@maxim_mazurok/gapi.client.discoveryengine-v1alpha 0.0.20230925 → 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.
Files changed (3) hide show
  1. package/index.d.ts +200 -1
  2. package/package.json +1 -1
  3. package/tests.ts +193 -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=v1alpha
12
- // Revision: 20230925
12
+ // Revision: 20231003
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -1301,6 +1301,8 @@ declare namespace gapi.client {
1301
1301
  /** Results of facets requested by user. */
1302
1302
  facets?:
1303
1303
  GoogleCloudDiscoveryengineV1alphaSearchResponseFacet[];
1304
+ geoSearchDebugInfo?:
1305
+ GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo[];
1304
1306
  /** Guided search result. */
1305
1307
  guidedSearchResult?:
1306
1308
  GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult;
@@ -1345,6 +1347,14 @@ declare namespace gapi.client {
1345
1347
  value?:
1346
1348
  string;
1347
1349
  }
1350
+ interface GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo {
1351
+ /** The error produced. */
1352
+ errorMessage?:
1353
+ string;
1354
+ /** The address from which forward geocoding ingestion produced issues. */
1355
+ originalAddressQuery?:
1356
+ string;
1357
+ }
1348
1358
  interface GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult {
1349
1359
  /** Suggested follow-up questions. */
1350
1360
  followUpQuestions?:
@@ -1699,6 +1709,9 @@ declare namespace gapi.client {
1699
1709
  /** Output only. Whether LLM is enabled in the corresponding data store. */
1700
1710
  llmEnabled?:
1701
1711
  boolean;
1712
+ /** Output only. Whether the customer accepted data use terms. */
1713
+ minimumDataTermAccepted?:
1714
+ boolean;
1702
1715
  /**
1703
1716
  * Immutable. The full resource name of the widget config. Format:
1704
1717
  * `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/widgetConfigs/{widget_config_id}`. This field must be a UTF-8 encoded string with a
@@ -1706,6 +1719,12 @@ declare namespace gapi.client {
1706
1719
  */
1707
1720
  name?:
1708
1721
  string;
1722
+ /**
1723
+ * The type of snippet to display in UCS widget. - RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new non-enterprise search users. - EXTRACTIVE_ANSWER for new
1724
+ * enterprise search users.
1725
+ */
1726
+ resultDisplayType?:
1727
+ string;
1709
1728
  /** Required. Immutable. Specifies the solution type that this WidgetConfig can be used for. */
1710
1729
  solutionType?:
1711
1730
  string;
@@ -4930,9 +4949,189 @@ declare namespace gapi.client {
4930
4949
  string;
4931
4950
  }): Request<GoogleLongrunningListOperationsResponse>;
4932
4951
  }
4952
+ interface ServingConfigsResource {
4953
+ /** Makes a recommendation, which requires a contextual user event. */
4954
+ recommend(request: {
4955
+ /** V1 error format. */
4956
+ "$.xgafv"?:
4957
+ string;
4958
+ /** OAuth access token. */
4959
+ access_token?:
4960
+ string;
4961
+ /** Data format for response. */
4962
+ alt?:
4963
+ string;
4964
+ /** JSONP */
4965
+ callback?:
4966
+ string;
4967
+ /** Selector specifying which fields to include in a partial response. */
4968
+ fields?:
4969
+ string;
4970
+ /** 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. */
4971
+ key?:
4972
+ string;
4973
+ /** OAuth 2.0 token for the current user. */
4974
+ oauth_token?:
4975
+ string;
4976
+ /** Returns response with indentations and line breaks. */
4977
+ prettyPrint?:
4978
+ boolean;
4979
+ /** 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. */
4980
+ quotaUser?:
4981
+ string;
4982
+ /**
4983
+ * Required. Full resource name of the format: `projects/*‍/locations/global/collections/*‍/dataStores/*‍/servingConfigs/*` Before you can request recommendations from your model,
4984
+ * you must create at least one serving config for it.
4985
+ */
4986
+ servingConfig:
4987
+ string;
4988
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4989
+ upload_protocol?:
4990
+ string;
4991
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4992
+ uploadType?:
4993
+ string;
4994
+ /** Request body */
4995
+ resource:
4996
+ GoogleCloudDiscoveryengineV1alphaRecommendRequest;
4997
+ }): Request<GoogleCloudDiscoveryengineV1alphaRecommendResponse>;
4998
+ recommend(request: {
4999
+ /** V1 error format. */
5000
+ "$.xgafv"?:
5001
+ string;
5002
+ /** OAuth access token. */
5003
+ access_token?:
5004
+ string;
5005
+ /** Data format for response. */
5006
+ alt?:
5007
+ string;
5008
+ /** JSONP */
5009
+ callback?:
5010
+ string;
5011
+ /** Selector specifying which fields to include in a partial response. */
5012
+ fields?:
5013
+ string;
5014
+ /** 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. */
5015
+ key?:
5016
+ string;
5017
+ /** OAuth 2.0 token for the current user. */
5018
+ oauth_token?:
5019
+ string;
5020
+ /** Returns response with indentations and line breaks. */
5021
+ prettyPrint?:
5022
+ boolean;
5023
+ /** 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. */
5024
+ quotaUser?:
5025
+ string;
5026
+ /**
5027
+ * Required. Full resource name of the format: `projects/*‍/locations/global/collections/*‍/dataStores/*‍/servingConfigs/*` Before you can request recommendations from your model,
5028
+ * you must create at least one serving config for it.
5029
+ */
5030
+ servingConfig:
5031
+ string;
5032
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5033
+ upload_protocol?:
5034
+ string;
5035
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5036
+ uploadType?:
5037
+ string;
5038
+ },
5039
+ body: GoogleCloudDiscoveryengineV1alphaRecommendRequest): Request<GoogleCloudDiscoveryengineV1alphaRecommendResponse>;
5040
+ /** Performs a search. */
5041
+ search(request: {
5042
+ /** V1 error format. */
5043
+ "$.xgafv"?:
5044
+ string;
5045
+ /** OAuth access token. */
5046
+ access_token?:
5047
+ string;
5048
+ /** Data format for response. */
5049
+ alt?:
5050
+ string;
5051
+ /** JSONP */
5052
+ callback?:
5053
+ string;
5054
+ /** Selector specifying which fields to include in a partial response. */
5055
+ fields?:
5056
+ string;
5057
+ /** 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. */
5058
+ key?:
5059
+ string;
5060
+ /** OAuth 2.0 token for the current user. */
5061
+ oauth_token?:
5062
+ string;
5063
+ /** Returns response with indentations and line breaks. */
5064
+ prettyPrint?:
5065
+ boolean;
5066
+ /** 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. */
5067
+ quotaUser?:
5068
+ string;
5069
+ /**
5070
+ * Required. The resource name of the Search serving config, such as
5071
+ * `projects/*‍/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving
5072
+ * configuration name, set of models used to make the search.
5073
+ */
5074
+ servingConfig:
5075
+ string;
5076
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5077
+ upload_protocol?:
5078
+ string;
5079
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5080
+ uploadType?:
5081
+ string;
5082
+ /** Request body */
5083
+ resource:
5084
+ GoogleCloudDiscoveryengineV1alphaSearchRequest;
5085
+ }): Request<GoogleCloudDiscoveryengineV1alphaSearchResponse>;
5086
+ search(request: {
5087
+ /** V1 error format. */
5088
+ "$.xgafv"?:
5089
+ string;
5090
+ /** OAuth access token. */
5091
+ access_token?:
5092
+ string;
5093
+ /** Data format for response. */
5094
+ alt?:
5095
+ string;
5096
+ /** JSONP */
5097
+ callback?:
5098
+ string;
5099
+ /** Selector specifying which fields to include in a partial response. */
5100
+ fields?:
5101
+ string;
5102
+ /** 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. */
5103
+ key?:
5104
+ string;
5105
+ /** OAuth 2.0 token for the current user. */
5106
+ oauth_token?:
5107
+ string;
5108
+ /** Returns response with indentations and line breaks. */
5109
+ prettyPrint?:
5110
+ boolean;
5111
+ /** 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. */
5112
+ quotaUser?:
5113
+ string;
5114
+ /**
5115
+ * Required. The resource name of the Search serving config, such as
5116
+ * `projects/*‍/locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`. This field is used to identify the serving
5117
+ * configuration name, set of models used to make the search.
5118
+ */
5119
+ servingConfig:
5120
+ string;
5121
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
5122
+ upload_protocol?:
5123
+ string;
5124
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
5125
+ uploadType?:
5126
+ string;
5127
+ },
5128
+ body: GoogleCloudDiscoveryengineV1alphaSearchRequest): Request<GoogleCloudDiscoveryengineV1alphaSearchResponse>;
5129
+ }
4933
5130
  interface EnginesResource {
4934
5131
  operations:
4935
5132
  OperationsResource;
5133
+ servingConfigs:
5134
+ ServingConfigsResource;
4936
5135
  }
4937
5136
  interface OperationsResource {
4938
5137
  /** 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1alpha",
3
- "version": "0.0.20230925",
3
+ "version": "0.0.20231003",
4
4
  "description": "TypeScript typings for Discovery Engine API v1alpha",
5
5
  "license": "MIT",
6
6
  "author": {
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: 20230925
6
+ // Revision: 20231003
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -1105,6 +1105,198 @@ gapi.load('client', async () => {
1105
1105
  pageSize: 42,
1106
1106
  pageToken: "Test string",
1107
1107
  });
1108
+ /** Makes a recommendation, which requires a contextual user event. */
1109
+ await gapi.client.discoveryengine.projects.locations.collections.engines.servingConfigs.recommend({
1110
+ servingConfig: "Test string",
1111
+ }, {
1112
+ filter: "Test string",
1113
+ pageSize: 42,
1114
+ params: {
1115
+ A: 42
1116
+ },
1117
+ userEvent: {
1118
+ attributes: {
1119
+ A: {
1120
+ numbers: [
1121
+ 42
1122
+ ],
1123
+ text: [
1124
+ "Test string"
1125
+ ],
1126
+ }
1127
+ },
1128
+ attributionToken: "Test string",
1129
+ completionInfo: {
1130
+ selectedPosition: 42,
1131
+ selectedSuggestion: "Test string",
1132
+ },
1133
+ directUserRequest: true,
1134
+ documents: [
1135
+ {
1136
+ id: "Test string",
1137
+ name: "Test string",
1138
+ promotionIds: [
1139
+ "Test string"
1140
+ ],
1141
+ quantity: 42,
1142
+ uri: "Test string",
1143
+ }
1144
+ ],
1145
+ eventTime: "Test string",
1146
+ eventType: "Test string",
1147
+ filter: "Test string",
1148
+ mediaInfo: {
1149
+ mediaProgressDuration: "Test string",
1150
+ mediaProgressPercentage: 42,
1151
+ },
1152
+ pageInfo: {
1153
+ pageCategory: "Test string",
1154
+ pageviewId: "Test string",
1155
+ referrerUri: "Test string",
1156
+ uri: "Test string",
1157
+ },
1158
+ panel: {
1159
+ displayName: "Test string",
1160
+ panelId: "Test string",
1161
+ panelPosition: 42,
1162
+ totalPanels: 42,
1163
+ },
1164
+ promotionIds: [
1165
+ "Test string"
1166
+ ],
1167
+ searchInfo: {
1168
+ offset: 42,
1169
+ orderBy: "Test string",
1170
+ searchQuery: "Test string",
1171
+ },
1172
+ sessionId: "Test string",
1173
+ tagIds: [
1174
+ "Test string"
1175
+ ],
1176
+ transactionInfo: {
1177
+ cost: 42,
1178
+ currency: "Test string",
1179
+ discountValue: 42,
1180
+ tax: 42,
1181
+ transactionId: "Test string",
1182
+ value: 42,
1183
+ },
1184
+ userInfo: {
1185
+ userAgent: "Test string",
1186
+ userId: "Test string",
1187
+ },
1188
+ userPseudoId: "Test string",
1189
+ },
1190
+ userLabels: {
1191
+ A: "Test string"
1192
+ },
1193
+ validateOnly: true,
1194
+ });
1195
+ /** Performs a search. */
1196
+ await gapi.client.discoveryengine.projects.locations.collections.engines.servingConfigs.search({
1197
+ servingConfig: "Test string",
1198
+ }, {
1199
+ boostSpec: {
1200
+ conditionBoostSpecs: [
1201
+ {
1202
+ boost: 42,
1203
+ condition: "Test string",
1204
+ }
1205
+ ],
1206
+ },
1207
+ branch: "Test string",
1208
+ contentSearchSpec: {
1209
+ extractiveContentSpec: {
1210
+ maxExtractiveAnswerCount: 42,
1211
+ maxExtractiveSegmentCount: 42,
1212
+ numNextSegments: 42,
1213
+ numPreviousSegments: 42,
1214
+ },
1215
+ snippetSpec: {
1216
+ maxSnippetCount: 42,
1217
+ referenceOnly: true,
1218
+ returnSnippet: true,
1219
+ },
1220
+ summarySpec: {
1221
+ ignoreAdversarialQuery: true,
1222
+ ignoreNonSummarySeekingQuery: true,
1223
+ includeCitations: true,
1224
+ languageCode: "Test string",
1225
+ summaryResultCount: 42,
1226
+ },
1227
+ },
1228
+ embeddingSpec: {
1229
+ embeddingVectors: [
1230
+ {
1231
+ fieldPath: "Test string",
1232
+ vector: [
1233
+ 42
1234
+ ],
1235
+ }
1236
+ ],
1237
+ },
1238
+ facetSpecs: [
1239
+ {
1240
+ enableDynamicPosition: true,
1241
+ excludedFilterKeys: [
1242
+ "Test string"
1243
+ ],
1244
+ facetKey: {
1245
+ caseInsensitive: true,
1246
+ contains: [
1247
+ "Test string"
1248
+ ],
1249
+ intervals: [
1250
+ {
1251
+ exclusiveMaximum: 42,
1252
+ exclusiveMinimum: 42,
1253
+ maximum: 42,
1254
+ minimum: 42,
1255
+ }
1256
+ ],
1257
+ key: "Test string",
1258
+ orderBy: "Test string",
1259
+ prefixes: [
1260
+ "Test string"
1261
+ ],
1262
+ restrictedValues: [
1263
+ "Test string"
1264
+ ],
1265
+ },
1266
+ limit: 42,
1267
+ }
1268
+ ],
1269
+ filter: "Test string",
1270
+ imageQuery: {
1271
+ imageBytes: "Test string",
1272
+ },
1273
+ offset: 42,
1274
+ orderBy: "Test string",
1275
+ pageSize: 42,
1276
+ pageToken: "Test string",
1277
+ params: {
1278
+ A: 42
1279
+ },
1280
+ query: "Test string",
1281
+ queryExpansionSpec: {
1282
+ condition: "Test string",
1283
+ pinUnexpandedResults: true,
1284
+ },
1285
+ rankingExpression: "Test string",
1286
+ safeSearch: true,
1287
+ servingConfig: "Test string",
1288
+ spellCorrectionSpec: {
1289
+ mode: "Test string",
1290
+ },
1291
+ userInfo: {
1292
+ userAgent: "Test string",
1293
+ userId: "Test string",
1294
+ },
1295
+ userLabels: {
1296
+ A: "Test string"
1297
+ },
1298
+ userPseudoId: "Test string",
1299
+ });
1108
1300
  /** 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. */
1109
1301
  await gapi.client.discoveryengine.projects.locations.collections.operations.get({
1110
1302
  name: "Test string",