@maxim_mazurok/gapi.client.discoveryengine-v1beta 0.0.20230928 → 0.0.20231003
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +181 -1
- package/package.json +1 -1
- package/tests.ts +192 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://discoveryengine.googleapis.com/$discovery/rest?version=v1beta
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20231003
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -4190,9 +4190,189 @@ declare namespace gapi.client {
|
|
|
4190
4190
|
string;
|
|
4191
4191
|
}): Request<GoogleLongrunningListOperationsResponse>;
|
|
4192
4192
|
}
|
|
4193
|
+
interface ServingConfigsResource {
|
|
4194
|
+
/** Makes a recommendation, which requires a contextual user event. */
|
|
4195
|
+
recommend(request: {
|
|
4196
|
+
/** V1 error format. */
|
|
4197
|
+
"$.xgafv"?:
|
|
4198
|
+
string;
|
|
4199
|
+
/** OAuth access token. */
|
|
4200
|
+
access_token?:
|
|
4201
|
+
string;
|
|
4202
|
+
/** Data format for response. */
|
|
4203
|
+
alt?:
|
|
4204
|
+
string;
|
|
4205
|
+
/** JSONP */
|
|
4206
|
+
callback?:
|
|
4207
|
+
string;
|
|
4208
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
4209
|
+
fields?:
|
|
4210
|
+
string;
|
|
4211
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
4212
|
+
key?:
|
|
4213
|
+
string;
|
|
4214
|
+
/** OAuth 2.0 token for the current user. */
|
|
4215
|
+
oauth_token?:
|
|
4216
|
+
string;
|
|
4217
|
+
/** Returns response with indentations and line breaks. */
|
|
4218
|
+
prettyPrint?:
|
|
4219
|
+
boolean;
|
|
4220
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
4221
|
+
quotaUser?:
|
|
4222
|
+
string;
|
|
4223
|
+
/**
|
|
4224
|
+
* Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model,
|
|
4225
|
+
* you must create at least one serving config for it.
|
|
4226
|
+
*/
|
|
4227
|
+
servingConfig:
|
|
4228
|
+
string;
|
|
4229
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
4230
|
+
upload_protocol?:
|
|
4231
|
+
string;
|
|
4232
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
4233
|
+
uploadType?:
|
|
4234
|
+
string;
|
|
4235
|
+
/** Request body */
|
|
4236
|
+
resource:
|
|
4237
|
+
GoogleCloudDiscoveryengineV1betaRecommendRequest;
|
|
4238
|
+
}): Request<GoogleCloudDiscoveryengineV1betaRecommendResponse>;
|
|
4239
|
+
recommend(request: {
|
|
4240
|
+
/** V1 error format. */
|
|
4241
|
+
"$.xgafv"?:
|
|
4242
|
+
string;
|
|
4243
|
+
/** OAuth access token. */
|
|
4244
|
+
access_token?:
|
|
4245
|
+
string;
|
|
4246
|
+
/** Data format for response. */
|
|
4247
|
+
alt?:
|
|
4248
|
+
string;
|
|
4249
|
+
/** JSONP */
|
|
4250
|
+
callback?:
|
|
4251
|
+
string;
|
|
4252
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
4253
|
+
fields?:
|
|
4254
|
+
string;
|
|
4255
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
4256
|
+
key?:
|
|
4257
|
+
string;
|
|
4258
|
+
/** OAuth 2.0 token for the current user. */
|
|
4259
|
+
oauth_token?:
|
|
4260
|
+
string;
|
|
4261
|
+
/** Returns response with indentations and line breaks. */
|
|
4262
|
+
prettyPrint?:
|
|
4263
|
+
boolean;
|
|
4264
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
4265
|
+
quotaUser?:
|
|
4266
|
+
string;
|
|
4267
|
+
/**
|
|
4268
|
+
* Required. Full resource name of the format: `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*` Before you can request recommendations from your model,
|
|
4269
|
+
* you must create at least one serving config for it.
|
|
4270
|
+
*/
|
|
4271
|
+
servingConfig:
|
|
4272
|
+
string;
|
|
4273
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
4274
|
+
upload_protocol?:
|
|
4275
|
+
string;
|
|
4276
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
4277
|
+
uploadType?:
|
|
4278
|
+
string;
|
|
4279
|
+
},
|
|
4280
|
+
body: GoogleCloudDiscoveryengineV1betaRecommendRequest): Request<GoogleCloudDiscoveryengineV1betaRecommendResponse>;
|
|
4281
|
+
/** Performs a search. */
|
|
4282
|
+
search(request: {
|
|
4283
|
+
/** V1 error format. */
|
|
4284
|
+
"$.xgafv"?:
|
|
4285
|
+
string;
|
|
4286
|
+
/** OAuth access token. */
|
|
4287
|
+
access_token?:
|
|
4288
|
+
string;
|
|
4289
|
+
/** Data format for response. */
|
|
4290
|
+
alt?:
|
|
4291
|
+
string;
|
|
4292
|
+
/** JSONP */
|
|
4293
|
+
callback?:
|
|
4294
|
+
string;
|
|
4295
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
4296
|
+
fields?:
|
|
4297
|
+
string;
|
|
4298
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
4299
|
+
key?:
|
|
4300
|
+
string;
|
|
4301
|
+
/** OAuth 2.0 token for the current user. */
|
|
4302
|
+
oauth_token?:
|
|
4303
|
+
string;
|
|
4304
|
+
/** Returns response with indentations and line breaks. */
|
|
4305
|
+
prettyPrint?:
|
|
4306
|
+
boolean;
|
|
4307
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
4308
|
+
quotaUser?:
|
|
4309
|
+
string;
|
|
4310
|
+
/**
|
|
4311
|
+
* Required. The resource name of the Search serving config, such as
|
|
4312
|
+
* `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving
|
|
4313
|
+
* configuration name, set of models used to make the search.
|
|
4314
|
+
*/
|
|
4315
|
+
servingConfig:
|
|
4316
|
+
string;
|
|
4317
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
4318
|
+
upload_protocol?:
|
|
4319
|
+
string;
|
|
4320
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
4321
|
+
uploadType?:
|
|
4322
|
+
string;
|
|
4323
|
+
/** Request body */
|
|
4324
|
+
resource:
|
|
4325
|
+
GoogleCloudDiscoveryengineV1betaSearchRequest;
|
|
4326
|
+
}): Request<GoogleCloudDiscoveryengineV1betaSearchResponse>;
|
|
4327
|
+
search(request: {
|
|
4328
|
+
/** V1 error format. */
|
|
4329
|
+
"$.xgafv"?:
|
|
4330
|
+
string;
|
|
4331
|
+
/** OAuth access token. */
|
|
4332
|
+
access_token?:
|
|
4333
|
+
string;
|
|
4334
|
+
/** Data format for response. */
|
|
4335
|
+
alt?:
|
|
4336
|
+
string;
|
|
4337
|
+
/** JSONP */
|
|
4338
|
+
callback?:
|
|
4339
|
+
string;
|
|
4340
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
4341
|
+
fields?:
|
|
4342
|
+
string;
|
|
4343
|
+
/** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
|
|
4344
|
+
key?:
|
|
4345
|
+
string;
|
|
4346
|
+
/** OAuth 2.0 token for the current user. */
|
|
4347
|
+
oauth_token?:
|
|
4348
|
+
string;
|
|
4349
|
+
/** Returns response with indentations and line breaks. */
|
|
4350
|
+
prettyPrint?:
|
|
4351
|
+
boolean;
|
|
4352
|
+
/** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
|
|
4353
|
+
quotaUser?:
|
|
4354
|
+
string;
|
|
4355
|
+
/**
|
|
4356
|
+
* Required. The resource name of the Search serving config, such as
|
|
4357
|
+
* `projects/*/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving
|
|
4358
|
+
* configuration name, set of models used to make the search.
|
|
4359
|
+
*/
|
|
4360
|
+
servingConfig:
|
|
4361
|
+
string;
|
|
4362
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
4363
|
+
upload_protocol?:
|
|
4364
|
+
string;
|
|
4365
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
4366
|
+
uploadType?:
|
|
4367
|
+
string;
|
|
4368
|
+
},
|
|
4369
|
+
body: GoogleCloudDiscoveryengineV1betaSearchRequest): Request<GoogleCloudDiscoveryengineV1betaSearchResponse>;
|
|
4370
|
+
}
|
|
4193
4371
|
interface EnginesResource {
|
|
4194
4372
|
operations:
|
|
4195
4373
|
OperationsResource;
|
|
4374
|
+
servingConfigs:
|
|
4375
|
+
ServingConfigsResource;
|
|
4196
4376
|
}
|
|
4197
4377
|
interface OperationsResource {
|
|
4198
4378
|
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
package/package.json
CHANGED
package/tests.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
4
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
5
|
|
|
6
|
-
// Revision:
|
|
6
|
+
// Revision: 20231003
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -843,6 +843,197 @@ gapi.load('client', async () => {
|
|
|
843
843
|
pageSize: 42,
|
|
844
844
|
pageToken: "Test string",
|
|
845
845
|
});
|
|
846
|
+
/** Makes a recommendation, which requires a contextual user event. */
|
|
847
|
+
await gapi.client.discoveryengine.projects.locations.collections.engines.servingConfigs.recommend({
|
|
848
|
+
servingConfig: "Test string",
|
|
849
|
+
}, {
|
|
850
|
+
filter: "Test string",
|
|
851
|
+
pageSize: 42,
|
|
852
|
+
params: {
|
|
853
|
+
A: 42
|
|
854
|
+
},
|
|
855
|
+
userEvent: {
|
|
856
|
+
attributes: {
|
|
857
|
+
A: {
|
|
858
|
+
numbers: [
|
|
859
|
+
42
|
|
860
|
+
],
|
|
861
|
+
text: [
|
|
862
|
+
"Test string"
|
|
863
|
+
],
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
attributionToken: "Test string",
|
|
867
|
+
completionInfo: {
|
|
868
|
+
selectedPosition: 42,
|
|
869
|
+
selectedSuggestion: "Test string",
|
|
870
|
+
},
|
|
871
|
+
directUserRequest: true,
|
|
872
|
+
documents: [
|
|
873
|
+
{
|
|
874
|
+
id: "Test string",
|
|
875
|
+
name: "Test string",
|
|
876
|
+
promotionIds: [
|
|
877
|
+
"Test string"
|
|
878
|
+
],
|
|
879
|
+
quantity: 42,
|
|
880
|
+
uri: "Test string",
|
|
881
|
+
}
|
|
882
|
+
],
|
|
883
|
+
eventTime: "Test string",
|
|
884
|
+
eventType: "Test string",
|
|
885
|
+
filter: "Test string",
|
|
886
|
+
mediaInfo: {
|
|
887
|
+
mediaProgressDuration: "Test string",
|
|
888
|
+
mediaProgressPercentage: 42,
|
|
889
|
+
},
|
|
890
|
+
pageInfo: {
|
|
891
|
+
pageCategory: "Test string",
|
|
892
|
+
pageviewId: "Test string",
|
|
893
|
+
referrerUri: "Test string",
|
|
894
|
+
uri: "Test string",
|
|
895
|
+
},
|
|
896
|
+
panel: {
|
|
897
|
+
displayName: "Test string",
|
|
898
|
+
panelId: "Test string",
|
|
899
|
+
panelPosition: 42,
|
|
900
|
+
totalPanels: 42,
|
|
901
|
+
},
|
|
902
|
+
promotionIds: [
|
|
903
|
+
"Test string"
|
|
904
|
+
],
|
|
905
|
+
searchInfo: {
|
|
906
|
+
offset: 42,
|
|
907
|
+
orderBy: "Test string",
|
|
908
|
+
searchQuery: "Test string",
|
|
909
|
+
},
|
|
910
|
+
sessionId: "Test string",
|
|
911
|
+
tagIds: [
|
|
912
|
+
"Test string"
|
|
913
|
+
],
|
|
914
|
+
transactionInfo: {
|
|
915
|
+
cost: 42,
|
|
916
|
+
currency: "Test string",
|
|
917
|
+
discountValue: 42,
|
|
918
|
+
tax: 42,
|
|
919
|
+
transactionId: "Test string",
|
|
920
|
+
value: 42,
|
|
921
|
+
},
|
|
922
|
+
userInfo: {
|
|
923
|
+
userAgent: "Test string",
|
|
924
|
+
userId: "Test string",
|
|
925
|
+
},
|
|
926
|
+
userPseudoId: "Test string",
|
|
927
|
+
},
|
|
928
|
+
userLabels: {
|
|
929
|
+
A: "Test string"
|
|
930
|
+
},
|
|
931
|
+
validateOnly: true,
|
|
932
|
+
});
|
|
933
|
+
/** Performs a search. */
|
|
934
|
+
await gapi.client.discoveryengine.projects.locations.collections.engines.servingConfigs.search({
|
|
935
|
+
servingConfig: "Test string",
|
|
936
|
+
}, {
|
|
937
|
+
boostSpec: {
|
|
938
|
+
conditionBoostSpecs: [
|
|
939
|
+
{
|
|
940
|
+
boost: 42,
|
|
941
|
+
condition: "Test string",
|
|
942
|
+
}
|
|
943
|
+
],
|
|
944
|
+
},
|
|
945
|
+
branch: "Test string",
|
|
946
|
+
contentSearchSpec: {
|
|
947
|
+
extractiveContentSpec: {
|
|
948
|
+
maxExtractiveAnswerCount: 42,
|
|
949
|
+
maxExtractiveSegmentCount: 42,
|
|
950
|
+
numNextSegments: 42,
|
|
951
|
+
numPreviousSegments: 42,
|
|
952
|
+
},
|
|
953
|
+
snippetSpec: {
|
|
954
|
+
maxSnippetCount: 42,
|
|
955
|
+
referenceOnly: true,
|
|
956
|
+
returnSnippet: true,
|
|
957
|
+
},
|
|
958
|
+
summarySpec: {
|
|
959
|
+
ignoreAdversarialQuery: true,
|
|
960
|
+
ignoreNonSummarySeekingQuery: true,
|
|
961
|
+
includeCitations: true,
|
|
962
|
+
languageCode: "Test string",
|
|
963
|
+
summaryResultCount: 42,
|
|
964
|
+
},
|
|
965
|
+
},
|
|
966
|
+
embeddingSpec: {
|
|
967
|
+
embeddingVectors: [
|
|
968
|
+
{
|
|
969
|
+
fieldPath: "Test string",
|
|
970
|
+
vector: [
|
|
971
|
+
42
|
|
972
|
+
],
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
},
|
|
976
|
+
facetSpecs: [
|
|
977
|
+
{
|
|
978
|
+
enableDynamicPosition: true,
|
|
979
|
+
excludedFilterKeys: [
|
|
980
|
+
"Test string"
|
|
981
|
+
],
|
|
982
|
+
facetKey: {
|
|
983
|
+
caseInsensitive: true,
|
|
984
|
+
contains: [
|
|
985
|
+
"Test string"
|
|
986
|
+
],
|
|
987
|
+
intervals: [
|
|
988
|
+
{
|
|
989
|
+
exclusiveMaximum: 42,
|
|
990
|
+
exclusiveMinimum: 42,
|
|
991
|
+
maximum: 42,
|
|
992
|
+
minimum: 42,
|
|
993
|
+
}
|
|
994
|
+
],
|
|
995
|
+
key: "Test string",
|
|
996
|
+
orderBy: "Test string",
|
|
997
|
+
prefixes: [
|
|
998
|
+
"Test string"
|
|
999
|
+
],
|
|
1000
|
+
restrictedValues: [
|
|
1001
|
+
"Test string"
|
|
1002
|
+
],
|
|
1003
|
+
},
|
|
1004
|
+
limit: 42,
|
|
1005
|
+
}
|
|
1006
|
+
],
|
|
1007
|
+
filter: "Test string",
|
|
1008
|
+
imageQuery: {
|
|
1009
|
+
imageBytes: "Test string",
|
|
1010
|
+
},
|
|
1011
|
+
offset: 42,
|
|
1012
|
+
orderBy: "Test string",
|
|
1013
|
+
pageSize: 42,
|
|
1014
|
+
pageToken: "Test string",
|
|
1015
|
+
params: {
|
|
1016
|
+
A: 42
|
|
1017
|
+
},
|
|
1018
|
+
query: "Test string",
|
|
1019
|
+
queryExpansionSpec: {
|
|
1020
|
+
condition: "Test string",
|
|
1021
|
+
pinUnexpandedResults: true,
|
|
1022
|
+
},
|
|
1023
|
+
rankingExpression: "Test string",
|
|
1024
|
+
safeSearch: true,
|
|
1025
|
+
spellCorrectionSpec: {
|
|
1026
|
+
mode: "Test string",
|
|
1027
|
+
},
|
|
1028
|
+
userInfo: {
|
|
1029
|
+
userAgent: "Test string",
|
|
1030
|
+
userId: "Test string",
|
|
1031
|
+
},
|
|
1032
|
+
userLabels: {
|
|
1033
|
+
A: "Test string"
|
|
1034
|
+
},
|
|
1035
|
+
userPseudoId: "Test string",
|
|
1036
|
+
});
|
|
846
1037
|
/** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
|
|
847
1038
|
await gapi.client.discoveryengine.projects.locations.collections.operations.get({
|
|
848
1039
|
name: "Test string",
|