@google-cloud/discoveryengine 1.12.0 → 1.13.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +4 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +55 -2
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +1 -1
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +31 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +38 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +28 -9
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +7 -1
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +23 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +11 -1
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +4 -1
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +6 -2
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +1 -1
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +114 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +57 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +5 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +407 -11
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +14 -5
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +126 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +3 -0
  21. package/build/protos/protos.d.ts +3703 -219
  22. package/build/protos/protos.js +35486 -26672
  23. package/build/protos/protos.json +844 -46
  24. package/build/src/v1alpha/completion_service_client.d.ts +91 -0
  25. package/build/src/v1alpha/completion_service_client.js +90 -0
  26. package/build/src/v1alpha/completion_service_client_config.json +10 -0
  27. package/build/src/v1alpha/conversational_search_service_client.d.ts +18 -0
  28. package/build/src/v1alpha/data_store_service_client.d.ts +12 -3
  29. package/build/src/v1alpha/data_store_service_client.js +8 -2
  30. package/build/src/v1alpha/document_service_client.d.ts +4 -0
  31. package/build/src/v1alpha/document_service_client.js +6 -0
  32. package/build/src/v1alpha/engine_service_client.js +6 -0
  33. package/build/src/v1alpha/estimate_billing_service_client.js +6 -0
  34. package/build/src/v1alpha/evaluation_service_client.js +6 -0
  35. package/build/src/v1alpha/project_service_client.js +6 -0
  36. package/build/src/v1alpha/sample_query_service_client.js +6 -0
  37. package/build/src/v1alpha/schema_service_client.js +6 -0
  38. package/build/src/v1alpha/search_service_client.d.ts +219 -21
  39. package/build/src/v1alpha/search_service_client.js +146 -14
  40. package/build/src/v1alpha/search_tuning_service_client.js +6 -0
  41. package/build/src/v1alpha/site_search_engine_service_client.d.ts +101 -0
  42. package/build/src/v1alpha/site_search_engine_service_client.js +70 -0
  43. package/build/src/v1alpha/site_search_engine_service_client_config.json +8 -0
  44. package/build/src/v1alpha/user_event_service_client.js +6 -0
  45. package/package.json +2 -2
@@ -180,6 +180,33 @@ export declare class SiteSearchEngineServiceClient {
180
180
  ]>;
181
181
  getTargetSite(request: protos.google.cloud.discoveryengine.v1alpha.IGetTargetSiteRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.ITargetSite, protos.google.cloud.discoveryengine.v1alpha.IGetTargetSiteRequest | null | undefined, {} | null | undefined>): void;
182
182
  getTargetSite(request: protos.google.cloud.discoveryengine.v1alpha.IGetTargetSiteRequest, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.ITargetSite, protos.google.cloud.discoveryengine.v1alpha.IGetTargetSiteRequest | null | undefined, {} | null | undefined>): void;
183
+ /**
184
+ * Gets the URI Pattern to Document data mapping for an Advanced Site Search
185
+ * DataStore.
186
+ *
187
+ * @param {Object} request
188
+ * The request object that will be sent.
189
+ * @param {string} request.siteSearchEngine
190
+ * Required. Full resource name of the
191
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SiteSearchEngine|SiteSearchEngine},
192
+ * such as
193
+ * `projects/* /locations/* /collections/* /dataStores/* /siteSearchEngine`.
194
+ * @param {object} [options]
195
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
196
+ * @returns {Promise} - The promise which resolves to an array.
197
+ * The first element of the array is an object representing {@link protos.google.cloud.discoveryengine.v1alpha.GetUriPatternDocumentDataResponse|GetUriPatternDocumentDataResponse}.
198
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
199
+ * for more details and examples.
200
+ * @example <caption>include:samples/generated/v1alpha/site_search_engine_service.get_uri_pattern_document_data.js</caption>
201
+ * region_tag:discoveryengine_v1alpha_generated_SiteSearchEngineService_GetUriPatternDocumentData_async
202
+ */
203
+ getUriPatternDocumentData(request?: protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataRequest, options?: CallOptions): Promise<[
204
+ protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataResponse,
205
+ (protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataRequest | undefined),
206
+ {} | undefined
207
+ ]>;
208
+ getUriPatternDocumentData(request: protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataResponse, protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataRequest | null | undefined, {} | null | undefined>): void;
209
+ getUriPatternDocumentData(request: protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataRequest, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataResponse, protos.google.cloud.discoveryengine.v1alpha.IGetUriPatternDocumentDataRequest | null | undefined, {} | null | undefined>): void;
183
210
  /**
184
211
  * Creates a {@link protos.google.cloud.discoveryengine.v1alpha.TargetSite|TargetSite}.
185
212
  *
@@ -521,6 +548,80 @@ export declare class SiteSearchEngineServiceClient {
521
548
  * region_tag:discoveryengine_v1alpha_generated_SiteSearchEngineService_BatchVerifyTargetSites_async
522
549
  */
