@google-cloud/discoveryengine 1.4.1 → 1.5.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 (60) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +2 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +35 -1
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +20 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +19 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +64 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +312 -21
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +115 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +153 -23
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +5 -2
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +2 -1
  12. package/build/protos/protos.d.ts +2743 -221
  13. package/build/protos/protos.js +10286 -3762
  14. package/build/protos/protos.json +595 -5
  15. package/build/src/v1/completion_service_client.js +10 -7
  16. package/build/src/v1/conversational_search_service_client.js +10 -7
  17. package/build/src/v1/data_store_service_client.js +10 -7
  18. package/build/src/v1/document_service_client.js +10 -7
  19. package/build/src/v1/engine_service_client.js +10 -7
  20. package/build/src/v1/schema_service_client.js +10 -7
  21. package/build/src/v1/search_service_client.js +10 -7
  22. package/build/src/v1/site_search_engine_service_client.js +10 -7
  23. package/build/src/v1/user_event_service_client.js +10 -7
  24. package/build/src/v1alpha/acl_config_service_client.js +10 -7
  25. package/build/src/v1alpha/chunk_service_client.js +10 -7
  26. package/build/src/v1alpha/completion_service_client.js +13 -7
  27. package/build/src/v1alpha/conversational_search_service_client.js +10 -7
  28. package/build/src/v1alpha/data_store_service_client.js +13 -7
  29. package/build/src/v1alpha/document_service_client.d.ts +80 -21
  30. package/build/src/v1alpha/document_service_client.js +35 -7
  31. package/build/src/v1alpha/document_service_client_config.json +5 -0
  32. package/build/src/v1alpha/engine_service_client.js +13 -7
  33. package/build/src/v1alpha/estimate_billing_service_client.js +13 -7
  34. package/build/src/v1alpha/index.d.ts +1 -0
  35. package/build/src/v1alpha/index.js +3 -1
  36. package/build/src/v1alpha/rank_service_client.d.ts +1254 -0
  37. package/build/src/v1alpha/rank_service_client.js +1796 -0
  38. package/build/src/v1alpha/rank_service_client_config.json +30 -0
  39. package/build/src/v1alpha/recommendation_service_client.js +10 -7
  40. package/build/src/v1alpha/schema_service_client.js +13 -7
  41. package/build/src/v1alpha/search_service_client.d.ts +30 -15
  42. package/build/src/v1alpha/search_service_client.js +30 -17
  43. package/build/src/v1alpha/search_tuning_service_client.js +13 -7
  44. package/build/src/v1alpha/serving_config_service_client.d.ts +2 -1
  45. package/build/src/v1alpha/serving_config_service_client.js +12 -8
  46. package/build/src/v1alpha/site_search_engine_service_client.js +13 -7
  47. package/build/src/v1alpha/user_event_service_client.js +13 -7
  48. package/build/src/v1beta/completion_service_client.js +10 -7
  49. package/build/src/v1beta/conversational_search_service_client.js +10 -7
  50. package/build/src/v1beta/data_store_service_client.js +10 -7
  51. package/build/src/v1beta/document_service_client.js +10 -7
  52. package/build/src/v1beta/engine_service_client.js +10 -7
  53. package/build/src/v1beta/recommendation_service_client.js +10 -7
  54. package/build/src/v1beta/schema_service_client.js +10 -7
  55. package/build/src/v1beta/search_service_client.js +10 -7
  56. package/build/src/v1beta/search_tuning_service_client.js +10 -7
  57. package/build/src/v1beta/serving_config_service_client.js +10 -7
  58. package/build/src/v1beta/site_search_engine_service_client.js +10 -7
  59. package/build/src/v1beta/user_event_service_client.js +10 -7
  60. package/package.json +1 -1
