@google-cloud/discoveryengine 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/protos/protos.d.ts +31 -316
  3. package/build/protos/protos.js +146 -593
  4. package/build/protos/protos.json +25 -1
  5. package/build/src/index.d.ts +1 -1
  6. package/build/src/index.js +1 -21
  7. package/build/src/v1/completion_service_client.d.ts +76 -76
  8. package/build/src/v1/completion_service_client.js +125 -262
  9. package/build/src/v1/control_service_client.d.ts +81 -81
  10. package/build/src/v1/control_service_client.js +96 -132
  11. package/build/src/v1/conversational_search_service_client.d.ts +143 -143
  12. package/build/src/v1/conversational_search_service_client.js +138 -226
  13. package/build/src/v1/data_store_service_client.d.ts +122 -122
  14. package/build/src/v1/data_store_service_client.js +134 -280
  15. package/build/src/v1/document_service_client.d.ts +120 -120
  16. package/build/src/v1/document_service_client.js +143 -300
  17. package/build/src/v1/engine_service_client.d.ts +103 -103
  18. package/build/src/v1/engine_service_client.js +134 -279
  19. package/build/src/v1/grounded_generation_service_client.d.ts +48 -48
  20. package/build/src/v1/grounded_generation_service_client.js +79 -100
  21. package/build/src/v1/project_service_client.d.ts +76 -76
  22. package/build/src/v1/project_service_client.js +108 -222
  23. package/build/src/v1/rank_service_client.d.ts +47 -47
  24. package/build/src/v1/rank_service_client.js +72 -85
  25. package/build/src/v1/recommendation_service_client.d.ts +47 -47
  26. package/build/src/v1/recommendation_service_client.js +70 -82
  27. package/build/src/v1/schema_service_client.d.ts +111 -111
  28. package/build/src/v1/schema_service_client.js +131 -273
  29. package/build/src/v1/search_service_client.d.ts +545 -545
  30. package/build/src/v1/search_service_client.js +90 -113
  31. package/build/src/v1/search_tuning_service_client.d.ts +77 -77
  32. package/build/src/v1/search_tuning_service_client.js +113 -235
  33. package/build/src/v1/serving_config_service_client.d.ts +48 -48
  34. package/build/src/v1/serving_config_service_client.js +69 -80
  35. package/build/src/v1/site_search_engine_service_client.d.ts +148 -148
  36. package/build/src/v1/site_search_engine_service_client.js +179 -378
  37. package/build/src/v1/user_event_service_client.d.ts +77 -77
  38. package/build/src/v1/user_event_service_client.js +121 -253
  39. package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
  40. package/build/src/v1alpha/acl_config_service_client.js +82 -106
  41. package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
  42. package/build/src/v1alpha/chunk_service_client.js +92 -120
  43. package/build/src/v1alpha/completion_service_client.d.ts +77 -77
  44. package/build/src/v1alpha/completion_service_client.js +134 -280
  45. package/build/src/v1alpha/control_service_client.d.ts +85 -85
  46. package/build/src/v1alpha/control_service_client.js +105 -151
  47. package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
  48. package/build/src/v1alpha/conversational_search_service_client.js +145 -237
  49. package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
  50. package/build/src/v1alpha/data_store_service_client.js +151 -316
  51. package/build/src/v1alpha/document_service_client.d.ts +126 -126
  52. package/build/src/v1alpha/document_service_client.js +156 -328
  53. package/build/src/v1alpha/engine_service_client.d.ts +106 -106
  54. package/build/src/v1alpha/engine_service_client.js +155 -325
  55. package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
  56. package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
  57. package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
  58. package/build/src/v1alpha/evaluation_service_client.js +143 -295
  59. package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
  60. package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
  61. package/build/src/v1alpha/project_service_client.d.ts +78 -78
  62. package/build/src/v1alpha/project_service_client.js +126 -262
  63. package/build/src/v1alpha/rank_service_client.d.ts +47 -47
  64. package/build/src/v1alpha/rank_service_client.js +81 -104
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
  66. package/build/src/v1alpha/recommendation_service_client.js +79 -100
  67. package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
  68. package/build/src/v1alpha/sample_query_service_client.js +144 -301
  69. package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
  70. package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
  71. package/build/src/v1alpha/schema_service_client.d.ts +112 -112
  72. package/build/src/v1alpha/schema_service_client.js +140 -292
  73. package/build/src/v1alpha/search_service_client.d.ts +327 -327
  74. package/build/src/v1alpha/search_service_client.js +88 -112
  75. package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
  76. package/build/src/v1alpha/search_tuning_service_client.js +122 -253
  77. package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
  78. package/build/src/v1alpha/serving_config_service_client.js +97 -133
  79. package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
  80. package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
  81. package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
  82. package/build/src/v1alpha/user_event_service_client.js +130 -271
  83. package/build/src/v1beta/completion_service_client.d.ts +78 -78
  84. package/build/src/v1beta/completion_service_client.js +136 -279
  85. package/build/src/v1beta/control_service_client.d.ts +84 -84
  86. package/build/src/v1beta/control_service_client.js +103 -147
  87. package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
  88. package/build/src/v1beta/conversational_search_service_client.js +143 -233
  89. package/build/src/v1beta/data_store_service_client.d.ts +124 -124
  90. package/build/src/v1beta/data_store_service_client.js +141 -288
  91. package/build/src/v1beta/document_service_client.d.ts +124 -124
  92. package/build/src/v1beta/document_service_client.js +150 -309
  93. package/build/src/v1beta/engine_service_client.d.ts +106 -106
  94. package/build/src/v1beta/engine_service_client.js +153 -315
  95. package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
  96. package/build/src/v1beta/evaluation_service_client.js +141 -285
  97. package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
  98. package/build/src/v1beta/grounded_generation_service_client.js +86 -114
  99. package/build/src/v1beta/project_service_client.d.ts +76 -76
  100. package/build/src/v1beta/project_service_client.js +115 -231
  101. package/build/src/v1beta/rank_service_client.d.ts +47 -47
  102. package/build/src/v1beta/rank_service_client.js +79 -99
  103. package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
  104. package/build/src/v1beta/recommendation_service_client.js +77 -96
  105. package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
  106. package/build/src/v1beta/sample_query_service_client.js +142 -291
  107. package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
  108. package/build/src/v1beta/sample_query_set_service_client.js +104 -149
  109. package/build/src/v1beta/schema_service_client.d.ts +111 -111
  110. package/build/src/v1beta/schema_service_client.js +138 -282
  111. package/build/src/v1beta/search_service_client.d.ts +665 -665
  112. package/build/src/v1beta/search_service_client.js +97 -128
  113. package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
  114. package/build/src/v1beta/search_tuning_service_client.js +120 -243
  115. package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
  116. package/build/src/v1beta/serving_config_service_client.js +95 -129
  117. package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
  118. package/build/src/v1beta/site_search_engine_service_client.js +186 -386
  119. package/build/src/v1beta/user_event_service_client.d.ts +78 -78
  120. package/build/src/v1beta/user_event_service_client.js +128 -261
  121. package/package.json +1 -1
