@google-cloud/discoveryengine 0.8.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +13 -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/v1beta/common.proto +7 -2
  15. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +13 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +138 -0
  17. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +306 -0
  18. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +2 -4
  19. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
  20. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +17 -17
  21. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  22. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +276 -64
  23. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +45 -36
  24. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
  25. package/build/protos/protos.d.ts +13913 -8367
  26. package/build/protos/protos.js +36766 -22883
  27. package/build/protos/protos.json +3956 -2571
  28. package/build/src/index.d.ts +4 -1
  29. package/build/src/index.js +4 -1
  30. package/build/src/v1/completion_service_client.d.ts +161 -12
  31. package/build/src/v1/completion_service_client.js +188 -4
  32. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  33. package/build/src/v1/conversational_search_service_client.js +1205 -0
  34. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  35. package/build/src/v1/document_service_client.d.ts +245 -109
  36. package/build/src/v1/document_service_client.js +231 -31
  37. package/build/src/v1/index.d.ts +1 -0
  38. package/build/src/v1/index.js +3 -1
  39. package/build/src/v1/schema_service_client.d.ts +187 -53
  40. package/build/src/v1/schema_service_client.js +224 -27
  41. package/build/src/v1/search_service_client.d.ts +266 -59
  42. package/build/src/v1/search_service_client.js +267 -41
  43. package/build/src/v1/user_event_service_client.d.ts +159 -19
  44. package/build/src/v1/user_event_service_client.js +208 -7
  45. package/build/src/v1beta/completion_service_client.d.ts +159 -12
  46. package/build/src/v1beta/completion_service_client.js +188 -4
  47. package/build/src/v1beta/conversational_search_service_client.d.ts +947 -0
  48. package/build/src/v1beta/conversational_search_service_client.js +1205 -0
  49. package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
  50. package/build/src/v1beta/document_service_client.d.ts +237 -101
  51. package/build/src/v1beta/document_service_client.js +227 -27
  52. package/build/src/v1beta/index.d.ts +1 -0
  53. package/build/src/v1beta/index.js +3 -1
  54. package/build/src/v1beta/recommendation_service_client.d.ts +158 -15
  55. package/build/src/v1beta/recommendation_service_client.js +188 -4
  56. package/build/src/v1beta/schema_service_client.d.ts +187 -53
  57. package/build/src/v1beta/schema_service_client.js +224 -27
  58. package/build/src/v1beta/search_service_client.d.ts +305 -71
  59. package/build/src/v1beta/search_service_client.js +293 -49
  60. package/build/src/v1beta/user_event_service_client.d.ts +156 -16
  61. package/build/src/v1beta/user_event_service_client.js +208 -7
  62. package/package.json +10 -13
@@ -1,5 +1,5 @@
1
1
  import type * as gax from 'google-gax';
2
- import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation } from 'google-gax';
2
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, LocationsClient, LocationProtos } from 'google-gax';
3
3
  import * as protos from '../../protos/protos';
4
4
  /**
5
5
  * Service for ingesting end user actions on a website to Discovery Engine API.
@@ -20,6 +20,7 @@ export declare class UserEventServiceClient {
20
20
  innerApiCalls: {
21
21
  [name: string]: Function;
22
22
  };
23
+ locationsClient: LocationsClient;
23
24
  pathTemplates: {
24
25
  [name: string]: gax.PathTemplate;
25
26
  };
@@ -55,8 +56,7 @@ export declare class UserEventServiceClient {
55
56
  * API remote host.
56
57
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
57
58
  * Follows the structure of {@link gapicConfig}.
58
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
59
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
59
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
60
60
  * For more information, please check the
61
61
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
62
62
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -64,7 +64,7 @@ export declare class UserEventServiceClient {
64
64
  * HTTP implementation. Load only fallback version and pass it to the constructor:
65
65
  * ```
66
66
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
67
- * const client = new UserEventServiceClient({fallback: 'rest'}, gax);
67
+ * const client = new UserEventServiceClient({fallback: true}, gax);
68
68
  * ```
69
69
  */
