@google-cloud/discoveryengine 2.1.0 → 2.3.0
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/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +17 -0
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/cmek_config_service.proto +300 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +67 -0
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +1 -3
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +95 -4
- package/build/protos/google/cloud/discoveryengine/v1/document_processing_config.proto +28 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +131 -6
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +8 -0
- package/build/protos/google/cloud/discoveryengine/v1/grounding.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto +84 -0
- package/build/protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto +375 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_license_service.proto +191 -0
- package/build/protos/protos.d.ts +5415 -578
- package/build/protos/protos.js +77830 -63391
- package/build/protos/protos.json +1537 -92
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +8 -22
- package/build/src/v1/cmek_config_service_client.d.ts +2287 -0
- package/build/src/v1/cmek_config_service_client.js +3274 -0
- package/build/src/v1/cmek_config_service_client_config.json +42 -0
- package/build/src/v1/cmek_config_service_proto_list.json +44 -0
- package/build/src/v1/completion_service_client.d.ts +166 -76
- package/build/src/v1/completion_service_client.js +258 -263
- package/build/src/v1/completion_service_proto_list.json +6 -1
- package/build/src/v1/control_service_client.d.ts +171 -81
- package/build/src/v1/control_service_client.js +246 -132
- package/build/src/v1/control_service_proto_list.json +6 -1
- package/build/src/v1/conversational_search_service_client.d.ts +233 -143
- package/build/src/v1/conversational_search_service_client.js +330 -226
- package/build/src/v1/conversational_search_service_proto_list.json +6 -1
- package/build/src/v1/data_store_service_client.d.ts +218 -122
- package/build/src/v1/data_store_service_client.js +273 -281
- package/build/src/v1/data_store_service_proto_list.json +6 -1
- package/build/src/v1/document_service_client.d.ts +210 -120
- package/build/src/v1/document_service_client.js +300 -301
- package/build/src/v1/document_service_proto_list.json +6 -1
- package/build/src/v1/engine_service_client.d.ts +193 -103
- package/build/src/v1/engine_service_client.js +273 -280
- package/build/src/v1/engine_service_proto_list.json +6 -1
- package/build/src/v1/gapic_metadata.json +184 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +138 -48
- package/build/src/v1/grounded_generation_service_client.js +217 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +6 -1
- package/build/src/v1/identity_mapping_store_service_client.d.ts +2470 -0
- package/build/src/v1/identity_mapping_store_service_client.js +3449 -0
- package/build/src/v1/identity_mapping_store_service_client_config.json +54 -0
- package/build/src/v1/identity_mapping_store_service_proto_list.json +44 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/project_service_client.d.ts +166 -76
- package/build/src/v1/project_service_client.js +235 -223
- package/build/src/v1/project_service_proto_list.json +6 -1
- package/build/src/v1/rank_service_client.d.ts +137 -47
- package/build/src/v1/rank_service_client.js +204 -85
- package/build/src/v1/rank_service_proto_list.json +6 -1
- package/build/src/v1/recommendation_service_client.d.ts +137 -47
- package/build/src/v1/recommendation_service_client.js +202 -82
- package/build/src/v1/recommendation_service_proto_list.json +6 -1
- package/build/src/v1/schema_service_client.d.ts +201 -111
- package/build/src/v1/schema_service_client.js +264 -274
- package/build/src/v1/schema_service_proto_list.json +6 -1
- package/build/src/v1/search_service_client.d.ts +661 -571
- package/build/src/v1/search_service_client.js +216 -113
- package/build/src/v1/search_service_proto_list.json +6 -1
- package/build/src/v1/search_tuning_service_client.d.ts +167 -77
- package/build/src/v1/search_tuning_service_client.js +246 -236
- package/build/src/v1/search_tuning_service_proto_list.json +6 -1
- package/build/src/v1/serving_config_service_client.d.ts +138 -48
- package/build/src/v1/serving_config_service_client.js +201 -80
- package/build/src/v1/serving_config_service_proto_list.json +6 -1
- package/build/src/v1/site_search_engine_service_client.d.ts +238 -148
- package/build/src/v1/site_search_engine_service_client.js +324 -379
- package/build/src/v1/site_search_engine_service_proto_list.json +6 -1
- package/build/src/v1/user_event_service_client.d.ts +167 -77
- package/build/src/v1/user_event_service_client.js +260 -254
- package/build/src/v1/user_event_service_proto_list.json +6 -1
- package/build/src/v1/user_license_service_client.d.ts +2256 -0
- package/build/src/v1/user_license_service_client.js +3194 -0
- package/build/src/v1/user_license_service_client_config.json +34 -0
- package/build/src/v1/user_license_service_proto_list.json +44 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +94 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +98 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +141 -281
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +129 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +211 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +176 -317
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +193 -329
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +180 -326
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +119 -244
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +150 -296
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +85 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +139 -263
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +87 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +85 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +169 -302
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +130 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +147 -293
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +129 -254
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +109 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +203 -388
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +143 -272
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +149 -280
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +127 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +209 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +154 -289
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +181 -310
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +178 -316
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +148 -286
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +98 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +116 -232
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +85 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +83 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +167 -292
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +128 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +145 -283
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +127 -244
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +107 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +205 -387
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +141 -262
- package/package.json +7 -7
- package/CHANGELOG.md +0 -267
@@ -175,55 +175,55 @@ export declare class RankServiceClient {
|
|
175
175
|
rank(request: protos.google.cloud.discoveryengine.v1.IRankRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1.IRankResponse, protos.google.cloud.discoveryengine.v1.IRankRequest | null | undefined, {} | null | undefined>): void;
|
176
176
|
rank(request: protos.google.cloud.discoveryengine.v1.IRankRequest, callback: Callback<protos.google.cloud.discoveryengine.v1.IRankResponse, protos.google.cloud.discoveryengine.v1.IRankRequest | null | undefined, {} | null | undefined>): void;
|
177
177
|
/**
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
178
|
+
* Gets information about a location.
|
179
|
+
*
|
180
|
+
* @param {Object} request
|
181
|
+
* The request object that will be sent.
|
182
|
+
* @param {string} request.name
|
183
|
+
* Resource name for the location.
|
184
|
+
* @param {object} [options]
|
185
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
186
|
+
* @returns {Promise} - The promise which resolves to an array.
|
187
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
188
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
189
|
+
* for more details and examples.
|
190
|
+
* @example
|
191
|
+
* ```
|
192
|
+
* const [response] = await client.getLocation(request);
|
193
|
+
* ```
|
194
|
+
*/
|
195
195
|
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
196
196
|
/**
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
197
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
198
|
+
*
|
199
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
200
|
+
* @param {Object} request
|
201
|
+
* The request object that will be sent.
|
202
|
+
* @param {string} request.name
|
203
|
+
* The resource that owns the locations collection, if applicable.
|
204
|
+
* @param {string} request.filter
|
205
|
+
* The standard list filter.
|
206
|
+
* @param {number} request.pageSize
|
207
|
+
* The standard list page size.
|
208
|
+
* @param {string} request.pageToken
|
209
|
+
* The standard list page token.
|
210
|
+
* @param {object} [options]
|
211
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
212
|
+
* @returns {Object}
|
213
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
214
|
+
* When you iterate the returned iterable, each element will be an object representing
|
215
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
216
|
+
* so you can stop the iteration when you don't need more results.
|
217
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
218
|
+
* for more details and examples.
|
219
|
+
* @example
|
220
|
+
* ```
|
221
|
+
* const iterable = client.listLocationsAsync(request);
|
222
|
+
* for await (const response of iterable) {
|
223
|
+
* // process response
|
224
|
+
* }
|
225
|
+
* ```
|
226
|
+
*/
|
227
227
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
228
228
|
/**
|
229
229
|
* Return a fully-qualified engine resource name string.
|
@@ -267,6 +267,39 @@ export declare class RankServiceClient {
|
|
267
267
|
* @returns {string} A string representing the engine.
|
268
268
|
*/
|
269
269
|
matchEngineFromEngineName(engineName: string): string | number;
|
270
|
+
/**
|
271
|
+
* Return a fully-qualified identityMappingStore resource name string.
|
272
|
+
*
|
273
|
+
* @param {string} project
|
274
|
+
* @param {string} location
|
275
|
+
* @param {string} identity_mapping_store
|
276
|
+
* @returns {string} Resource name string.
|
277
|
+
*/
|
278
|
+
identityMappingStorePath(project: string, location: string, identityMappingStore: string): string;
|
279
|
+
/**
|
280
|
+
* Parse the project from IdentityMappingStore resource.
|
281
|
+
*
|
282
|
+
* @param {string} identityMappingStoreName
|
283
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
284
|
+
* @returns {string} A string representing the project.
|
285
|
+
*/
|
286
|
+
matchProjectFromIdentityMappingStoreName(identityMappingStoreName: string): string | number;
|
287
|
+
/**
|
288
|
+
* Parse the location from IdentityMappingStore resource.
|
289
|
+
*
|
290
|
+
* @param {string} identityMappingStoreName
|
291
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
292
|
+
* @returns {string} A string representing the location.
|
293
|
+
*/
|
294
|
+
matchLocationFromIdentityMappingStoreName(identityMappingStoreName: string): string | number;
|
295
|
+
/**
|
296
|
+
* Parse the identity_mapping_store from IdentityMappingStore resource.
|
297
|
+
*
|
298
|
+
* @param {string} identityMappingStoreName
|
299
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
300
|
+
* @returns {string} A string representing the identity_mapping_store.
|
301
|
+
*/
|
302
|
+
matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName: string): string | number;
|
270
303
|
/**
|
271
304
|
* Return a fully-qualified project resource name string.
|
272
305
|
*
|
@@ -282,6 +315,63 @@ export declare class RankServiceClient {
|
|
282
315
|
* @returns {string} A string representing the project.
|
283
316
|
*/
|
284
317
|
matchProjectFromProjectName(projectName: string): string | number;
|
318
|
+
/**
|
319
|
+
* Return a fully-qualified projectLocationCmekConfig resource name string.
|
320
|
+
*
|
321
|
+
* @param {string} project
|
322
|
+
* @param {string} location
|
323
|
+
* @returns {string} Resource name string.
|
324
|
+
*/
|
325
|
+
projectLocationCmekConfigPath(project: string, location: string): string;
|
326
|
+
/**
|
327
|
+
* Parse the project from ProjectLocationCmekConfig resource.
|
328
|
+
*
|
329
|
+
* @param {string} projectLocationCmekConfigName
|
330
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
331
|
+
* @returns {string} A string representing the project.
|
332
|
+
*/
|
333
|
+
matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName: string): string | number;
|
334
|
+
/**
|
335
|
+
* Parse the location from ProjectLocationCmekConfig resource.
|
336
|
+
*
|
337
|
+
* @param {string} projectLocationCmekConfigName
|
338
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
339
|
+
* @returns {string} A string representing the location.
|
340
|
+
*/
|
341
|
+
matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName: string): string | number;
|
342
|
+
/**
|
343
|
+
* Return a fully-qualified projectLocationCmekConfigs resource name string.
|
344
|
+
*
|
345
|
+
* @param {string} project
|
346
|
+
* @param {string} location
|
347
|
+
* @param {string} cmek_config
|
348
|
+
* @returns {string} Resource name string.
|
349
|
+
*/
|
350
|
+
projectLocationCmekConfigsPath(project: string, location: string, cmekConfig: string): string;
|
351
|
+
/**
|
352
|
+
* Parse the project from ProjectLocationCmekConfigs resource.
|
353
|
+
*
|
354
|
+
* @param {string} projectLocationCmekConfigsName
|
355
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
356
|
+
* @returns {string} A string representing the project.
|
357
|
+
*/
|
358
|
+
matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName: string): string | number;
|
359
|
+
/**
|
360
|
+
* Parse the location from ProjectLocationCmekConfigs resource.
|
361
|
+
*
|
362
|
+
* @param {string} projectLocationCmekConfigsName
|
363
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
364
|
+
* @returns {string} A string representing the location.
|
365
|
+
*/
|
366
|
+
matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName: string): string | number;
|
367
|
+
/**
|
368
|
+
* Parse the cmek_config from ProjectLocationCmekConfigs resource.
|
369
|
+
*
|
370
|
+
* @param {string} projectLocationCmekConfigsName
|
371
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
372
|
+
* @returns {string} A string representing the cmek_config.
|
373
|
+
*/
|
374
|
+
matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName: string): string | number;
|
285
375
|
/**
|
286
376
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
287
377
|
*
|
@@ -97,26 +97,17 @@ class RankServiceClient {
|
|
97
97
|
constructor(opts, gaxInstance) {
|
98
98
|
// Ensure that options include all the required fields.
|
99
99
|
const staticMembers = this.constructor;
|
100
|
-
if (opts?.universe_domain &&
|
101
|
-
opts?.universeDomain &&
|
102
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
103
101
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
104
102
|
}
|
105
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
106
|
-
|
107
|
-
: undefined;
|
108
|
-
this._universeDomain =
|
109
|
-
opts?.universeDomain ??
|
110
|
-
opts?.universe_domain ??
|
111
|
-
universeDomainEnvVar ??
|
112
|
-
'googleapis.com';
|
103
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
104
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
113
105
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
114
106
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
115
107
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
116
108
|
const port = opts?.port || staticMembers.port;
|
117
109
|
const clientConfig = opts?.clientConfig ?? {};
|
118
|
-
const fallback = opts?.fallback ??
|
119
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
110
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
120
111
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
121
112
|
// Request numeric enum values if REST transport is used.
|
122
113
|
opts.numericEnums = true;
|
@@ -146,7 +137,10 @@ class RankServiceClient {
|
|
146
137
|
}
|
147
138
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
148
139
|
// Determine the client header string.
|
149
|
-
const clientHeader = [
|
140
|
+
const clientHeader = [
|
141
|
+
`gax/${this._gaxModule.version}`,
|
142
|
+
`gapic/${version}`,
|
143
|
+
];
|
150
144
|
if (typeof process === 'object' && 'versions' in process) {
|
151
145
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
152
146
|
}
|
@@ -169,7 +163,10 @@ class RankServiceClient {
|
|
169
163
|
// Create useful helper objects for these.
|
170
164
|
this.pathTemplates = {
|
171
165
|
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
166
|
+
identityMappingStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/identityMappingStores/{identity_mapping_store}'),
|
172
167
|
projectPathTemplate: new this._gaxModule.PathTemplate('projects/{project}'),
|
168
|
+
projectLocationCmekConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfig'),
|
169
|
+
projectLocationCmekConfigsPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/cmekConfigs/{cmek_config}'),
|
173
170
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
174
171
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
175
172
|
projectLocationCollectionDataStoreBranchDocumentChunkPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}/chunks/{chunk}'),
|
@@ -232,10 +229,10 @@ class RankServiceClient {
|
|
232
229
|
}
|
233
230
|
// Put together the "service stub" for
|
234
231
|
// google.cloud.discoveryengine.v1.RankService.
|
235
|
-
this.rankServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
236
|
-
|
237
|
-
|
238
|
-
|
232
|
+
this.rankServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
233
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.RankService') :
|
234
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
235
|
+
this._protos.google.cloud.discoveryengine.v1.RankService, this._opts, this._providedCustomServicePath);
|
239
236
|
// Iterate over each of the methods that the service provides
|
240
237
|
// and create an API call method for each.
|
241
238
|
const rankServiceStubMethods = ['rank'];
|
@@ -261,8 +258,7 @@ class RankServiceClient {
|
|
261
258
|
* @returns {string} The DNS address for this service.
|
262
259
|
*/
|
263
260
|
static get servicePath() {
|
264
|
-
if (typeof process === 'object' &&
|
265
|
-
typeof process.emitWarning === 'function') {
|
261
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
266
262
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
267
263
|
}
|
268
264
|
return 'discoveryengine.googleapis.com';
|
@@ -273,8 +269,7 @@ class RankServiceClient {
|
|
273
269
|
* @returns {string} The DNS address for this service.
|
274
270
|
*/
|
275
271
|
static get apiEndpoint() {
|
276
|
-
if (typeof process === 'object' &&
|
277
|
-
typeof process.emitWarning === 'function') {
|
272
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
278
273
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
279
274
|
}
|
280
275
|
return 'discoveryengine.googleapis.com';
|
@@ -302,7 +297,9 @@ class RankServiceClient {
|
|
302
297
|
* @returns {string[]} List of default scopes.
|
303
298
|
*/
|
304
299
|
static get scopes() {
|
305
|
-
return [
|
300
|
+
return [
|
301
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
302
|
+
];
|
306
303
|
}
|
307
304
|
/**
|
308
305
|
* Return the project ID used by this class.
|
@@ -328,13 +325,10 @@ class RankServiceClient {
|
|
328
325
|
options = options || {};
|
329
326
|
options.otherArgs = options.otherArgs || {};
|
330
327
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
331
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
332
|
-
|
333
|
-
ranking_config: request.rankingConfig ?? '',
|
334
|
-
});
|
335
|
-
this.initialize().catch(err => {
|
336
|
-
throw err;
|
328
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
329
|
+
'ranking_config': request.rankingConfig ?? '',
|
337
330
|
});
|
331
|
+
this.initialize().catch(err => { throw err; });
|
338
332
|
this._log.info('rank request %j', request);
|
339
333
|
const wrappedCallback = callback
|
340
334
|
? (error, response, options, rawResponse) => {
|
@@ -342,65 +336,70 @@ class RankServiceClient {
|
|
342
336
|
callback(error, response, options, rawResponse); // We verified callback above.
|
343
337
|
}
|
344
338
|
: undefined;
|
345
|
-
return this.innerApiCalls
|
346
|
-
.rank(request, options, wrappedCallback)
|
339
|
+
return this.innerApiCalls.rank(request, options, wrappedCallback)
|
347
340
|
?.then(([response, options, rawResponse]) => {
|
348
341
|
this._log.info('rank response %j', response);
|
349
342
|
return [response, options, rawResponse];
|
343
|
+
}).catch((error) => {
|
344
|
+
if (error && 'statusDetails' in error && error.statusDetails instanceof Array) {
|
345
|
+
const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
346
|
+
error.statusDetails = (0, google_gax_1.decodeAnyProtosInArray)(error.statusDetails, protos);
|
347
|
+
}
|
348
|
+
throw error;
|
350
349
|
});
|
351
350
|
}
|
352
351
|
/**
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
352
|
+
* Gets information about a location.
|
353
|
+
*
|
354
|
+
* @param {Object} request
|
355
|
+
* The request object that will be sent.
|
356
|
+
* @param {string} request.name
|
357
|
+
* Resource name for the location.
|
358
|
+
* @param {object} [options]
|
359
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
360
|
+
* @returns {Promise} - The promise which resolves to an array.
|
361
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
362
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
363
|
+
* for more details and examples.
|
364
|
+
* @example
|
365
|
+
* ```
|
366
|
+
* const [response] = await client.getLocation(request);
|
367
|
+
* ```
|
368
|
+
*/
|
370
369
|
getLocation(request, options, callback) {
|
371
370
|
return this.locationsClient.getLocation(request, options, callback);
|
372
371
|
}
|
373
372
|
/**
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
373
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
374
|
+
*
|
375
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
376
|
+
* @param {Object} request
|
377
|
+
* The request object that will be sent.
|
378
|
+
* @param {string} request.name
|
379
|
+
* The resource that owns the locations collection, if applicable.
|
380
|
+
* @param {string} request.filter
|
381
|
+
* The standard list filter.
|
382
|
+
* @param {number} request.pageSize
|
383
|
+
* The standard list page size.
|
384
|
+
* @param {string} request.pageToken
|
385
|
+
* The standard list page token.
|
386
|
+
* @param {object} [options]
|
387
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
388
|
+
* @returns {Object}
|
389
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
390
|
+
* When you iterate the returned iterable, each element will be an object representing
|
391
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
392
|
+
* so you can stop the iteration when you don't need more results.
|
393
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
394
|
+
* for more details and examples.
|
395
|
+
* @example
|
396
|
+
* ```
|
397
|
+
* const iterable = client.listLocationsAsync(request);
|
398
|
+
* for await (const response of iterable) {
|
399
|
+
* // process response
|
400
|
+
* }
|
401
|
+
* ```
|
402
|
+
*/
|
404
403
|
listLocationsAsync(request, options) {
|
405
404
|
return this.locationsClient.listLocationsAsync(request, options);
|
406
405
|
}
|
@@ -464,6 +463,51 @@ class RankServiceClient {
|
|
464
463
|
matchEngineFromEngineName(engineName) {
|
465
464
|
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
466
465
|
}
|
466
|
+
/**
|
467
|
+
* Return a fully-qualified identityMappingStore resource name string.
|
468
|
+
*
|
469
|
+
* @param {string} project
|
470
|
+
* @param {string} location
|
471
|
+
* @param {string} identity_mapping_store
|
472
|
+
* @returns {string} Resource name string.
|
473
|
+
*/
|
474
|
+
identityMappingStorePath(project, location, identityMappingStore) {
|
475
|
+
return this.pathTemplates.identityMappingStorePathTemplate.render({
|
476
|
+
project: project,
|
477
|
+
location: location,
|
478
|
+
identity_mapping_store: identityMappingStore,
|
479
|
+
});
|
480
|
+
}
|
481
|
+
/**
|
482
|
+
* Parse the project from IdentityMappingStore resource.
|
483
|
+
*
|
484
|
+
* @param {string} identityMappingStoreName
|
485
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
486
|
+
* @returns {string} A string representing the project.
|
487
|
+
*/
|
488
|
+
matchProjectFromIdentityMappingStoreName(identityMappingStoreName) {
|
489
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).project;
|
490
|
+
}
|
491
|
+
/**
|
492
|
+
* Parse the location from IdentityMappingStore resource.
|
493
|
+
*
|
494
|
+
* @param {string} identityMappingStoreName
|
495
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
496
|
+
* @returns {string} A string representing the location.
|
497
|
+
*/
|
498
|
+
matchLocationFromIdentityMappingStoreName(identityMappingStoreName) {
|
499
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).location;
|
500
|
+
}
|
501
|
+
/**
|
502
|
+
* Parse the identity_mapping_store from IdentityMappingStore resource.
|
503
|
+
*
|
504
|
+
* @param {string} identityMappingStoreName
|
505
|
+
* A fully-qualified path representing IdentityMappingStore resource.
|
506
|
+
* @returns {string} A string representing the identity_mapping_store.
|
507
|
+
*/
|
508
|
+
matchIdentityMappingStoreFromIdentityMappingStoreName(identityMappingStoreName) {
|
509
|
+
return this.pathTemplates.identityMappingStorePathTemplate.match(identityMappingStoreName).identity_mapping_store;
|
510
|
+
}
|
467
511
|
/**
|
468
512
|
* Return a fully-qualified project resource name string.
|
469
513
|
*
|
@@ -485,6 +529,84 @@ class RankServiceClient {
|
|
485
529
|
matchProjectFromProjectName(projectName) {
|
486
530
|
return this.pathTemplates.projectPathTemplate.match(projectName).project;
|
487
531
|
}
|
532
|
+
/**
|
533
|
+
* Return a fully-qualified projectLocationCmekConfig resource name string.
|
534
|
+
*
|
535
|
+
* @param {string} project
|
536
|
+
* @param {string} location
|
537
|
+
* @returns {string} Resource name string.
|
538
|
+
*/
|
539
|
+
projectLocationCmekConfigPath(project, location) {
|
540
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.render({
|
541
|
+
project: project,
|
542
|
+
location: location,
|
543
|
+
});
|
544
|
+
}
|
545
|
+
/**
|
546
|
+
* Parse the project from ProjectLocationCmekConfig resource.
|
547
|
+
*
|
548
|
+
* @param {string} projectLocationCmekConfigName
|
549
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
550
|
+
* @returns {string} A string representing the project.
|
551
|
+
*/
|
552
|
+
matchProjectFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
553
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).project;
|
554
|
+
}
|
555
|
+
/**
|
556
|
+
* Parse the location from ProjectLocationCmekConfig resource.
|
557
|
+
*
|
558
|
+
* @param {string} projectLocationCmekConfigName
|
559
|
+
* A fully-qualified path representing project_location_cmekConfig resource.
|
560
|
+
* @returns {string} A string representing the location.
|
561
|
+
*/
|
562
|
+
matchLocationFromProjectLocationCmekConfigName(projectLocationCmekConfigName) {
|
563
|
+
return this.pathTemplates.projectLocationCmekConfigPathTemplate.match(projectLocationCmekConfigName).location;
|
564
|
+
}
|
565
|
+
/**
|
566
|
+
* Return a fully-qualified projectLocationCmekConfigs resource name string.
|
567
|
+
*
|
568
|
+
* @param {string} project
|
569
|
+
* @param {string} location
|
570
|
+
* @param {string} cmek_config
|
571
|
+
* @returns {string} Resource name string.
|
572
|
+
*/
|
573
|
+
projectLocationCmekConfigsPath(project, location, cmekConfig) {
|
574
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.render({
|
575
|
+
project: project,
|
576
|
+
location: location,
|
577
|
+
cmek_config: cmekConfig,
|
578
|
+
});
|
579
|
+
}
|
580
|
+
/**
|
581
|
+
* Parse the project from ProjectLocationCmekConfigs resource.
|
582
|
+
*
|
583
|
+
* @param {string} projectLocationCmekConfigsName
|
584
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
585
|
+
* @returns {string} A string representing the project.
|
586
|
+
*/
|
587
|
+
matchProjectFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
588
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).project;
|
589
|
+
}
|
590
|
+
/**
|
591
|
+
* Parse the location from ProjectLocationCmekConfigs resource.
|
592
|
+
*
|
593
|
+
* @param {string} projectLocationCmekConfigsName
|
594
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
595
|
+
* @returns {string} A string representing the location.
|
596
|
+
*/
|
597
|
+
matchLocationFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
598
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).location;
|
599
|
+
}
|
600
|
+
/**
|
601
|
+
* Parse the cmek_config from ProjectLocationCmekConfigs resource.
|
602
|
+
*
|
603
|
+
* @param {string} projectLocationCmekConfigsName
|
604
|
+
* A fully-qualified path representing project_location_cmekConfigs resource.
|
605
|
+
* @returns {string} A string representing the cmek_config.
|
606
|
+
*/
|
607
|
+
matchCmekConfigFromProjectLocationCmekConfigsName(projectLocationCmekConfigsName) {
|
608
|
+
return this.pathTemplates.projectLocationCmekConfigsPathTemplate.match(projectLocationCmekConfigsName).cmek_config;
|
609
|
+
}
|
488
610
|
/**
|
489
611
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
490
612
|
*
|
@@ -2653,8 +2775,7 @@ class RankServiceClient {
|
|
2653
2775
|
* @returns {string} A string representing the project.
|
2654
2776
|
*/
|
2655
2777
|
matchProjectFromRankingConfigName(rankingConfigName) {
|
2656
|
-
return this.pathTemplates.rankingConfigPathTemplate.match(rankingConfigName)
|
2657
|
-
.project;
|
2778
|
+
return this.pathTemplates.rankingConfigPathTemplate.match(rankingConfigName).project;
|
2658
2779
|
}
|
2659
2780
|
/**
|
2660
2781
|
* Parse the location from RankingConfig resource.
|
@@ -2664,8 +2785,7 @@ class RankServiceClient {
|
|
2664
2785
|
* @returns {string} A string representing the location.
|
2665
2786
|
*/
|
2666
2787
|
matchLocationFromRankingConfigName(rankingConfigName) {
|
2667
|
-
return this.pathTemplates.rankingConfigPathTemplate.match(rankingConfigName)
|
2668
|
-
.location;
|
2788
|
+
return this.pathTemplates.rankingConfigPathTemplate.match(rankingConfigName).location;
|
2669
2789
|
}
|
2670
2790
|
/**
|
2671
2791
|
* Parse the ranking_config from RankingConfig resource.
|
@@ -2675,8 +2795,7 @@ class RankServiceClient {
|
|
2675
2795
|
* @returns {string} A string representing the ranking_config.
|
2676
2796
|
*/
|
2677
2797
|
matchRankingConfigFromRankingConfigName(rankingConfigName) {
|
2678
|
-
return this.pathTemplates.rankingConfigPathTemplate.match(rankingConfigName)
|
2679
|
-
.ranking_config;
|
2798
|
+
return this.pathTemplates.rankingConfigPathTemplate.match(rankingConfigName).ranking_config;
|
2680
2799
|
}
|
2681
2800
|
/**
|
2682
2801
|
* Terminate the gRPC channel and close the client.
|
@@ -2690,7 +2809,7 @@ class RankServiceClient {
|
|
2690
2809
|
this._log.info('ending gRPC channel');
|
2691
2810
|
this._terminated = true;
|
2692
2811
|
stub.close();
|
2693
|
-
this.locationsClient.close();
|
2812
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2694
2813
|
});
|
2695
2814
|
}
|
2696
2815
|
return Promise.resolve();
|
@@ -1,6 +1,7 @@
|
|
1
1
|
[
|
2
2
|
"../../protos/google/cloud/discoveryengine/v1/answer.proto",
|
3
3
|
"../../protos/google/cloud/discoveryengine/v1/chunk.proto",
|
4
|
+
"../../protos/google/cloud/discoveryengine/v1/cmek_config_service.proto",
|
4
5
|
"../../protos/google/cloud/discoveryengine/v1/common.proto",
|
5
6
|
"../../protos/google/cloud/discoveryengine/v1/completion.proto",
|
6
7
|
"../../protos/google/cloud/discoveryengine/v1/completion_service.proto",
|
@@ -18,6 +19,8 @@
|
|
18
19
|
"../../protos/google/cloud/discoveryengine/v1/engine_service.proto",
|
19
20
|
"../../protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto",
|
20
21
|
"../../protos/google/cloud/discoveryengine/v1/grounding.proto",
|
22
|
+
"../../protos/google/cloud/discoveryengine/v1/identity_mapping_store.proto",
|
23
|
+
"../../protos/google/cloud/discoveryengine/v1/identity_mapping_store_service.proto",
|
21
24
|
"../../protos/google/cloud/discoveryengine/v1/import_config.proto",
|
22
25
|
"../../protos/google/cloud/discoveryengine/v1/project.proto",
|
23
26
|
"../../protos/google/cloud/discoveryengine/v1/project_service.proto",
|
@@ -35,5 +38,7 @@
|
|
35
38
|
"../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
|
36
39
|
"../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",
|
37
40
|
"../../protos/google/cloud/discoveryengine/v1/user_event.proto",
|
38
|
-
"../../protos/google/cloud/discoveryengine/v1/user_event_service.proto"
|
41
|
+
"../../protos/google/cloud/discoveryengine/v1/user_event_service.proto",
|
42
|
+
"../../protos/google/cloud/discoveryengine/v1/user_license.proto",
|
43
|
+
"../../protos/google/cloud/discoveryengine/v1/user_license_service.proto"
|
39
44
|
]
|