@google-cloud/discoveryengine 2.0.0 → 2.1.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 (149) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +7 -2
  3. package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
  5. package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
  6. package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
  7. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
  8. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
  9. package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
  10. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
  12. package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
  13. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
  14. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
  15. package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
  16. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
  17. package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
  18. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
  19. package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
  20. package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
  21. package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
  22. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
  23. package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
  24. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
  25. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
  26. package/build/protos/protos.d.ts +5356 -981
  27. package/build/protos/protos.js +32266 -20956
  28. package/build/protos/protos.json +1391 -74
  29. package/build/src/index.d.ts +4 -1
  30. package/build/src/index.js +4 -1
  31. package/build/src/v1/completion_service_client.d.ts +238 -1
  32. package/build/src/v1/completion_service_client.js +341 -5
  33. package/build/src/v1/completion_service_proto_list.json +3 -0
  34. package/build/src/v1/control_service_client.d.ts +237 -0
  35. package/build/src/v1/control_service_client.js +347 -7
  36. package/build/src/v1/control_service_proto_list.json +3 -0
  37. package/build/src/v1/conversational_search_service_client.d.ts +213 -6
  38. package/build/src/v1/conversational_search_service_client.js +316 -22
  39. package/build/src/v1/conversational_search_service_client_config.json +5 -0
  40. package/build/src/v1/conversational_search_service_proto_list.json +3 -0
  41. package/build/src/v1/data_store_service_client.d.ts +238 -1
  42. package/build/src/v1/data_store_service_client.js +347 -7
  43. package/build/src/v1/data_store_service_proto_list.json +3 -0
  44. package/build/src/v1/document_service_client.d.ts +245 -2
  45. package/build/src/v1/document_service_client.js +356 -10
  46. package/build/src/v1/document_service_proto_list.json +3 -0
  47. package/build/src/v1/engine_service_client.d.ts +238 -1
  48. package/build/src/v1/engine_service_client.js +347 -7
  49. package/build/src/v1/engine_service_proto_list.json +3 -0
  50. package/build/src/v1/gapic_metadata.json +59 -0
  51. package/build/src/v1/grounded_generation_service_client.d.ts +238 -3
  52. package/build/src/v1/grounded_generation_service_client.js +335 -3
  53. package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
  54. package/build/src/v1/index.d.ts +1 -0
  55. package/build/src/v1/index.js +3 -1
  56. package/build/src/v1/project_service_client.d.ts +238 -1
  57. package/build/src/v1/project_service_client.js +329 -1
  58. package/build/src/v1/project_service_proto_list.json +3 -0
  59. package/build/src/v1/rank_service_client.d.ts +238 -1
  60. package/build/src/v1/rank_service_client.js +329 -1
  61. package/build/src/v1/rank_service_proto_list.json +3 -0
  62. package/build/src/v1/recommendation_service_client.d.ts +95 -2
  63. package/build/src/v1/recommendation_service_client.js +131 -1
  64. package/build/src/v1/recommendation_service_proto_list.json +3 -0
  65. package/build/src/v1/schema_service_client.d.ts +238 -1
  66. package/build/src/v1/schema_service_client.js +347 -7
  67. package/build/src/v1/schema_service_proto_list.json +3 -0
  68. package/build/src/v1/search_service_client.d.ts +219 -30
  69. package/build/src/v1/search_service_client.js +230 -26
  70. package/build/src/v1/search_service_proto_list.json +3 -0
  71. package/build/src/v1/search_tuning_service_client.d.ts +238 -1
  72. package/build/src/v1/search_tuning_service_client.js +332 -2
  73. package/build/src/v1/search_tuning_service_proto_list.json +3 -0
  74. package/build/src/v1/serving_config_service_client.d.ts +1851 -0
  75. package/build/src/v1/serving_config_service_client.js +2653 -0
  76. package/build/src/v1/serving_config_service_client_config.json +30 -0
  77. package/build/src/v1/serving_config_service_proto_list.json +39 -0
  78. package/build/src/v1/site_search_engine_service_client.d.ts +357 -4
  79. package/build/src/v1/site_search_engine_service_client.js +521 -16
  80. package/build/src/v1/site_search_engine_service_client_config.json +12 -0
  81. package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
  82. package/build/src/v1/user_event_service_client.d.ts +259 -10
  83. package/build/src/v1/user_event_service_client.js +338 -4
  84. package/build/src/v1/user_event_service_proto_list.json +3 -0
  85. package/build/src/v1alpha/acl_config_service_client.js +6 -2
  86. package/build/src/v1alpha/chunk_service_client.js +12 -4
  87. package/build/src/v1alpha/completion_service_client.d.ts +1 -1
  88. package/build/src/v1alpha/completion_service_client.js +15 -5
  89. package/build/src/v1alpha/control_service_client.js +21 -7
  90. package/build/src/v1alpha/conversational_search_service_client.js +51 -17
  91. package/build/src/v1alpha/data_store_service_client.d.ts +1 -1
  92. package/build/src/v1alpha/data_store_service_client.js +27 -9
  93. package/build/src/v1alpha/document_service_client.d.ts +1 -1
  94. package/build/src/v1alpha/document_service_client.js +33 -11
  95. package/build/src/v1alpha/engine_service_client.d.ts +1 -1
  96. package/build/src/v1alpha/engine_service_client.js +30 -10
  97. package/build/src/v1alpha/estimate_billing_service_client.d.ts +1 -1
  98. package/build/src/v1alpha/estimate_billing_service_client.js +3 -1
  99. package/build/src/v1alpha/evaluation_service_client.d.ts +1 -1
  100. package/build/src/v1alpha/evaluation_service_client.js +24 -8
  101. package/build/src/v1alpha/grounded_generation_service_client.js +3 -1
  102. package/build/src/v1alpha/project_service_client.d.ts +1 -1
  103. package/build/src/v1alpha/project_service_client.js +9 -3
  104. package/build/src/v1alpha/rank_service_client.js +3 -1
  105. package/build/src/v1alpha/recommendation_service_client.js +3 -1
  106. package/build/src/v1alpha/sample_query_service_client.d.ts +1 -1
  107. package/build/src/v1alpha/sample_query_service_client.js +24 -8
  108. package/build/src/v1alpha/sample_query_set_service_client.js +21 -7
  109. package/build/src/v1alpha/schema_service_client.d.ts +1 -1
  110. package/build/src/v1alpha/schema_service_client.js +21 -7
  111. package/build/src/v1alpha/search_service_client.js +9 -3
  112. package/build/src/v1alpha/search_tuning_service_client.d.ts +1 -1
  113. package/build/src/v1alpha/search_tuning_service_client.js +6 -2
  114. package/build/src/v1alpha/serving_config_service_client.js +15 -5
  115. package/build/src/v1alpha/site_search_engine_service_client.d.ts +1 -1
  116. package/build/src/v1alpha/site_search_engine_service_client.js +54 -18
  117. package/build/src/v1alpha/user_event_service_client.d.ts +1 -1
  118. package/build/src/v1alpha/user_event_service_client.js +12 -4
  119. package/build/src/v1beta/completion_service_client.d.ts +1 -1
  120. package/build/src/v1beta/completion_service_client.js +18 -6
  121. package/build/src/v1beta/control_service_client.js +21 -7
  122. package/build/src/v1beta/conversational_search_service_client.js +51 -17
  123. package/build/src/v1beta/data_store_service_client.d.ts +1 -1
  124. package/build/src/v1beta/data_store_service_client.js +21 -7
  125. package/build/src/v1beta/document_service_client.d.ts +1 -1
  126. package/build/src/v1beta/document_service_client.js +30 -10
  127. package/build/src/v1beta/engine_service_client.d.ts +1 -1
  128. package/build/src/v1beta/engine_service_client.js +30 -10
  129. package/build/src/v1beta/evaluation_service_client.d.ts +1 -1
  130. package/build/src/v1beta/evaluation_service_client.js +24 -8
  131. package/build/src/v1beta/grounded_generation_service_client.js +9 -3
  132. package/build/src/v1beta/project_service_client.d.ts +1 -1
  133. package/build/src/v1beta/project_service_client.js +3 -1
  134. package/build/src/v1beta/rank_service_client.js +3 -1
  135. package/build/src/v1beta/recommendation_service_client.js +3 -1
  136. package/build/src/v1beta/sample_query_service_client.d.ts +1 -1
  137. package/build/src/v1beta/sample_query_service_client.js +24 -8
  138. package/build/src/v1beta/sample_query_set_service_client.js +21 -7
  139. package/build/src/v1beta/schema_service_client.d.ts +1 -1
  140. package/build/src/v1beta/schema_service_client.js +21 -7
  141. package/build/src/v1beta/search_service_client.js +18 -6
  142. package/build/src/v1beta/search_tuning_service_client.d.ts +1 -1
  143. package/build/src/v1beta/search_tuning_service_client.js +6 -2
  144. package/build/src/v1beta/serving_config_service_client.js +15 -5
  145. package/build/src/v1beta/site_search_engine_service_client.d.ts +1 -1
  146. package/build/src/v1beta/site_search_engine_service_client.js +57 -19
  147. package/build/src/v1beta/user_event_service_client.d.ts +1 -1
  148. package/build/src/v1beta/user_event_service_client.js +12 -4
  149. package/package.json +5 -5
