@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
@@ -73,7 +73,7 @@ class ServingConfigServiceClient {
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 ServingConfigServiceClient {
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 ServingConfigServiceClient {
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 {
@@ -236,7 +239,7 @@ class ServingConfigServiceClient {
236
239
  * @returns {string} The DNS address for this service.
237
240
  */
238
241
  static get servicePath() {
239
- if (typeof process !== undefined &&
242
+ if (typeof process === 'object' &&
240
243
  typeof process.emitWarning === 'function') {
241
244
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
242
245
  }
@@ -248,7 +251,7 @@ class ServingConfigServiceClient {
248
251
  * @returns {string} The DNS address for this service.
249
252
  */
250
253
  static get apiEndpoint() {
251
- if (typeof process !== undefined &&
254
+ if (typeof process === 'object' &&
252
255
  typeof process.emitWarning === 'function') {
253
256
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
254
257
  }
@@ -72,7 +72,7 @@ class SiteSearchEngineServiceClient {
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 SiteSearchEngineServiceClient {
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 SiteSearchEngineServiceClient {
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 {
@@ -370,7 +373,7 @@ class SiteSearchEngineServiceClient {
370
373
  * @returns {string} The DNS address for this service.
371
374
  */
372
375
  static get servicePath() {
373
- if (typeof process !== undefined &&
376
+ if (typeof process === 'object' &&
374
377
  typeof process.emitWarning === 'function') {
375
378
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
376
379
  }
@@ -382,7 +385,7 @@ class SiteSearchEngineServiceClient {
382
385
  * @returns {string} The DNS address for this service.
383
386
  */
384
387
  static get apiEndpoint() {
385
- if (typeof process !== undefined &&
388
+ if (typeof process === 'object' &&
386
389
  typeof process.emitWarning === 'function') {
387
390
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
388
391
  }
@@ -72,7 +72,7 @@ class UserEventServiceClient {
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 UserEventServiceClient {
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 UserEventServiceClient {
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 {
@@ -330,7 +333,7 @@ class UserEventServiceClient {
330
333
  * @returns {string} The DNS address for this service.
331
334
  */
332
335
  static get servicePath() {
333
- if (typeof process !== undefined &&
336
+ if (typeof process === 'object' &&
334
337
  typeof process.emitWarning === 'function') {
335
338
  process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
336
339
  }
@@ -342,7 +345,7 @@ class UserEventServiceClient {
342
345
  * @returns {string} The DNS address for this service.
343
346
  */
344
347
  static get apiEndpoint() {
345
- if (typeof process !== undefined &&
348
+ if (typeof process === 'object' &&
346
349
  typeof process.emitWarning === 'function') {
347
350
  process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
348
351
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-cloud/discoveryengine",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Discovery Engine API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",