@google-cloud/discoveryengine 2.1.0 → 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 +7 -0
- package/build/protos/protos.d.ts +31 -316
- package/build/protos/protos.js +146 -593
- package/build/protos/protos.json +25 -1
- package/build/src/index.d.ts +1 -1
- package/build/src/index.js +1 -21
- package/build/src/v1/completion_service_client.d.ts +76 -76
- package/build/src/v1/completion_service_client.js +125 -262
- package/build/src/v1/control_service_client.d.ts +81 -81
- package/build/src/v1/control_service_client.js +96 -132
- package/build/src/v1/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1/conversational_search_service_client.js +138 -226
- package/build/src/v1/data_store_service_client.d.ts +122 -122
- package/build/src/v1/data_store_service_client.js +134 -280
- package/build/src/v1/document_service_client.d.ts +120 -120
- package/build/src/v1/document_service_client.js +143 -300
- package/build/src/v1/engine_service_client.d.ts +103 -103
- package/build/src/v1/engine_service_client.js +134 -279
- package/build/src/v1/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1/grounded_generation_service_client.js +79 -100
- package/build/src/v1/project_service_client.d.ts +76 -76
- package/build/src/v1/project_service_client.js +108 -222
- package/build/src/v1/rank_service_client.d.ts +47 -47
- package/build/src/v1/rank_service_client.js +72 -85
- package/build/src/v1/recommendation_service_client.d.ts +47 -47
- package/build/src/v1/recommendation_service_client.js +70 -82
- package/build/src/v1/schema_service_client.d.ts +111 -111
- package/build/src/v1/schema_service_client.js +131 -273
- package/build/src/v1/search_service_client.d.ts +545 -545
- package/build/src/v1/search_service_client.js +90 -113
- package/build/src/v1/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1/search_tuning_service_client.js +113 -235
- package/build/src/v1/serving_config_service_client.d.ts +48 -48
- package/build/src/v1/serving_config_service_client.js +69 -80
- package/build/src/v1/site_search_engine_service_client.d.ts +148 -148
- package/build/src/v1/site_search_engine_service_client.js +179 -378
- package/build/src/v1/user_event_service_client.d.ts +77 -77
- package/build/src/v1/user_event_service_client.js +121 -253
- 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 +1 -1
@@ -168,7 +168,7 @@ export declare class GroundedGenerationServiceClient {
|
|
168
168
|
*/
|
169
169
|
generateGroundedContent(request?: protos.google.cloud.discoveryengine.v1.IGenerateGroundedContentRequest, options?: CallOptions): Promise<[
|
170
170
|
protos.google.cloud.discoveryengine.v1.IGenerateGroundedContentResponse,
|
171
|
-
|
171
|
+
protos.google.cloud.discoveryengine.v1.IGenerateGroundedContentRequest | undefined,
|
172
172
|
{} | undefined
|
173
173
|
]>;
|
174
174
|
generateGroundedContent(request: protos.google.cloud.discoveryengine.v1.IGenerateGroundedContentRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1.IGenerateGroundedContentResponse, protos.google.cloud.discoveryengine.v1.IGenerateGroundedContentRequest | null | undefined, {} | null | undefined>): void;
|
@@ -238,55 +238,55 @@ export declare class GroundedGenerationServiceClient {
|
|
238
238
|
*/
|
239
239
|
streamGenerateGroundedContent(options?: CallOptions): gax.CancellableStream;
|
240
240
|
/**
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
241
|
+
* Gets information about a location.
|
242
|
+
*
|
243
|
+
* @param {Object} request
|
244
|
+
* The request object that will be sent.
|
245
|
+
* @param {string} request.name
|
246
|
+
* Resource name for the location.
|
247
|
+
* @param {object} [options]
|
248
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
249
|
+
* @returns {Promise} - The promise which resolves to an array.
|
250
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
251
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
252
|
+
* for more details and examples.
|
253
|
+
* @example
|
254
|
+
* ```
|
255
|
+
* const [response] = await client.getLocation(request);
|
256
|
+
* ```
|
257
|
+
*/
|
258
258
|
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>;
|
259
259
|
/**
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
260
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
261
|
+
*
|
262
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
263
|
+
* @param {Object} request
|
264
|
+
* The request object that will be sent.
|
265
|
+
* @param {string} request.name
|
266
|
+
* The resource that owns the locations collection, if applicable.
|
267
|
+
* @param {string} request.filter
|
268
|
+
* The standard list filter.
|
269
|
+
* @param {number} request.pageSize
|
270
|
+
* The standard list page size.
|
271
|
+
* @param {string} request.pageToken
|
272
|
+
* The standard list page token.
|
273
|
+
* @param {object} [options]
|
274
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
275
|
+
* @returns {Object}
|
276
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
277
|
+
* When you iterate the returned iterable, each element will be an object representing
|
278
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
279
|
+
* so you can stop the iteration when you don't need more results.
|
280
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
281
|
+
* for more details and examples.
|
282
|
+
* @example
|
283
|
+
* ```
|
284
|
+
* const iterable = client.listLocationsAsync(request);
|
285
|
+
* for await (const response of iterable) {
|
286
|
+
* // process response
|
287
|
+
* }
|
288
|
+
* ```
|
289
|
+
*/
|
290
290
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
291
291
|
/**
|
292
292
|
* Return a fully-qualified engine resource name string.
|
@@ -97,28 +97,18 @@ class GroundedGenerationServiceClient {
|
|
97
97
|
*/
|
98
98
|
constructor(opts, gaxInstance) {
|
99
99
|
// Ensure that options include all the required fields.
|
100
|
-
const staticMembers = this
|
101
|
-
|
102
|
-
if (opts?.universe_domain &&
|
103
|
-
opts?.universeDomain &&
|
104
|
-
opts?.universe_domain !== opts?.universeDomain) {
|
100
|
+
const staticMembers = this.constructor;
|
101
|
+
if (opts?.universe_domain && opts?.universeDomain && opts?.universe_domain !== opts?.universeDomain) {
|
105
102
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
106
103
|
}
|
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';
|
104
|
+
const universeDomainEnvVar = (typeof process === 'object' && typeof process.env === 'object') ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] : undefined;
|
105
|
+
this._universeDomain = opts?.universeDomain ?? opts?.universe_domain ?? universeDomainEnvVar ?? 'googleapis.com';
|
115
106
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
116
107
|
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
117
108
|
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
118
109
|
const port = opts?.port || staticMembers.port;
|
119
110
|
const clientConfig = opts?.clientConfig ?? {};
|
120
|
-
const fallback = opts?.fallback ??
|
121
|
-
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
111
|
+
const fallback = opts?.fallback ?? (typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
122
112
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
123
113
|
// Request numeric enum values if REST transport is used.
|
124
114
|
opts.numericEnums = true;
|
@@ -148,7 +138,10 @@ class GroundedGenerationServiceClient {
|
|
148
138
|
}
|
149
139
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
150
140
|
// Determine the client header string.
|
151
|
-
const clientHeader = [
|
141
|
+
const clientHeader = [
|
142
|
+
`gax/${this._gaxModule.version}`,
|
143
|
+
`gapic/${version}`,
|
144
|
+
];
|
152
145
|
if (typeof process === 'object' && 'versions' in process) {
|
153
146
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
154
147
|
}
|
@@ -211,7 +204,7 @@ class GroundedGenerationServiceClient {
|
|
211
204
|
// Some of the methods on this service provide streaming responses.
|
212
205
|
// Provide descriptors for these.
|
213
206
|
this.descriptors.stream = {
|
214
|
-
streamGenerateGroundedContent: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries)
|
207
|
+
streamGenerateGroundedContent: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.BIDI_STREAMING, !!opts.fallback, !!opts.gaxServerStreamingRetries)
|
215
208
|
};
|
216
209
|
// Put together the default options sent with requests.
|
217
210
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1.GroundedGenerationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -240,18 +233,13 @@ class GroundedGenerationServiceClient {
|
|
240
233
|
}
|
241
234
|
// Put together the "service stub" for
|
242
235
|
// google.cloud.discoveryengine.v1.GroundedGenerationService.
|
243
|
-
this.groundedGenerationServiceStub = this._gaxGrpc.createStub(this._opts.fallback
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
.GroundedGenerationService, this._opts, this._providedCustomServicePath);
|
236
|
+
this.groundedGenerationServiceStub = this._gaxGrpc.createStub(this._opts.fallback ?
|
237
|
+
this._protos.lookupService('google.cloud.discoveryengine.v1.GroundedGenerationService') :
|
238
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
239
|
+
this._protos.google.cloud.discoveryengine.v1.GroundedGenerationService, this._opts, this._providedCustomServicePath);
|
248
240
|
// Iterate over each of the methods that the service provides
|
249
241
|
// and create an API call method for each.
|
250
|
-
const groundedGenerationServiceStubMethods = [
|
251
|
-
'streamGenerateGroundedContent',
|
252
|
-
'generateGroundedContent',
|
253
|
-
'checkGrounding',
|
254
|
-
];
|
242
|
+
const groundedGenerationServiceStubMethods = ['streamGenerateGroundedContent', 'generateGroundedContent', 'checkGrounding'];
|
255
243
|
for (const methodName of groundedGenerationServiceStubMethods) {
|
256
244
|
const callPromise = this.groundedGenerationServiceStub.then(stub => (...args) => {
|
257
245
|
if (this._terminated) {
|
@@ -269,7 +257,8 @@ class GroundedGenerationServiceClient {
|
|
269
257
|
}, (err) => () => {
|
270
258
|
throw err;
|
271
259
|
});
|
272
|
-
const descriptor = this.descriptors.stream[methodName] ||
|
260
|
+
const descriptor = this.descriptors.stream[methodName] ||
|
261
|
+
undefined;
|
273
262
|
const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
|
274
263
|
this.innerApiCalls[methodName] = apiCall;
|
275
264
|
}
|
@@ -281,8 +270,7 @@ class GroundedGenerationServiceClient {
|
|
281
270
|
* @returns {string} The DNS address for this service.
|
282
271
|
*/
|
283
272
|
static get servicePath() {
|
284
|
-
if (typeof process === 'object' &&
|
285
|
-
typeof process.emitWarning === 'function') {
|
273
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
286
274
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
287
275
|
}
|
288
276
|
return 'discoveryengine.googleapis.com';
|
@@ -293,8 +281,7 @@ class GroundedGenerationServiceClient {
|
|
293
281
|
* @returns {string} The DNS address for this service.
|
294
282
|
*/
|
295
283
|
static get apiEndpoint() {
|
296
|
-
if (typeof process === 'object' &&
|
297
|
-
typeof process.emitWarning === 'function') {
|
284
|
+
if (typeof process === 'object' && typeof process.emitWarning === 'function') {
|
298
285
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
299
286
|
}
|
300
287
|
return 'discoveryengine.googleapis.com';
|
@@ -322,7 +309,9 @@ class GroundedGenerationServiceClient {
|
|
322
309
|
* @returns {string[]} List of default scopes.
|
323
310
|
*/
|
324
311
|
static get scopes() {
|
325
|
-
return [
|
312
|
+
return [
|
313
|
+
'https://www.googleapis.com/auth/cloud-platform'
|
314
|
+
];
|
326
315
|
}
|
327
316
|
/**
|
328
317
|
* Return the project ID used by this class.
|
@@ -348,13 +337,10 @@ class GroundedGenerationServiceClient {
|
|
348
337
|
options = options || {};
|
349
338
|
options.otherArgs = options.otherArgs || {};
|
350
339
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
351
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
352
|
-
|
353
|
-
location: request.location ?? '',
|
354
|
-
});
|
355
|
-
this.initialize().catch(err => {
|
356
|
-
throw err;
|
340
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
341
|
+
'location': request.location ?? '',
|
357
342
|
});
|
343
|
+
this.initialize().catch(err => { throw err; });
|
358
344
|
this._log.info('generateGroundedContent request %j', request);
|
359
345
|
const wrappedCallback = callback
|
360
346
|
? (error, response, options, rawResponse) => {
|
@@ -362,8 +348,7 @@ class GroundedGenerationServiceClient {
|
|
362
348
|
callback(error, response, options, rawResponse); // We verified callback above.
|
363
349
|
}
|
364
350
|
: undefined;
|
365
|
-
return this.innerApiCalls
|
366
|
-
.generateGroundedContent(request, options, wrappedCallback)
|
351
|
+
return this.innerApiCalls.generateGroundedContent(request, options, wrappedCallback)
|
367
352
|
?.then(([response, options, rawResponse]) => {
|
368
353
|
this._log.info('generateGroundedContent response %j', response);
|
369
354
|
return [response, options, rawResponse];
|
@@ -382,13 +367,10 @@ class GroundedGenerationServiceClient {
|
|
382
367
|
options = options || {};
|
383
368
|
options.otherArgs = options.otherArgs || {};
|
384
369
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
385
|
-
options.otherArgs.headers['x-goog-request-params'] =
|
386
|
-
|
387
|
-
grounding_config: request.groundingConfig ?? '',
|
388
|
-
});
|
389
|
-
this.initialize().catch(err => {
|
390
|
-
throw err;
|
370
|
+
options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({
|
371
|
+
'grounding_config': request.groundingConfig ?? '',
|
391
372
|
});
|
373
|
+
this.initialize().catch(err => { throw err; });
|
392
374
|
this._log.info('checkGrounding request %j', request);
|
393
375
|
const wrappedCallback = callback
|
394
376
|
? (error, response, options, rawResponse) => {
|
@@ -396,8 +378,7 @@ class GroundedGenerationServiceClient {
|
|
396
378
|
callback(error, response, options, rawResponse); // We verified callback above.
|
397
379
|
}
|
398
380
|
: undefined;
|
399
|
-
return this.innerApiCalls
|
400
|
-
.checkGrounding(request, options, wrappedCallback)
|
381
|
+
return this.innerApiCalls.checkGrounding(request, options, wrappedCallback)
|
401
382
|
?.then(([response, options, rawResponse]) => {
|
402
383
|
this._log.info('checkGrounding response %j', response);
|
403
384
|
return [response, options, rawResponse];
|
@@ -418,64 +399,62 @@ class GroundedGenerationServiceClient {
|
|
418
399
|
* region_tag:discoveryengine_v1_generated_GroundedGenerationService_StreamGenerateGroundedContent_async
|
419
400
|
*/
|
420
401
|
streamGenerateGroundedContent(options) {
|
421
|
-
this.initialize().catch(err => {
|
422
|
-
throw err;
|
423
|
-
});
|
402
|
+
this.initialize().catch(err => { throw err; });
|
424
403
|
this._log.info('streamGenerateGroundedContent stream %j', options);
|
425
404
|
return this.innerApiCalls.streamGenerateGroundedContent(null, options);
|
426
405
|
}
|
427
406
|
/**
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
407
|
+
* Gets information about a location.
|
408
|
+
*
|
409
|
+
* @param {Object} request
|
410
|
+
* The request object that will be sent.
|
411
|
+
* @param {string} request.name
|
412
|
+
* Resource name for the location.
|
413
|
+
* @param {object} [options]
|
414
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
415
|
+
* @returns {Promise} - The promise which resolves to an array.
|
416
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
417
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
418
|
+
* for more details and examples.
|
419
|
+
* @example
|
420
|
+
* ```
|
421
|
+
* const [response] = await client.getLocation(request);
|
422
|
+
* ```
|
423
|
+
*/
|
445
424
|
getLocation(request, options, callback) {
|
446
425
|
return this.locationsClient.getLocation(request, options, callback);
|
447
426
|
}
|
448
427
|
/**
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
428
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
429
|
+
*
|
430
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
431
|
+
* @param {Object} request
|
432
|
+
* The request object that will be sent.
|
433
|
+
* @param {string} request.name
|
434
|
+
* The resource that owns the locations collection, if applicable.
|
435
|
+
* @param {string} request.filter
|
436
|
+
* The standard list filter.
|
437
|
+
* @param {number} request.pageSize
|
438
|
+
* The standard list page size.
|
439
|
+
* @param {string} request.pageToken
|
440
|
+
* The standard list page token.
|
441
|
+
* @param {object} [options]
|
442
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
443
|
+
* @returns {Object}
|
444
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
445
|
+
* When you iterate the returned iterable, each element will be an object representing
|
446
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
447
|
+
* so you can stop the iteration when you don't need more results.
|
448
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
449
|
+
* for more details and examples.
|
450
|
+
* @example
|
451
|
+
* ```
|
452
|
+
* const iterable = client.listLocationsAsync(request);
|
453
|
+
* for await (const response of iterable) {
|
454
|
+
* // process response
|
455
|
+
* }
|
456
|
+
* ```
|
457
|
+
*/
|
479
458
|
listLocationsAsync(request, options) {
|
480
459
|
return this.locationsClient.listLocationsAsync(request, options);
|
481
460
|
}
|
@@ -2795,7 +2774,7 @@ class GroundedGenerationServiceClient {
|
|
2795
2774
|
this._log.info('ending gRPC channel');
|
2796
2775
|
this._terminated = true;
|
2797
2776
|
stub.close();
|
2798
|
-
this.locationsClient.close();
|
2777
|
+
this.locationsClient.close().catch(err => { throw err; });
|
2799
2778
|
});
|
2800
2779
|
}
|
2801
2780
|
return Promise.resolve();
|
@@ -172,86 +172,86 @@ export declare class ProjectServiceClient {
|
|
172
172
|
*/
|
173
173
|
checkProvisionProjectProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1.Project, protos.google.cloud.discoveryengine.v1.ProvisionProjectMetadata>>;
|
174
174
|
/**
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
175
|
+
* Gets information about a location.
|
176
|
+
*
|
177
|
+
* @param {Object} request
|
178
|
+
* The request object that will be sent.
|
179
|
+
* @param {string} request.name
|
180
|
+
* Resource name for the location.
|
181
|
+
* @param {object} [options]
|
182
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
183
|
+
* @returns {Promise} - The promise which resolves to an array.
|
184
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
185
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
186
|
+
* for more details and examples.
|
187
|
+
* @example
|
188
|
+
* ```
|
189
|
+
* const [response] = await client.getLocation(request);
|
190
|
+
* ```
|
191
|
+
*/
|
192
192
|
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>;
|
193
193
|
/**
|
194
|
-
|
195
|
-
|
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
|
-
|
194
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
195
|
+
*
|
196
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
197
|
+
* @param {Object} request
|
198
|
+
* The request object that will be sent.
|
199
|
+
* @param {string} request.name
|
200
|
+
* The resource that owns the locations collection, if applicable.
|
201
|
+
* @param {string} request.filter
|
202
|
+
* The standard list filter.
|
203
|
+
* @param {number} request.pageSize
|
204
|
+
* The standard list page size.
|
205
|
+
* @param {string} request.pageToken
|
206
|
+
* The standard list page token.
|
207
|
+
* @param {object} [options]
|
208
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
209
|
+
* @returns {Object}
|
210
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
211
|
+
* When you iterate the returned iterable, each element will be an object representing
|
212
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
213
|
+
* so you can stop the iteration when you don't need more results.
|
214
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
215
|
+
* for more details and examples.
|
216
|
+
* @example
|
217
|
+
* ```
|
218
|
+
* const iterable = client.listLocationsAsync(request);
|
219
|
+
* for await (const response of iterable) {
|
220
|
+
* // process response
|
221
|
+
* }
|
222
|
+
* ```
|
223
|
+
*/
|
224
224
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
225
225
|
/**
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
226
|
+
* Gets the latest state of a long-running operation. Clients can use this
|
227
|
+
* method to poll the operation result at intervals as recommended by the API
|
228
|
+
* service.
|
229
|
+
*
|
230
|
+
* @param {Object} request - The request object that will be sent.
|
231
|
+
* @param {string} request.name - The name of the operation resource.
|
232
|
+
* @param {Object=} options
|
233
|
+
* Optional parameters. You can override the default settings for this call,
|
234
|
+
* e.g, timeout, retries, paginations, etc. See {@link
|
235
|
+
* https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions}
|
236
|
+
* for the details.
|
237
|
+
* @param {function(?Error, ?Object)=} callback
|
238
|
+
* The function which will be called with the result of the API call.
|
239
|
+
*
|
240
|
+
* The second parameter to the callback is an object representing
|
241
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
242
|
+
* @return {Promise} - The promise which resolves to an array.
|
243
|
+
* The first element of the array is an object representing
|
244
|
+
* {@link google.longrunning.Operation | google.longrunning.Operation}.
|
245
|
+
* The promise has a method named "cancel" which cancels the ongoing API call.
|
246
|
+
*
|
247
|
+
* @example
|
248
|
+
* ```
|
249
|
+
* const client = longrunning.operationsClient();
|
250
|
+
* const name = '';
|
251
|
+
* const [response] = await client.getOperation({name});
|
252
|
+
* // doThingsWith(response)
|
253
|
+
* ```
|
254
|
+
*/
|
255
255
|
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;
|
256
256
|
/**
|
257
257
|
* Lists operations that match the specified filter in the request. If the
|