@@ -117,249 +117,249 @@ export declare class SearchServiceClient {
117
117
  getProjectId(): Promise<string>;
118
118
  getProjectId(callback: Callback<string, undefined, undefined>): void;
119
119
  /**
120
- * Performs a search.
121
- *
122
- * @param {Object} request
123
- * The request object that will be sent.
124
- * @param {string} request.servingConfig
125
- * Required. The resource name of the Search serving config, such as
126
- * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
127
- * or
128
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
129
- * This field is used to identify the serving configuration name, set
130
- * of models used to make the search.
131
- * @param {string} request.branch
132
- * The branch resource name, such as
133
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
134
- *
135
- * Use `default_branch` as the branch ID or leave this field empty, to search
136
- * documents under the default branch.
137
- * @param {string} request.query
138
- * Raw search query.
139
- * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
140
- * Raw image query.
141
- * @param {number} request.pageSize
142
- * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
143
- * return. The maximum allowed value depends on the data type. Values above
144
- * the maximum value are coerced to the maximum value.
145
- *
146
- * * Websites with basic indexing: Default `10`, Maximum `25`.
147
- * * Websites with advanced indexing: Default `25`, Maximum `50`.
148
- * * Other: Default `50`, Maximum `100`.
149
- *
150
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
151
- * @param {string} request.pageToken
152
- * A page token received from a previous
153
- * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
154
- * call. Provide this to retrieve the subsequent page.
155
- *
156
- * When paginating, all other parameters provided to
157
- * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
158
- * must match the call that provided the page token. Otherwise, an
159
- * `INVALID_ARGUMENT` error is returned.
160
- * @param {number} request.offset
161
- * A 0-indexed integer that specifies the current offset (that is, starting
162
- * result location, amongst the
163
- * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
164
- * relevant) in search results. This field is only considered if
165
- * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
166
- * unset.
167
- *
168
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
169
- * @param {number} request.oneBoxPageSize
170
- * The maximum number of results to return for OneBox.
171
- * This applies to each OneBox type individually.
172
- * Default number is 10.
173
- * @param {number[]} request.dataStoreSpecs
174
- * Specifications that define the specific
175
- * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
176
- * along with configurations for those data stores. This is only considered
177
- * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
178
- * stores. For engines with a single data store, the specs directly under
179
- * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
180
- * used.
181
- * @param {string} request.filter
182
- * The filter syntax consists of an expression language for constructing a
183
- * predicate from one or more fields of the documents being filtered. Filter
184
- * expression is case-sensitive.
185
- *
186
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
187
- *
188
- * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
189
- * key property defined in the Vertex AI Search backend -- this mapping is
190
- * defined by the customer in their schema. For example a media customer might
191
- * have a field 'name' in their schema. In this case the filter would look
192
- * like this: filter --> name:'ANY("king kong")'
193
- *
194
- * For more information about filtering including syntax and filter
195
- * operators, see
196
- * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
197
- * @param {string} request.canonicalFilter
198
- * The default filter that is applied when a user performs a search without
199
- * checking any filters on the search page.
200
- *
201
- * The filter applied to every search request when quality improvement such as
202
- * query expansion is needed. In the case a query does not have a sufficient
203
- * amount of results this filter will be used to determine whether or not to
204
- * enable the query expansion flow. The original filter will still be used for
205
- * the query expanded search.
206
- * This field is strongly recommended to achieve high search quality.
207
- *
208
- * For more information about filter syntax, see
209
- * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.filter|SearchRequest.filter}.
210
- * @param {string} request.orderBy
211
- * The order in which documents are returned. Documents can be ordered by
212
- * a field in an {@link protos.google.cloud.discoveryengine.v1.Document|Document} object.
213
- * Leave it unset if ordered by relevance. `order_by` expression is
214
- * case-sensitive.
215
- *
216
- * For more information on ordering the website search results, see
217
- * [Order web search
218
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
219
- * For more information on ordering the healthcare search results, see
220
- * [Order healthcare search
221
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
222
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
223
- * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
224
- * Information about the end user.
225
- * Highly recommended for analytics and personalization.
226
- * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
227
- * is used to deduce `device_type` for analytics.
228
- * @param {string} request.languageCode
229
- * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
230
- * information, see [Standard
231
- * fields](https://cloud.google.com/apis/design/standard_fields). This field
232
- * helps to better interpret the query. If a value isn't specified, the query
233
- * language code is automatically detected, which may not be accurate.
234
- * @param {number[]} request.facetSpecs
235
- * Facet specifications for faceted search. If empty, no facets are returned.
236
- *
237
- * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
238
- * error is returned.
239
- * @param {google.cloud.discoveryengine.v1.SearchRequest.BoostSpec} request.boostSpec
240
- * Boost specification to boost certain documents.
241
- * For more information on boosting, see
242
- * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
243
- * @param {number[]} request.params
244
- * Additional search parameters.
245
- *
246
- * For public website search only, supported values are:
247
- *
248
- * * `user_country_code`: string. Default empty. If set to non-empty, results
249
- * are restricted or boosted based on the location provided.
250
- * For example, `user_country_code: "au"`
251
- *
252
- * For available codes see [Country
253
- * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
254
- *
255
- * * `search_type`: double. Default empty. Enables non-webpage searching
256
- * depending on the value. The only valid non-default value is 1,
257
- * which enables image searching.
258
- * For example, `search_type: 1`
259
- * @param {google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
260
- * The query expansion specification that specifies the conditions under which
261
- * query expansion occurs.
262
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
263
- * The spell correction specification that specifies the mode under
264
- * which spell correction takes effect.
265
- * @param {string} request.userPseudoId
266
- * A unique identifier for tracking visitors. For example, this could be
267
- * implemented with an HTTP cookie, which should be able to uniquely identify
268
- * a visitor on a single device. This unique identifier should not change if
269
- * the visitor logs in or out of the website.
270
- *
271
- * This field should NOT have a fixed value such as `unknown_visitor`.
272
- *
273
- * This should be the same identifier as
274
- * {@link protos.google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
275
- * and
276
- * {@link protos.google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
277
- *
278
- * The field must be a UTF-8 encoded string with a length limit of 128
279
- * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
280
- * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
281
- * A specification for configuring the behavior of content search.
282
- * @param {boolean} request.safeSearch
283
- * Whether to turn on safe search. This is only supported for
284
- * website search.
285
- * @param {number[]} request.userLabels
286
- * The user labels applied to a resource must meet the following requirements:
287
- *
288
- * * Each resource can have multiple labels, up to a maximum of 64.
289
- * * Each label must be a key-value pair.
290
- * * Keys have a minimum length of 1 character and a maximum length of 63
291
- * characters and cannot be empty. Values can be empty and have a maximum
292
- * length of 63 characters.
293
- * * Keys and values can contain only lowercase letters, numeric characters,
294
- * underscores, and dashes. All characters must use UTF-8 encoding, and
295
- * international characters are allowed.
296
- * * The key portion of a label must be unique. However, you can use the same
297
- * key with multiple resources.
298
- * * Keys must start with a lowercase letter or international character.
299
- *
300
- * See [Google Cloud
301
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
302
- * for more details.
303
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
304
- * Search as you type configuration. Only supported for the
305
- * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
306
- * vertical.
307
- * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
308
- * Optional. Config for display feature, like match highlighting on search
309
- * results.
310
- * @param {string} request.session
311
- * The session resource name. Optional.
312
- *
313
- * Session allows users to do multi-turn /search API calls or coordination
314
- * between /search API calls and /answer API calls.
315
- *
316
- * Example #1 (multi-turn /search API calls):
317
- * 1. Call /search API with the auto-session mode (see below).
318
- * 2. Call /search API with the session ID generated in the first call.
319
- * Here, the previous search query gets considered in query
320
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
321
- * and the current query is "How about 2023?", the current query will
322
- * be interpreted as "How did Alphabet do in 2023?".
323
- *
324
- * Example #2 (coordination between /search API calls and /answer API calls):
325
- * 1. Call /search API with the auto-session mode (see below).
326
- * 2. Call /answer API with the session ID generated in the first call.
327
- * Here, the answer generation happens in the context of the search
328
- * results from the first search call.
329
- *
330
- * Auto-session mode: when `projects/.../sessions/-` is used, a new session
331
- * gets automatically created. Otherwise, users can use the create-session API
332
- * to create a session manually.
333
- *
334
- * Multi-turn Search feature is currently at private GA stage. Please use
335
- * v1alpha or v1beta version instead before we launch this feature to public
336
- * GA. Or ask for allowlisting through Google Support team.
337
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
338
- * Session specification.
339
- *
340
- * Can be used only when `session` is set.
341
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
342
- * The relevance threshold of the search results.
343
- *
344
- * Default to Google defined threshold, leveraging a balance of
345
- * precision and recall to deliver both highly accurate results and
346
- * comprehensive coverage of relevant information.
347
- *
348
- * This feature is not supported for healthcare search.
349
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
350
- * Optional. The specification for returning the relevance score.
351
- * @param {object} [options]
352
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
353
- * @returns {Promise} - The promise which resolves to an array.
354
- * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1.SearchResponse.SearchResult|SearchResult}.
355
- * The client library will perform auto-pagination by default: it will call the API as many
356
- * times as needed and will merge results from all the pages into this array.
357
- * Note that it can affect your quota.
358
- * We recommend using `searchAsync()`
359
- * method described below for async iteration which you can stop as needed.
360
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
361
- * for more details and examples.
362
- */
120
+ * Performs a search.
121
+ *
122
+ * @param {Object} request
123
+ * The request object that will be sent.
124
+ * @param {string} request.servingConfig
125
+ * Required. The resource name of the Search serving config, such as
126
+ * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
127
+ * or
128
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
129
+ * This field is used to identify the serving configuration name, set
130
+ * of models used to make the search.
131
+ * @param {string} request.branch
132
+ * The branch resource name, such as
133
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
134
+ *
135
+ * Use `default_branch` as the branch ID or leave this field empty, to search
136
+ * documents under the default branch.
137
+ * @param {string} request.query
138
+ * Raw search query.
139
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
140
+ * Raw image query.
141
+ * @param {number} request.pageSize
142
+ * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
143
+ * return. The maximum allowed value depends on the data type. Values above
144
+ * the maximum value are coerced to the maximum value.
145
+ *
146
+ * * Websites with basic indexing: Default `10`, Maximum `25`.
147
+ * * Websites with advanced indexing: Default `25`, Maximum `50`.
148
+ * * Other: Default `50`, Maximum `100`.
149
+ *
150
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
151
+ * @param {string} request.pageToken
152
+ * A page token received from a previous
153
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
154
+ * call. Provide this to retrieve the subsequent page.
155
+ *
156
+ * When paginating, all other parameters provided to
157
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
158
+ * must match the call that provided the page token. Otherwise, an
159
+ * `INVALID_ARGUMENT` error is returned.
160
+ * @param {number} request.offset
161
+ * A 0-indexed integer that specifies the current offset (that is, starting
162
+ * result location, amongst the
163
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
164
+ * relevant) in search results. This field is only considered if
165
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
166
+ * unset.
167
+ *
168
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
169
+ * @param {number} request.oneBoxPageSize
170
+ * The maximum number of results to return for OneBox.
171
+ * This applies to each OneBox type individually.
172
+ * Default number is 10.
173
+ * @param {number[]} request.dataStoreSpecs
174
+ * Specifications that define the specific
175
+ * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
176
+ * along with configurations for those data stores. This is only considered
177
+ * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
178
+ * stores. For engines with a single data store, the specs directly under
179
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
180
+ * used.
181
+ * @param {string} request.filter
182
+ * The filter syntax consists of an expression language for constructing a
183
+ * predicate from one or more fields of the documents being filtered. Filter
184
+ * expression is case-sensitive.
185
+ *
186
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
187
+ *
188
+ * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
189
+ * key property defined in the Vertex AI Search backend -- this mapping is
190
+ * defined by the customer in their schema. For example a media customer might
191
+ * have a field 'name' in their schema. In this case the filter would look
192
+ * like this: filter --> name:'ANY("king kong")'
193
+ *
194
+ * For more information about filtering including syntax and filter
195
+ * operators, see
196
+ * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
197
+ * @param {string} request.canonicalFilter
198
+ * The default filter that is applied when a user performs a search without
199
+ * checking any filters on the search page.
200
+ *
201
+ * The filter applied to every search request when quality improvement such as
202
+ * query expansion is needed. In the case a query does not have a sufficient
203
+ * amount of results this filter will be used to determine whether or not to
204
+ * enable the query expansion flow. The original filter will still be used for
205
+ * the query expanded search.
206
+ * This field is strongly recommended to achieve high search quality.
207
+ *
208
+ * For more information about filter syntax, see
209
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.filter|SearchRequest.filter}.
210
+ * @param {string} request.orderBy
211
+ * The order in which documents are returned. Documents can be ordered by
212
+ * a field in an {@link protos.google.cloud.discoveryengine.v1.Document|Document} object.
213
+ * Leave it unset if ordered by relevance. `order_by` expression is
214
+ * case-sensitive.
215
+ *
216
+ * For more information on ordering the website search results, see
217
+ * [Order web search
218
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
219
+ * For more information on ordering the healthcare search results, see
220
+ * [Order healthcare search
221
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
222
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
223
+ * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
224
+ * Information about the end user.
225
+ * Highly recommended for analytics and personalization.
226
+ * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
227
+ * is used to deduce `device_type` for analytics.
228
+ * @param {string} request.languageCode
229
+ * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
230
+ * information, see [Standard
231
+ * fields](https://cloud.google.com/apis/design/standard_fields). This field
232
+ * helps to better interpret the query. If a value isn't specified, the query
233
+ * language code is automatically detected, which may not be accurate.
234
+ * @param {number[]} request.facetSpecs
235
+ * Facet specifications for faceted search. If empty, no facets are returned.
236
+ *
237
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
238
+ * error is returned.
239
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.BoostSpec} request.boostSpec
240
+ * Boost specification to boost certain documents.
241
+ * For more information on boosting, see
242
+ * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
243
+ * @param {number[]} request.params
244
+ * Additional search parameters.
245
+ *
246
+ * For public website search only, supported values are:
247
+ *
248
+ * * `user_country_code`: string. Default empty. If set to non-empty, results
249
+ * are restricted or boosted based on the location provided.
250
+ * For example, `user_country_code: "au"`
251
+ *
252
+ * For available codes see [Country
253
+ * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
254
+ *
255
+ * * `search_type`: double. Default empty. Enables non-webpage searching
256
+ * depending on the value. The only valid non-default value is 1,
257
+ * which enables image searching.
258
+ * For example, `search_type: 1`
259
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
260
+ * The query expansion specification that specifies the conditions under which
261
+ * query expansion occurs.
262
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
263
+ * The spell correction specification that specifies the mode under
264
+ * which spell correction takes effect.
265
+ * @param {string} request.userPseudoId
266
+ * A unique identifier for tracking visitors. For example, this could be
267
+ * implemented with an HTTP cookie, which should be able to uniquely identify
268
+ * a visitor on a single device. This unique identifier should not change if
269
+ * the visitor logs in or out of the website.
270
+ *
271
+ * This field should NOT have a fixed value such as `unknown_visitor`.
272
+ *
273
+ * This should be the same identifier as
274
+ * {@link protos.google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
275
+ * and
276
+ * {@link protos.google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
277
+ *
278
+ * The field must be a UTF-8 encoded string with a length limit of 128
279
+ * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
280
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
281
+ * A specification for configuring the behavior of content search.
282
+ * @param {boolean} request.safeSearch
283
+ * Whether to turn on safe search. This is only supported for
284
+ * website search.
285
+ * @param {number[]} request.userLabels
286
+ * The user labels applied to a resource must meet the following requirements:
287
+ *
288
+ * * Each resource can have multiple labels, up to a maximum of 64.
289
+ * * Each label must be a key-value pair.
290
+ * * Keys have a minimum length of 1 character and a maximum length of 63
291
+ * characters and cannot be empty. Values can be empty and have a maximum
292
+ * length of 63 characters.
293
+ * * Keys and values can contain only lowercase letters, numeric characters,
294
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
295
+ * international characters are allowed.
296
+ * * The key portion of a label must be unique. However, you can use the same
297
+ * key with multiple resources.
298
+ * * Keys must start with a lowercase letter or international character.
299
+ *
300
+ * See [Google Cloud
301
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
302
+ * for more details.
303
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
304
+ * Search as you type configuration. Only supported for the
305
+ * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
306
+ * vertical.
307
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
308
+ * Optional. Config for display feature, like match highlighting on search
309
+ * results.
310
+ * @param {string} request.session
311
+ * The session resource name. Optional.
312
+ *
313
+ * Session allows users to do multi-turn /search API calls or coordination
314
+ * between /search API calls and /answer API calls.
315
+ *
316
+ * Example #1 (multi-turn /search API calls):
317
+ * 1. Call /search API with the auto-session mode (see below).
318
+ * 2. Call /search API with the session ID generated in the first call.
319
+ * Here, the previous search query gets considered in query
320
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
321
+ * and the current query is "How about 2023?", the current query will
322
+ * be interpreted as "How did Alphabet do in 2023?".
323
+ *
324
+ * Example #2 (coordination between /search API calls and /answer API calls):
325
+ * 1. Call /search API with the auto-session mode (see below).
326
+ * 2. Call /answer API with the session ID generated in the first call.
327
+ * Here, the answer generation happens in the context of the search
328
+ * results from the first search call.
329
+ *
330
+ * Auto-session mode: when `projects/.../sessions/-` is used, a new session
331
+ * gets automatically created. Otherwise, users can use the create-session API
332
+ * to create a session manually.
333
+ *
334
+ * Multi-turn Search feature is currently at private GA stage. Please use
335
+ * v1alpha or v1beta version instead before we launch this feature to public
336
+ * GA. Or ask for allowlisting through Google Support team.
337
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
338
+ * Session specification.
339
+ *
340
+ * Can be used only when `session` is set.
341
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
342
+ * The relevance threshold of the search results.
343
+ *
344
+ * Default to Google defined threshold, leveraging a balance of
345
+ * precision and recall to deliver both highly accurate results and
346
+ * comprehensive coverage of relevant information.
347
+ *
348
+ * This feature is not supported for healthcare search.
349
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
350
+ * Optional. The specification for returning the relevance score.
351
+ * @param {object} [options]
352
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
353
+ * @returns {Promise} - The promise which resolves to an array.
354
+ * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1.SearchResponse.SearchResult|SearchResult}.
355
+ * The client library will perform auto-pagination by default: it will call the API as many
356
+ * times as needed and will merge results from all the pages into this array.
357
+ * Note that it can affect your quota.
358
+ * We recommend using `searchAsync()`
359
+ * method described below for async iteration which you can stop as needed.
360
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
361
+ * for more details and examples.
362
+ */
363
363
  search(request?: protos.google.cloud.discoveryengine.v1.ISearchRequest, options?: CallOptions): Promise<[
364
364
  protos.google.cloud.discoveryengine.v1.SearchResponse.ISearchResult[],
365
365
  protos.google.cloud.discoveryengine.v1.ISearchRequest | null,
@@ -857,261 +857,261 @@ export declare class SearchServiceClient {
857
857
  */
858
858
  searchAsync(request?: protos.google.cloud.discoveryengine.v1.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1.SearchResponse.ISearchResult>;
859
859
  /**
860
- * Performs a search. Similar to the
861
- * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
862
- * method, but a lite version that allows API key for authentication, where
863
- * OAuth and IAM checks are not required.
864
- *
865
- * Only public website search is supported by this method. If data stores and
866
- * engines not associated with public website search are specified, a
867
- * `FAILED_PRECONDITION` error is returned.
868
- *
869
- * This method can be used for easy onboarding without having to implement an
870
- * authentication backend. However, it is strongly recommended to use
871
- * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
872
- * instead with required OAuth and IAM checks to provide better data security.
873
- *
874
- * @param {Object} request
875
- * The request object that will be sent.
876
- * @param {string} request.servingConfig
877
- * Required. The resource name of the Search serving config, such as
878
- * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
879
- * or
880
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
881
- * This field is used to identify the serving configuration name, set
882
- * of models used to make the search.
883
- * @param {string} request.branch
884
- * The branch resource name, such as
885
- * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
886
- *
887
- * Use `default_branch` as the branch ID or leave this field empty, to search
888
- * documents under the default branch.
889
- * @param {string} request.query
890
- * Raw search query.
891
- * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
892
- * Raw image query.
893
- * @param {number} request.pageSize
894
- * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
895
- * return. The maximum allowed value depends on the data type. Values above
896
- * the maximum value are coerced to the maximum value.
897
- *
898
- * * Websites with basic indexing: Default `10`, Maximum `25`.
899
- * * Websites with advanced indexing: Default `25`, Maximum `50`.
900
- * * Other: Default `50`, Maximum `100`.
901
- *
902
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
903
- * @param {string} request.pageToken
904
- * A page token received from a previous
905
- * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
906
- * call. Provide this to retrieve the subsequent page.
907
- *
908
- * When paginating, all other parameters provided to
909
- * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
910
- * must match the call that provided the page token. Otherwise, an
911
- * `INVALID_ARGUMENT` error is returned.
912
- * @param {number} request.offset
913
- * A 0-indexed integer that specifies the current offset (that is, starting
914
- * result location, amongst the
915
- * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
916
- * relevant) in search results. This field is only considered if
917
- * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
918
- * unset.
919
- *
920
- * If this field is negative, an `INVALID_ARGUMENT` is returned.
921
- * @param {number} request.oneBoxPageSize
922
- * The maximum number of results to return for OneBox.
923
- * This applies to each OneBox type individually.
924
- * Default number is 10.
925
- * @param {number[]} request.dataStoreSpecs
926
- * Specifications that define the specific
927
- * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
928
- * along with configurations for those data stores. This is only considered
929
- * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
930
- * stores. For engines with a single data store, the specs directly under
931
- * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
932
- * used.
933
- * @param {string} request.filter
934
- * The filter syntax consists of an expression language for constructing a
935
- * predicate from one or more fields of the documents being filtered. Filter
936
- * expression is case-sensitive.
937
- *
938
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
939
- *
940
- * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
941
- * key property defined in the Vertex AI Search backend -- this mapping is
942
- * defined by the customer in their schema. For example a media customer might
943
- * have a field 'name' in their schema. In this case the filter would look
944
- * like this: filter --> name:'ANY("king kong")'
945
- *
946
- * For more information about filtering including syntax and filter
947
- * operators, see
948
- * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
949
- * @param {string} request.canonicalFilter
950
- * The default filter that is applied when a user performs a search without
951
- * checking any filters on the search page.
952
- *
953
- * The filter applied to every search request when quality improvement such as
954
- * query expansion is needed. In the case a query does not have a sufficient
955
- * amount of results this filter will be used to determine whether or not to
956
- * enable the query expansion flow. The original filter will still be used for
957
- * the query expanded search.
958
- * This field is strongly recommended to achieve high search quality.
959
- *
960
- * For more information about filter syntax, see
961
- * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.filter|SearchRequest.filter}.
962
- * @param {string} request.orderBy
963
- * The order in which documents are returned. Documents can be ordered by
964
- * a field in an {@link protos.google.cloud.discoveryengine.v1.Document|Document} object.
965
- * Leave it unset if ordered by relevance. `order_by` expression is
966
- * case-sensitive.
967
- *
968
- * For more information on ordering the website search results, see
969
- * [Order web search
970
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
971
- * For more information on ordering the healthcare search results, see
972
- * [Order healthcare search
973
- * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
974
- * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
975
- * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
976
- * Information about the end user.
977
- * Highly recommended for analytics and personalization.
978
- * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
979
- * is used to deduce `device_type` for analytics.
980
- * @param {string} request.languageCode
981
- * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
982
- * information, see [Standard
983
- * fields](https://cloud.google.com/apis/design/standard_fields). This field
984
- * helps to better interpret the query. If a value isn't specified, the query
985
- * language code is automatically detected, which may not be accurate.
986
- * @param {number[]} request.facetSpecs
987
- * Facet specifications for faceted search. If empty, no facets are returned.
988
- *
989
- * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
990
- * error is returned.
991
- * @param {google.cloud.discoveryengine.v1.SearchRequest.BoostSpec} request.boostSpec
992
- * Boost specification to boost certain documents.
993
- * For more information on boosting, see
994
- * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
995
- * @param {number[]} request.params
996
- * Additional search parameters.
997
- *
998
- * For public website search only, supported values are:
999
- *
1000
- * * `user_country_code`: string. Default empty. If set to non-empty, results
1001
- * are restricted or boosted based on the location provided.
1002
- * For example, `user_country_code: "au"`
1003
- *
1004
- * For available codes see [Country
1005
- * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
1006
- *
1007
- * * `search_type`: double. Default empty. Enables non-webpage searching
1008
- * depending on the value. The only valid non-default value is 1,
1009
- * which enables image searching.
1010
- * For example, `search_type: 1`
1011
- * @param {google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
1012
- * The query expansion specification that specifies the conditions under which
1013
- * query expansion occurs.
1014
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
1015
- * The spell correction specification that specifies the mode under
1016
- * which spell correction takes effect.
1017
- * @param {string} request.userPseudoId
1018
- * A unique identifier for tracking visitors. For example, this could be
1019
- * implemented with an HTTP cookie, which should be able to uniquely identify
1020
- * a visitor on a single device. This unique identifier should not change if
1021
- * the visitor logs in or out of the website.
1022
- *
1023
- * This field should NOT have a fixed value such as `unknown_visitor`.
1024
- *
1025
- * This should be the same identifier as
1026
- * {@link protos.google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
1027
- * and
1028
- * {@link protos.google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
1029
- *
1030
- * The field must be a UTF-8 encoded string with a length limit of 128
1031
- * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
1032
- * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
1033
- * A specification for configuring the behavior of content search.
1034
- * @param {boolean} request.safeSearch
1035
- * Whether to turn on safe search. This is only supported for
1036
- * website search.
1037
- * @param {number[]} request.userLabels
1038
- * The user labels applied to a resource must meet the following requirements:
1039
- *
1040
- * * Each resource can have multiple labels, up to a maximum of 64.
1041
- * * Each label must be a key-value pair.
1042
- * * Keys have a minimum length of 1 character and a maximum length of 63
1043
- * characters and cannot be empty. Values can be empty and have a maximum
1044
- * length of 63 characters.
1045
- * * Keys and values can contain only lowercase letters, numeric characters,
1046
- * underscores, and dashes. All characters must use UTF-8 encoding, and
1047
- * international characters are allowed.
1048
- * * The key portion of a label must be unique. However, you can use the same
1049
- * key with multiple resources.
1050
- * * Keys must start with a lowercase letter or international character.
1051
- *
1052
- * See [Google Cloud
1053
- * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1054
- * for more details.
1055
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1056
- * Search as you type configuration. Only supported for the
1057
- * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1058
- * vertical.
1059
- * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1060
- * Optional. Config for display feature, like match highlighting on search
1061
- * results.
1062
- * @param {string} request.session
1063
- * The session resource name. Optional.
1064
- *
1065
- * Session allows users to do multi-turn /search API calls or coordination
1066
- * between /search API calls and /answer API calls.
1067
- *
1068
- * Example #1 (multi-turn /search API calls):
1069
- * 1. Call /search API with the auto-session mode (see below).
1070
- * 2. Call /search API with the session ID generated in the first call.
1071
- * Here, the previous search query gets considered in query
1072
- * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1073
- * and the current query is "How about 2023?", the current query will
1074
- * be interpreted as "How did Alphabet do in 2023?".
1075
- *
1076
- * Example #2 (coordination between /search API calls and /answer API calls):
1077
- * 1. Call /search API with the auto-session mode (see below).
1078
- * 2. Call /answer API with the session ID generated in the first call.
1079
- * Here, the answer generation happens in the context of the search
1080
- * results from the first search call.
1081
- *
1082
- * Auto-session mode: when `projects/.../sessions/-` is used, a new session
1083
- * gets automatically created. Otherwise, users can use the create-session API
1084
- * to create a session manually.
1085
- *
1086
- * Multi-turn Search feature is currently at private GA stage. Please use
1087
- * v1alpha or v1beta version instead before we launch this feature to public
1088
- * GA. Or ask for allowlisting through Google Support team.
1089
- * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1090
- * Session specification.
1091
- *
1092
- * Can be used only when `session` is set.
1093
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1094
- * The relevance threshold of the search results.
1095
- *
1096
- * Default to Google defined threshold, leveraging a balance of
1097
- * precision and recall to deliver both highly accurate results and
1098
- * comprehensive coverage of relevant information.
1099
- *
1100
- * This feature is not supported for healthcare search.
1101
- * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1102
- * Optional. The specification for returning the relevance score.
1103
- * @param {object} [options]
1104
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1105
- * @returns {Promise} - The promise which resolves to an array.
1106
- * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1.SearchResponse.SearchResult|SearchResult}.
1107
- * The client library will perform auto-pagination by default: it will call the API as many
1108
- * times as needed and will merge results from all the pages into this array.
1109
- * Note that it can affect your quota.
1110
- * We recommend using `searchLiteAsync()`
1111
- * method described below for async iteration which you can stop as needed.
1112
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1113
- * for more details and examples.
1114
- */
860
+ * Performs a search. Similar to the
861
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
862
+ * method, but a lite version that allows API key for authentication, where
863
+ * OAuth and IAM checks are not required.
864
+ *
865
+ * Only public website search is supported by this method. If data stores and
866
+ * engines not associated with public website search are specified, a
867
+ * `FAILED_PRECONDITION` error is returned.
868
+ *
869
+ * This method can be used for easy onboarding without having to implement an
870
+ * authentication backend. However, it is strongly recommended to use
871
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
872
+ * instead with required OAuth and IAM checks to provide better data security.
873
+ *
874
+ * @param {Object} request
875
+ * The request object that will be sent.
876
+ * @param {string} request.servingConfig
877
+ * Required. The resource name of the Search serving config, such as
878
+ * `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
879
+ * or
880
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
881
+ * This field is used to identify the serving configuration name, set
882
+ * of models used to make the search.
883
+ * @param {string} request.branch
884
+ * The branch resource name, such as
885
+ * `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
886
+ *
887
+ * Use `default_branch` as the branch ID or leave this field empty, to search
888
+ * documents under the default branch.
889
+ * @param {string} request.query
890
+ * Raw search query.
891
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.ImageQuery} request.imageQuery
892
+ * Raw image query.
893
+ * @param {number} request.pageSize
894
+ * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
895
+ * return. The maximum allowed value depends on the data type. Values above
896
+ * the maximum value are coerced to the maximum value.
897
+ *
898
+ * * Websites with basic indexing: Default `10`, Maximum `25`.
899
+ * * Websites with advanced indexing: Default `25`, Maximum `50`.
900
+ * * Other: Default `50`, Maximum `100`.
901
+ *
902
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
903
+ * @param {string} request.pageToken
904
+ * A page token received from a previous
905
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
906
+ * call. Provide this to retrieve the subsequent page.
907
+ *
908
+ * When paginating, all other parameters provided to
909
+ * {@link protos.google.cloud.discoveryengine.v1.SearchService.Search|SearchService.Search}
910
+ * must match the call that provided the page token. Otherwise, an
911
+ * `INVALID_ARGUMENT` error is returned.
912
+ * @param {number} request.offset
913
+ * A 0-indexed integer that specifies the current offset (that is, starting
914
+ * result location, amongst the
915
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s deemed by the API as
916
+ * relevant) in search results. This field is only considered if
917
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.page_token|page_token} is
918
+ * unset.
919
+ *
920
+ * If this field is negative, an `INVALID_ARGUMENT` is returned.
921
+ * @param {number} request.oneBoxPageSize
922
+ * The maximum number of results to return for OneBox.
923
+ * This applies to each OneBox type individually.
924
+ * Default number is 10.
925
+ * @param {number[]} request.dataStoreSpecs
926
+ * Specifications that define the specific
927
+ * {@link protos.google.cloud.discoveryengine.v1.DataStore|DataStore}s to be searched,
928
+ * along with configurations for those data stores. This is only considered
929
+ * for {@link protos.google.cloud.discoveryengine.v1.Engine|Engine}s with multiple data
930
+ * stores. For engines with a single data store, the specs directly under
931
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest|SearchRequest} should be
932
+ * used.
933
+ * @param {string} request.filter
934
+ * The filter syntax consists of an expression language for constructing a
935
+ * predicate from one or more fields of the documents being filtered. Filter
936
+ * expression is case-sensitive.
937
+ *
938
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
939
+ *
940
+ * Filtering in Vertex AI Search is done by mapping the LHS filter key to a
941
+ * key property defined in the Vertex AI Search backend -- this mapping is
942
+ * defined by the customer in their schema. For example a media customer might
943
+ * have a field 'name' in their schema. In this case the filter would look
944
+ * like this: filter --> name:'ANY("king kong")'
945
+ *
946
+ * For more information about filtering including syntax and filter
947
+ * operators, see
948
+ * [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
949
+ * @param {string} request.canonicalFilter
950
+ * The default filter that is applied when a user performs a search without
951
+ * checking any filters on the search page.
952
+ *
953
+ * The filter applied to every search request when quality improvement such as
954
+ * query expansion is needed. In the case a query does not have a sufficient
955
+ * amount of results this filter will be used to determine whether or not to
956
+ * enable the query expansion flow. The original filter will still be used for
957
+ * the query expanded search.
958
+ * This field is strongly recommended to achieve high search quality.
959
+ *
960
+ * For more information about filter syntax, see
961
+ * {@link protos.google.cloud.discoveryengine.v1.SearchRequest.filter|SearchRequest.filter}.
962
+ * @param {string} request.orderBy
963
+ * The order in which documents are returned. Documents can be ordered by
964
+ * a field in an {@link protos.google.cloud.discoveryengine.v1.Document|Document} object.
965
+ * Leave it unset if ordered by relevance. `order_by` expression is
966
+ * case-sensitive.
967
+ *
968
+ * For more information on ordering the website search results, see
969
+ * [Order web search
970
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
971
+ * For more information on ordering the healthcare search results, see
972
+ * [Order healthcare search
973
+ * results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
974
+ * If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
975
+ * @param {google.cloud.discoveryengine.v1.UserInfo} request.userInfo
976
+ * Information about the end user.
977
+ * Highly recommended for analytics and personalization.
978
+ * {@link protos.google.cloud.discoveryengine.v1.UserInfo.user_agent|UserInfo.user_agent}
979
+ * is used to deduce `device_type` for analytics.
980
+ * @param {string} request.languageCode
981
+ * The BCP-47 language code, such as "en-US" or "sr-Latn". For more
982
+ * information, see [Standard
983
+ * fields](https://cloud.google.com/apis/design/standard_fields). This field
984
+ * helps to better interpret the query. If a value isn't specified, the query
985
+ * language code is automatically detected, which may not be accurate.
986
+ * @param {number[]} request.facetSpecs
987
+ * Facet specifications for faceted search. If empty, no facets are returned.
988
+ *
989
+ * A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
990
+ * error is returned.
991
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.BoostSpec} request.boostSpec
992
+ * Boost specification to boost certain documents.
993
+ * For more information on boosting, see
994
+ * [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
995
+ * @param {number[]} request.params
996
+ * Additional search parameters.
997
+ *
998
+ * For public website search only, supported values are:
999
+ *
1000
+ * * `user_country_code`: string. Default empty. If set to non-empty, results
1001
+ * are restricted or boosted based on the location provided.
1002
+ * For example, `user_country_code: "au"`
1003
+ *
1004
+ * For available codes see [Country
1005
+ * Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
1006
+ *
1007
+ * * `search_type`: double. Default empty. Enables non-webpage searching
1008
+ * depending on the value. The only valid non-default value is 1,
1009
+ * which enables image searching.
1010
+ * For example, `search_type: 1`
1011
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
1012
+ * The query expansion specification that specifies the conditions under which
1013
+ * query expansion occurs.
1014
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
1015
+ * The spell correction specification that specifies the mode under
1016
+ * which spell correction takes effect.
1017
+ * @param {string} request.userPseudoId
1018
+ * A unique identifier for tracking visitors. For example, this could be
1019
+ * implemented with an HTTP cookie, which should be able to uniquely identify
1020
+ * a visitor on a single device. This unique identifier should not change if
1021
+ * the visitor logs in or out of the website.
1022
+ *
1023
+ * This field should NOT have a fixed value such as `unknown_visitor`.
1024
+ *
1025
+ * This should be the same identifier as
1026
+ * {@link protos.google.cloud.discoveryengine.v1.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
1027
+ * and
1028
+ * {@link protos.google.cloud.discoveryengine.v1.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
1029
+ *
1030
+ * The field must be a UTF-8 encoded string with a length limit of 128
1031
+ * characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
1032
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.ContentSearchSpec} request.contentSearchSpec
1033
+ * A specification for configuring the behavior of content search.
1034
+ * @param {boolean} request.safeSearch
1035
+ * Whether to turn on safe search. This is only supported for
1036
+ * website search.
1037
+ * @param {number[]} request.userLabels
1038
+ * The user labels applied to a resource must meet the following requirements:
1039
+ *
1040
+ * * Each resource can have multiple labels, up to a maximum of 64.
1041
+ * * Each label must be a key-value pair.
1042
+ * * Keys have a minimum length of 1 character and a maximum length of 63
1043
+ * characters and cannot be empty. Values can be empty and have a maximum
1044
+ * length of 63 characters.
1045
+ * * Keys and values can contain only lowercase letters, numeric characters,
1046
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
1047
+ * international characters are allowed.
1048
+ * * The key portion of a label must be unique. However, you can use the same
1049
+ * key with multiple resources.
1050
+ * * Keys must start with a lowercase letter or international character.
1051
+ *
1052
+ * See [Google Cloud
1053
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
1054
+ * for more details.
1055
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
1056
+ * Search as you type configuration. Only supported for the
1057
+ * {@link protos.google.cloud.discoveryengine.v1.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
1058
+ * vertical.
1059
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.DisplaySpec} [request.displaySpec]
1060
+ * Optional. Config for display feature, like match highlighting on search
1061
+ * results.
1062
+ * @param {string} request.session
1063
+ * The session resource name. Optional.
1064
+ *
1065
+ * Session allows users to do multi-turn /search API calls or coordination
1066
+ * between /search API calls and /answer API calls.
1067
+ *
1068
+ * Example #1 (multi-turn /search API calls):
1069
+ * 1. Call /search API with the auto-session mode (see below).
1070
+ * 2. Call /search API with the session ID generated in the first call.
1071
+ * Here, the previous search query gets considered in query
1072
+ * standing. I.e., if the first query is "How did Alphabet do in 2022?"
1073
+ * and the current query is "How about 2023?", the current query will
1074
+ * be interpreted as "How did Alphabet do in 2023?".
1075
+ *
1076
+ * Example #2 (coordination between /search API calls and /answer API calls):
1077
+ * 1. Call /search API with the auto-session mode (see below).
1078
+ * 2. Call /answer API with the session ID generated in the first call.
1079
+ * Here, the answer generation happens in the context of the search
1080
+ * results from the first search call.
1081
+ *
1082
+ * Auto-session mode: when `projects/.../sessions/-` is used, a new session
1083
+ * gets automatically created. Otherwise, users can use the create-session API
1084
+ * to create a session manually.
1085
+ *
1086
+ * Multi-turn Search feature is currently at private GA stage. Please use
1087
+ * v1alpha or v1beta version instead before we launch this feature to public
1088
+ * GA. Or ask for allowlisting through Google Support team.
1089
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.SessionSpec} request.sessionSpec
1090
+ * Session specification.
1091
+ *
1092
+ * Can be used only when `session` is set.
1093
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceThreshold} request.relevanceThreshold
1094
+ * The relevance threshold of the search results.
1095
+ *
1096
+ * Default to Google defined threshold, leveraging a balance of
1097
+ * precision and recall to deliver both highly accurate results and
1098
+ * comprehensive coverage of relevant information.
1099
+ *
1100
+ * This feature is not supported for healthcare search.
1101
+ * @param {google.cloud.discoveryengine.v1.SearchRequest.RelevanceScoreSpec} [request.relevanceScoreSpec]
1102
+ * Optional. The specification for returning the relevance score.
1103
+ * @param {object} [options]
1104
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1105
+ * @returns {Promise} - The promise which resolves to an array.
1106
+ * The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1.SearchResponse.SearchResult|SearchResult}.
1107
+ * The client library will perform auto-pagination by default: it will call the API as many
1108
+ * times as needed and will merge results from all the pages into this array.
1109
+ * Note that it can affect your quota.
1110
+ * We recommend using `searchLiteAsync()`
1111
+ * method described below for async iteration which you can stop as needed.
1112
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1113
+ * for more details and examples.
1114
+ */
1115
1115
  searchLite(request?: protos.google.cloud.discoveryengine.v1.ISearchRequest, options?: CallOptions): Promise<[
1116
1116
  protos.google.cloud.discoveryengine.v1.SearchResponse.ISearchResult[],
1117
1117
  protos.google.cloud.discoveryengine.v1.ISearchRequest | null,
@@ -1609,55 +1609,55 @@ export declare class SearchServiceClient {
1609
1609
  */
1610
1610
  searchLiteAsync(request?: protos.google.cloud.discoveryengine.v1.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1.SearchResponse.ISearchResult>;
1611
1611
  /**
1612
- * Gets information about a location.
1613
- *
1614
- * @param {Object} request
1615
- * The request object that will be sent.
1616
- * @param {string} request.name
1617
- * Resource name for the location.
1618
- * @param {object} [options]
1619
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1620
- * @returns {Promise} - The promise which resolves to an array.
1621
- * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1622
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1623
- * for more details and examples.
1624
- * @example
1625
- * ```
1626
- * const [response] = await client.getLocation(request);
1627
- * ```
1628
- */
1612
+ * Gets information about a location.
1613
+ *
1614
+ * @param {Object} request
1615
+ * The request object that will be sent.
1616
+ * @param {string} request.name
1617
+ * Resource name for the location.
1618
+ * @param {object} [options]
1619
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
1620
+ * @returns {Promise} - The promise which resolves to an array.
1621
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
1622
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1623
+ * for more details and examples.
1624
+ * @example
1625
+ * ```
1626
+ * const [response] = await client.getLocation(request);
1627
+ * ```
1628
+ */
1629
1629
  getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
1630
1630
  /**
1631
- * Lists information about the supported locations for this service. Returns an iterable object.
1632
- *
1633
- * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1634
- * @param {Object} request
1635
- * The request object that will be sent.
1636
- * @param {string} request.name
1637
- * The resource that owns the locations collection, if applicable.
1638
- * @param {string} request.filter
1639
- * The standard list filter.
1640
- * @param {number} request.pageSize
1641
- * The standard list page size.
1642
- * @param {string} request.pageToken
1643
- * The standard list page token.
1644
- * @param {object} [options]
1645
- * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1646
- * @returns {Object}
1647
- * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1648
- * When you iterate the returned iterable, each element will be an object representing
1649
- * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1650
- * so you can stop the iteration when you don't need more results.
1651
- * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1652
- * for more details and examples.
1653
- * @example
1654
- * ```
1655
- * const iterable = client.listLocationsAsync(request);
1656
- * for await (const response of iterable) {
1657
- * // process response
1658
- * }
1659
- * ```
1660
- */
1631
+ * Lists information about the supported locations for this service. Returns an iterable object.
1632
+ *
1633
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
1634
+ * @param {Object} request
1635
+ * The request object that will be sent.
1636
+ * @param {string} request.name
1637
+ * The resource that owns the locations collection, if applicable.
1638
+ * @param {string} request.filter
1639
+ * The standard list filter.
1640
+ * @param {number} request.pageSize
1641
+ * The standard list page size.
1642
+ * @param {string} request.pageToken
1643
+ * The standard list page token.
1644
+ * @param {object} [options]
1645
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1646
+ * @returns {Object}
1647
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
1648
+ * When you iterate the returned iterable, each element will be an object representing
1649
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
1650
+ * so you can stop the iteration when you don't need more results.
1651
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
1652
+ * for more details and examples.
1653
+ * @example
1654
+ * ```
1655
+ * const iterable = client.listLocationsAsync(request);
1656
+ * for await (const response of iterable) {
1657
+ * // process response
1658
+ * }
1659
+ * ```
1660
+ */
1661
1661
  listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
1662
1662
  /**
1663
1663
  * Return a fully-qualified engine resource name string.