Skip to content

Commit b4895ac

Browse files
add updates
1 parent 0795301 commit b4895ac

4 files changed

Lines changed: 197 additions & 0 deletions

File tree

src/Aisearch/AisearchClient.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
/**
3+
* Aisearch
4+
*
5+
* @category Jdcloud
6+
* @package Jdcloud\Aisearch
7+
* @author Jdcloud <jdcloud-api@jd.com>
8+
* @license Apache-2.0 http://www.apache.org/licenses/LICENSE-2.0
9+
* @link https://www.jdcloud.com/help/faq
10+
*/
11+
12+
namespace Jdcloud\Aisearch;
13+
14+
use Jdcloud\JdCloudClient;
15+
use Jdcloud\Api\Service;
16+
use Jdcloud\Api\DocModel;
17+
use Jdcloud\Api\ApiProvider;
18+
use Jdcloud\PresignUrlMiddleware;
19+
20+
/**
21+
* Client used to interact with aisearch.
22+
*
23+
* @method \Jdcloud\Result externalWebSearch(array $args = [])
24+
* @method \GuzzleHttp\Promise\Promise externalWebSearchAsync(array $args = [])
25+
*/
26+
class AisearchClient extends JdCloudClient
27+
{
28+
public function __construct(array $args)
29+
{
30+
$args['with_resolved'] = function (array $args) {
31+
$this->getHandlerList()->appendInit(
32+
PresignUrlMiddleware::wrap(
33+
$this,
34+
$args['endpoint_provider'],
35+
[
36+
'operations' => [
37+
],
38+
'service' => 'aisearch',
39+
'presign_param' => 'PresignedUrl',
40+
]
41+
),
42+
'aisearch'
43+
);
44+
};
45+
46+
parent::__construct($args);
47+
}
48+
}

