@google-cloud/discoveryengine 1.0.0 → 1.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 (94) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +33 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  29. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
  30. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
  31. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
  32. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
  33. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
  34. package/build/protos/protos.d.ts +22864 -6680
  35. package/build/protos/protos.js +57205 -16191
  36. package/build/protos/protos.json +5548 -1224
  37. package/build/src/index.d.ts +6 -1
  38. package/build/src/index.js +7 -1
  39. package/build/src/v1/completion_service_client.d.ts +156 -6
  40. package/build/src/v1/completion_service_client.js +188 -4
  41. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  42. package/build/src/v1/conversational_search_service_client.js +1205 -0
  43. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  44. package/build/src/v1/document_service_client.d.ts +165 -18
  45. package/build/src/v1/document_service_client.js +215 -11
  46. package/build/src/v1/index.d.ts +1 -0
  47. package/build/src/v1/index.js +3 -1
  48. package/build/src/v1/schema_service_client.d.ts +148 -4
  49. package/build/src/v1/schema_service_client.js +207 -5
  50. package/build/src/v1/search_service_client.d.ts +238 -28
  51. package/build/src/v1/search_service_client.js +248 -20
  52. package/build/src/v1/user_event_service_client.d.ts +153 -9
  53. package/build/src/v1/user_event_service_client.js +207 -5
  54. package/build/src/v1alpha/completion_service_client.d.ts +603 -0
  55. package/build/src/v1alpha/completion_service_client.js +843 -0
  56. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  57. package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
  58. package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
  59. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  60. package/build/src/v1alpha/document_service_client.d.ts +1140 -0
  61. package/build/src/v1alpha/document_service_client.js +1393 -0
  62. package/build/src/v1alpha/document_service_client_config.json +82 -0
  63. package/build/src/v1alpha/index.d.ts +8 -0
  64. package/build/src/v1alpha/index.js +37 -0
  65. package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
  66. package/build/src/v1alpha/recommendation_service_client.js +938 -0
  67. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  68. package/build/src/v1alpha/schema_service_client.d.ts +935 -0
  69. package/build/src/v1alpha/schema_service_client.js +1327 -0
  70. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  71. package/build/src/v1alpha/search_service_client.d.ts +1208 -0
  72. package/build/src/v1alpha/search_service_client.js +1432 -0
  73. package/build/src/v1alpha/search_service_client_config.json +43 -0
  74. package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
  75. package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
  76. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  77. package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
  78. package/build/src/v1alpha/user_event_service_client.js +1174 -0
  79. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  80. package/build/src/v1beta/completion_service_client.d.ts +55 -4
  81. package/build/src/v1beta/completion_service_client.js +60 -4
  82. package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
  83. package/build/src/v1beta/conversational_search_service_client.js +60 -4
  84. package/build/src/v1beta/document_service_client.d.ts +55 -4
  85. package/build/src/v1beta/document_service_client.js +61 -5
  86. package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
  87. package/build/src/v1beta/recommendation_service_client.js +60 -4
  88. package/build/src/v1beta/schema_service_client.d.ts +55 -4
  89. package/build/src/v1beta/schema_service_client.js +61 -5
  90. package/build/src/v1beta/search_service_client.d.ts +142 -4
  91. package/build/src/v1beta/search_service_client.js +118 -4
  92. package/build/src/v1beta/user_event_service_client.d.ts +55 -4
  93. package/build/src/v1beta/user_event_service_client.js +61 -5
  94. package/package.json +5 -5
