@google-cloud/discoveryengine 1.11.0 → 1.12.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 +8 -0
- package/README.md +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +108 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
- package/build/protos/protos.d.ts +2891 -4
- package/build/protos/protos.js +23610 -16379
- package/build/protos/protos.json +665 -6
- package/build/src/v1beta/completion_service_client.d.ts +91 -0
- package/build/src/v1beta/completion_service_client.js +84 -0
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +18 -0
- package/build/src/v1beta/data_store_service_client.d.ts +9 -0
- package/build/src/v1beta/document_service_client.d.ts +2 -0
- package/build/src/v1beta/search_service_client.d.ts +147 -0
- package/build/src/v1beta/search_service_client.js +98 -0
- package/build/src/v1beta/user_event_service_client.d.ts +75 -0
- package/build/src/v1beta/user_event_service_client.js +42 -0
- package/build/src/v1beta/user_event_service_client_config.json +5 -0
- package/package.json +1 -1
@@ -192,6 +192,81 @@ export declare class UserEventServiceClient {
|
|
192
192
|
]>;
|
193
193
|
collectUserEvent(request: protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, options: CallOptions, callback: Callback<protos.google.api.IHttpBody, protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest | null | undefined, {} | null | undefined>): void;
|
194
194
|
collectUserEvent(request: protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, callback: Callback<protos.google.api.IHttpBody, protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest | null | undefined, {} | null | undefined>): void;
|
195
|
+
/**
|
196
|
+
* Deletes permanently all user events specified by the filter provided.
|
197
|
+
* Depending on the number of events specified by the filter, this operation
|
198
|
+
* could take hours or days to complete. To test a filter, use the list
|
199
|
+
* command first.
|
200
|
+
*
|
201
|
+
* @param {Object} request
|
202
|
+
* The request object that will be sent.
|
203
|
+
* @param {string} request.parent
|
204
|
+
* Required. The resource name of the catalog under which the events are
|
205
|
+
* created. The format is
|
206
|
+
* `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
|
207
|
+
* @param {string} request.filter
|
208
|
+
* Required. The filter string to specify the events to be deleted with a
|
209
|
+
* length limit of 5,000 characters. The eligible fields for filtering are:
|
210
|
+
*
|
211
|
+
* * `eventType`: Double quoted
|
212
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.event_type|UserEvent.event_type}
|
213
|
+
* string.
|
214
|
+
* * `eventTime`: in ISO 8601 "zulu" format.
|
215
|
+
* * `userPseudoId`: Double quoted string. Specifying this will delete all
|
216
|
+
* events associated with a visitor.
|
217
|
+
* * `userId`: Double quoted string. Specifying this will delete all events
|
218
|
+
* associated with a user.
|
219
|
+
*
|
220
|
+
* Examples:
|
221
|
+
*
|
222
|
+
* * Deleting all events in a time range:
|
223
|
+
* `eventTime > "2012-04-23T18:25:43.511Z"
|
224
|
+
* eventTime < "2012-04-23T18:30:43.511Z"`
|
225
|
+
* * Deleting specific eventType:
|
226
|
+
* `eventType = "search"`
|
227
|
+
* * Deleting all events for a specific visitor:
|
228
|
+
* `userPseudoId = "visitor1024"`
|
229
|
+
* * Deleting all events inside a DataStore:
|
230
|
+
* `*`
|
231
|
+
*
|
232
|
+
* The filtering fields are assumed to have an implicit AND.
|
233
|
+
* @param {boolean} request.force
|
234
|
+
* The `force` field is currently not supported. Purge user event requests
|
235
|
+
* will permanently delete all purgeable events. Once the development is
|
236
|
+
* complete:
|
237
|
+
* If `force` is set to false, the method will return the expected
|
238
|
+
* purge count without deleting any user events. This field will default to
|
239
|
+
* false if not included in the request.
|
240
|
+
* @param {object} [options]
|
241
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
242
|
+
* @returns {Promise} - The promise which resolves to an array.
|
243
|
+
* The first element of the array is an object representing
|
244
|
+
* a long running operation. Its `promise()` method returns a promise
|
245
|
+
* you can `await` for.
|
246
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
247
|
+
* for more details and examples.
|
248
|
+
* @example <caption>include:samples/generated/v1beta/user_event_service.purge_user_events.js</caption>
|
249
|
+
* region_tag:discoveryengine_v1beta_generated_UserEventService_PurgeUserEvents_async
|
250
|
+
*/
|
251
|
+
purgeUserEvents(request?: protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsRequest, options?: CallOptions): Promise<[
|
252
|
+
LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsMetadata>,
|
253
|
+
protos.google.longrunning.IOperation | undefined,
|
254
|
+
{} | undefined
|
255
|
+
]>;
|
256
|
+
purgeUserEvents(request: protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
257
|
+
purgeUserEvents(request: protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsRequest, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
258
|
+
/**
|
259
|
+
* Check the status of the long running operation returned by `purgeUserEvents()`.
|
260
|
+
* @param {String} name
|
261
|
+
* The operation name that will be passed.
|
262
|
+
* @returns {Promise} - The promise which resolves to an object.
|
263
|
+
* The decoded operation object has result and metadata field to get information from.
|
264
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
265
|
+
* for more details and examples.
|
266
|
+
* @example <caption>include:samples/generated/v1beta/user_event_service.purge_user_events.js</caption>
|
267
|
+
* region_tag:discoveryengine_v1beta_generated_UserEventService_PurgeUserEvents_async
|
268
|
+
*/
|
269
|
+
checkPurgeUserEventsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata>>;
|
195
270
|
/**
|
196
271
|
* Bulk import of user events. Request processing might be
|
197
272
|
* synchronous. Events that already exist are skipped.
|
@@ -301,9 +301,12 @@ class UserEventServiceClient {
|
|
301
301
|
this.operationsClient = this._gaxModule
|
302
302
|
.lro(lroOptions)
|
303
303
|
.operationsClient(opts);
|
304
|
+
const purgeUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse');
|
305
|
+
const purgeUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata');
|
304
306
|
const importUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse');
|
305
307
|
const importUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata');
|
306
308
|
this.descriptors.longrunning = {
|
309
|
+
purgeUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeUserEventsResponse.decode.bind(purgeUserEventsResponse), purgeUserEventsMetadata.decode.bind(purgeUserEventsMetadata)),
|
307
310
|
importUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importUserEventsResponse.decode.bind(importUserEventsResponse), importUserEventsMetadata.decode.bind(importUserEventsMetadata)),
|
308
311
|
};
|
309
312
|
// Put together the default options sent with requests.
|
@@ -343,6 +346,7 @@ class UserEventServiceClient {
|
|
343
346
|
const userEventServiceStubMethods = [
|
344
347
|
'writeUserEvent',
|
345
348
|
'collectUserEvent',
|
349
|
+
'purgeUserEvents',
|
346
350
|
'importUserEvents',
|
347
351
|
];
|
348
352
|
for (const methodName of userEventServiceStubMethods) {
|
@@ -463,6 +467,44 @@ class UserEventServiceClient {
|
|
463
467
|
this.initialize();
|
464
468
|
return this.innerApiCalls.collectUserEvent(request, options, callback);
|
465
469
|
}
|
470
|
+
purgeUserEvents(request, optionsOrCallback, callback) {
|
471
|
+
var _a;
|
472
|
+
request = request || {};
|
473
|
+
let options;
|
474
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
475
|
+
callback = optionsOrCallback;
|
476
|
+
options = {};
|
477
|
+
}
|
478
|
+
else {
|
479
|
+
options = optionsOrCallback;
|
480
|
+
}
|
481
|
+
options = options || {};
|
482
|
+
options.otherArgs = options.otherArgs || {};
|
483
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
484
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
485
|
+
this._gaxModule.routingHeader.fromParams({
|
486
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
487
|
+
});
|
488
|
+
this.initialize();
|
489
|
+
return this.innerApiCalls.purgeUserEvents(request, options, callback);
|
490
|
+
}
|
491
|
+
/**
|
492
|
+
* Check the status of the long running operation returned by `purgeUserEvents()`.
|
493
|
+
* @param {String} name
|
494
|
+
* The operation name that will be passed.
|
495
|
+
* @returns {Promise} - The promise which resolves to an object.
|
496
|
+
* The decoded operation object has result and metadata field to get information from.
|
497
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
498
|
+
* for more details and examples.
|
499
|
+
* @example <caption>include:samples/generated/v1beta/user_event_service.purge_user_events.js</caption>
|
500
|
+
* region_tag:discoveryengine_v1beta_generated_UserEventService_PurgeUserEvents_async
|
501
|
+
*/
|
502
|
+
async checkPurgeUserEventsProgress(name) {
|
503
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
504
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
505
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeUserEvents, this._gaxModule.createDefaultBackoffSettings());
|
506
|
+
return decodeOperation;
|
507
|
+
}
|
466
508
|
importUserEvents(request, optionsOrCallback, callback) {
|
467
509
|
var _a;
|
468
510
|
request = request || {};
|
@@ -51,6 +51,11 @@
|
|
51
51
|
"retry_codes_name": "unavailable",
|
52
52
|
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
53
53
|
},
|
54
|
+
"PurgeUserEvents": {
|
55
|
+
"timeout_millis": 30000,
|
56
|
+
"retry_codes_name": "unavailable",
|
57
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
58
|
+
},
|
54
59
|
"ImportUserEvents": {
|
55
60
|
"timeout_millis": 300000,
|
56
61
|
"retry_codes_name": "unavailable",
|