src/Aisearch/ChangeLog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 更新历史 #
2+
3+
API版本:0.1.0
4+
5+
| 发布时间 | 版本号 | 更新 | 说明 |
6+
|------------|-------|-------|------|
7+
| 2025-04-29 | 0.1.0 | MVP版本 | 基础功能 |
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<?php
2+
// This file was auto-generated
3+
return [
4+
// 'version' => '',
5+
'metadata' =>
6+
[
7+
// 'apiVersion' => '',
8+
// 'endpointPrefix' => 'aisearch',
9+
'protocol' => 'json',
10+
// 'serviceFullName' => 'aisearch',
11+
// 'serviceId' => 'aisearch',
12+
],
13+
'operations' => [
14+
'ExternalWebSearch' => [
15+
'name' => 'ExternalWebSearch',
16+
'http' => [
17+
'method' => 'POST',
18+
'requestUri' => '/v1/external:webSearch',
19+
],
20+
'input' => [ 'shape' => 'ExternalWebSearchRequestShape', ],
21+
'output' => [ 'shape' => 'ExternalWebSearchResponseShape', ],
22+
],
23+
],
24+
'shapes' => [
25+
'AccountUsageStatisticsRespVo' => [
26+
'type' => 'structure',
27+
'members' => [
28+
'totalCallCount' => [ 'type' => 'long', 'locationName' => 'totalCallCount', ],
29+
'todayCallCount' => [ 'type' => 'long', 'locationName' => 'todayCallCount', ],
30+
'yesterdayCallCount' => [ 'type' => 'long', 'locationName' => 'yesterdayCallCount', ],
31+
'thisMonthCallCount' => [ 'type' => 'long', 'locationName' => 'thisMonthCallCount', ],
32+
],
33+
],
34+
'CallCountDataVo' => [
35+
'type' => 'structure',
36+
'members' => [
37+
'date' => [ 'type' => 'string', 'locationName' => 'date', ],
38+
'callCount' => [ 'type' => 'long', 'locationName' => 'callCount', ],
39+
],
40+
],
41+
'AccountUsageSearchRespVo' => [
42+
'type' => 'structure',
43+
'members' => [
44+
'callCountDataList' => [ 'type' => 'list', 'member' => [ 'shape' => 'CallCountDataVo', ], ],
45+
],
46+
],
47+
'AccountBalanceRespVo' => [
48+
'type' => 'structure',
49+
'members' => [
50+
'totalResourcePackageCount' => [ 'type' => 'long', 'locationName' => 'totalResourcePackageCount', ],
51+
'validResourcePackageCount' => [ 'type' => 'long', 'locationName' => 'validResourcePackageCount', ],
52+
'invalidResourcePackageCount' => [ 'type' => 'long', 'locationName' => 'invalidResourcePackageCount', ],
53+
'remainCallTimes' => [ 'type' => 'long', 'locationName' => 'remainCallTimes', ],
54+
],
55+
],
56+
'UserApiKeyVo' => [
57+
'type' => 'structure',
58+
'members' => [
59+
'keyNo' => [ 'type' => 'string', 'locationName' => 'keyNo', ],
60+
'apiKey' => [ 'type' => 'string', 'locationName' => 'apiKey', ],
61+
'pin' => [ 'type' => 'string', 'locationName' => 'pin', ],
62+
'userType' => [ 'type' => 'string', 'locationName' => 'userType', ],
63+
'apiKeyName' => [ 'type' => 'string', 'locationName' => 'apiKeyName', ],
64+
'createdDate' => [ 'type' => 'string', 'locationName' => 'createdDate', ],
65+
'deletedFlag' => [ 'type' => 'integer', 'locationName' => 'deletedFlag', ],
66+
],
67+
],
68+
'ImageItemVo' => [
69+
'type' => 'structure',
70+
'members' => [
71+
'name' => [ 'type' => 'string', 'locationName' => 'name', ],
72+
'datePublished' => [ 'type' => 'string', 'locationName' => 'datePublished', ],
73+
'hostPageUrl' => [ 'type' => 'string', 'locationName' => 'hostPageUrl', ],
74+
'contentUrl' => [ 'type' => 'string', 'locationName' => 'contentUrl', ],
75+
'contentSize' => [ 'type' => 'string', 'locationName' => 'contentSize', ],
76+
'encodingFormat' => [ 'type' => 'string', 'locationName' => 'encodingFormat', ],
77+
'width' => [ 'type' => 'integer', 'locationName' => 'width', ],
78+
'height' => [ 'type' => 'integer', 'locationName' => 'height', ],
79+
'thumbnailUrl' => [ 'type' => 'string', 'locationName' => 'thumbnailUrl', ],
80+
'thumbnailWidth' => [ 'type' => 'integer', 'locationName' => 'thumbnailWidth', ],
81+
'thumbnailHeight' => [ 'type' => 'integer', 'locationName' => 'thumbnailHeight', ],
82+
],
83+
],
84+
'QueryContextVo' => [
85+
'type' => 'structure',
86+
'members' => [
87+
'query' => [ 'type' => 'string', 'locationName' => 'query', ],
88+
],
89+
],
90+
'CloudWebSearchResponseVo' => [
91+
'type' => 'structure',
92+
'members' => [
93+
'queryContext' => [ 'shape' => 'QueryContextVo', ],
94+
'pageItems' => [ 'type' => 'list', 'member' => [ 'shape' => 'PageItemVo', ], ],
95+
'imageItems' => [ 'type' => 'list', 'member' => [ 'shape' => 'ImageItemVo', ], ],
96+
],
97+
],
98+
'PageItemVo' => [
99+
'type' => 'structure',
100+
'members' => [
101+
'id' => [ 'type' => 'string', 'locationName' => 'id', ],
102+
'title' => [ 'type' => 'string', 'locationName' => 'title', ],
103+
'url' => [ 'type' => 'string', 'locationName' => 'url', ],
104+
'icon' => [ 'type' => 'string', 'locationName' => 'icon', ],
105+
'siteName' => [ 'type' => 'string', 'locationName' => 'siteName', ],
106+
'snippet' => [ 'type' => 'string', 'locationName' => 'snippet', ],
107+
'summary' => [ 'type' => 'string', 'locationName' => 'summary', ],
108+
'dateLastCrawled' => [ 'type' => 'string', 'locationName' => 'dateLastCrawled', ],
109+
],
110+
],
111+
'ExternalWebSearchResultShape' => [
112+
'type' => 'structure',
113+
'members' => [
114+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
115+
'code' => [ 'type' => 'string', 'locationName' => 'code', ],
116+
'msg' => [ 'type' => 'string', 'locationName' => 'msg', ],
117+
'data' => [ 'shape' => 'CloudWebSearchResponseVo', ],
118+
],
119+
],
120+
'ExternalWebSearchResponseShape' => [
121+
'type' => 'structure',
122+
'members' => [
123+
'result' => [ 'shape' => 'ExternalWebSearchResultShape', ],
124+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
125+
],
126+
],
127+
'ExternalWebSearchRequestShape' => [
128+
'type' => 'structure',
129+
'members' => [
130+
'apiKey' => [ 'type' => 'string', 'locationName' => 'apiKey', ],
131+
'requestId' => [ 'type' => 'string', 'locationName' => 'requestId', ],
132+
'query' => [ 'type' => 'string', 'locationName' => 'query', ],
133+
'page' => [ 'type' => 'integer', 'locationName' => 'page', ],
134+
'pageSize' => [ 'type' => 'integer', 'locationName' => 'pageSize', ],
135+
],
136+
],
137+
],
138+
];

src/data/manifest.json.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@
209209
'namespace' => 'Yunding',
210210
'versions' => [ 'latest' => 'v2', ],
211211
],
212+
'aisearch' => [
213+
'namespace' => 'Aisearch',
214+
'versions' => [ 'latest' => 'v1', ],
215+
],
212216
'cp' => [
213217
'namespace' => 'Cp',
214218
'versions' => [ 'latest' => 'v1', ],

0 commit comments

Comments
 (0)