@@ -0,0 +1,67 @@
1
+ {
2
+ "interfaces": {
3
+ "google.cloud.discoveryengine.v1alpha.UserEventService": {
4
+ "retry_codes": {
5
+ "non_idempotent": [],
6
+ "idempotent": [
7
+ "DEADLINE_EXCEEDED",
8
+ "UNAVAILABLE"
9
+ ],
10
+ "unavailable": [
11
+ "UNAVAILABLE"
12
+ ]
13
+ },
14
+ "retry_params": {
15
+ "default": {
16
+ "initial_retry_delay_millis": 100,
17
+ "retry_delay_multiplier": 1.3,
18
+ "max_retry_delay_millis": 60000,
19
+ "initial_rpc_timeout_millis": 60000,
20
+ "rpc_timeout_multiplier": 1,
21
+ "max_rpc_timeout_millis": 60000,
22
+ "total_timeout_millis": 600000
23
+ },
24
+ "ce5b960a6ed052e690863808e4f0deff3dc7d49f": {
25
+ "initial_retry_delay_millis": 1000,
26
+ "retry_delay_multiplier": 1.3,
27
+ "max_retry_delay_millis": 10000,
28
+ "initial_rpc_timeout_millis": 60000,
29
+ "rpc_timeout_multiplier": 1,
30
+ "max_rpc_timeout_millis": 60000,
31
+ "total_timeout_millis": 600000
32
+ },
33
+ "e6a9f61a856ca7c2128ab9550ca4fb9e97c77876": {
34
+ "initial_retry_delay_millis": 1000,
35
+ "retry_delay_multiplier": 1.3,
36
+ "max_retry_delay_millis": 30000,
37
+ "initial_rpc_timeout_millis": 60000,
38
+ "rpc_timeout_multiplier": 1,
39
+ "max_rpc_timeout_millis": 60000,
40
+ "total_timeout_millis": 600000
41
+ }
42
+ },
43
+ "methods": {
44
+ "WriteUserEvent": {
45
+ "timeout_millis": 30000,
46
+ "retry_codes_name": "unavailable",
47
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
48
+ },
49
+ "CollectUserEvent": {
50
+ "timeout_millis": 30000,
51
+ "retry_codes_name": "unavailable",
52
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
53
+ },
54
+ "PurgeUserEvents": {
55
+ "timeout_millis": 30000,
56
+ "retry_codes_name": "unavailable",
57
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
58
+ },
59
+ "ImportUserEvents": {
60
+ "timeout_millis": 300000,
61
+ "retry_codes_name": "unavailable",
62
+ "retry_params_name": "e6a9f61a856ca7c2128ab9550ca4fb9e97c77876"
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
@@ -1,5 +1,5 @@
1
1
  import type * as gax from 'google-gax';
2
- import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LocationsClient, LocationProtos } from 'google-gax';
3
3
  import * as protos from '../../protos/protos';
4
4
  /**
5
5
  * Service for Auto-Completion.
@@ -20,6 +20,7 @@ export declare class CompletionServiceClient {
20
20
  innerApiCalls: {
21
21
  [name: string]: Function;
22
22
  };
23
+ locationsClient: LocationsClient;
23
24
  pathTemplates: {
24
25
  [name: string]: gax.PathTemplate;
25
26
  };
@@ -54,8 +55,7 @@ export declare class CompletionServiceClient {
54
55
  * API remote host.
55
56
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
56
57
  * Follows the structure of {@link gapicConfig}.
57
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
58
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
58
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
59
59
  * For more information, please check the
60
60
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
61
61
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -63,7 +63,7 @@ export declare class CompletionServiceClient {
63
63
  * HTTP implementation. Load only fallback version and pass it to the constructor:
64
64
  * ```
65
65
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
66
- * const client = new CompletionServiceClient({fallback: 'rest'}, gax);
66
+ * const client = new CompletionServiceClient({fallback: true}, gax);
67
67
  * ```
68
68
  */
69
69
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -171,6 +171,57 @@ export declare class CompletionServiceClient {
171
171
  ]>;
172
172
  completeQuery(request: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest | null | undefined, {} | null | undefined>): void;
173
173
  completeQuery(request: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, callback: Callback<protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest | null | undefined, {} | null | undefined>): void;
174
+ /**
175
+ * Gets information about a location.
176
+ *
177
+ * @param {Object} request
178
+ * The request object that will be sent.
179
+ * @param {string} request.name
180
+ * Resource name for the location.
181
+ * @param {object} [options]
182
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
183
+ * @returns {Promise} - The promise which resolves to an array.
184
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
185
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
186
+ * for more details and examples.
187
+ * @example
188
+ * ```
189
+ * const [response] = await client.getLocation(request);
190
+ * ```
191
+ */
192
+ 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>;
193
+ /**
194
+ * Lists information about the supported locations for this service. Returns an iterable object.
195
+ *
196
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
197
+ * @param {Object} request
198
+ * The request object that will be sent.
199
+ * @param {string} request.name
200
+ * The resource that owns the locations collection, if applicable.
201
+ * @param {string} request.filter
202
+ * The standard list filter.
203
+ * @param {number} request.pageSize
204
+ * The standard list page size.
205
+ * @param {string} request.pageToken
206
+ * The standard list page token.
207
+ * @param {object} [options]
208
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
209
+ * @returns {Object}
210
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
211
+ * When you iterate the returned iterable, each element will be an object representing
212
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
213
+ * so you can stop the iteration when you don't need more results.
214
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
215
+ * for more details and examples.
216
+ * @example
217
+ * ```
218
+ * const iterable = client.listLocationsAsync(request);
219
+ * for await (const response of iterable) {
220
+ * // process response
221
+ * }
222
+ * ```
223
+ */
224
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
174
225
  /**
175
226
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
176
227
  *
@@ -60,8 +60,7 @@ class CompletionServiceClient {
60
60
  * API remote host.
61
61
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
62
  * Follows the structure of {@link gapicConfig}.
63
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
64
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
65
64
  * For more information, please check the
66
65
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
66
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -69,7 +68,7 @@ class CompletionServiceClient {
69
68
  * HTTP implementation. Load only fallback version and pass it to the constructor:
70
69
  * ```
71
70
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
- * const client = new CompletionServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new CompletionServiceClient({fallback: true}, gax);
73
72
  * ```
74
73
  */
75
74
  constructor(opts, gaxInstance) {
@@ -115,6 +114,7 @@ class CompletionServiceClient {
115
114
  if (servicePath === staticMembers.servicePath) {
116
115
  this.auth.defaultScopes = staticMembers.scopes;
117
116
  }
117
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
118
118
  // Determine the client header string.
119
119
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
120
120
  if (typeof process !== 'undefined' && 'versions' in process) {
@@ -126,7 +126,7 @@ class CompletionServiceClient {
126
126
  if (!opts.fallback) {
127
127
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
128
128
  }
129
- else if (opts.fallback === 'rest') {
129
+ else {
130
130
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
131
131
  }
132
132
  if (opts.libName && opts.libVersion) {
@@ -260,6 +260,61 @@ class CompletionServiceClient {
260
260
  this.initialize();
261
261
  return this.innerApiCalls.completeQuery(request, options, callback);
262
262
  }
263
+ /**
264
+ * Gets information about a location.
265
+ *
266
+ * @param {Object} request
267
+ * The request object that will be sent.
268
+ * @param {string} request.name
269
+ * Resource name for the location.
270
+ * @param {object} [options]
271
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
272
+ * @returns {Promise} - The promise which resolves to an array.
273
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
274
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
275
+ * for more details and examples.
276
+ * @example
277
+ * ```
278
+ * const [response] = await client.getLocation(request);
279
+ * ```
280
+ */
281
+ getLocation(request, options, callback) {
282
+ return this.locationsClient.getLocation(request, options, callback);
283
+ }
284
+ /**
285
+ * Lists information about the supported locations for this service. Returns an iterable object.
286
+ *
287
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
288
+ * @param {Object} request
289
+ * The request object that will be sent.
290
+ * @param {string} request.name
291
+ * The resource that owns the locations collection, if applicable.
292
+ * @param {string} request.filter
293
+ * The standard list filter.
294
+ * @param {number} request.pageSize
295
+ * The standard list page size.
296
+ * @param {string} request.pageToken
297
+ * The standard list page token.
298
+ * @param {object} [options]
299
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
300
+ * @returns {Object}
301
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
302
+ * When you iterate the returned iterable, each element will be an object representing
303
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
304
+ * so you can stop the iteration when you don't need more results.
305
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
306
+ * for more details and examples.
307
+ * @example
308
+ * ```
309
+ * const iterable = client.listLocationsAsync(request);
310
+ * for await (const response of iterable) {
311
+ * // process response
312
+ * }
313
+ * ```
314
+ */
315
+ listLocationsAsync(request, options) {
316
+ return this.locationsClient.listLocationsAsync(request, options);
317
+ }
263
318
  // --------------------
264
319
  // -- Path templates --
265
320
  // --------------------
@@ -778,6 +833,7 @@ class CompletionServiceClient {
778
833
  return this.completionServiceStub.then(stub => {
779
834
  this._terminated = true;
780
835
  stub.close();
836
+ this.locationsClient.close();
781
837
  });
782
838
  }
783
839
  return Promise.resolve();
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type * as gax from 'google-gax';
3
- import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
3
+ import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
4
4
  import { Transform } from 'stream';
5
5
  import * as protos from '../../protos/protos';
6
6
  /**
@@ -22,6 +22,7 @@ export declare class ConversationalSearchServiceClient {
22
22
  innerApiCalls: {
23
23
  [name: string]: Function;
24
24
  };
25
+ locationsClient: LocationsClient;
25
26
  pathTemplates: {
26
27
  [name: string]: gax.PathTemplate;
27
28
  };
@@ -56,8 +57,7 @@ export declare class ConversationalSearchServiceClient {
56
57
  * API remote host.
57
58
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
58
59
  * Follows the structure of {@link gapicConfig}.
59
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
60
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
60
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
61
61
  * For more information, please check the
62
62
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
63
63
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -65,7 +65,7 @@ export declare class ConversationalSearchServiceClient {
65
65
  * HTTP implementation. Load only fallback version and pass it to the constructor:
66
66
  * ```
67
67
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
68
- * const client = new ConversationalSearchServiceClient({fallback: 'rest'}, gax);
68
+ * const client = new ConversationalSearchServiceClient({fallback: true}, gax);
69
69
  * ```
70
70
  */
71
71
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -131,6 +131,26 @@ export declare class ConversationalSearchServiceClient {
131
131
  * session.
132
132
  * @param {boolean} request.safeSearch
133
133
  * Whether to turn on safe search.
134
+ * @param {number[]} request.userLabels
135
+ * The user labels applied to a resource must meet the following requirements:
136
+ *
137
+ * * Each resource can have multiple labels, up to a maximum of 64.
138
+ * * Each label must be a key-value pair.
139
+ * * Keys have a minimum length of 1 character and a maximum length of 63
140
+ * characters and cannot be empty. Values can be empty and have a maximum
141
+ * length of 63 characters.
142
+ * * Keys and values can contain only lowercase letters, numeric characters,
143
+ * underscores, and dashes. All characters must use UTF-8 encoding, and
144
+ * international characters are allowed.
145
+ * * The key portion of a label must be unique. However, you can use the same
146
+ * key with multiple resources.
147
+ * * Keys must start with a lowercase letter or international character.
148
+ *
149
+ * See [Google Cloud
150
+ * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
151
+ * for more details.
152
+ * @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} request.summarySpec
153
+ * A specification for configuring the summary returned in the response.
134
154
  * @param {object} [options]
135
155
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
136
156
  * @returns {Promise} - The promise which resolves to an array.
@@ -401,6 +421,57 @@ export declare class ConversationalSearchServiceClient {
401
421
  * region_tag:discoveryengine_v1beta_generated_ConversationalSearchService_ListConversations_async
402
422
  */
403
423
  listConversationsAsync(request?: protos.google.cloud.discoveryengine.v1beta.IListConversationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.IConversation>;
424
+ /**
425
+ * Gets information about a location.
426
+ *
427
+ * @param {Object} request
428
+ * The request object that will be sent.
429
+ * @param {string} request.name
430
+ * Resource name for the location.
431
+ * @param {object} [options]
432
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
433
+ * @returns {Promise} - The promise which resolves to an array.
434
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
435
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
436
+ * for more details and examples.
437
+ * @example
438
+ * ```
439
+ * const [response] = await client.getLocation(request);
440
+ * ```
441
+ */
442
+ 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>;
443
+ /**
444
+ * Lists information about the supported locations for this service. Returns an iterable object.
445
+ *
446
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
447
+ * @param {Object} request
448
+ * The request object that will be sent.
449
+ * @param {string} request.name
450
+ * The resource that owns the locations collection, if applicable.
451
+ * @param {string} request.filter
452
+ * The standard list filter.
453
+ * @param {number} request.pageSize
454
+ * The standard list page size.
455
+ * @param {string} request.pageToken
456
+ * The standard list page token.
457
+ * @param {object} [options]
458
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
459
+ * @returns {Object}
460
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
461
+ * When you iterate the returned iterable, each element will be an object representing
462
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
463
+ * so you can stop the iteration when you don't need more results.
464
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
465
+ * for more details and examples.
466
+ * @example
467
+ * ```
468
+ * const iterable = client.listLocationsAsync(request);
469
+ * for await (const response of iterable) {
470
+ * // process response
471
+ * }
472
+ * ```
473
+ */
474
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
404
475
  /**
405
476
  * Return a fully-qualified projectLocationCollectionDataStore resource name string.
406
477
  *
@@ -60,8 +60,7 @@ class ConversationalSearchServiceClient {
60
60
  * API remote host.
61
61
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
62
  * Follows the structure of {@link gapicConfig}.
63
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
64
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
65
64
  * For more information, please check the
66
65
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
66
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -69,7 +68,7 @@ class ConversationalSearchServiceClient {
69
68
  * HTTP implementation. Load only fallback version and pass it to the constructor:
70
69
  * ```
71
70
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
- * const client = new ConversationalSearchServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new ConversationalSearchServiceClient({fallback: true}, gax);
73
72
  * ```
74
73
  */
75
74
  constructor(opts, gaxInstance) {
@@ -116,6 +115,7 @@ class ConversationalSearchServiceClient {
116
115
  if (servicePath === staticMembers.servicePath) {
117
116
  this.auth.defaultScopes = staticMembers.scopes;
118
117
  }
118
+ this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
119
119
  // Determine the client header string.
120
120
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
121
121
  if (typeof process !== 'undefined' && 'versions' in process) {
@@ -127,7 +127,7 @@ class ConversationalSearchServiceClient {
127
127
  if (!opts.fallback) {
128
128
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
129
129
  }
130
- else if (opts.fallback === 'rest') {
130
+ else {
131
131
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
132
132
  }
133
133
  if (opts.libName && opts.libVersion) {
@@ -496,6 +496,61 @@ class ConversationalSearchServiceClient {
496
496
  this.initialize();
497
497
  return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
498
498
  }
499
+ /**
500
+ * Gets information about a location.
501
+ *
502
+ * @param {Object} request
503
+ * The request object that will be sent.
504
+ * @param {string} request.name
505
+ * Resource name for the location.
506
+ * @param {object} [options]
507
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
508
+ * @returns {Promise} - The promise which resolves to an array.
509
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
510
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
511
+ * for more details and examples.
512
+ * @example
513
+ * ```
514
+ * const [response] = await client.getLocation(request);
515
+ * ```
516
+ */
517
+ getLocation(request, options, callback) {
518
+ return this.locationsClient.getLocation(request, options, callback);
519
+ }
520
+ /**
521
+ * Lists information about the supported locations for this service. Returns an iterable object.
522
+ *
523
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
524
+ * @param {Object} request
525
+ * The request object that will be sent.
526
+ * @param {string} request.name
527
+ * The resource that owns the locations collection, if applicable.
528
+ * @param {string} request.filter
529
+ * The standard list filter.
530
+ * @param {number} request.pageSize
531
+ * The standard list page size.
532
+ * @param {string} request.pageToken
533
+ * The standard list page token.
534
+ * @param {object} [options]
535
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
536
+ * @returns {Object}
537
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
538
+ * When you iterate the returned iterable, each element will be an object representing
539
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
540
+ * so you can stop the iteration when you don't need more results.
541
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
542
+ * for more details and examples.
543
+ * @example
544
+ * ```
545
+ * const iterable = client.listLocationsAsync(request);
546
+ * for await (const response of iterable) {
547
+ * // process response
548
+ * }
549
+ * ```
550
+ */
551
+ listLocationsAsync(request, options) {
552
+ return this.locationsClient.listLocationsAsync(request, options);
553
+ }
499
554
  // --------------------
500
555
  // -- Path templates --
501
556
  // --------------------
@@ -1140,6 +1195,7 @@ class ConversationalSearchServiceClient {
1140
1195
  return this.conversationalSearchServiceStub.then(stub => {
1141
1196
  this._terminated = true;
1142
1197
  stub.close();
1198
+ this.locationsClient.close();
1143
1199
  });
1144
1200
  }
1145
1201
  return Promise.resolve();
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type * as gax from 'google-gax';
3
- import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
3
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
4
4
  import { Transform } from 'stream';
5
5
  import * as protos from '../../protos/protos';
6
6
  /**
@@ -24,6 +24,7 @@ export declare class DocumentServiceClient {
24
24
  innerApiCalls: {
25
25
  [name: string]: Function;
26
26
  };
27
+ locationsClient: LocationsClient;
27
28
  pathTemplates: {
28
29
  [name: string]: gax.PathTemplate;
29
30
  };
@@ -59,8 +60,7 @@ export declare class DocumentServiceClient {
59
60
  * API remote host.
60
61
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
61
62
  * Follows the structure of {@link gapicConfig}.
62
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
63
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
63
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
64
64
  * For more information, please check the
65
65
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
66
66
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -68,7 +68,7 @@ export declare class DocumentServiceClient {
68
68
  * HTTP implementation. Load only fallback version and pass it to the constructor:
69
69
  * ```
70
70
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
71
- * const client = new DocumentServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new DocumentServiceClient({fallback: true}, gax);
72
72
  * ```
73
73
  */
74
74
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -566,6 +566,57 @@ export declare class DocumentServiceClient {
566
566
  * region_tag:discoveryengine_v1beta_generated_DocumentService_ListDocuments_async
567
567
  */
568
568
  listDocumentsAsync(request?: protos.google.cloud.discoveryengine.v1beta.IListDocumentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.IDocument>;
569
+ /**
570
+ * Gets information about a location.
571
+ *
572
+ * @param {Object} request
573
+ * The request object that will be sent.
574
+ * @param {string} request.name
575
+ * Resource name for the location.
576
+ * @param {object} [options]
577
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
578
+ * @returns {Promise} - The promise which resolves to an array.
579
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
580
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
581
+ * for more details and examples.
582
+ * @example
583
+ * ```
584
+ * const [response] = await client.getLocation(request);
585
+ * ```
586
+ */
587
+ 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>;
588
+ /**
589
+ * Lists information about the supported locations for this service. Returns an iterable object.
590
+ *
591
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
592
+ * @param {Object} request
593
+ * The request object that will be sent.
594
+ * @param {string} request.name
595
+ * The resource that owns the locations collection, if applicable.
596
+ * @param {string} request.filter
597
+ * The standard list filter.
598
+ * @param {number} request.pageSize
599
+ * The standard list page size.
600
+ * @param {string} request.pageToken
601
+ * The standard list page token.
602
+ * @param {object} [options]
603
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
604
+ * @returns {Object}
605
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
606
+ * When you iterate the returned iterable, each element will be an object representing
607
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
608
+ * so you can stop the iteration when you don't need more results.
609
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
610
+ * for more details and examples.
611
+ * @example
612
+ * ```
613
+ * const iterable = client.listLocationsAsync(request);
614
+ * for await (const response of iterable) {
615
+ * // process response
616
+ * }
617
+ * ```
618
+ */
619
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
569
620
  /**
570
621
  * Gets the latest state of a long-running operation. Clients can use this
571
622
  * method to poll the operation result at intervals as recommended by the API