@@ -74,7 +74,7 @@ class ChunkServiceClient {
74
74
  * ```
75
75
  */
76
76
  constructor(opts, gaxInstance) {
77
- var _a, _b, _c, _d;
77
+ var _a, _b, _c, _d, _e;
78
78
  this._terminated = false;
79
79
  this.descriptors = {
80
80
  page: {},
@@ -89,14 +89,17 @@ class ChunkServiceClient {
89
89
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
90
90
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
91
91
  }
92
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
93
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
94
+ : undefined;
92
95
  this._universeDomain =
93
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
96
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
94
97
  this._servicePath = 'discoveryengine.' + this._universeDomain;
95
98
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
96
99
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
97
100
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
98
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
99
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
101
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
102
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
100
103
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
101
104
  // Request numeric enum values if REST transport is used.
102
105
  opts.numericEnums = true;
@@ -127,7 +130,7 @@ class ChunkServiceClient {
127
130
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
128
131
  // Determine the client header string.
129
132
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
130
- if (typeof process !== 'undefined' && 'versions' in process) {
133
+ if (typeof process === 'object' && 'versions' in process) {
131
134
  clientHeader.push(`gl-node/${process.versions.node}`);
132
135
  }
133
136
  else {
@@ -234,7 +237,7 @@ class ChunkServiceClient {
234
237
  * @returns {string} The DNS address for this service.
235
238
  */
236
239
  static get servicePath() {
237
- if (typeof process !== undefined &&
240
+ if (typeof process === 'object' &&
238
241
  typeof process.emitWarning === 'function') {
239
242
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
240
243
  }
@@ -246,7 +249,7 @@ class ChunkServiceClient {
246
249
  * @returns {string} The DNS address for this service.
247
250
  */
248
251
  static get apiEndpoint() {
249
- if (typeof process !== undefined &&
252
+ if (typeof process === 'object' &&
250
253
  typeof process.emitWarning === 'function') {
251
254
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
252
255
  }
@@ -72,7 +72,7 @@ class CompletionServiceClient {
72
72
  * ```
73
73
  */
74
74
  constructor(opts, gaxInstance) {
75
- var _a, _b, _c, _d;
75
+ var _a, _b, _c, _d, _e;
76
76
  this._terminated = false;
77
77
  this.descriptors = {
78
78
  page: {},
@@ -87,14 +87,17 @@ class CompletionServiceClient {
87
87
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
88
88
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
89
89
  }
90
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
91
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
92
+ : undefined;
90
93
  this._universeDomain =
91
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
94
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
92
95
  this._servicePath = 'discoveryengine.' + this._universeDomain;
93
96
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
94
97
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
95
98
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
96
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
97
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
99
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
100
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
98
101
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
99
102
  // Request numeric enum values if REST transport is used.
100
103
  opts.numericEnums = true;
@@ -125,7 +128,7 @@ class CompletionServiceClient {
125
128
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
126
129
  // Determine the client header string.
127
130
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
128
- if (typeof process !== 'undefined' && 'versions' in process) {
131
+ if (typeof process === 'object' && 'versions' in process) {
129
132
  clientHeader.push(`gl-node/${process.versions.node}`);
130
133
  }
131
134
  else {
@@ -217,6 +220,9 @@ class CompletionServiceClient {
217
220
  {
218
221
  get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
219
222
  },
223
+ {
224
+ get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
225
+ },
220
226
  { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
221
227
  { get: '/v1alpha/{name=projects/*/operations/*}' },
222
228
  ],
@@ -336,7 +342,7 @@ class CompletionServiceClient {
336
342
  * @returns {string} The DNS address for this service.
337
343
  */
338
344
  static get servicePath() {
339
- if (typeof process !== undefined &&
345
+ if (typeof process === 'object' &&
340
346
  typeof process.emitWarning === 'function') {
341
347
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
342
348
  }
@@ -348,7 +354,7 @@ class CompletionServiceClient {
348
354
  * @returns {string} The DNS address for this service.
349
355
  */
350
356
  static get apiEndpoint() {
351
- if (typeof process !== undefined &&
357
+ if (typeof process === 'object' &&
352
358
  typeof process.emitWarning === 'function') {
353
359
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
354
360
  }
@@ -72,7 +72,7 @@ class ConversationalSearchServiceClient {
72
72
  * ```
73
73
  */
74
74
  constructor(opts, gaxInstance) {
75
- var _a, _b, _c, _d;
75
+ var _a, _b, _c, _d, _e;
76
76
  this._terminated = false;
77
77
  this.descriptors = {
78
78
  page: {},
@@ -88,14 +88,17 @@ class ConversationalSearchServiceClient {
88
88
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
89
89
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
90
90
  }
91
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
92
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
93
+ : undefined;
91
94
  this._universeDomain =
92
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
95
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
93
96
  this._servicePath = 'discoveryengine.' + this._universeDomain;
94
97
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
95
98
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
96
99
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
97
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
98
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
100
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
101
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
99
102
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
100
103
  // Request numeric enum values if REST transport is used.
101
104
  opts.numericEnums = true;
@@ -126,7 +129,7 @@ class ConversationalSearchServiceClient {
126
129
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
127
130
  // Determine the client header string.
128
131
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
129
- if (typeof process !== 'undefined' && 'versions' in process) {
132
+ if (typeof process === 'object' && 'versions' in process) {
130
133
  clientHeader.push(`gl-node/${process.versions.node}`);
131
134
  }
132
135
  else {
@@ -240,7 +243,7 @@ class ConversationalSearchServiceClient {
240
243
  * @returns {string} The DNS address for this service.
241
244
  */
242
245
  static get servicePath() {
243
- if (typeof process !== undefined &&
246
+ if (typeof process === 'object' &&
244
247
  typeof process.emitWarning === 'function') {
245
248
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
246
249
  }
@@ -252,7 +255,7 @@ class ConversationalSearchServiceClient {
252
255
  * @returns {string} The DNS address for this service.
253
256
  */
254
257
  static get apiEndpoint() {
255
- if (typeof process !== undefined &&
258
+ if (typeof process === 'object' &&
256
259
  typeof process.emitWarning === 'function') {
257
260
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
258
261
  }
@@ -73,7 +73,7 @@ class DataStoreServiceClient {
73
73
  * ```
74
74
  */
75
75
  constructor(opts, gaxInstance) {
76
- var _a, _b, _c, _d;
76
+ var _a, _b, _c, _d, _e;
77
77
  this._terminated = false;
78
78
  this.descriptors = {
79
79
  page: {},
@@ -88,14 +88,17 @@ class DataStoreServiceClient {
88
88
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
89
89
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
90
90
  }
91
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
92
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
93
+ : undefined;
91
94
  this._universeDomain =
92
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
95
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
93
96
  this._servicePath = 'discoveryengine.' + this._universeDomain;
94
97
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
95
98
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
96
99
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
97
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
98
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
100
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
101
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
99
102
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
100
103
  // Request numeric enum values if REST transport is used.
101
104
  opts.numericEnums = true;
@@ -126,7 +129,7 @@ class DataStoreServiceClient {
126
129
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
127
130
  // Determine the client header string.
128
131
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
129
- if (typeof process !== 'undefined' && 'versions' in process) {
132
+ if (typeof process === 'object' && 'versions' in process) {
130
133
  clientHeader.push(`gl-node/${process.versions.node}`);
131
134
  }
132
135
  else {
@@ -225,6 +228,9 @@ class DataStoreServiceClient {
225
228
  {
226
229
  get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
227
230
  },
231
+ {
232
+ get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
233
+ },
228
234
  { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
229
235
  { get: '/v1alpha/{name=projects/*/operations/*}' },
230
236
  ],
@@ -350,7 +356,7 @@ class DataStoreServiceClient {
350
356
  * @returns {string} The DNS address for this service.
351
357
  */
352
358
  static get servicePath() {
353
- if (typeof process !== undefined &&
359
+ if (typeof process === 'object' &&
354
360
  typeof process.emitWarning === 'function') {
355
361
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
356
362
  }
@@ -362,7 +368,7 @@ class DataStoreServiceClient {
362
368
  * @returns {string} The DNS address for this service.
363
369
  */
364
370
  static get apiEndpoint() {
365
- if (typeof process !== undefined &&
371
+ if (typeof process === 'object' &&
366
372
  typeof process.emitWarning === 'function') {
367
373
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
368
374
  }
@@ -268,6 +268,43 @@ export declare class DocumentServiceClient {
268
268
  ]>;
269
269
  deleteDocument(request: protos.google.cloud.discoveryengine.v1alpha.IDeleteDocumentRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.discoveryengine.v1alpha.IDeleteDocumentRequest | null | undefined, {} | null | undefined>): void;
270
270
  deleteDocument(request: protos.google.cloud.discoveryengine.v1alpha.IDeleteDocumentRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.discoveryengine.v1alpha.IDeleteDocumentRequest | null | undefined, {} | null | undefined>): void;
271
+ /**
272
+ * Gets the parsed layout information for a
273
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}.
274
+ *
275
+ * @param {Object} request
276
+ * The request object that will be sent.
277
+ * @param {string} request.name
278
+ * Required. Full resource name of
279
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}, such as
280
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
281
+ *
282
+ * If the caller does not have permission to access the
283
+ * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}, regardless of
284
+ * whether or not it exists, a `PERMISSION_DENIED` error is returned.
285
+ *
286
+ * If the requested {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
287
+ * does not exist, a `NOT_FOUND` error is returned.
288
+ * @param {google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentType} request.processedDocumentType
289
+ * Required. What type of processing to return.
290
+ * @param {google.cloud.discoveryengine.v1alpha.GetProcessedDocumentRequest.ProcessedDocumentFormat} request.processedDocumentFormat
291
+ * What format output should be. If unspecified, defaults to JSON.
292
+ * @param {object} [options]
293
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
294
+ * @returns {Promise} - The promise which resolves to an array.
295
+ * The first element of the array is an object representing {@link protos.google.cloud.discoveryengine.v1alpha.ProcessedDocument|ProcessedDocument}.
296
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
297
+ * for more details and examples.
298
+ * @example <caption>include:samples/generated/v1alpha/document_service.get_processed_document.js</caption>
299
+ * region_tag:discoveryengine_v1alpha_generated_DocumentService_GetProcessedDocument_async
300
+ */
301
+ getProcessedDocument(request?: protos.google.cloud.discoveryengine.v1alpha.IGetProcessedDocumentRequest, options?: CallOptions): Promise<[
302
+ protos.google.cloud.discoveryengine.v1alpha.IProcessedDocument,
303
+ (protos.google.cloud.discoveryengine.v1alpha.IGetProcessedDocumentRequest | undefined),
304
+ {} | undefined
305
+ ]>;
306
+ getProcessedDocument(request: protos.google.cloud.discoveryengine.v1alpha.IGetProcessedDocumentRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IProcessedDocument, protos.google.cloud.discoveryengine.v1alpha.IGetProcessedDocumentRequest | null | undefined, {} | null | undefined>): void;
307
+ getProcessedDocument(request: protos.google.cloud.discoveryengine.v1alpha.IGetProcessedDocumentRequest, callback: Callback<protos.google.cloud.discoveryengine.v1alpha.IProcessedDocument, protos.google.cloud.discoveryengine.v1alpha.IGetProcessedDocumentRequest | null | undefined, {} | null | undefined>): void;
271
308
  /**
272
309
  * Bulk import of multiple
273
310
  * {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s. Request
@@ -285,6 +322,16 @@ export declare class DocumentServiceClient {
285
322
  * Cloud Storage location for the input content.
286
323
  * @param {google.cloud.discoveryengine.v1alpha.BigQuerySource} request.bigquerySource
287
324
  * BigQuery input source.
325
+ * @param {google.cloud.discoveryengine.v1alpha.FhirStoreSource} request.fhirStoreSource
326
+ * FhirStore input source.
327
+ * @param {google.cloud.discoveryengine.v1alpha.SpannerSource} request.spannerSource
328
+ * Spanner input source.
329
+ * @param {google.cloud.discoveryengine.v1alpha.CloudSqlSource} request.cloudSqlSource
330
+ * Cloud SQL input source.
331
+ * @param {google.cloud.discoveryengine.v1alpha.FirestoreSource} request.firestoreSource
332
+ * Firestore input source.
333
+ * @param {google.cloud.discoveryengine.v1alpha.BigtableSource} request.bigtableSource
334
+ * Cloud Bigtable input source.
288
335
  * @param {string} request.parent
289
336
  * Required. The parent branch resource name, such as
290
337
  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
@@ -295,6 +342,9 @@ export declare class DocumentServiceClient {
295
342
  * The mode of reconciliation between existing documents and the documents to
296
343
  * be imported. Defaults to
297
344
  * {@link protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL|ReconciliationMode.INCREMENTAL}.
345
+ * @param {google.protobuf.FieldMask} request.updateMask
346
+ * Indicates which fields in the provided imported documents to update. If
347
+ * not set, the default is to update all fields.
298
348
  * @param {boolean} request.autoGenerateIds
299
349
  * Whether to automatically generate IDs for the documents if absent.
300
350
  *
@@ -309,44 +359,53 @@ export declare class DocumentServiceClient {
309
359
  * {@link protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.id_field|id_field},
310
360
  * otherwise, documents without IDs fail to be imported.
311
361
  *
312
- * Only set this field when using
313
- * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource|GcsSource} or
314
- * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource|BigQuerySource}, and
315
- * when
362
+ * Supported data sources:
363
+ *
364
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource|GcsSource}.
316
365
  * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource.data_schema|GcsSource.data_schema}
317
- * or
366
+ * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
367
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource|BigQuerySource}.
318
368
  * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema|BigQuerySource.data_schema}
319
- * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
369
+ * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
370
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.SpannerSource|SpannerSource}.
371
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.CloudSqlSource|CloudSqlSource}.
372
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.FirestoreSource|FirestoreSource}.
373
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.BigtableSource|BigtableSource}.
320
374
  * @param {string} request.idField
321
- * The field in the Cloud Storage and BigQuery sources that indicates the
322
- * unique IDs of the documents.
375
+ * The field indicates the ID field or column to be used as unique IDs of
376
+ * the documents.
323
377
  *
324
378
  * For {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource|GcsSource} it is the
325
379
  * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
326
- * "some_uuid"}`. For
327
- * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource|BigQuerySource} it is
328
- * the column name of the BigQuery table where the unique ids are stored.
380
+ * "some_uuid"}`. For others, it may be the column name of the table where the
381
+ * unique ids are stored.
329
382
  *
330
- * The values of the JSON field or the BigQuery column are used as the
383
+ * The values of the JSON field or the table column are used as the
331
384
  * {@link protos.google.cloud.discoveryengine.v1alpha.Document.id|Document.id}s. The JSON
332
- * field or the BigQuery column must be of string type, and the values must be
385
+ * field or the table column must be of string type, and the values must be
333
386
  * set as valid strings conform to
334
387
  * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
335
388
  * Otherwise, documents without valid IDs fail to be imported.
336
389
  *
337
- * Only set this field when using
338
- * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource|GcsSource} or
339
- * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource|BigQuerySource}, and
340
- * when
341
- * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource.data_schema|GcsSource.data_schema}
342
- * or
343
- * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema|BigQuerySource.data_schema}
344
- * is `custom`. And only set this field when
390
+ * Only set this field when
345
391
  * {@link protos.google.cloud.discoveryengine.v1alpha.ImportDocumentsRequest.auto_generate_ids|auto_generate_ids}
346
392
  * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
347
393
  *
348
394
  * If it is unset, a default value `_id` is used when importing from the
349
395
  * allowed data sources.
396
+ *
397
+ * Supported data sources:
398
+ *
399
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource|GcsSource}.
400
+ * {@link protos.google.cloud.discoveryengine.v1alpha.GcsSource.data_schema|GcsSource.data_schema}
401
+ * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
402
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource|BigQuerySource}.
403
+ * {@link protos.google.cloud.discoveryengine.v1alpha.BigQuerySource.data_schema|BigQuerySource.data_schema}
404
+ * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
405
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.SpannerSource|SpannerSource}.
406
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.CloudSqlSource|CloudSqlSource}.
407
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.FirestoreSource|FirestoreSource}.
408
+ * * {@link protos.google.cloud.discoveryengine.v1alpha.BigtableSource|BigtableSource}.
350
409
  * @param {object} [options]
351
410
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
352
411
  * @returns {Promise} - The promise which resolves to an array.
@@ -74,7 +74,7 @@ class DocumentServiceClient {
74
74
  * ```
75
75
  */
76
76
  constructor(opts, gaxInstance) {
77
- var _a, _b, _c, _d;
77
+ var _a, _b, _c, _d, _e;
78
78
  this._terminated = false;
79
79
  this.descriptors = {
80
80
  page: {},
@@ -89,14 +89,17 @@ class DocumentServiceClient {
89
89
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
90
90
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
91
91
  }
92
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
93
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
94
+ : undefined;
92
95
  this._universeDomain =
93
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
96
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
94
97
  this._servicePath = 'discoveryengine.' + this._universeDomain;
95
98
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
96
99
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
97
100
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
98
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
99
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
101
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
102
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
100
103
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
101
104
  // Request numeric enum values if REST transport is used.
102
105
  opts.numericEnums = true;
@@ -127,7 +130,7 @@ class DocumentServiceClient {
127
130
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
128
131
  // Determine the client header string.
129
132
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
130
- if (typeof process !== 'undefined' && 'versions' in process) {
133
+ if (typeof process === 'object' && 'versions' in process) {
131
134
  clientHeader.push(`gl-node/${process.versions.node}`);
132
135
  }
133
136
  else {
@@ -227,6 +230,9 @@ class DocumentServiceClient {
227
230
  {
228
231
  get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
229
232
  },
233
+ {
234
+ get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
235
+ },
230
236
  { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
231
237
  { get: '/v1alpha/{name=projects/*/operations/*}' },
232
238
  ],
@@ -327,6 +333,7 @@ class DocumentServiceClient {
327
333
  'deleteDocument',
328
334
  'importDocuments',
329
335
  'purgeDocuments',
336
+ 'getProcessedDocument',
330
337
  ];
331
338
  for (const methodName of documentServiceStubMethods) {
332
339
  const callPromise = this.documentServiceStub.then(stub => (...args) => {
@@ -352,7 +359,7 @@ class DocumentServiceClient {
352
359
  * @returns {string} The DNS address for this service.
353
360
  */
354
361
  static get servicePath() {
355
- if (typeof process !== undefined &&
362
+ if (typeof process === 'object' &&
356
363
  typeof process.emitWarning === 'function') {
357
364
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
358
365
  }
@@ -364,7 +371,7 @@ class DocumentServiceClient {
364
371
  * @returns {string} The DNS address for this service.
365
372
  */
366
373
  static get apiEndpoint() {
367
- if (typeof process !== undefined &&
374
+ if (typeof process === 'object' &&
368
375
  typeof process.emitWarning === 'function') {
369
376
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
370
377
  }
@@ -490,6 +497,27 @@ class DocumentServiceClient {
490
497
  this.initialize();
491
498
  return this.innerApiCalls.deleteDocument(request, options, callback);
492
499
  }
500
+ getProcessedDocument(request, optionsOrCallback, callback) {
501
+ var _a;
502
+ request = request || {};
503
+ let options;
504
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
505
+ callback = optionsOrCallback;
506
+ options = {};
507
+ }
508
+ else {
509
+ options = optionsOrCallback;
510
+ }
511
+ options = options || {};
512
+ options.otherArgs = options.otherArgs || {};
513
+ options.otherArgs.headers = options.otherArgs.headers || {};
514
+ options.otherArgs.headers['x-goog-request-params'] =
515
+ this._gaxModule.routingHeader.fromParams({
516
+ name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
517
+ });
518
+ this.initialize();
519
+ return this.innerApiCalls.getProcessedDocument(request, options, callback);
520
+ }
493
521
  importDocuments(request, optionsOrCallback, callback) {
494
522
  var _a;
495
523
  request = request || {};
@@ -75,6 +75,11 @@
75
75
  "timeout_millis": 30000,
76
76
  "retry_codes_name": "unavailable",
77
77
  "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
78
+ },
79
+ "GetProcessedDocument": {
80
+ "timeout_millis": 30000,
81
+ "retry_codes_name": "unavailable",
82
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
78
83
  }
79
84
  }
80
85
  }
@@ -73,7 +73,7 @@ class EngineServiceClient {
73
73
  * ```
74
74
  */
75
75
  constructor(opts, gaxInstance) {
76
- var _a, _b, _c, _d;
76
+ var _a, _b, _c, _d, _e;
77
77
  this._terminated = false;
78
78
  this.descriptors = {
79
79
  page: {},
@@ -88,14 +88,17 @@ class EngineServiceClient {
88
88
  (opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
89
89
  throw new Error('Please set either universe_domain or universeDomain, but not both.');
90
90
  }
91
+ const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
92
+ ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
93
+ : undefined;
91
94
  this._universeDomain =
92
- (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
95
+ (_c = (_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : universeDomainEnvVar) !== null && _c !== void 0 ? _c : 'googleapis.com';
93
96
  this._servicePath = 'discoveryengine.' + this._universeDomain;
94
97
  const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
95
98
  this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
96
99
  const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
97
- const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
98
- const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
100
+ const clientConfig = (_d = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _d !== void 0 ? _d : {};
101
+ const fallback = (_e = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _e !== void 0 ? _e : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
99
102
  opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
100
103
  // Request numeric enum values if REST transport is used.
101
104
  opts.numericEnums = true;
@@ -126,7 +129,7 @@ class EngineServiceClient {
126
129
  this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
127
130
  // Determine the client header string.
128
131
  const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
129
- if (typeof process !== 'undefined' && 'versions' in process) {
132
+ if (typeof process === 'object' && 'versions' in process) {
130
133
  clientHeader.push(`gl-node/${process.versions.node}`);
131
134
  }
132
135
  else {
@@ -225,6 +228,9 @@ class EngineServiceClient {
225
228
  {
226
229
  get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
227
230
  },
231
+ {
232
+ get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
233
+ },
228
234
  { get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
229
235
  { get: '/v1alpha/{name=projects/*/operations/*}' },
230
236
  ],
@@ -354,7 +360,7 @@ class EngineServiceClient {
354
360
  * @returns {string} The DNS address for this service.
355
361
  */
356
362
  static get servicePath() {
357
- if (typeof process !== undefined &&
363
+ if (typeof process === 'object' &&
358
364
  typeof process.emitWarning === 'function') {
359
365
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
360
366
  }
@@ -366,7 +372,7 @@ class EngineServiceClient {
366
372
  * @returns {string} The DNS address for this service.
367
373
  */
368
374
  static get apiEndpoint() {
369
- if (typeof process !== undefined &&
375
+ if (typeof process === 'object' &&
370
376
  typeof process.emitWarning === 'function') {
371
377
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
372
378
  }