@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.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +35 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +20 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +312 -21
- package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +115 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +153 -23
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +5 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +2 -1
- package/build/protos/protos.d.ts +2743 -221
- package/build/protos/protos.js +10286 -3762
- package/build/protos/protos.json +595 -5
- package/build/src/v1/completion_service_client.js +10 -7
- package/build/src/v1/conversational_search_service_client.js +10 -7
- package/build/src/v1/data_store_service_client.js +10 -7
- package/build/src/v1/document_service_client.js +10 -7
- package/build/src/v1/engine_service_client.js +10 -7
- package/build/src/v1/schema_service_client.js +10 -7
- package/build/src/v1/search_service_client.js +10 -7
- package/build/src/v1/site_search_engine_service_client.js +10 -7
- package/build/src/v1/user_event_service_client.js +10 -7
- package/build/src/v1alpha/acl_config_service_client.js +10 -7
- package/build/src/v1alpha/chunk_service_client.js +10 -7
- package/build/src/v1alpha/completion_service_client.js +13 -7
- package/build/src/v1alpha/conversational_search_service_client.js +10 -7
- package/build/src/v1alpha/data_store_service_client.js +13 -7
- package/build/src/v1alpha/document_service_client.d.ts +80 -21
- package/build/src/v1alpha/document_service_client.js +35 -7
- package/build/src/v1alpha/document_service_client_config.json +5 -0
- package/build/src/v1alpha/engine_service_client.js +13 -7
- package/build/src/v1alpha/estimate_billing_service_client.js +13 -7
- package/build/src/v1alpha/index.d.ts +1 -0
- package/build/src/v1alpha/index.js +3 -1
- package/build/src/v1alpha/rank_service_client.d.ts +1254 -0
- package/build/src/v1alpha/rank_service_client.js +1796 -0
- package/build/src/v1alpha/rank_service_client_config.json +30 -0
- package/build/src/v1alpha/recommendation_service_client.js +10 -7
- package/build/src/v1alpha/schema_service_client.js +13 -7
- package/build/src/v1alpha/search_service_client.d.ts +30 -15
- package/build/src/v1alpha/search_service_client.js +30 -17
- package/build/src/v1alpha/search_tuning_service_client.js +13 -7
- package/build/src/v1alpha/serving_config_service_client.d.ts +2 -1
- package/build/src/v1alpha/serving_config_service_client.js +12 -8
- package/build/src/v1alpha/site_search_engine_service_client.js +13 -7
- package/build/src/v1alpha/user_event_service_client.js +13 -7
- package/build/src/v1beta/completion_service_client.js +10 -7
- package/build/src/v1beta/conversational_search_service_client.js +10 -7
- package/build/src/v1beta/data_store_service_client.js +10 -7
- package/build/src/v1beta/document_service_client.js +10 -7
- package/build/src/v1beta/engine_service_client.js +10 -7
- package/build/src/v1beta/recommendation_service_client.js +10 -7
- package/build/src/v1beta/schema_service_client.js +10 -7
- package/build/src/v1beta/search_service_client.js +10 -7
- package/build/src/v1beta/search_tuning_service_client.js +10 -7
- package/build/src/v1beta/serving_config_service_client.js +10 -7
- package/build/src/v1beta/site_search_engine_service_client.js +10 -7
- package/build/src/v1beta/user_event_service_client.js +10 -7
- package/package.json +1 -1
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.cloud.discoveryengine.v1alpha.RankService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"non_idempotent": [],
|
6
|
+
"idempotent": [
|
7
|
+
"DEADLINE_EXCEEDED",
|
8
|
+
"UNAVAILABLE"
|
9
|
+
]
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 60000,
|
17
|
+
"rpc_timeout_multiplier": 1,
|
18
|
+
"max_rpc_timeout_millis": 60000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"methods": {
|
23
|
+
"Rank": {
|
24
|
+
"retry_codes_name": "non_idempotent",
|
25
|
+
"retry_params_name": "default"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
@@ -72,7 +72,7 @@ class RecommendationServiceClient {
|
|
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 RecommendationServiceClient {
|
|
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 = (
|
98
|
-
const fallback = (
|
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 RecommendationServiceClient {
|
|
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
|
132
|
+
if (typeof process === 'object' && 'versions' in process) {
|
130
133
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
131
134
|
}
|
132
135
|
else {
|
@@ -227,7 +230,7 @@ class RecommendationServiceClient {
|
|
227
230
|
* @returns {string} The DNS address for this service.
|
228
231
|
*/
|
229
232
|
static get servicePath() {
|
230
|
-
if (typeof process
|
233
|
+
if (typeof process === 'object' &&
|
231
234
|
typeof process.emitWarning === 'function') {
|
232
235
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
233
236
|
}
|
@@ -239,7 +242,7 @@ class RecommendationServiceClient {
|
|
239
242
|
* @returns {string} The DNS address for this service.
|
240
243
|
*/
|
241
244
|
static get apiEndpoint() {
|
242
|
-
if (typeof process
|
245
|
+
if (typeof process === 'object' &&
|
243
246
|
typeof process.emitWarning === 'function') {
|
244
247
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
245
248
|
}
|
@@ -72,7 +72,7 @@ class SchemaServiceClient {
|
|
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 SchemaServiceClient {
|
|
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 = (
|
97
|
-
const fallback = (
|
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 SchemaServiceClient {
|
|
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
|
131
|
+
if (typeof process === 'object' && 'versions' in process) {
|
129
132
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
130
133
|
}
|
131
134
|
else {
|
@@ -223,6 +226,9 @@ class SchemaServiceClient {
|
|
223
226
|
{
|
224
227
|
get: '/v1alpha/{name=projects/*/locations/*/dataStores/*/operations/*}',
|
225
228
|
},
|
229
|
+
{
|
230
|
+
get: '/v1alpha/{name=projects/*/locations/*/evaluations/*/operations/*}',
|
231
|
+
},
|
226
232
|
{ get: '/v1alpha/{name=projects/*/locations/*/operations/*}' },
|
227
233
|
{ get: '/v1alpha/{name=projects/*/operations/*}' },
|
228
234
|
],
|
@@ -349,7 +355,7 @@ class SchemaServiceClient {
|
|
349
355
|
* @returns {string} The DNS address for this service.
|
350
356
|
*/
|
351
357
|
static get servicePath() {
|
352
|
-
if (typeof process
|
358
|
+
if (typeof process === 'object' &&
|
353
359
|
typeof process.emitWarning === 'function') {
|
354
360
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
355
361
|
}
|
@@ -361,7 +367,7 @@ class SchemaServiceClient {
|
|
361
367
|
* @returns {string} The DNS address for this service.
|
362
368
|
*/
|
363
369
|
static get apiEndpoint() {
|
364
|
-
if (typeof process
|
370
|
+
if (typeof process === 'object' &&
|
365
371
|
typeof process.emitWarning === 'function') {
|
366
372
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
367
373
|
}
|
@@ -140,11 +140,15 @@ export declare class SearchServiceClient {
|
|
140
140
|
* Raw image query.
|
141
141
|
* @param {number} request.pageSize
|
142
142
|
* Maximum number of
|
143
|
-
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return.
|
144
|
-
*
|
145
|
-
*
|
143
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
|
144
|
+
* maximum allowed value depends on the data type. Values above the maximum
|
145
|
+
* value are coerced to the maximum value.
|
146
146
|
*
|
147
|
-
*
|
147
|
+
* * Websites with basic indexing: Default `10`, Maximum `25`.
|
148
|
+
* * Websites with advanced indexing: Default `25`, Maximum `50`.
|
149
|
+
* * Other: Default `50`, Maximum `100`.
|
150
|
+
*
|
151
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
148
152
|
* @param {string} request.pageToken
|
149
153
|
* A page token received from a previous
|
150
154
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
@@ -266,7 +270,8 @@ export declare class SearchServiceClient {
|
|
266
270
|
*
|
267
271
|
* If
|
268
272
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
269
|
-
* is not provided, it will use
|
273
|
+
* is not provided, it will use
|
274
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
|
270
275
|
* @param {string} request.rankingExpression
|
271
276
|
* The ranking expression controls the customized ranking on retrieval
|
272
277
|
* documents. This overrides
|
@@ -353,11 +358,15 @@ export declare class SearchServiceClient {
|
|
353
358
|
* Raw image query.
|
354
359
|
* @param {number} request.pageSize
|
355
360
|
* Maximum number of
|
356
|
-
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return.
|
357
|
-
*
|
358
|
-
*
|
361
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
|
362
|
+
* maximum allowed value depends on the data type. Values above the maximum
|
363
|
+
* value are coerced to the maximum value.
|
359
364
|
*
|
360
|
-
*
|
365
|
+
* * Websites with basic indexing: Default `10`, Maximum `25`.
|
366
|
+
* * Websites with advanced indexing: Default `25`, Maximum `50`.
|
367
|
+
* * Other: Default `50`, Maximum `100`.
|
368
|
+
*
|
369
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
361
370
|
* @param {string} request.pageToken
|
362
371
|
* A page token received from a previous
|
363
372
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
@@ -479,7 +488,8 @@ export declare class SearchServiceClient {
|
|
479
488
|
*
|
480
489
|
* If
|
481
490
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
482
|
-
* is not provided, it will use
|
491
|
+
* is not provided, it will use
|
492
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
|
483
493
|
* @param {string} request.rankingExpression
|
484
494
|
* The ranking expression controls the customized ranking on retrieval
|
485
495
|
* documents. This overrides
|
@@ -561,11 +571,15 @@ export declare class SearchServiceClient {
|
|
561
571
|
* Raw image query.
|
562
572
|
* @param {number} request.pageSize
|
563
573
|
* Maximum number of
|
564
|
-
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return.
|
565
|
-
*
|
566
|
-
*
|
574
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
|
575
|
+
* maximum allowed value depends on the data type. Values above the maximum
|
576
|
+
* value are coerced to the maximum value.
|
567
577
|
*
|
568
|
-
*
|
578
|
+
* * Websites with basic indexing: Default `10`, Maximum `25`.
|
579
|
+
* * Websites with advanced indexing: Default `25`, Maximum `50`.
|
580
|
+
* * Other: Default `50`, Maximum `100`.
|
581
|
+
*
|
582
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
569
583
|
* @param {string} request.pageToken
|
570
584
|
* A page token received from a previous
|
571
585
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
@@ -687,7 +701,8 @@ export declare class SearchServiceClient {
|
|
687
701
|
*
|
688
702
|
* If
|
689
703
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
690
|
-
* is not provided, it will use
|
704
|
+
* is not provided, it will use
|
705
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
|
691
706
|
* @param {string} request.rankingExpression
|
692
707
|
* The ranking expression controls the customized ranking on retrieval
|
693
708
|
* documents. This overrides
|
@@ -72,7 +72,7 @@ class SearchServiceClient {
|
|
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 SearchServiceClient {
|
|
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 = (
|
97
|
-
const fallback = (
|
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 SearchServiceClient {
|
|
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
|
131
|
+
if (typeof process === 'object' && 'versions' in process) {
|
129
132
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
130
133
|
}
|
131
134
|
else {
|
@@ -234,7 +237,7 @@ class SearchServiceClient {
|
|
234
237
|
* @returns {string} The DNS address for this service.
|
235
238
|
*/
|
236
239
|
static get servicePath() {
|
237
|
-
if (typeof process
|
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 SearchServiceClient {
|
|
246
249
|
* @returns {string} The DNS address for this service.
|
247
250
|
*/
|
248
251
|
static get apiEndpoint() {
|
249
|
-
if (typeof process
|
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
|
}
|
@@ -332,11 +335,15 @@ class SearchServiceClient {
|
|
332
335
|
* Raw image query.
|
333
336
|
* @param {number} request.pageSize
|
334
337
|
* Maximum number of
|
335
|
-
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return.
|
336
|
-
*
|
337
|
-
*
|
338
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
|
339
|
+
* maximum allowed value depends on the data type. Values above the maximum
|
340
|
+
* value are coerced to the maximum value.
|
338
341
|
*
|
339
|
-
*
|
342
|
+
* * Websites with basic indexing: Default `10`, Maximum `25`.
|
343
|
+
* * Websites with advanced indexing: Default `25`, Maximum `50`.
|
344
|
+
* * Other: Default `50`, Maximum `100`.
|
345
|
+
*
|
346
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
340
347
|
* @param {string} request.pageToken
|
341
348
|
* A page token received from a previous
|
342
349
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
@@ -458,7 +465,8 @@ class SearchServiceClient {
|
|
458
465
|
*
|
459
466
|
* If
|
460
467
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
461
|
-
* is not provided, it will use
|
468
|
+
* is not provided, it will use
|
469
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
|
462
470
|
* @param {string} request.rankingExpression
|
463
471
|
* The ranking expression controls the customized ranking on retrieval
|
464
472
|
* documents. This overrides
|
@@ -554,11 +562,15 @@ class SearchServiceClient {
|
|
554
562
|
* Raw image query.
|
555
563
|
* @param {number} request.pageSize
|
556
564
|
* Maximum number of
|
557
|
-
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return.
|
558
|
-
*
|
559
|
-
*
|
565
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
|
566
|
+
* maximum allowed value depends on the data type. Values above the maximum
|
567
|
+
* value are coerced to the maximum value.
|
560
568
|
*
|
561
|
-
*
|
569
|
+
* * Websites with basic indexing: Default `10`, Maximum `25`.
|
570
|
+
* * Websites with advanced indexing: Default `25`, Maximum `50`.
|
571
|
+
* * Other: Default `50`, Maximum `100`.
|
572
|
+
*
|
573
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
562
574
|
* @param {string} request.pageToken
|
563
575
|
* A page token received from a previous
|
564
576
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
@@ -680,7 +692,8 @@ class SearchServiceClient {
|
|
680
692
|
*
|
681
693
|
* If
|
682
694
|
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
683
|
-
* is not provided, it will use
|
695
|
+
* is not provided, it will use
|
696
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
|
684
697
|
* @param {string} request.rankingExpression
|
685
698
|
* The ranking expression controls the customized ranking on retrieval
|
686
699
|
* documents. This overrides
|
@@ -72,7 +72,7 @@ class SearchTuningServiceClient {
|
|
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 SearchTuningServiceClient {
|
|
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 = (
|
97
|
-
const fallback = (
|
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 SearchTuningServiceClient {
|
|
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
|
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 SearchTuningServiceClient {
|
|
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
|
],
|
@@ -329,7 +335,7 @@ class SearchTuningServiceClient {
|
|
329
335
|
* @returns {string} The DNS address for this service.
|
330
336
|
*/
|
331
337
|
static get servicePath() {
|
332
|
-
if (typeof process
|
338
|
+
if (typeof process === 'object' &&
|
333
339
|
typeof process.emitWarning === 'function') {
|
334
340
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
335
341
|
}
|
@@ -341,7 +347,7 @@ class SearchTuningServiceClient {
|
|
341
347
|
* @returns {string} The DNS address for this service.
|
342
348
|
*/
|
343
349
|
static get apiEndpoint() {
|
344
|
-
if (typeof process
|
350
|
+
if (typeof process === 'object' &&
|
345
351
|
typeof process.emitWarning === 'function') {
|
346
352
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
347
353
|
}
|
@@ -4,7 +4,8 @@ import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallb
|
|
4
4
|
import { Transform } from 'stream';
|
5
5
|
import * as protos from '../../protos/protos';
|
6
6
|
/**
|
7
|
-
* Service for operations related to
|
7
|
+
* Service for operations related to
|
8
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig|ServingConfig}.
|
8
9
|
* @class
|
9
10
|
* @memberof v1alpha
|
10
11
|
*/
|
@@ -27,7 +27,8 @@ const jsonProtos = require("../../protos/protos.json");
|
|
27
27
|
const gapicConfig = require("./serving_config_service_client_config.json");
|
28
28
|
const version = require('../../../package.json').version;
|
29
29
|
/**
|
30
|
-
* Service for operations related to
|
30
|
+
* Service for operations related to
|
31
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig|ServingConfig}.
|
31
32
|
* @class
|
32
33
|
* @memberof v1alpha
|
33
34
|
*/
|
@@ -72,7 +73,7 @@ class ServingConfigServiceClient {
|
|
72
73
|
* ```
|
73
74
|
*/
|
74
75
|
constructor(opts, gaxInstance) {
|
75
|
-
var _a, _b, _c, _d;
|
76
|
+
var _a, _b, _c, _d, _e;
|
76
77
|
this._terminated = false;
|
77
78
|
this.descriptors = {
|
78
79
|
page: {},
|
@@ -87,14 +88,17 @@ class ServingConfigServiceClient {
|
|
87
88
|
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
88
89
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
89
90
|
}
|
91
|
+
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
92
|
+
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
93
|
+
: undefined;
|
90
94
|
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';
|
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';
|
92
96
|
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
93
97
|
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
94
98
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
95
99
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
96
|
-
const clientConfig = (
|
97
|
-
const fallback = (
|
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');
|
98
102
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
99
103
|
// Request numeric enum values if REST transport is used.
|
100
104
|
opts.numericEnums = true;
|
@@ -125,7 +129,7 @@ class ServingConfigServiceClient {
|
|
125
129
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
126
130
|
// Determine the client header string.
|
127
131
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
128
|
-
if (typeof process
|
132
|
+
if (typeof process === 'object' && 'versions' in process) {
|
129
133
|
clientHeader.push(`gl-node/${process.versions.node}`);
|
130
134
|
}
|
131
135
|
else {
|
@@ -238,7 +242,7 @@ class ServingConfigServiceClient {
|
|
238
242
|
* @returns {string} The DNS address for this service.
|
239
243
|
*/
|
240
244
|
static get servicePath() {
|
241
|
-
if (typeof process
|
245
|
+
if (typeof process === 'object' &&
|
242
246
|
typeof process.emitWarning === 'function') {
|
243
247
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
244
248
|
}
|
@@ -250,7 +254,7 @@ class ServingConfigServiceClient {
|
|
250
254
|
* @returns {string} The DNS address for this service.
|
251
255
|
*/
|
252
256
|
static get apiEndpoint() {
|
253
|
-
if (typeof process
|
257
|
+
if (typeof process === 'object' &&
|
254
258
|
typeof process.emitWarning === 'function') {
|
255
259
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
256
260
|
}
|
@@ -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 = (
|
98
|
-
const fallback = (
|
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
|
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 SiteSearchEngineServiceClient {
|
|
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
|
],
|
@@ -373,7 +379,7 @@ class SiteSearchEngineServiceClient {
|
|
373
379
|
* @returns {string} The DNS address for this service.
|
374
380
|
*/
|
375
381
|
static get servicePath() {
|
376
|
-
if (typeof process
|
382
|
+
if (typeof process === 'object' &&
|
377
383
|
typeof process.emitWarning === 'function') {
|
378
384
|
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
379
385
|
}
|
@@ -385,7 +391,7 @@ class SiteSearchEngineServiceClient {
|
|
385
391
|
* @returns {string} The DNS address for this service.
|
386
392
|
*/
|
387
393
|
static get apiEndpoint() {
|
388
|
-
if (typeof process
|
394
|
+
if (typeof process === 'object' &&
|
389
395
|
typeof process.emitWarning === 'function') {
|
390
396
|
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
391
397
|
}
|