70
70
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -119,9 +119,8 @@ export declare class UserEventServiceClient {
119
119
  * @param {object} [options]
120
120
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
121
121
  * @returns {Promise} - The promise which resolves to an array.
122
- * The first element of the array is an object representing {@link google.cloud.discoveryengine.v1beta.UserEvent | UserEvent}.
123
- * Please see the
124
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
122
+ * The first element of the array is an object representing {@link protos.google.cloud.discoveryengine.v1beta.UserEvent|UserEvent}.
123
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
125
124
  * for more details and examples.
126
125
  * @example <caption>include:samples/generated/v1beta/user_event_service.write_user_event.js</caption>
127
126
  * region_tag:discoveryengine_v1beta_generated_UserEventService_WriteUserEvent_async
@@ -135,7 +134,7 @@ export declare class UserEventServiceClient {
135
134
  writeUserEvent(request: protos.google.cloud.discoveryengine.v1beta.IWriteUserEventRequest, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IUserEvent, protos.google.cloud.discoveryengine.v1beta.IWriteUserEventRequest | null | undefined, {} | null | undefined>): void;
136
135
  /**
137
136
  * Writes a single user event from the browser. This uses a GET request to
138
- * due to browser restriction of POST-ing to a 3rd party domain.
137
+ * due to browser restriction of POST-ing to a third-party domain.
139
138
  *
140
139
  * This method is used only by the Discovery Engine API JavaScript pixel and
141
140
  * Google Tag Manager. Users should not call this method directly.
@@ -151,7 +150,7 @@ export declare class UserEventServiceClient {
151
150
  * @param {string} request.uri
152
151
  * The URL including cgi-parameters but excluding the hash fragment with a
153
152
  * length limit of 5,000 characters. This is often more useful than the
154
- * referer URL, because many browsers only send the domain for 3rd party
153
+ * referer URL, because many browsers only send the domain for third-party
155
154
  * requests.
156
155
  * @param {number} request.ets
157
156
  * The event timestamp in milliseconds. This prevents browser caching of
@@ -160,9 +159,8 @@ export declare class UserEventServiceClient {
160
159
  * @param {object} [options]
161
160
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
162
161
  * @returns {Promise} - The promise which resolves to an array.
163
- * The first element of the array is an object representing {@link google.api.HttpBody | HttpBody}.
164
- * Please see the
165
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
162
+ * The first element of the array is an object representing {@link protos.google.api.HttpBody|HttpBody}.
163
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
166
164
  * for more details and examples.
167
165
  * @example <caption>include:samples/generated/v1beta/user_event_service.collect_user_event.js</caption>
168
166
  * region_tag:discoveryengine_v1beta_generated_UserEventService_CollectUserEvent_async
@@ -203,8 +201,7 @@ export declare class UserEventServiceClient {
203
201
  * The first element of the array is an object representing
204
202
  * a long running operation. Its `promise()` method returns a promise
205
203
  * you can `await` for.
206
- * Please see the
207
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
204
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
208
205
  * for more details and examples.
209
206
  * @example <caption>include:samples/generated/v1beta/user_event_service.import_user_events.js</caption>
210
207
  * region_tag:discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_async
@@ -222,13 +219,63 @@ export declare class UserEventServiceClient {
222
219
  * The operation name that will be passed.
223
220
  * @returns {Promise} - The promise which resolves to an object.
224
221
  * The decoded operation object has result and metadata field to get information from.
225
- * Please see the
226
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
222
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
227
223
  * for more details and examples.
228
224
  * @example <caption>include:samples/generated/v1beta/user_event_service.import_user_events.js</caption>
229
225
  * region_tag:discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_async
230
226
  */
231
227
  checkImportUserEventsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata>>;
228
+ /**
229
+ * Gets information about a location.
230
+ *
231
+ * @param {Object} request
232
+ * The request object that will be sent.
233
+ * @param {string} request.name
234
+ * Resource name for the location.
235
+ * @param {object} [options]
236
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
237
+ * @returns {Promise} - The promise which resolves to an array.
238
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
239
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
240
+ * for more details and examples.
241
+ * @example
242
+ * ```
243
+ * const [response] = await client.getLocation(request);
244
+ * ```
245
+ */
246
+ 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>;
247
+ /**
248
+ * Lists information about the supported locations for this service. Returns an iterable object.
249
+ *
250
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
251
+ * @param {Object} request
252
+ * The request object that will be sent.
253
+ * @param {string} request.name
254
+ * The resource that owns the locations collection, if applicable.
255
+ * @param {string} request.filter
256
+ * The standard list filter.
257
+ * @param {number} request.pageSize
258
+ * The standard list page size.
259
+ * @param {string} request.pageToken
260
+ * The standard list page token.
261
+ * @param {object} [options]
262
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
263
+ * @returns {Object}
264
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
265
+ * When you iterate the returned iterable, each element will be an object representing
266
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
267
+ * so you can stop the iteration when you don't need more results.
268
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
269
+ * for more details and examples.
270
+ * @example
271
+ * ```
272
+ * const iterable = client.listLocationsAsync(request);
273
+ * for await (const response of iterable) {
274
+ * // process response
275
+ * }
276
+ * ```
277
+ */
278
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
232
279
  /**
233
280
  * Gets the latest state of a long-running operation. Clients can use this
234
281
  * method to poll the operation result at intervals as recommended by the API
@@ -451,6 +498,57 @@ export declare class UserEventServiceClient {
451
498
  * @returns {string} A string representing the document.
452
499
  */
453
500
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
501
+ /**
502
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
503
+ *
504
+ * @param {string} project
505
+ * @param {string} location
506
+ * @param {string} collection
507
+ * @param {string} data_store
508
+ * @param {string} conversation
509
+ * @returns {string} Resource name string.
510
+ */
511
+ projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;
512
+ /**
513
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
514
+ *
515
+ * @param {string} projectLocationCollectionDataStoreConversationName
516
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
517
+ * @returns {string} A string representing the project.
518
+ */
519
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
520
+ /**
521
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
522
+ *
523
+ * @param {string} projectLocationCollectionDataStoreConversationName
524
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
525
+ * @returns {string} A string representing the location.
526
+ */
527
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
528
+ /**
529
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
530
+ *
531
+ * @param {string} projectLocationCollectionDataStoreConversationName
532
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
533
+ * @returns {string} A string representing the collection.
534
+ */
535
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
536
+ /**
537
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
538
+ *
539
+ * @param {string} projectLocationCollectionDataStoreConversationName
540
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
541
+ * @returns {string} A string representing the data_store.
542
+ */
543
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
544
+ /**
545
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
546
+ *
547
+ * @param {string} projectLocationCollectionDataStoreConversationName
548
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
549
+ * @returns {string} A string representing the conversation.
550
+ */
551
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
454
552
  /**
455
553
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
456
554
  *
@@ -586,6 +684,48 @@ export declare class UserEventServiceClient {
586
684
  * @returns {string} A string representing the document.
587
685
  */
588
686
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
687
+ /**
688
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
689
+ *
690
+ * @param {string} project
691
+ * @param {string} location
692
+ * @param {string} data_store
693
+ * @param {string} conversation
694
+ * @returns {string} Resource name string.
695
+ */
696
+ projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;
697
+ /**
698
+ * Parse the project from ProjectLocationDataStoreConversation resource.
699
+ *
700
+ * @param {string} projectLocationDataStoreConversationName
701
+ * A fully-qualified path representing project_location_data_store_conversation resource.
702
+ * @returns {string} A string representing the project.
703
+ */
704
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
705
+ /**
706
+ * Parse the location from ProjectLocationDataStoreConversation resource.
707
+ *
708
+ * @param {string} projectLocationDataStoreConversationName
709
+ * A fully-qualified path representing project_location_data_store_conversation resource.
710
+ * @returns {string} A string representing the location.
711
+ */
712
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
713
+ /**
714
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
715
+ *
716
+ * @param {string} projectLocationDataStoreConversationName
717
+ * A fully-qualified path representing project_location_data_store_conversation resource.
718
+ * @returns {string} A string representing the data_store.
719
+ */
720
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
721
+ /**
722
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
723
+ *
724
+ * @param {string} projectLocationDataStoreConversationName
725
+ * A fully-qualified path representing project_location_data_store_conversation resource.
726
+ * @returns {string} A string representing the conversation.
727
+ */
728
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
589
729
  /**
590
730
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
591
731
  *
@@ -60,8 +60,7 @@ class UserEventServiceClient {
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 UserEventServiceClient {
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 UserEventServiceClient({fallback: 'rest'}, gax);
71
+ * const client = new UserEventServiceClient({fallback: true}, gax);
73
72
  * ```
74
73
  */
75
74
  constructor(opts, gaxInstance) {
@@ -115,6 +114,7 @@ class UserEventServiceClient {
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 UserEventServiceClient {
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) {
@@ -140,9 +140,11 @@ class UserEventServiceClient {
140
140
  this.pathTemplates = {
141
141
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
142
142
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
143
144
  projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
144
145
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
145
146
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
147
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
146
148
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
147
149
  };
148
150
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
@@ -153,7 +155,7 @@ class UserEventServiceClient {
153
155
  auth: this.auth,
154
156
  grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
155
157
  };
156
- if (opts.fallback === 'rest') {
158
+ if (opts.fallback) {
157
159
  lroOptions.protoJson = protoFilesRoot;
158
160
  lroOptions.httpRules = [
159
161
  {
@@ -169,6 +171,15 @@ class UserEventServiceClient {
169
171
  {
170
172
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
171
173
  },
174
+ {
175
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
176
+ },
177
+ {
178
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
179
+ },
180
+ {
181
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
182
+ },
172
183
  {
173
184
  get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
174
185
  },
@@ -195,9 +206,18 @@ class UserEventServiceClient {
195
206
  {
196
207
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
197
208
  },
209
+ {
210
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
211
+ },
212
+ {
213
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
214
+ },
198
215
  {
199
216
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
200
217
  },
218
+ {
219
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
220
+ },
201
221
  {
202
222
  get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
203
223
  },
@@ -389,8 +409,7 @@ class UserEventServiceClient {
389
409
  * The operation name that will be passed.
390
410
  * @returns {Promise} - The promise which resolves to an object.
391
411
  * The decoded operation object has result and metadata field to get information from.
392
- * Please see the
393
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
412
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
394
413
  * for more details and examples.
395
414
  * @example <caption>include:samples/generated/v1beta/user_event_service.import_user_events.js</caption>
396
415
  * region_tag:discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_async
@@ -401,6 +420,61 @@ class UserEventServiceClient {
401
420
  const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importUserEvents, this._gaxModule.createDefaultBackoffSettings());
402
421
  return decodeOperation;
403
422
  }
423
+ /**
424
+ * Gets information about a location.
425
+ *
426
+ * @param {Object} request
427
+ * The request object that will be sent.
428
+ * @param {string} request.name
429
+ * Resource name for the location.
430
+ * @param {object} [options]
431
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
432
+ * @returns {Promise} - The promise which resolves to an array.
433
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
434
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
435
+ * for more details and examples.
436
+ * @example
437
+ * ```
438
+ * const [response] = await client.getLocation(request);
439
+ * ```
440
+ */
441
+ getLocation(request, options, callback) {
442
+ return this.locationsClient.getLocation(request, options, callback);
443
+ }
444
+ /**
445
+ * Lists information about the supported locations for this service. Returns an iterable object.
446
+ *
447
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
448
+ * @param {Object} request
449
+ * The request object that will be sent.
450
+ * @param {string} request.name
451
+ * The resource that owns the locations collection, if applicable.
452
+ * @param {string} request.filter
453
+ * The standard list filter.
454
+ * @param {number} request.pageSize
455
+ * The standard list page size.
456
+ * @param {string} request.pageToken
457
+ * The standard list page token.
458
+ * @param {object} [options]
459
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
460
+ * @returns {Object}
461
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
462
+ * When you iterate the returned iterable, each element will be an object representing
463
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
464
+ * so you can stop the iteration when you don't need more results.
465
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
466
+ * for more details and examples.
467
+ * @example
468
+ * ```
469
+ * const iterable = client.listLocationsAsync(request);
470
+ * for await (const response of iterable) {
471
+ * // process response
472
+ * }
473
+ * ```
474
+ */
475
+ listLocationsAsync(request, options) {
476
+ return this.locationsClient.listLocationsAsync(request, options);
477
+ }
404
478
  /**
405
479
  * Gets the latest state of a long-running operation. Clients can use this
406
480
  * method to poll the operation result at intervals as recommended by the API
@@ -670,6 +744,75 @@ class UserEventServiceClient {
670
744
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
671
745
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
672
746
  }
747
+ /**
748
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
749
+ *
750
+ * @param {string} project
751
+ * @param {string} location
752
+ * @param {string} collection
753
+ * @param {string} data_store
754
+ * @param {string} conversation
755
+ * @returns {string} Resource name string.
756
+ */
757
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
758
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
759
+ project: project,
760
+ location: location,
761
+ collection: collection,
762
+ data_store: dataStore,
763
+ conversation: conversation,
764
+ });
765
+ }
766
+ /**
767
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
768
+ *
769
+ * @param {string} projectLocationCollectionDataStoreConversationName
770
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
771
+ * @returns {string} A string representing the project.
772
+ */
773
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
774
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
775
+ }
776
+ /**
777
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
778
+ *
779
+ * @param {string} projectLocationCollectionDataStoreConversationName
780
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
781
+ * @returns {string} A string representing the location.
782
+ */
783
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
784
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
785
+ }
786
+ /**
787
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
788
+ *
789
+ * @param {string} projectLocationCollectionDataStoreConversationName
790
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
791
+ * @returns {string} A string representing the collection.
792
+ */
793
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
794
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
795
+ }
796
+ /**
797
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
798
+ *
799
+ * @param {string} projectLocationCollectionDataStoreConversationName
800
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
801
+ * @returns {string} A string representing the data_store.
802
+ */
803
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
804
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
805
+ }
806
+ /**
807
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
808
+ *
809
+ * @param {string} projectLocationCollectionDataStoreConversationName
810
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
811
+ * @returns {string} A string representing the conversation.
812
+ */
813
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
814
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
815
+ }
673
816
  /**
674
817
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
675
818
  *
@@ -853,6 +996,63 @@ class UserEventServiceClient {
853
996
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
854
997
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
855
998
  }
999
+ /**
1000
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1001
+ *
1002
+ * @param {string} project
1003
+ * @param {string} location
1004
+ * @param {string} data_store
1005
+ * @param {string} conversation
1006
+ * @returns {string} Resource name string.
1007
+ */
1008
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1009
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1010
+ project: project,
1011
+ location: location,
1012
+ data_store: dataStore,
1013
+ conversation: conversation,
1014
+ });
1015
+ }
1016
+ /**
1017
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1018
+ *
1019
+ * @param {string} projectLocationDataStoreConversationName
1020
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1021
+ * @returns {string} A string representing the project.
1022
+ */
1023
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1024
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1025
+ }
1026
+ /**
1027
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1028
+ *
1029
+ * @param {string} projectLocationDataStoreConversationName
1030
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1031
+ * @returns {string} A string representing the location.
1032
+ */
1033
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1034
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1035
+ }
1036
+ /**
1037
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1038
+ *
1039
+ * @param {string} projectLocationDataStoreConversationName
1040
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1041
+ * @returns {string} A string representing the data_store.
1042
+ */
1043
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1044
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1045
+ }
1046
+ /**
1047
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1048
+ *
1049
+ * @param {string} projectLocationDataStoreConversationName
1050
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1051
+ * @returns {string} A string representing the conversation.
1052
+ */
1053
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1054
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1055
+ }
856
1056
  /**
857
1057
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
858
1058
  *
@@ -921,6 +1121,7 @@ class UserEventServiceClient {
921
1121
  return this.userEventServiceStub.then(stub => {
922
1122
  this._terminated = true;
923
1123
  stub.close();
1124
+ this.locationsClient.close();
924
1125
  this.operationsClient.close();
925
1126
  });
926
1127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-cloud/discoveryengine",
3
- "version": "0.8.0",
3
+ "version": "1.1.0",
4
4
  "description": "Discovery Engine API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,29 +46,26 @@
46
46
  "test": "c8 mocha build/test"
47
47
  },
48
48
  "dependencies": {
49
- "google-gax": "^3.5.8"
49
+ "google-gax": "^4.0.3"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/mocha": "^9.0.0",
53
- "@types/node": "^18.0.0",
53
+ "@types/node": "^20.4.5",
54
54
  "@types/sinon": "^10.0.0",
55
- "c8": "^7.3.5",
56
- "gts": "^3.1.0",
55
+ "c8": "^8.0.1",
56
+ "gapic-tools": "^0.1.8",
57
+ "gts": "^5.0.0",
57
58
  "jsdoc": "^4.0.0",
58
- "jsdoc-fresh": "^2.0.0",
59
- "jsdoc-region-tag": "^2.0.0",
59
+ "jsdoc-fresh": "^3.0.0",
60
+ "jsdoc-region-tag": "^3.0.0",
60
61
  "linkinator": "4.1.2",
61
62
  "long": "^5.2.3",
62
63
  "mocha": "^9.2.2",
63
- "null-loader": "^4.0.1",
64
64
  "pack-n-play": "^1.0.0-2",
65
65
  "sinon": "^15.0.0",
66
- "ts-loader": "^9.0.0",
67
- "typescript": "^4.6.4",
68
- "webpack": "^5.9.0",
69
- "webpack-cli": "^5.0.0"
66
+ "typescript": "^5.1.6"
70
67
  },
71
68
  "engines": {
72
- "node": ">=12.0.0"
69
+ "node": ">=14.0.0"
73
70
  }
74
71
  }