@@ -183,6 +183,7 @@ class SearchServiceClient {
183
183
  projectLocationCollectionDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}'),
184
184
  projectLocationCollectionDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
185
185
  projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
186
+ projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
186
187
  projectLocationCollectionDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
187
188
  projectLocationCollectionEngineControlPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/controls/{control}'),
188
189
  projectLocationCollectionEngineConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/conversations/{conversation}'),
@@ -202,6 +203,7 @@ class SearchServiceClient {
202
203
  projectLocationDataStoreSessionPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}'),
203
204
  projectLocationDataStoreSessionAnswerPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/sessions/{session}/answers/{answer}'),
204
205
  projectLocationDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine'),
206
+ projectLocationDataStoreSiteSearchEngineSitemapPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}'),
205
207
  projectLocationDataStoreSiteSearchEngineTargetSitePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}'),
206
208
  };
207
209
  // Some of the methods on this service return "paged" results,
@@ -338,7 +340,9 @@ class SearchServiceClient {
338
340
  this._gaxModule.routingHeader.fromParams({
339
341
  serving_config: request.servingConfig ?? '',
340
342
  });
341
- this.initialize();
343
+ this.initialize().catch(err => {
344
+ throw err;
345
+ });
342
346
  const wrappedCallback = callback
343
347
  ? (error, values, nextPageRequest, rawResponse) => {
344
348
  this._log.info('search values %j', values);
@@ -407,10 +411,13 @@ class SearchServiceClient {
407
411
  * This applies to each OneBox type individually.
408
412
  * Default number is 10.
409
413
  * @param {number[]} request.dataStoreSpecs
410
- * Specs defining dataStores to filter on in a search call and configurations
411
- * for those dataStores. This is only considered for engines with multiple
412
- * dataStores use case. For single dataStore within an engine, they should
413
- * use the specs at the top level.
414
+ * Specifications that define the specific
415
+ * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
416
+ * along with configurations for those data stores. This is only considered
417
+ * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
418
+ * stores. For engines with a single data store, the specs directly under
419
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
420
+ * used.
414
421
  * @param {string} request.filter
415
422
  * The filter syntax consists of an expression language for constructing a
416
423
  * predicate from one or more fields of the documents being filtered. Filter
@@ -455,7 +462,7 @@ class SearchServiceClient {
455
462
  * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
456
463
  * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
457
464
  * Information about the end user.
458
- * Highly recommended for analytics.
465
+ * Highly recommended for analytics and personalization.
459
466
  * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
460
467
  * is used to deduce `device_type` for analytics.
461
468
  * @param {string} request.languageCode
@@ -537,6 +544,9 @@ class SearchServiceClient {
537
544
  * Search as you type configuration. Only supported for the
538
545
  * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
539
546
  * vertical.
547
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
548
+ * Optional. Config for display feature, like match highlighting on search
549
+ * results.
540
550
  * @param {string} request.session
541
551
  * The session resource name. Optional.
542
552
  *
@@ -568,6 +578,16 @@ class SearchServiceClient {
568
578
  * Session specification.
569
579
  *
570
580
  * Can be used only when `session` is set.
581
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
582
+ * The relevance threshold of the search results.
583
+ *
584
+ * Default to Google defined threshold, leveraging a balance of
585
+ * precision and recall to deliver both highly accurate results and
586
+ * comprehensive coverage of relevant information.
587
+ *
588
+ * This feature is not supported for healthcare search.
589
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
590
+ * Optional. The specification for returning the relevance score.
571
591
  * @param {object} [options]
572
592
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
573
593
  * @returns {Stream}
@@ -590,7 +610,9 @@ class SearchServiceClient {
590
610
  });
591
611
  const defaultCallSettings = this._defaults['search'];
592
612
  const callSettings = defaultCallSettings.merge(options);
593
- this.initialize();
613
+ this.initialize().catch(err => {
614
+ throw err;
615
+ });
594
616
  this._log.info('search stream %j', request);
595
617
  return this.descriptors.page.search.createStream(this.innerApiCalls.search, request, callSettings);
596
618
  }
@@ -650,10 +672,13 @@ class SearchServiceClient {
650
672
  * This applies to each OneBox type individually.
651
673
  * Default number is 10.
652
674
  * @param {number[]} request.dataStoreSpecs
653
- * Specs defining dataStores to filter on in a search call and configurations
654
- * for those dataStores. This is only considered for engines with multiple
655
- * dataStores use case. For single dataStore within an engine, they should
656
- * use the specs at the top level.
675
+ * Specifications that define the specific
676
+ * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
677
+ * along with configurations for those data stores. This is only considered
678
+ * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
679
+ * stores. For engines with a single data store, the specs directly under
680
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
681
+ * used.
657
682
  * @param {string} request.filter
658
683
  * The filter syntax consists of an expression language for constructing a
659
684
  * predicate from one or more fields of the documents being filtered. Filter
@@ -698,7 +723,7 @@ class SearchServiceClient {
698
723
  * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
699
724
  * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
700
725
  * Information about the end user.
701
- * Highly recommended for analytics.
726
+ * Highly recommended for analytics and personalization.
702
727
  * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
703
728
  * is used to deduce `device_type` for analytics.
704
729
  * @param {string} request.languageCode
@@ -780,6 +805,9 @@ class SearchServiceClient {
780
805
  * Search as you type configuration. Only supported for the
781
806
  * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
782
807
  * vertical.
808
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
809
+ * Optional. Config for display feature, like match highlighting on search
810
+ * results.
783
811
  * @param {string} request.session
784
812
  * The session resource name. Optional.
785
813
  *
@@ -811,6 +839,16 @@ class SearchServiceClient {
811
839
  * Session specification.
812
840
  *
813
841
  * Can be used only when `session` is set.
842
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
843
+ * The relevance threshold of the search results.
844
+ *
845
+ * Default to Google defined threshold, leveraging a balance of
846
+ * precision and recall to deliver both highly accurate results and
847
+ * comprehensive coverage of relevant information.
848
+ *
849
+ * This feature is not supported for healthcare search.
850
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
851
+ * Optional. The specification for returning the relevance score.
814
852
  * @param {object} [options]
815
853
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
816
854
  * @returns {Object}
@@ -834,7 +872,9 @@ class SearchServiceClient {
834
872
  });
835
873
  const defaultCallSettings = this._defaults['search'];
836
874
  const callSettings = defaultCallSettings.merge(options);
837
- this.initialize();
875
+ this.initialize().catch(err => {
876
+ throw err;
877
+ });
838
878
  this._log.info('search iterate %j', request);
839
879
  return this.descriptors.page.search.asyncIterate(this.innerApiCalls['search'], request, callSettings);
840
880
  }
@@ -855,7 +895,9 @@ class SearchServiceClient {
855
895
  this._gaxModule.routingHeader.fromParams({
856
896
  serving_config: request.servingConfig ?? '',
857
897
  });
858
- this.initialize();
898
+ this.initialize().catch(err => {
899
+ throw err;
900
+ });
859
901
  const wrappedCallback = callback
860
902
  ? (error, values, nextPageRequest, rawResponse) => {
861
903
  this._log.info('searchLite values %j', values);
@@ -924,10 +966,13 @@ class SearchServiceClient {
924
966
  * This applies to each OneBox type individually.
925
967
  * Default number is 10.
926
968
  * @param {number[]} request.dataStoreSpecs
927
- * Specs defining dataStores to filter on in a search call and configurations
928
- * for those dataStores. This is only considered for engines with multiple
929
- * dataStores use case. For single dataStore within an engine, they should
930
- * use the specs at the top level.
969
+ * Specifications that define the specific
970
+ * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
971
+ * along with configurations for those data stores. This is only considered
972
+ * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
973
+ * stores. For engines with a single data store, the specs directly under
974
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
975
+ * used.
931
976
  * @param {string} request.filter
932
977
  * The filter syntax consists of an expression language for constructing a
933
978
  * predicate from one or more fields of the documents being filtered. Filter
@@ -972,7 +1017,7 @@ class SearchServiceClient {
972
1017
  * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
973
1018
  * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
974
1019
  * Information about the end user.
975
- * Highly recommended for analytics.
1020
+ * Highly recommended for analytics and personalization.
976
1021
  * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
977
1022
  * is used to deduce `device_type` for analytics.
978
1023
  * @param {string} request.languageCode
@@ -1054,6 +1099,9 @@ class SearchServiceClient {
1054
1099
  * Search as you type configuration. Only supported for the
1055
1100
  * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1056
1101
  * vertical.
1102
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1103
+ * Optional. Config for display feature, like match highlighting on search
1104
+ * results.
1057
1105
  * @param {string} request.session
1058
1106
  * The session resource name. Optional.
1059
1107
  *
@@ -1085,6 +1133,16 @@ class SearchServiceClient {
1085
1133
  * Session specification.
1086
1134
  *
1087
1135
  * Can be used only when `session` is set.
1136
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1137
+ * The relevance threshold of the search results.
1138
+ *
1139
+ * Default to Google defined threshold, leveraging a balance of
1140
+ * precision and recall to deliver both highly accurate results and
1141
+ * comprehensive coverage of relevant information.
1142
+ *
1143
+ * This feature is not supported for healthcare search.
1144
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1145
+ * Optional. The specification for returning the relevance score.
1088
1146
  * @param {object} [options]
1089
1147
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1090
1148
  * @returns {Stream}
@@ -1107,7 +1165,9 @@ class SearchServiceClient {
1107
1165
  });
1108
1166
  const defaultCallSettings = this._defaults['searchLite'];
1109
1167
  const callSettings = defaultCallSettings.merge(options);
1110
- this.initialize();
1168
+ this.initialize().catch(err => {
1169
+ throw err;
1170
+ });
1111
1171
  this._log.info('searchLite stream %j', request);
1112
1172
  return this.descriptors.page.searchLite.createStream(this.innerApiCalls.searchLite, request, callSettings);
1113
1173
  }
@@ -1167,10 +1227,13 @@ class SearchServiceClient {
1167
1227
  * This applies to each OneBox type individually.
1168
1228
  * Default number is 10.
1169
1229
  * @param {number[]} request.dataStoreSpecs
1170
- * Specs defining dataStores to filter on in a search call and configurations
1171
- * for those dataStores. This is only considered for engines with multiple
1172
- * dataStores use case. For single dataStore within an engine, they should
1173
- * use the specs at the top level.
1230
+ * Specifications that define the specific
1231
+ * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
1232
+ * along with configurations for those data stores. This is only considered
1233
+ * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
1234
+ * stores. For engines with a single data store, the specs directly under
1235
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
1236
+ * used.
1174
1237
  * @param {string} request.filter
1175
1238
  * The filter syntax consists of an expression language for constructing a
1176
1239
  * predicate from one or more fields of the documents being filtered. Filter
@@ -1215,7 +1278,7 @@ class SearchServiceClient {
1215
1278
  * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
1216
1279
  * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
1217
1280
  * Information about the end user.
1218
- * Highly recommended for analytics.
1281
+ * Highly recommended for analytics and personalization.
1219
1282
  * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
1220
1283
  * is used to deduce `device_type` for analytics.
1221
1284
  * @param {string} request.languageCode
@@ -1297,6 +1360,9 @@ class SearchServiceClient {
1297
1360
  * Search as you type configuration. Only supported for the
1298
1361
  * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1299
1362
  * vertical.
1363
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1364
+ * Optional. Config for display feature, like match highlighting on search
1365
+ * results.
1300
1366
  * @param {string} request.session
1301
1367
  * The session resource name. Optional.
1302
1368
  *
@@ -1328,6 +1394,16 @@ class SearchServiceClient {
1328
1394
  * Session specification.
1329
1395
  *
1330
1396
  * Can be used only when `session` is set.
1397
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1398
+ * The relevance threshold of the search results.
1399
+ *
1400
+ * Default to Google defined threshold, leveraging a balance of
1401
+ * precision and recall to deliver both highly accurate results and
1402
+ * comprehensive coverage of relevant information.
1403
+ *
1404
+ * This feature is not supported for healthcare search.
1405
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1406
+ * Optional. The specification for returning the relevance score.
1331
1407
  * @param {object} [options]
1332
1408
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1333
1409
  * @returns {Object}
@@ -1351,7 +1427,9 @@ class SearchServiceClient {
1351
1427
  });
1352
1428
  const defaultCallSettings = this._defaults['searchLite'];
1353
1429
  const callSettings = defaultCallSettings.merge(options);
1354
- this.initialize();
1430
+ this.initialize().catch(err => {
1431
+ throw err;
1432
+ });
1355
1433
  this._log.info('searchLite iterate %j', request);
1356
1434
  return this.descriptors.page.searchLite.asyncIterate(this.innerApiCalls['searchLite'], request, callSettings);
1357
1435
  }
@@ -2400,6 +2478,75 @@ class SearchServiceClient {
2400
2478
  matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
2401
2479
  return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
2402
2480
  }
2481
+ /**
2482
+ * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineSitemap resource name string.
2483
+ *
2484
+ * @param {string} project
2485
+ * @param {string} location
2486
+ * @param {string} collection
2487
+ * @param {string} data_store
2488
+ * @param {string} sitemap
2489
+ * @returns {string} Resource name string.
2490
+ */
2491
+ projectLocationCollectionDataStoreSiteSearchEngineSitemapPath(project, location, collection, dataStore, sitemap) {
2492
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.render({
2493
+ project: project,
2494
+ location: location,
2495
+ collection: collection,
2496
+ data_store: dataStore,
2497
+ sitemap: sitemap,
2498
+ });
2499
+ }
2500
+ /**
2501
+ * Parse the project from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2502
+ *
2503
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2504
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2505
+ * @returns {string} A string representing the project.
2506
+ */
2507
+ matchProjectFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2508
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).project;
2509
+ }
2510
+ /**
2511
+ * Parse the location from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2512
+ *
2513
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2514
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2515
+ * @returns {string} A string representing the location.
2516
+ */
2517
+ matchLocationFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2518
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).location;
2519
+ }
2520
+ /**
2521
+ * Parse the collection from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2522
+ *
2523
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2524
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2525
+ * @returns {string} A string representing the collection.
2526
+ */
2527
+ matchCollectionFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2528
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).collection;
2529
+ }
2530
+ /**
2531
+ * Parse the data_store from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2532
+ *
2533
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2534
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2535
+ * @returns {string} A string representing the data_store.
2536
+ */
2537
+ matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2538
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).data_store;
2539
+ }
2540
+ /**
2541
+ * Parse the sitemap from ProjectLocationCollectionDataStoreSiteSearchEngineSitemap resource.
2542
+ *
2543
+ * @param {string} projectLocationCollectionDataStoreSiteSearchEngineSitemapName
2544
+ * A fully-qualified path representing project_location_collection_data_store_siteSearchEngine_sitemap resource.
2545
+ * @returns {string} A string representing the sitemap.
2546
+ */
2547
+ matchSitemapFromProjectLocationCollectionDataStoreSiteSearchEngineSitemapName(projectLocationCollectionDataStoreSiteSearchEngineSitemapName) {
2548
+ return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineSitemapName).sitemap;
2549
+ }
2403
2550
  /**
2404
2551
  * Return a fully-qualified projectLocationCollectionDataStoreSiteSearchEngineTargetSite resource name string.
2405
2552
  *
@@ -3579,6 +3726,63 @@ class SearchServiceClient {
3579
3726
  matchDataStoreFromProjectLocationDataStoreSiteSearchEngineName(projectLocationDataStoreSiteSearchEngineName) {
3580
3727
  return this.pathTemplates.projectLocationDataStoreSiteSearchEnginePathTemplate.match(projectLocationDataStoreSiteSearchEngineName).data_store;
3581
3728
  }
3729
+ /**
3730
+ * Return a fully-qualified projectLocationDataStoreSiteSearchEngineSitemap resource name string.
3731
+ *
3732
+ * @param {string} project
3733
+ * @param {string} location
3734
+ * @param {string} data_store
3735
+ * @param {string} sitemap
3736
+ * @returns {string} Resource name string.
3737
+ */
3738
+ projectLocationDataStoreSiteSearchEngineSitemapPath(project, location, dataStore, sitemap) {
3739
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.render({
3740
+ project: project,
3741
+ location: location,
3742
+ data_store: dataStore,
3743
+ sitemap: sitemap,
3744
+ });
3745
+ }
3746
+ /**
3747
+ * Parse the project from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3748
+ *
3749
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3750
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3751
+ * @returns {string} A string representing the project.
3752
+ */
3753
+ matchProjectFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3754
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).project;
3755
+ }
3756
+ /**
3757
+ * Parse the location from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3758
+ *
3759
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3760
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3761
+ * @returns {string} A string representing the location.
3762
+ */
3763
+ matchLocationFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3764
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).location;
3765
+ }
3766
+ /**
3767
+ * Parse the data_store from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3768
+ *
3769
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3770
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3771
+ * @returns {string} A string representing the data_store.
3772
+ */
3773
+ matchDataStoreFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3774
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).data_store;
3775
+ }
3776
+ /**
3777
+ * Parse the sitemap from ProjectLocationDataStoreSiteSearchEngineSitemap resource.
3778
+ *
3779
+ * @param {string} projectLocationDataStoreSiteSearchEngineSitemapName
3780
+ * A fully-qualified path representing project_location_data_store_siteSearchEngine_sitemap resource.
3781
+ * @returns {string} A string representing the sitemap.
3782
+ */
3783
+ matchSitemapFromProjectLocationDataStoreSiteSearchEngineSitemapName(projectLocationDataStoreSiteSearchEngineSitemapName) {
3784
+ return this.pathTemplates.projectLocationDataStoreSiteSearchEngineSitemapPathTemplate.match(projectLocationDataStoreSiteSearchEngineSitemapName).sitemap;
3785
+ }
3582
3786
  /**
3583
3787
  * Return a fully-qualified projectLocationDataStoreSiteSearchEngineTargetSite resource name string.
3584
3788
  *
@@ -24,10 +24,13 @@
24
24
  "../../protos/google/cloud/discoveryengine/v1/purge_config.proto",
25
25
  "../../protos/google/cloud/discoveryengine/v1/rank_service.proto",
26
26
  "../../protos/google/cloud/discoveryengine/v1/recommendation_service.proto",
27
+ "../../protos/google/cloud/discoveryengine/v1/safety.proto",
27
28
  "../../protos/google/cloud/discoveryengine/v1/schema.proto",
28
29
  "../../protos/google/cloud/discoveryengine/v1/schema_service.proto",
29
30
  "../../protos/google/cloud/discoveryengine/v1/search_service.proto",
30
31
  "../../protos/google/cloud/discoveryengine/v1/search_tuning_service.proto",
32
+ "../../protos/google/cloud/discoveryengine/v1/serving_config.proto",
33
+ "../../protos/google/cloud/discoveryengine/v1/serving_config_service.proto",
31
34
  "../../protos/google/cloud/discoveryengine/v1/session.proto",
32
35
  "../../protos/google/cloud/discoveryengine/v1/site_search_engine.proto",
33
36
  "../../protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto",