@google-cloud/discoveryengine 0.4.1 → 0.6.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 +8 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +43 -10
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +116 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +45 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +46 -12
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +86 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +15 -14
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +58 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +259 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +546 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +31 -25
- package/build/protos/protos.d.ts +5965 -1866
- package/build/protos/protos.js +39781 -1
- package/build/protos/protos.json +3963 -1
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1beta/completion_service_client.d.ts +455 -0
- package/build/src/v1beta/completion_service_client.js +659 -0
- package/build/src/v1beta/completion_service_client_config.json +43 -0
- package/build/src/v1beta/document_service_client.d.ts +174 -18
- package/build/src/v1beta/document_service_client.js +177 -6
- package/build/src/v1beta/document_service_client_config.json +5 -0
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +7 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +108 -14
- package/build/src/v1beta/recommendation_service_client.js +128 -0
- package/build/src/v1beta/schema_service_client.d.ts +798 -0
- package/build/src/v1beta/schema_service_client.js +1122 -0
- package/build/src/v1beta/schema_service_client_config.json +63 -0
- package/build/src/v1beta/search_service_client.d.ts +851 -0
- package/build/src/v1beta/search_service_client.js +1070 -0
- package/build/src/v1beta/search_service_client_config.json +43 -0
- package/build/src/v1beta/user_event_service_client.d.ts +93 -0
- package/build/src/v1beta/user_event_service_client.js +128 -0
- package/package.json +8 -6
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.cloud.discoveryengine.v1beta.CompletionService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"non_idempotent": [],
|
6
|
+
"idempotent": [
|
7
|
+
"DEADLINE_EXCEEDED",
|
8
|
+
"UNAVAILABLE"
|
9
|
+
],
|
10
|
+
"unavailable": [
|
11
|
+
"UNAVAILABLE"
|
12
|
+
]
|
13
|
+
},
|
14
|
+
"retry_params": {
|
15
|
+
"default": {
|
16
|
+
"initial_retry_delay_millis": 100,
|
17
|
+
"retry_delay_multiplier": 1.3,
|
18
|
+
"max_retry_delay_millis": 60000,
|
19
|
+
"initial_rpc_timeout_millis": 60000,
|
20
|
+
"rpc_timeout_multiplier": 1,
|
21
|
+
"max_rpc_timeout_millis": 60000,
|
22
|
+
"total_timeout_millis": 600000
|
23
|
+
},
|
24
|
+
"319f27672a8be83550d842a373549dd84649a57e": {
|
25
|
+
"initial_retry_delay_millis": 100,
|
26
|
+
"retry_delay_multiplier": 1.3,
|
27
|
+
"max_retry_delay_millis": 5000,
|
28
|
+
"initial_rpc_timeout_millis": 60000,
|
29
|
+
"rpc_timeout_multiplier": 1,
|
30
|
+
"max_rpc_timeout_millis": 60000,
|
31
|
+
"total_timeout_millis": 600000
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"methods": {
|
35
|
+
"CompleteQuery": {
|
36
|
+
"timeout_millis": 5000,
|
37
|
+
"retry_codes_name": "unavailable",
|
38
|
+
"retry_params_name": "319f27672a8be83550d842a373549dd84649a57e"
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -122,10 +122,10 @@ export declare class DocumentServiceClient {
|
|
122
122
|
*
|
123
123
|
* If the caller does not have permission to access the
|
124
124
|
* {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of
|
125
|
-
* whether or not it exists, a PERMISSION_DENIED error is returned.
|
125
|
+
* whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
126
126
|
*
|
127
127
|
* If the requested {@link google.cloud.discoveryengine.v1beta.Document|Document}
|
128
|
-
* does not exist, a NOT_FOUND error is returned.
|
128
|
+
* does not exist, a `NOT_FOUND` error is returned.
|
129
129
|
* @param {object} [options]
|
130
130
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
131
131
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -162,16 +162,16 @@ export declare class DocumentServiceClient {
|
|
162
162
|
*
|
163
163
|
* If the caller does not have permission to create the
|
164
164
|
* {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of
|
165
|
-
* whether or not it exists, a PERMISSION_DENIED error is returned.
|
165
|
+
* whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
166
166
|
*
|
167
167
|
* This field must be unique among all
|
168
168
|
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s with the same
|
169
169
|
* {@link google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent|parent}.
|
170
|
-
* Otherwise, an ALREADY_EXISTS error is returned.
|
170
|
+
* Otherwise, an `ALREADY_EXISTS` error is returned.
|
171
171
|
*
|
172
172
|
* This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
173
173
|
* standard with a length limit of 63 characters. Otherwise, an
|
174
|
-
* INVALID_ARGUMENT error is returned.
|
174
|
+
* `INVALID_ARGUMENT` error is returned.
|
175
175
|
* @param {object} [options]
|
176
176
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
177
177
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -199,12 +199,12 @@ export declare class DocumentServiceClient {
|
|
199
199
|
*
|
200
200
|
* If the caller does not have permission to update the
|
201
201
|
* {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of
|
202
|
-
* whether or not it exists, a PERMISSION_DENIED error is returned.
|
202
|
+
* whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
203
203
|
*
|
204
204
|
* If the {@link google.cloud.discoveryengine.v1beta.Document|Document} to update
|
205
205
|
* does not exist and
|
206
206
|
* {@link google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing|allow_missing}
|
207
|
-
* is not set, a NOT_FOUND error is returned.
|
207
|
+
* is not set, a `NOT_FOUND` error is returned.
|
208
208
|
* @param {boolean} request.allowMissing
|
209
209
|
* If set to true, and the
|
210
210
|
* {@link google.cloud.discoveryengine.v1beta.Document|Document} is not found, a
|
@@ -239,10 +239,10 @@ export declare class DocumentServiceClient {
|
|
239
239
|
*
|
240
240
|
* If the caller does not have permission to delete the
|
241
241
|
* {@link google.cloud.discoveryengine.v1beta.Document|Document}, regardless of
|
242
|
-
* whether or not it exists, a PERMISSION_DENIED error is returned.
|
242
|
+
* whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
243
243
|
*
|
244
244
|
* If the {@link google.cloud.discoveryengine.v1beta.Document|Document} to delete
|
245
|
-
* does not exist, a NOT_FOUND error is returned.
|
245
|
+
* does not exist, a `NOT_FOUND` error is returned.
|
246
246
|
* @param {object} [options]
|
247
247
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
248
248
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -319,6 +319,69 @@ export declare class DocumentServiceClient {
|
|
319
319
|
* region_tag:discoveryengine_v1beta_generated_DocumentService_ImportDocuments_async
|
320
320
|
*/
|
321
321
|
checkImportDocumentsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata>>;
|
322
|
+
/**
|
323
|
+
* Permanently deletes all selected
|
324
|
+
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s in a branch.
|
325
|
+
*
|
326
|
+
* This process is asynchronous. Depending on the number of
|
327
|
+
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s to be deleted,
|
328
|
+
* this operation can take hours to complete. Before the delete operation
|
329
|
+
* completes, some {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
330
|
+
* might still be returned by
|
331
|
+
* {@link google.cloud.discoveryengine.v1beta.DocumentService.GetDocument|DocumentService.GetDocument}
|
332
|
+
* or
|
333
|
+
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}.
|
334
|
+
*
|
335
|
+
* To get a list of the
|
336
|
+
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s to be deleted,
|
337
|
+
* set
|
338
|
+
* {@link google.cloud.discoveryengine.v1beta.PurgeDocumentsRequest.force|PurgeDocumentsRequest.force}
|
339
|
+
* to false.
|
340
|
+
*
|
341
|
+
* @param {Object} request
|
342
|
+
* The request object that will be sent.
|
343
|
+
* @param {string} request.parent
|
344
|
+
* Required. The parent resource name, such as
|
345
|
+
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
|
346
|
+
* @param {string} request.filter
|
347
|
+
* Required. Filter matching documents to purge. Only currently supported
|
348
|
+
* value is
|
349
|
+
* `*` (all items).
|
350
|
+
* @param {boolean} request.force
|
351
|
+
* Actually performs the purge. If `force` is set to false, return the
|
352
|
+
* expected purge count without deleting any documents.
|
353
|
+
* @param {object} [options]
|
354
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
355
|
+
* @returns {Promise} - The promise which resolves to an array.
|
356
|
+
* The first element of the array is an object representing
|
357
|
+
* a long running operation. Its `promise()` method returns a promise
|
358
|
+
* you can `await` for.
|
359
|
+
* Please see the
|
360
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
361
|
+
* for more details and examples.
|
362
|
+
* @example <caption>include:samples/generated/v1beta/document_service.purge_documents.js</caption>
|
363
|
+
* region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async
|
364
|
+
*/
|
365
|
+
purgeDocuments(request?: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, options?: CallOptions): Promise<[
|
366
|
+
LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata>,
|
367
|
+
protos.google.longrunning.IOperation | undefined,
|
368
|
+
{} | undefined
|
369
|
+
]>;
|
370
|
+
purgeDocuments(request: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
371
|
+
purgeDocuments(request: protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsRequest, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeDocumentsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
372
|
+
/**
|
373
|
+
* Check the status of the long running operation returned by `purgeDocuments()`.
|
374
|
+
* @param {String} name
|
375
|
+
* The operation name that will be passed.
|
376
|
+
* @returns {Promise} - The promise which resolves to an object.
|
377
|
+
* The decoded operation object has result and metadata field to get information from.
|
378
|
+
* Please see the
|
379
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
380
|
+
* for more details and examples.
|
381
|
+
* @example <caption>include:samples/generated/v1beta/document_service.purge_documents.js</caption>
|
382
|
+
* region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async
|
383
|
+
*/
|
384
|
+
checkPurgeDocumentsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse, protos.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata>>;
|
322
385
|
/**
|
323
386
|
* Gets a list of {@link google.cloud.discoveryengine.v1beta.Document|Document}s.
|
324
387
|
*
|
@@ -332,13 +395,13 @@ export declare class DocumentServiceClient {
|
|
332
395
|
*
|
333
396
|
* If the caller does not have permission to list {@link |Documents}s under this
|
334
397
|
* branch, regardless of whether or not this branch exists, a
|
335
|
-
* PERMISSION_DENIED error is returned.
|
398
|
+
* `PERMISSION_DENIED` error is returned.
|
336
399
|
* @param {number} request.pageSize
|
337
400
|
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
338
401
|
* to return. If unspecified, defaults to 100. The maximum allowed value is
|
339
402
|
* 1000. Values above 1000 will be coerced to 1000.
|
340
403
|
*
|
341
|
-
* If this field is negative, an INVALID_ARGUMENT error is returned.
|
404
|
+
* If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
342
405
|
* @param {string} request.pageToken
|
343
406
|
* A page token
|
344
407
|
* {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token},
|
@@ -349,7 +412,7 @@ export declare class DocumentServiceClient {
|
|
349
412
|
* When paginating, all other parameters provided to
|
350
413
|
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}
|
351
414
|
* must match the call that provided the page token. Otherwise, an
|
352
|
-
* INVALID_ARGUMENT error is returned.
|
415
|
+
* `INVALID_ARGUMENT` error is returned.
|
353
416
|
* @param {object} [options]
|
354
417
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
355
418
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -382,13 +445,13 @@ export declare class DocumentServiceClient {
|
|
382
445
|
*
|
383
446
|
* If the caller does not have permission to list {@link |Documents}s under this
|
384
447
|
* branch, regardless of whether or not this branch exists, a
|
385
|
-
* PERMISSION_DENIED error is returned.
|
448
|
+
* `PERMISSION_DENIED` error is returned.
|
386
449
|
* @param {number} request.pageSize
|
387
450
|
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
388
451
|
* to return. If unspecified, defaults to 100. The maximum allowed value is
|
389
452
|
* 1000. Values above 1000 will be coerced to 1000.
|
390
453
|
*
|
391
|
-
* If this field is negative, an INVALID_ARGUMENT error is returned.
|
454
|
+
* If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
392
455
|
* @param {string} request.pageToken
|
393
456
|
* A page token
|
394
457
|
* {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token},
|
@@ -399,7 +462,7 @@ export declare class DocumentServiceClient {
|
|
399
462
|
* When paginating, all other parameters provided to
|
400
463
|
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}
|
401
464
|
* must match the call that provided the page token. Otherwise, an
|
402
|
-
* INVALID_ARGUMENT error is returned.
|
465
|
+
* `INVALID_ARGUMENT` error is returned.
|
403
466
|
* @param {object} [options]
|
404
467
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
405
468
|
* @returns {Stream}
|
@@ -427,13 +490,13 @@ export declare class DocumentServiceClient {
|
|
427
490
|
*
|
428
491
|
* If the caller does not have permission to list {@link |Documents}s under this
|
429
492
|
* branch, regardless of whether or not this branch exists, a
|
430
|
-
* PERMISSION_DENIED error is returned.
|
493
|
+
* `PERMISSION_DENIED` error is returned.
|
431
494
|
* @param {number} request.pageSize
|
432
495
|
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
433
496
|
* to return. If unspecified, defaults to 100. The maximum allowed value is
|
434
497
|
* 1000. Values above 1000 will be coerced to 1000.
|
435
498
|
*
|
436
|
-
* If this field is negative, an INVALID_ARGUMENT error is returned.
|
499
|
+
* If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
437
500
|
* @param {string} request.pageToken
|
438
501
|
* A page token
|
439
502
|
* {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token},
|
@@ -444,7 +507,7 @@ export declare class DocumentServiceClient {
|
|
444
507
|
* When paginating, all other parameters provided to
|
445
508
|
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}
|
446
509
|
* must match the call that provided the page token. Otherwise, an
|
447
|
-
* INVALID_ARGUMENT error is returned.
|
510
|
+
* `INVALID_ARGUMENT` error is returned.
|
448
511
|
* @param {object} [options]
|
449
512
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
450
513
|
* @returns {Object}
|
@@ -690,6 +753,57 @@ export declare class DocumentServiceClient {
|
|
690
753
|
* @returns {string} A string representing the document.
|
691
754
|
*/
|
692
755
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
|
756
|
+
/**
|
757
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
758
|
+
*
|
759
|
+
* @param {string} project
|
760
|
+
* @param {string} location
|
761
|
+
* @param {string} collection
|
762
|
+
* @param {string} data_store
|
763
|
+
* @param {string} schema
|
764
|
+
* @returns {string} Resource name string.
|
765
|
+
*/
|
766
|
+
projectLocationCollectionDataStoreSchemaPath(project: string, location: string, collection: string, dataStore: string, schema: string): string;
|
767
|
+
/**
|
768
|
+
* Parse the project from ProjectLocationCollectionDataStoreSchema resource.
|
769
|
+
*
|
770
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
771
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
772
|
+
* @returns {string} A string representing the project.
|
773
|
+
*/
|
774
|
+
matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
775
|
+
/**
|
776
|
+
* Parse the location from ProjectLocationCollectionDataStoreSchema resource.
|
777
|
+
*
|
778
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
779
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
780
|
+
* @returns {string} A string representing the location.
|
781
|
+
*/
|
782
|
+
matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
783
|
+
/**
|
784
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
|
785
|
+
*
|
786
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
787
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
788
|
+
* @returns {string} A string representing the collection.
|
789
|
+
*/
|
790
|
+
matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
791
|
+
/**
|
792
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
|
793
|
+
*
|
794
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
795
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
796
|
+
* @returns {string} A string representing the data_store.
|
797
|
+
*/
|
798
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
799
|
+
/**
|
800
|
+
* Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
|
801
|
+
*
|
802
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
803
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
804
|
+
* @returns {string} A string representing the schema.
|
805
|
+
*/
|
806
|
+
matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
693
807
|
/**
|
694
808
|
* Return a fully-qualified projectLocationDataStoreBranch resource name string.
|
695
809
|
*
|
@@ -783,6 +897,48 @@ export declare class DocumentServiceClient {
|
|
783
897
|
* @returns {string} A string representing the document.
|
784
898
|
*/
|
785
899
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
|
900
|
+
/**
|
901
|
+
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
902
|
+
*
|
903
|
+
* @param {string} project
|
904
|
+
* @param {string} location
|
905
|
+
* @param {string} data_store
|
906
|
+
* @param {string} schema
|
907
|
+
* @returns {string} Resource name string.
|
908
|
+
*/
|
909
|
+
projectLocationDataStoreSchemaPath(project: string, location: string, dataStore: string, schema: string): string;
|
910
|
+
/**
|
911
|
+
* Parse the project from ProjectLocationDataStoreSchema resource.
|
912
|
+
*
|
913
|
+
* @param {string} projectLocationDataStoreSchemaName
|
914
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
915
|
+
* @returns {string} A string representing the project.
|
916
|
+
*/
|
917
|
+
matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
918
|
+
/**
|
919
|
+
* Parse the location from ProjectLocationDataStoreSchema resource.
|
920
|
+
*
|
921
|
+
* @param {string} projectLocationDataStoreSchemaName
|
922
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
923
|
+
* @returns {string} A string representing the location.
|
924
|
+
*/
|
925
|
+
matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
926
|
+
/**
|
927
|
+
* Parse the data_store from ProjectLocationDataStoreSchema resource.
|
928
|
+
*
|
929
|
+
* @param {string} projectLocationDataStoreSchemaName
|
930
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
931
|
+
* @returns {string} A string representing the data_store.
|
932
|
+
*/
|
933
|
+
matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
934
|
+
/**
|
935
|
+
* Parse the schema from ProjectLocationDataStoreSchema resource.
|
936
|
+
*
|
937
|
+
* @param {string} projectLocationDataStoreSchemaName
|
938
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
939
|
+
* @returns {string} A string representing the schema.
|
940
|
+
*/
|
941
|
+
matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
786
942
|
/**
|
787
943
|
* Terminate the gRPC channel and close the client.
|
788
944
|
*
|
@@ -142,8 +142,10 @@ class DocumentServiceClient {
|
|
142
142
|
this.pathTemplates = {
|
143
143
|
projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
|
144
144
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
145
|
+
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
145
146
|
projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
|
146
147
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
148
|
+
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
147
149
|
};
|
148
150
|
// Some of the methods on this service return "paged" results,
|
149
151
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
@@ -221,8 +223,11 @@ class DocumentServiceClient {
|
|
221
223
|
.operationsClient(opts);
|
222
224
|
const importDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse');
|
223
225
|
const importDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata');
|
226
|
+
const purgeDocumentsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeDocumentsResponse');
|
227
|
+
const purgeDocumentsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeDocumentsMetadata');
|
224
228
|
this.descriptors.longrunning = {
|
225
229
|
importDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importDocumentsResponse.decode.bind(importDocumentsResponse), importDocumentsMetadata.decode.bind(importDocumentsMetadata)),
|
230
|
+
purgeDocuments: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeDocumentsResponse.decode.bind(purgeDocumentsResponse), purgeDocumentsMetadata.decode.bind(purgeDocumentsMetadata)),
|
226
231
|
};
|
227
232
|
// Put together the default options sent with requests.
|
228
233
|
this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.DocumentService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
|
@@ -265,6 +270,7 @@ class DocumentServiceClient {
|
|
265
270
|
'updateDocument',
|
266
271
|
'deleteDocument',
|
267
272
|
'importDocuments',
|
273
|
+
'purgeDocuments',
|
268
274
|
];
|
269
275
|
for (const methodName of documentServiceStubMethods) {
|
270
276
|
const callPromise = this.documentServiceStub.then(stub => (...args) => {
|
@@ -448,6 +454,45 @@ class DocumentServiceClient {
|
|
448
454
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importDocuments, this._gaxModule.createDefaultBackoffSettings());
|
449
455
|
return decodeOperation;
|
450
456
|
}
|
457
|
+
purgeDocuments(request, optionsOrCallback, callback) {
|
458
|
+
var _a;
|
459
|
+
request = request || {};
|
460
|
+
let options;
|
461
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
462
|
+
callback = optionsOrCallback;
|
463
|
+
options = {};
|
464
|
+
}
|
465
|
+
else {
|
466
|
+
options = optionsOrCallback;
|
467
|
+
}
|
468
|
+
options = options || {};
|
469
|
+
options.otherArgs = options.otherArgs || {};
|
470
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
471
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
472
|
+
this._gaxModule.routingHeader.fromParams({
|
473
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
474
|
+
});
|
475
|
+
this.initialize();
|
476
|
+
return this.innerApiCalls.purgeDocuments(request, options, callback);
|
477
|
+
}
|
478
|
+
/**
|
479
|
+
* Check the status of the long running operation returned by `purgeDocuments()`.
|
480
|
+
* @param {String} name
|
481
|
+
* The operation name that will be passed.
|
482
|
+
* @returns {Promise} - The promise which resolves to an object.
|
483
|
+
* The decoded operation object has result and metadata field to get information from.
|
484
|
+
* Please see the
|
485
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
|
486
|
+
* for more details and examples.
|
487
|
+
* @example <caption>include:samples/generated/v1beta/document_service.purge_documents.js</caption>
|
488
|
+
* region_tag:discoveryengine_v1beta_generated_DocumentService_PurgeDocuments_async
|
489
|
+
*/
|
490
|
+
async checkPurgeDocumentsProgress(name) {
|
491
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
492
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
493
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeDocuments, this._gaxModule.createDefaultBackoffSettings());
|
494
|
+
return decodeOperation;
|
495
|
+
}
|
451
496
|
listDocuments(request, optionsOrCallback, callback) {
|
452
497
|
var _a;
|
453
498
|
request = request || {};
|
@@ -481,13 +526,13 @@ class DocumentServiceClient {
|
|
481
526
|
*
|
482
527
|
* If the caller does not have permission to list {@link |Documents}s under this
|
483
528
|
* branch, regardless of whether or not this branch exists, a
|
484
|
-
* PERMISSION_DENIED error is returned.
|
529
|
+
* `PERMISSION_DENIED` error is returned.
|
485
530
|
* @param {number} request.pageSize
|
486
531
|
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
487
532
|
* to return. If unspecified, defaults to 100. The maximum allowed value is
|
488
533
|
* 1000. Values above 1000 will be coerced to 1000.
|
489
534
|
*
|
490
|
-
* If this field is negative, an INVALID_ARGUMENT error is returned.
|
535
|
+
* If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
491
536
|
* @param {string} request.pageToken
|
492
537
|
* A page token
|
493
538
|
* {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token},
|
@@ -498,7 +543,7 @@ class DocumentServiceClient {
|
|
498
543
|
* When paginating, all other parameters provided to
|
499
544
|
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}
|
500
545
|
* must match the call that provided the page token. Otherwise, an
|
501
|
-
* INVALID_ARGUMENT error is returned.
|
546
|
+
* `INVALID_ARGUMENT` error is returned.
|
502
547
|
* @param {object} [options]
|
503
548
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
504
549
|
* @returns {Stream}
|
@@ -540,13 +585,13 @@ class DocumentServiceClient {
|
|
540
585
|
*
|
541
586
|
* If the caller does not have permission to list {@link |Documents}s under this
|
542
587
|
* branch, regardless of whether or not this branch exists, a
|
543
|
-
* PERMISSION_DENIED error is returned.
|
588
|
+
* `PERMISSION_DENIED` error is returned.
|
544
589
|
* @param {number} request.pageSize
|
545
590
|
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
546
591
|
* to return. If unspecified, defaults to 100. The maximum allowed value is
|
547
592
|
* 1000. Values above 1000 will be coerced to 1000.
|
548
593
|
*
|
549
|
-
* If this field is negative, an INVALID_ARGUMENT error is returned.
|
594
|
+
* If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
550
595
|
* @param {string} request.pageToken
|
551
596
|
* A page token
|
552
597
|
* {@link google.cloud.discoveryengine.v1beta.ListDocumentsResponse.next_page_token|ListDocumentsResponse.next_page_token},
|
@@ -557,7 +602,7 @@ class DocumentServiceClient {
|
|
557
602
|
* When paginating, all other parameters provided to
|
558
603
|
* {@link google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments|DocumentService.ListDocuments}
|
559
604
|
* must match the call that provided the page token. Otherwise, an
|
560
|
-
* INVALID_ARGUMENT error is returned.
|
605
|
+
* `INVALID_ARGUMENT` error is returned.
|
561
606
|
* @param {object} [options]
|
562
607
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
563
608
|
* @returns {Object}
|
@@ -867,6 +912,75 @@ class DocumentServiceClient {
|
|
867
912
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
|
868
913
|
return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
|
869
914
|
}
|
915
|
+
/**
|
916
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
917
|
+
*
|
918
|
+
* @param {string} project
|
919
|
+
* @param {string} location
|
920
|
+
* @param {string} collection
|
921
|
+
* @param {string} data_store
|
922
|
+
* @param {string} schema
|
923
|
+
* @returns {string} Resource name string.
|
924
|
+
*/
|
925
|
+
projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
|
926
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
|
927
|
+
project: project,
|
928
|
+
location: location,
|
929
|
+
collection: collection,
|
930
|
+
data_store: dataStore,
|
931
|
+
schema: schema,
|
932
|
+
});
|
933
|
+
}
|
934
|
+
/**
|
935
|
+
* Parse the project from ProjectLocationCollectionDataStoreSchema resource.
|
936
|
+
*
|
937
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
938
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
939
|
+
* @returns {string} A string representing the project.
|
940
|
+
*/
|
941
|
+
matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
942
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
|
943
|
+
}
|
944
|
+
/**
|
945
|
+
* Parse the location from ProjectLocationCollectionDataStoreSchema resource.
|
946
|
+
*
|
947
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
948
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
949
|
+
* @returns {string} A string representing the location.
|
950
|
+
*/
|
951
|
+
matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
952
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
|
953
|
+
}
|
954
|
+
/**
|
955
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
|
956
|
+
*
|
957
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
958
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
959
|
+
* @returns {string} A string representing the collection.
|
960
|
+
*/
|
961
|
+
matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
962
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
|
963
|
+
}
|
964
|
+
/**
|
965
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
|
966
|
+
*
|
967
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
968
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
969
|
+
* @returns {string} A string representing the data_store.
|
970
|
+
*/
|
971
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
972
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
|
973
|
+
}
|
974
|
+
/**
|
975
|
+
* Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
|
976
|
+
*
|
977
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
978
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
979
|
+
* @returns {string} A string representing the schema.
|
980
|
+
*/
|
981
|
+
matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
982
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
|
983
|
+
}
|
870
984
|
/**
|
871
985
|
* Return a fully-qualified projectLocationDataStoreBranch resource name string.
|
872
986
|
*
|
@@ -993,6 +1107,63 @@ class DocumentServiceClient {
|
|
993
1107
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
|
994
1108
|
return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
|
995
1109
|
}
|
1110
|
+
/**
|
1111
|
+
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
1112
|
+
*
|
1113
|
+
* @param {string} project
|
1114
|
+
* @param {string} location
|
1115
|
+
* @param {string} data_store
|
1116
|
+
* @param {string} schema
|
1117
|
+
* @returns {string} Resource name string.
|
1118
|
+
*/
|
1119
|
+
projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
|
1120
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
|
1121
|
+
project: project,
|
1122
|
+
location: location,
|
1123
|
+
data_store: dataStore,
|
1124
|
+
schema: schema,
|
1125
|
+
});
|
1126
|
+
}
|
1127
|
+
/**
|
1128
|
+
* Parse the project from ProjectLocationDataStoreSchema resource.
|
1129
|
+
*
|
1130
|
+
* @param {string} projectLocationDataStoreSchemaName
|
1131
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
1132
|
+
* @returns {string} A string representing the project.
|
1133
|
+
*/
|
1134
|
+
matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
1135
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
|
1136
|
+
}
|
1137
|
+
/**
|
1138
|
+
* Parse the location from ProjectLocationDataStoreSchema resource.
|
1139
|
+
*
|
1140
|
+
* @param {string} projectLocationDataStoreSchemaName
|
1141
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
1142
|
+
* @returns {string} A string representing the location.
|
1143
|
+
*/
|
1144
|
+
matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
1145
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
|
1146
|
+
}
|
1147
|
+
/**
|
1148
|
+
* Parse the data_store from ProjectLocationDataStoreSchema resource.
|
1149
|
+
*
|
1150
|
+
* @param {string} projectLocationDataStoreSchemaName
|
1151
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
1152
|
+
* @returns {string} A string representing the data_store.
|
1153
|
+
*/
|
1154
|
+
matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
1155
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
|
1156
|
+
}
|
1157
|
+
/**
|
1158
|
+
* Parse the schema from ProjectLocationDataStoreSchema resource.
|
1159
|
+
*
|
1160
|
+
* @param {string} projectLocationDataStoreSchemaName
|
1161
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
1162
|
+
* @returns {string} A string representing the schema.
|
1163
|
+
*/
|
1164
|
+
matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
1165
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
|
1166
|
+
}
|
996
1167
|
/**
|
997
1168
|
* Terminate the gRPC channel and close the client.
|
998
1169
|
*
|
@@ -70,6 +70,11 @@
|
|
70
70
|
"timeout_millis": 300000,
|
71
71
|
"retry_codes_name": "unavailable",
|
72
72
|
"retry_params_name": "e6a9f61a856ca7c2128ab9550ca4fb9e97c77876"
|
73
|
+
},
|
74
|
+
"PurgeDocuments": {
|
75
|
+
"timeout_millis": 30000,
|
76
|
+
"retry_codes_name": "unavailable",
|
77
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
73
78
|
}
|
74
79
|
}
|
75
80
|
}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
export { CompletionServiceClient } from './completion_service_client';
|
1
2
|
export { DocumentServiceClient } from './document_service_client';
|
2
3
|
export { RecommendationServiceClient } from './recommendation_service_client';
|
4
|
+
export { SchemaServiceClient } from './schema_service_client';
|
5
|
+
export { SearchServiceClient } from './search_service_client';
|
3
6
|
export { UserEventServiceClient } from './user_event_service_client';
|