523
550
  checkBatchVerifyTargetSitesProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesResponse, protos.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesMetadata>>;
551
+ /**
552
+ * Sets the URI Pattern to Document data mapping for an Advanced Site Search
553
+ * DataStore.
554
+ *
555
+ * @param {Object} request
556
+ * The request object that will be sent.
557
+ * @param {string} request.siteSearchEngine
558
+ * Required. Full resource name of the
559
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SiteSearchEngine|SiteSearchEngine},
560
+ * such as
561
+ * `projects/* /locations/* /collections/* /dataStores/* /siteSearchEngine`.
562
+ * @param {number[]} request.documentDataMap
563
+ * Document data keyed by URI pattern. Each entry must be consistent with
564
+ * the {@link protos.google.cloud.discoveryengine.v1alpha.Schema|Schema}. For example:
565
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Schema|Schema} = {
566
+ * "type": "object",
567
+ * "properties": {
568
+ * "Categories": {
569
+ * "type": "array",
570
+ * "items": {
571
+ * "retrievable": true,
572
+ * "type": "string"
573
+ * }
574
+ * }
575
+ * }
576
+ *
577
+ * document_data_map = {
578
+ * "www.url1.com/*": {
579
+ * "Categories": ["category1", "category2"]
580
+ * },
581
+ * "www.url2.com/*": {
582
+ * "Categories": ["category3"]
583
+ * }
584
+ * }
585
+ * @param {boolean} request.emptyDocumentDataMap
586
+ * If true, clears the document data map. If true,
587
+ * {@link protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataRequest.document_data_map|SetUriPatternDocumentDataRequest.document_data_map}
588
+ * must be empty.
589
+ * @param {google.protobuf.Struct} request.schema
590
+ * Optional. If not provided, the current
591
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Schema|Schema} is used. If provided,
592
+ * validates and updates the
593
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Schema|Schema}. If validation fails,
594
+ * an error is returned.
595
+ * @param {object} [options]
596
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
597
+ * @returns {Promise} - The promise which resolves to an array.
598
+ * The first element of the array is an object representing
599
+ * a long running operation. Its `promise()` method returns a promise
600
+ * you can `await` for.
601
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
602
+ * for more details and examples.
603
+ * @example <caption>include:samples/generated/v1alpha/site_search_engine_service.set_uri_pattern_document_data.js</caption>
604
+ * region_tag:discoveryengine_v1alpha_generated_SiteSearchEngineService_SetUriPatternDocumentData_async
605
+ */
606
+ setUriPatternDocumentData(request?: protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataRequest, options?: CallOptions): Promise<[
607
+ LROperation<protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataResponse, protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataMetadata>,
608
+ protos.google.longrunning.IOperation | undefined,
609
+ {} | undefined
610
+ ]>;
611
+ setUriPatternDocumentData(request: protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataResponse, protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
612
+ setUriPatternDocumentData(request: protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataRequest, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataResponse, protos.google.cloud.discoveryengine.v1alpha.ISetUriPatternDocumentDataMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
613
+ /**
614
+ * Check the status of the long running operation returned by `setUriPatternDocumentData()`.
615
+ * @param {String} name
616
+ * The operation name that will be passed.
617
+ * @returns {Promise} - The promise which resolves to an object.
618
+ * The decoded operation object has result and metadata field to get information from.
619
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
620
+ * for more details and examples.
621
+ * @example <caption>include:samples/generated/v1alpha/site_search_engine_service.set_uri_pattern_document_data.js</caption>
622
+ * region_tag:discoveryengine_v1alpha_generated_SiteSearchEngineService_SetUriPatternDocumentData_async
623
+ */
624
+ checkSetUriPatternDocumentDataProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataResponse, protos.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataMetadata>>;
524
625
  /**
525
626
  * Gets a list of
526
627
  * {@link protos.google.cloud.discoveryengine.v1alpha.TargetSite|TargetSite}s.
@@ -257,6 +257,9 @@ class SiteSearchEngineServiceClient {
257
257
  {
258
258
  get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
259
259
  },
260
+ {
261
+ get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
262
+ },
260
263
  { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
261
264
  {
262
265
  get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
@@ -301,6 +304,9 @@ class SiteSearchEngineServiceClient {
301
304
  {
302
305
  get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
303
306
  },
307
+ {
308
+ get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
309
+ },
304
310
  { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
305
311
  { get: '/v1alpha/{name=projects/*}/operations' },
306
312
  ],
@@ -326,6 +332,8 @@ class SiteSearchEngineServiceClient {
326
332
  const recrawlUrisMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.RecrawlUrisMetadata');
327
333
  const batchVerifyTargetSitesResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesResponse');
328
334
  const batchVerifyTargetSitesMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.BatchVerifyTargetSitesMetadata');
335
+ const setUriPatternDocumentDataResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataResponse');
336
+ const setUriPatternDocumentDataMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1alpha.SetUriPatternDocumentDataMetadata');
329
337
  this.descriptors.longrunning = {
330
338
  createTargetSite: new this._gaxModule.LongrunningDescriptor(this.operationsClient, createTargetSiteResponse.decode.bind(createTargetSiteResponse), createTargetSiteMetadata.decode.bind(createTargetSiteMetadata)),
331
339
  batchCreateTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchCreateTargetSitesResponse.decode.bind(batchCreateTargetSitesResponse), batchCreateTargetSitesMetadata.decode.bind(batchCreateTargetSitesMetadata)),
@@ -335,6 +343,7 @@ class SiteSearchEngineServiceClient {
335
343
  disableAdvancedSiteSearch: new this._gaxModule.LongrunningDescriptor(this.operationsClient, disableAdvancedSiteSearchResponse.decode.bind(disableAdvancedSiteSearchResponse), disableAdvancedSiteSearchMetadata.decode.bind(disableAdvancedSiteSearchMetadata)),
336
344
  recrawlUris: new this._gaxModule.LongrunningDescriptor(this.operationsClient, recrawlUrisResponse.decode.bind(recrawlUrisResponse), recrawlUrisMetadata.decode.bind(recrawlUrisMetadata)),
337
345
  batchVerifyTargetSites: new this._gaxModule.LongrunningDescriptor(this.operationsClient, batchVerifyTargetSitesResponse.decode.bind(batchVerifyTargetSitesResponse), batchVerifyTargetSitesMetadata.decode.bind(batchVerifyTargetSitesMetadata)),
346
+ setUriPatternDocumentData: new this._gaxModule.LongrunningDescriptor(this.operationsClient, setUriPatternDocumentDataResponse.decode.bind(setUriPatternDocumentDataResponse), setUriPatternDocumentDataMetadata.decode.bind(setUriPatternDocumentDataMetadata)),
338
347
  };
339
348
  // Put together the default options sent with requests.
340
349
  this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1alpha.SiteSearchEngineService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
@@ -383,6 +392,8 @@ class SiteSearchEngineServiceClient {
383
392
  'recrawlUris',
384
393
  'batchVerifyTargetSites',
385
394
  'fetchDomainVerificationStatus',
395
+ 'setUriPatternDocumentData',
396
+ 'getUriPatternDocumentData',
386
397
  ];
387
398
  for (const methodName of siteSearchEngineServiceStubMethods) {
388
399
  const callPromise = this.siteSearchEngineServiceStub.then(stub => (...args) => {
@@ -504,6 +515,27 @@ class SiteSearchEngineServiceClient {
504
515
  this.initialize();
505
516
  return this.innerApiCalls.getTargetSite(request, options, callback);
506
517
  }
518
+ getUriPatternDocumentData(request, optionsOrCallback, callback) {
519
+ var _a;
520
+ request = request || {};
521
+ let options;
522
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
523
+ callback = optionsOrCallback;
524
+ options = {};
525
+ }
526
+ else {
527
+ options = optionsOrCallback;
528
+ }
529
+ options = options || {};
530
+ options.otherArgs = options.otherArgs || {};
531
+ options.otherArgs.headers = options.otherArgs.headers || {};
532
+ options.otherArgs.headers['x-goog-request-params'] =
533
+ this._gaxModule.routingHeader.fromParams({
534
+ site_search_engine: (_a = request.siteSearchEngine) !== null && _a !== void 0 ? _a : '',
535
+ });
536
+ this.initialize();
537
+ return this.innerApiCalls.getUriPatternDocumentData(request, options, callback);
538
+ }
507
539
  createTargetSite(request, optionsOrCallback, callback) {
508
540
  var _a;
509
541
  request = request || {};
@@ -808,6 +840,44 @@ class SiteSearchEngineServiceClient {
808
840
  const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.batchVerifyTargetSites, this._gaxModule.createDefaultBackoffSettings());
809
841
  return decodeOperation;
810
842
  }
843
+ setUriPatternDocumentData(request, optionsOrCallback, callback) {
844
+ var _a;
845
+ request = request || {};
846
+ let options;
847
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
848
+ callback = optionsOrCallback;
849
+ options = {};
850
+ }
851
+ else {
852
+ options = optionsOrCallback;
853
+ }
854
+ options = options || {};
855
+ options.otherArgs = options.otherArgs || {};
856
+ options.otherArgs.headers = options.otherArgs.headers || {};
857
+ options.otherArgs.headers['x-goog-request-params'] =
858
+ this._gaxModule.routingHeader.fromParams({
859
+ site_search_engine: (_a = request.siteSearchEngine) !== null && _a !== void 0 ? _a : '',
860
+ });
861
+ this.initialize();
862
+ return this.innerApiCalls.setUriPatternDocumentData(request, options, callback);
863
+ }
864
+ /**
865
+ * Check the status of the long running operation returned by `setUriPatternDocumentData()`.
866
+ * @param {String} name
867
+ * The operation name that will be passed.
868
+ * @returns {Promise} - The promise which resolves to an object.
869
+ * The decoded operation object has result and metadata field to get information from.
870
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
871
+ * for more details and examples.
872
+ * @example <caption>include:samples/generated/v1alpha/site_search_engine_service.set_uri_pattern_document_data.js</caption>
873
+ * region_tag:discoveryengine_v1alpha_generated_SiteSearchEngineService_SetUriPatternDocumentData_async
874
+ */
875
+ async checkSetUriPatternDocumentDataProgress(name) {
876
+ const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
877
+ const [operation] = await this.operationsClient.getOperation(request);
878
+ const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.setUriPatternDocumentData, this._gaxModule.createDefaultBackoffSettings());
879
+ return decodeOperation;
880
+ }
811
881
  listTargetSites(request, optionsOrCallback, callback) {
812
882
  var _a;
813
883
  request = request || {};
@@ -67,6 +67,14 @@
67
67
  "FetchDomainVerificationStatus": {
68
68
  "retry_codes_name": "non_idempotent",
69
69
  "retry_params_name": "default"
70
+ },
71
+ "SetUriPatternDocumentData": {
72
+ "retry_codes_name": "non_idempotent",
73
+ "retry_params_name": "default"
74
+ },
75
+ "GetUriPatternDocumentData": {
76
+ "retry_codes_name": "non_idempotent",
77
+ "retry_params_name": "default"
70
78
  }
71
79
  }
72
80
  }
