@google-cloud/discoveryengine 2.0.1 → 2.2.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/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- 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 +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- 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 +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -99,26 +99,17 @@ class ProjectServiceClient {
|
|
99
99
|
constructor(opts, gaxInstance) {
|
100
100
|
// Ensure that options include all the required fields.
|
101
101
|
const staticMembers = this.constructor;
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
102
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
103
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
104
|
}
|
107
|
-
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
108
|
-
|
109
|
-
: undefined;
|
110
|
-
this._universeDomain =
|
111
|
-
opts?.universeDomain ??
|
112
|
-
opts?.universe_domain ??
|
113
|
-
universeDomainEnvVar ??
|
114
|
-
'googleapis.com';
|
105
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
106
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
115
107
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
108
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
109
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
110
|
const port = opts?.port || staticMembers.port;
|
119
111
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
112
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
113
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
114
|
// Request numeric enum values if REST transport is used.
|
124
115
|
opts.numericEnums = true;
|
@@ -148,7 +139,10 @@ class ProjectServiceClient {
|
|
148
139
|
}
|
149
140
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
141
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
142
|
+
const clientHeader = [
|
143
|
+
`gax/${this._gaxModule.version}`,
|
144
|
+
`gapic/${version}`,
|
145
|
+
];
|
152
146
|
if (typeof process === 'object' && 'versions' in process) {
|
153
147
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
148
|
}
|
@@ -216,119 +210,20 @@ class ProjectServiceClient {
|
|
216
210
|
// rather than holding a request open.
|
217
211
|
const lroOptions = {
|
218
212
|
auth: this.auth,
|
219
|
-
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
213
|
+
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined
|
220
214
|
};
|
221
215
|
if (opts.fallback) {
|
222
216
|
lroOptions.protoJson = protoFilesRoot;
|
223
|
-
lroOptions.httpRules = [
|
224
|
-
{
|
225
|
-
|
226
|
-
|
227
|
-
body: '*',
|
228
|
-
additional_bindings: [
|
229
|
-
{
|
230
|
-
post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel',
|
231
|
-
body: '*',
|
232
|
-
},
|
233
|
-
],
|
234
|
-
},
|
235
|
-
{
|
236
|
-
selector: 'google.longrunning.Operations.GetOperation',
|
237
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}',
|
238
|
-
additional_bindings: [
|
239
|
-
{
|
240
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}',
|
241
|
-
},
|
242
|
-
{
|
243
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}',
|
244
|
-
},
|
245
|
-
{
|
246
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}',
|
247
|
-
},
|
248
|
-
{
|
249
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
250
|
-
},
|
251
|
-
{
|
252
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
253
|
-
},
|
254
|
-
{
|
255
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
256
|
-
},
|
257
|
-
{
|
258
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
259
|
-
},
|
260
|
-
{
|
261
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
|
262
|
-
},
|
263
|
-
{
|
264
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}',
|
265
|
-
},
|
266
|
-
{
|
267
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}',
|
268
|
-
},
|
269
|
-
{
|
270
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
271
|
-
},
|
272
|
-
{
|
273
|
-
get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
274
|
-
},
|
275
|
-
{ get: '/v1beta/{name=projects/*/locations/*/operations/*}' },
|
276
|
-
{
|
277
|
-
get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
|
278
|
-
},
|
279
|
-
{ get: '/v1beta/{name=projects/*/operations/*}' },
|
280
|
-
],
|
281
|
-
},
|
282
|
-
{
|
283
|
-
selector: 'google.longrunning.Operations.ListOperations',
|
284
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations',
|
285
|
-
additional_bindings: [
|
286
|
-
{
|
287
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations',
|
288
|
-
},
|
289
|
-
{
|
290
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations',
|
291
|
-
},
|
292
|
-
{
|
293
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
294
|
-
},
|
295
|
-
{
|
296
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
297
|
-
},
|
298
|
-
{
|
299
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
300
|
-
},
|
301
|
-
{
|
302
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
303
|
-
},
|
304
|
-
{
|
305
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
306
|
-
},
|
307
|
-
{
|
308
|
-
get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
|
309
|
-
},
|
310
|
-
{
|
311
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
312
|
-
},
|
313
|
-
{
|
314
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations',
|
315
|
-
},
|
316
|
-
{
|
317
|
-
get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations',
|
318
|
-
},
|
319
|
-
{ get: '/v1beta/{name=projects/*/locations/*}/operations' },
|
320
|
-
{ get: '/v1beta/{name=projects/*}/operations' },
|
321
|
-
],
|
322
|
-
},
|
323
|
-
];
|
217
|
+
lroOptions.httpRules = [{ selector: 'google.longrunning.Operations.CancelOperation', post: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', additional_bindings: [{ post: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}:cancel', body: '*', }],
|
218
|
+
}, { selector: 'google.longrunning.Operations.GetOperation', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector/operations/*}', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/evaluations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/operations/*}', }, { get: '/v1beta/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}', }, { get: '/v1beta/{name=projects/*/operations/*}', }],
|
219
|
+
}, { selector: 'google.longrunning.Operations.ListOperations', get: '/v1beta/{name=projects/*/locations/*/collections/*/dataConnector}/operations', additional_bindings: [{ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/branches/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*/models/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*/dataStores/*}/operations', }, { get: '/v1beta/{name=projects/*/locations/*}/operations', }, { get: '/v1beta/{name=projects/*}/operations', }],
|
220
|
+
}];
|
324
221
|
}
|
325
|
-
this.operationsClient = this._gaxModule
|
326
|
-
.lro(lroOptions)
|
327
|
-
.operationsClient(opts);
|
222
|
+
this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts);
|
328
223
|
const provisionProjectResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.Project');
|
329
224
|
const provisionProjectMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ProvisionProjectMetadata');
|
330
225
|
this.descriptors.longrunning = {
|
331
|
-
provisionProject: new this._gaxModule.LongrunningDescriptor(this.operationsClient, provisionProjectResponse.decode.bind(provisionProjectResponse), provisionProjectMetadata.decode.bind(provisionProjectMetadata))
|
226
|
+
provisionProject: new this._gaxModule.LongrunningDescriptor(this.operationsClient, provisionProjectResponse.decode.bind(provisionProjectResponse), provisionProjectMetadata.decode.bind(provisionProjectMetadata))
|
332
227
|
};
|
333
228
|
// Put together the default options sent with requests.
|
334
229
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.ProjectService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -357,11 +252,10 @@ class ProjectServiceClient {
|
|
357
252
|
}
|
358
253
|
// Put together the "service stub" for
|
359
254
|
// google.cloud.discoveryengine.v1beta.ProjectService.
|
360
|
-
this.projectServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
.ProjectService, this._opts, this._providedCustomServicePath);
|
255
|
+
this.projectServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
256
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1beta.ProjectService') :
|
257
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
258
|
+
this._protos.google.cloud.discoveryengine.v1beta.ProjectService, this._opts, this._providedCustomServicePath);
|
365
259
|
// Iterate over each of the methods that the service provides
|
366
260
|
// and create an API call method for each.
|
367
261
|
const projectServiceStubMethods = ['provisionProject'];
|
@@ -375,7 +269,8 @@ class ProjectServiceClient {
|
|
375
269
|
}, (err) => () => {
|
376
270
|
throw err;
|
377
271
|
});
|
378
|
-
const descriptor = this.descriptors.longrunning[methodName] ||
|
272
|
+
const descriptor = this.descriptors.longrunning[methodName] ||
|
273
|
+
undefined;
|
379
274
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
380
275
|
this.innerApiCalls[methodName] = apiCall;
|
381
276
|
}
|
@@ -387,8 +282,7 @@ class ProjectServiceClient {
|
|
387
282
|
* @returns {string} The DNS address for this service.
|
388
283
|
*/
|
389
284
|
static get servicePath() {
|
390
|
-
if (typeof process === 'object' &&
|
391
|
-
typeof process.emitWarning === 'function') {
|
285
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
392
286
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
393
287
|
}
|
394
288
|
return 'discoveryengine.googleapis.com';
|
@@ -399,8 +293,7 @@ class ProjectServiceClient {
|
|
399
293
|
* @returns {string} The DNS address for this service.
|
400
294
|
*/
|
401
295
|
static get apiEndpoint() {
|
402
|
-
if (typeof process === 'object' &&
|
403
|
-
typeof process.emitWarning === 'function') {
|
296
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
404
297
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
405
298
|
}
|
406
299
|
return 'discoveryengine.googleapis.com';
|
@@ -428,7 +321,9 @@ class ProjectServiceClient {
|
|
428
321
|
* @returns {string[]} List of default scopes.
|
429
322
|
*/
|
430
323
|
static get scopes() {
|
431
|
-
return [
|
324
|
+
return [
|
325
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
326
|
+
];
|
432
327
|
}
|
433
328
|
/**
|
434
329
|
* Return the project ID used by this class.
|
@@ -454,13 +349,10 @@ class ProjectServiceClient {
|
|
454
349
|
options = options || {};
|
455
350
|
options.otherArgs = options.otherArgs || {};
|
456
351
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
457
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
458
|
-
|
459
|
-
name: request.name ?? '',
|
460
|
-
});
|
461
|
-
this.initialize().catch(err => {
|
462
|
-
throw err;
|
352
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
353
|
+
'name': request.name ?? '',
|
463
354
|
});
|
355
|
+
this.initialize().catch(err => { throw err; });
|
464
356
|
const wrappedCallback = callback
|
465
357
|
? (error, response, rawResponse, _) => {
|
466
358
|
this._log.info('provisionProject response %j', rawResponse);
|
@@ -468,8 +360,7 @@ class ProjectServiceClient {
|
|
468
360
|
}
|
469
361
|
: undefined;
|
470
362
|
this._log.info('provisionProject request %j', request);
|
471
|
-
return this.innerApiCalls
|
472
|
-
.provisionProject(request, options, wrappedCallback)
|
363
|
+
return this.innerApiCalls.provisionProject(request, options, wrappedCallback)
|
473
364
|
?.then(([response, rawResponse, _]) => {
|
474
365
|
this._log.info('provisionProject response %j', rawResponse);
|
475
366
|
return [response, rawResponse, _];
|
@@ -494,90 +385,90 @@ class ProjectServiceClient {
|
|
494
385
|
return decodeOperation;
|
495
386
|
}
|
496
387
|
/**
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
388
|
+
* Gets information about a location.
|
389
|
+
*
|
390
|
+
* @param {Object} request
|
391
|
+
* The request object that will be sent.
|
392
|
+
* @param {string} request.name
|
393
|
+
* Resource name for the location.
|
394
|
+
* @param {object} [options]
|
395
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
396
|
+
* @returns {Promise} - The promise which resolves to an array.
|
397
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
398
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
399
|
+
* for more details and examples.
|
400
|
+
* @example
|
401
|
+
* ```
|
402
|
+
* const [response] = await client.getLocation(request);
|
403
|
+
* ```
|
404
|
+
*/
|
514
405
|
getLocation(request, options, callback) {
|
515
406
|
return this.locationsClient.getLocation(request, options, callback);
|
516
407
|
}
|
517
408
|
/**
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
409
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
410
|
+
*
|
411
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
412
|
+
* @param {Object} request
|
413
|
+
* The request object that will be sent.
|
414
|
+
* @param {string} request.name
|
415
|
+
* The resource that owns the locations collection, if applicable.
|
416
|
+
* @param {string} request.filter
|
417
|
+
* The standard list filter.
|
418
|
+
* @param {number} request.pageSize
|
419
|
+
* The standard list page size.
|
420
|
+
* @param {string} request.pageToken
|
421
|
+
* The standard list page token.
|
422
|
+
* @param {object} [options]
|
423
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
424
|
+
* @returns {Object}
|
425
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
426
|
+
* When you iterate the returned iterable, each element will be an object representing
|
427
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
428
|
+
* so you can stop the iteration when you don't need more results.
|
429
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
430
|
+
* for more details and examples.
|
431
|
+
* @example
|
432
|
+
* ```
|
433
|
+
* const iterable = client.listLocationsAsync(request);
|
434
|
+
* for await (const response of iterable) {
|
435
|
+
* // process response
|
436
|
+
* }
|
437
|
+
* ```
|
438
|
+
*/
|
548
439
|
listLocationsAsync(request, options) {
|
549
440
|
return this.locationsClient.listLocationsAsync(request, options);
|
550
441
|
}
|
551
442
|
/**
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
443
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
444
|
+
* method to poll the operation result at intervals as recommended by the API
|
445
|
+
* service.
|
446
|
+
*
|
447
|
+
* @param {Object} request - The request object that will be sent.
|
448
|
+
* @param {string} request.name - The name of the operation resource.
|
449
|
+
* @param {Object=} options
|
450
|
+
* Optional parameters. You can override the default settings for this call,
|
451
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
452
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
453
|
+
* for the details.
|
454
|
+
* @param {function(?Error, ?Object)=} callback
|
455
|
+
* The function which will be called with the result of the API call.
|
456
|
+
*
|
457
|
+
* The second parameter to the callback is an object representing
|
458
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
459
|
+
* @return {Promise} - The promise which resolves to an array.
|
460
|
+
* The first element of the array is an object representing
|
461
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
462
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
463
|
+
*
|
464
|
+
* @example
|
465
|
+
* ```
|
466
|
+
* const client = longrunning.operationsClient();
|
467
|
+
* const name = '';
|
468
|
+
* const [response] = await client.getOperation({name});
|
469
|
+
* // doThingsWith(response)
|
470
|
+
* ```
|
471
|
+
*/
|
581
472
|
getOperation(request, optionsOrCallback, callback) {
|
582
473
|
let options;
|
583
474
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
@@ -811,8 +702,7 @@ class ProjectServiceClient {
|
|
811
702
|
* @returns {string} A string representing the project.
|
812
703
|
*/
|
813
704
|
matchProjectFromEvaluationName(evaluationName) {
|
814
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
815
|
-
.project;
|
705
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).project;
|
816
706
|
}
|
817
707
|
/**
|
818
708
|
* Parse the location from Evaluation resource.
|
@@ -822,8 +712,7 @@ class ProjectServiceClient {
|
|
822
712
|
* @returns {string} A string representing the location.
|
823
713
|
*/
|
824
714
|
matchLocationFromEvaluationName(evaluationName) {
|
825
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
826
|
-
.location;
|
715
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).location;
|
827
716
|
}
|
828
717
|
/**
|
829
718
|
* Parse the evaluation from Evaluation resource.
|
@@ -833,8 +722,7 @@ class ProjectServiceClient {
|
|
833
722
|
* @returns {string} A string representing the evaluation.
|
834
723
|
*/
|
835
724
|
matchEvaluationFromEvaluationName(evaluationName) {
|
836
|
-
return this.pathTemplates.evaluationPathTemplate.match(evaluationName)
|
837
|
-
.evaluation;
|
725
|
+
return this.pathTemplates.evaluationPathTemplate.match(evaluationName).evaluation;
|
838
726
|
}
|
839
727
|
/**
|
840
728
|
* Return a fully-qualified groundingConfig resource name string.
|
@@ -3072,8 +2960,7 @@ class ProjectServiceClient {
|
|
3072
2960
|
* @returns {string} A string representing the project.
|
3073
2961
|
*/
|
3074
2962
|
matchProjectFromSampleQueryName(sampleQueryName) {
|
3075
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3076
|
-
.project;
|
2963
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).project;
|
3077
2964
|
}
|
3078
2965
|
/**
|
3079
2966
|
* Parse the location from SampleQuery resource.
|
@@ -3083,8 +2970,7 @@ class ProjectServiceClient {
|
|
3083
2970
|
* @returns {string} A string representing the location.
|
3084
2971
|
*/
|
3085
2972
|
matchLocationFromSampleQueryName(sampleQueryName) {
|
3086
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3087
|
-
.location;
|
2973
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).location;
|
3088
2974
|
}
|
3089
2975
|
/**
|
3090
2976
|
* Parse the sample_query_set from SampleQuery resource.
|
@@ -3094,8 +2980,7 @@ class ProjectServiceClient {
|
|
3094
2980
|
* @returns {string} A string representing the sample_query_set.
|
3095
2981
|
*/
|
3096
2982
|
matchSampleQuerySetFromSampleQueryName(sampleQueryName) {
|
3097
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3098
|
-
.sample_query_set;
|
2983
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query_set;
|
3099
2984
|
}
|
3100
2985
|
/**
|
3101
2986
|
* Parse the sample_query from SampleQuery resource.
|
@@ -3105,8 +2990,7 @@ class ProjectServiceClient {
|
|
3105
2990
|
* @returns {string} A string representing the sample_query.
|
3106
2991
|
*/
|
3107
2992
|
matchSampleQueryFromSampleQueryName(sampleQueryName) {
|
3108
|
-
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName)
|
3109
|
-
.sample_query;
|
2993
|
+
return this.pathTemplates.sampleQueryPathTemplate.match(sampleQueryName).sample_query;
|
3110
2994
|
}
|
3111
2995
|
/**
|
3112
2996
|
* Return a fully-qualified sampleQuerySet resource name string.
|
@@ -3165,8 +3049,8 @@ class ProjectServiceClient {
|
|
3165
3049
|
this._log.info('ending gRPC channel');
|
3166
3050
|
this._terminated = true;
|
3167
3051
|
stub.close();
|
3168
|
-
this.locationsClient.close();
|
3169
|
-
this.operationsClient.close();
|
3052
|
+
this.locationsClient.close().catch(err => { throw err; });
|
3053
|
+
void this.operationsClient.close();
|
3170
3054
|
});
|
3171
3055
|
}
|
3172
3056
|
return Promise.resolve();
|
@@ -175,55 +175,55 @@ export declare class RankServiceClient {
|
|
175
175
|
rank(request: protos.google.cloud.discoveryengine.v1beta.IRankRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IRankResponse, protos.google.cloud.discoveryengine.v1beta.IRankRequest | null | undefined, {} | null | undefined>): void;
|
176
176
|
rank(request: protos.google.cloud.discoveryengine.v1beta.IRankRequest, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IRankResponse, protos.google.cloud.discoveryengine.v1beta.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.
|