@@ -249,6 +249,9 @@ class UserEventServiceClient {
249
249
  {
250
250
  get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
251
251
  },
252
+ {
253
+ get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*/operations/*}',
254
+ },
252
255
  { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
253
256
  {
254
257
  get: '/v1alpha/{name=projects/*/locations/*/sampleQuerySets/*/operations/*}',
@@ -293,6 +296,9 @@ class UserEventServiceClient {
293
296
  {
294
297
  get: '/v1alpha/{name=projects/*/locations/*/dataStores/*}/operations',
295
298
  },
299
+ {
300
+ get: '/v1alpha/{name=projects/*/locations/*/identity_mapping_stores/*}/operations',
301
+ },
296
302
  { get: '/v1alpha/{name=projects/*/locations/*}/operations' },
297
303
  { get: '/v1alpha/{name=projects/*}/operations' },
298
304
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-cloud/discoveryengine",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Discovery Engine API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  "postpack": "minifyProtoJson",
44
44
  "samples-test": "cd samples/ && npm link ../ && npm i && npm test",
45
45
  "system-test": "c8 mocha build/system-test",
46
- "test": "c8 mocha build/test"
46
+ "test": "NODE_OPTIONS=--max-old-space-size=8192 c8 mocha build/test"
47
47
  },
48
48
  "dependencies": {
49
49
  "google-gax": "^4.0.3"