@google-cloud/discoveryengine 1.3.1 → 1.4.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 +51 -0
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +54 -3
- package/build/protos/google/cloud/discoveryengine/v1/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +51 -4
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +40 -1
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1/data_store_service.proto +304 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +215 -0
- package/build/protos/google/cloud/discoveryengine/v1/engine_service.proto +242 -0
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +137 -4
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +170 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +691 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +3 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +59 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +51 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +40 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +220 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +244 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +64 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +26 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +150 -11
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +264 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +147 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine.proto +170 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/site_search_engine_service.proto +695 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -3
- package/build/protos/protos.d.ts +41157 -23655
- package/build/protos/protos.js +103188 -62466
- package/build/protos/protos.json +10400 -6075
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1/completion_service_client.d.ts +489 -7
- package/build/src/v1/completion_service_client.js +715 -11
- package/build/src/v1/completion_service_client_config.json +10 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -3
- package/build/src/v1/conversational_search_service_client.js +466 -9
- package/build/src/v1/data_store_service_client.d.ts +1286 -0
- package/build/src/v1/data_store_service_client.js +1768 -0
- package/build/src/v1/data_store_service_client_config.json +46 -0
- package/build/src/v1/document_service_client.d.ts +347 -2
- package/build/src/v1/document_service_client.js +506 -9
- package/build/src/v1/engine_service_client.d.ts +1211 -0
- package/build/src/v1/engine_service_client.js +1731 -0
- package/build/src/v1/engine_service_client_config.json +46 -0
- package/build/src/v1/index.d.ts +3 -0
- package/build/src/v1/index.js +7 -1
- package/build/src/v1/schema_service_client.d.ts +272 -2
- package/build/src/v1/schema_service_client.js +402 -9
- package/build/src/v1/search_service_client.d.ts +515 -11
- package/build/src/v1/search_service_client.js +648 -15
- package/build/src/v1/site_search_engine_service_client.d.ts +1564 -0
- package/build/src/v1/site_search_engine_service_client.js +2075 -0
- package/build/src/v1/site_search_engine_service_client_config.json +74 -0
- package/build/src/v1/user_event_service_client.d.ts +272 -2
- package/build/src/v1/user_event_service_client.js +402 -9
- package/build/src/v1alpha/completion_service_client.d.ts +11 -2
- package/build/src/v1alpha/completion_service_client.js +37 -10
- package/build/src/v1alpha/conversational_search_service_client.d.ts +11 -2
- package/build/src/v1alpha/conversational_search_service_client.js +37 -10
- package/build/src/v1alpha/data_store_service_client.d.ts +11 -2
- package/build/src/v1alpha/data_store_service_client.js +37 -10
- package/build/src/v1alpha/document_service_client.d.ts +11 -2
- package/build/src/v1alpha/document_service_client.js +37 -10
- package/build/src/v1alpha/engine_service_client.d.ts +11 -2
- package/build/src/v1alpha/engine_service_client.js +37 -10
- package/build/src/v1alpha/index.js +1 -1
- package/build/src/v1alpha/recommendation_service_client.d.ts +11 -2
- package/build/src/v1alpha/recommendation_service_client.js +37 -10
- package/build/src/v1alpha/schema_service_client.d.ts +11 -2
- package/build/src/v1alpha/schema_service_client.js +37 -10
- package/build/src/v1alpha/search_service_client.d.ts +11 -2
- package/build/src/v1alpha/search_service_client.js +37 -10
- package/build/src/v1alpha/search_tuning_service_client.d.ts +11 -2
- package/build/src/v1alpha/search_tuning_service_client.js +37 -10
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +11 -2
- package/build/src/v1alpha/site_search_engine_service_client.js +37 -10
- package/build/src/v1alpha/user_event_service_client.d.ts +11 -2
- package/build/src/v1alpha/user_event_service_client.js +37 -10
- package/build/src/v1beta/completion_service_client.d.ts +633 -7
- package/build/src/v1beta/completion_service_client.js +911 -11
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +341 -3
- package/build/src/v1beta/conversational_search_service_client.js +466 -9
- package/build/src/v1beta/data_store_service_client.d.ts +1433 -0
- package/build/src/v1beta/data_store_service_client.js +1966 -0
- package/build/src/v1beta/data_store_service_client_config.json +46 -0
- package/build/src/v1beta/document_service_client.d.ts +491 -2
- package/build/src/v1beta/document_service_client.js +706 -11
- package/build/src/v1beta/engine_service_client.d.ts +1357 -0
- package/build/src/v1beta/engine_service_client.js +1928 -0
- package/build/src/v1beta/engine_service_client_config.json +46 -0
- package/build/src/v1beta/index.d.ts +4 -0
- package/build/src/v1beta/index.js +9 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +420 -5
- package/build/src/v1beta/recommendation_service_client.js +570 -9
- package/build/src/v1beta/schema_service_client.d.ts +416 -2
- package/build/src/v1beta/schema_service_client.js +602 -11
- package/build/src/v1beta/search_service_client.d.ts +539 -29
- package/build/src/v1beta/search_service_client.js +664 -27
- package/build/src/v1beta/serving_config_service_client.d.ts +1102 -0
- package/build/src/v1beta/serving_config_service_client.js +1563 -0
- package/build/src/v1beta/serving_config_service_client_config.json +38 -0
- package/build/src/v1beta/site_search_engine_service_client.d.ts +1712 -0
- package/build/src/v1beta/site_search_engine_service_client.js +2271 -0
- package/build/src/v1beta/site_search_engine_service_client_config.json +74 -0
- package/build/src/v1beta/user_event_service_client.d.ts +416 -2
- package/build/src/v1beta/user_event_service_client.js +602 -11
- package/package.json +2 -2
|
@@ -16,6 +16,8 @@ export declare class ConversationalSearchServiceClient {
|
|
|
16
16
|
private _gaxGrpc;
|
|
17
17
|
private _protos;
|
|
18
18
|
private _defaults;
|
|
19
|
+
private _universeDomain;
|
|
20
|
+
private _servicePath;
|
|
19
21
|
auth: gax.GoogleAuth;
|
|
20
22
|
descriptors: Descriptors;
|
|
21
23
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -85,15 +87,22 @@ export declare class ConversationalSearchServiceClient {
|
|
|
85
87
|
}>;
|
|
86
88
|
/**
|
|
87
89
|
* The DNS address for this API service.
|
|
90
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
88
91
|
* @returns {string} The DNS address for this service.
|
|
89
92
|
*/
|
|
90
93
|
static get servicePath(): string;
|
|
91
94
|
/**
|
|
92
|
-
* The DNS address for this API service - same as servicePath
|
|
93
|
-
*
|
|
95
|
+
* The DNS address for this API service - same as servicePath.
|
|
96
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
94
97
|
* @returns {string} The DNS address for this service.
|
|
95
98
|
*/
|
|
96
99
|
static get apiEndpoint(): string;
|
|
100
|
+
/**
|
|
101
|
+
* The DNS address for this API service.
|
|
102
|
+
* @returns {string} The DNS address for this service.
|
|
103
|
+
*/
|
|
104
|
+
get apiEndpoint(): string;
|
|
105
|
+
get universeDomain(): string;
|
|
97
106
|
/**
|
|
98
107
|
* The port for this API service.
|
|
99
108
|
* @returns {number} The default port for this service.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -72,7 +72,7 @@ class ConversationalSearchServiceClient {
|
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
74
|
constructor(opts, gaxInstance) {
|
|
75
|
-
var _a, _b;
|
|
75
|
+
var _a, _b, _c, _d;
|
|
76
76
|
this._terminated = false;
|
|
77
77
|
this.descriptors = {
|
|
78
78
|
page: {},
|
|
@@ -83,16 +83,24 @@ class ConversationalSearchServiceClient {
|
|
|
83
83
|
// Ensure that options include all the required fields.
|
|
84
84
|
const staticMembers = this
|
|
85
85
|
.constructor;
|
|
86
|
-
|
|
86
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
|
87
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
|
88
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
89
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
90
|
+
}
|
|
91
|
+
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';
|
|
93
|
+
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
|
94
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
87
95
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
88
96
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
89
|
-
const clientConfig = (
|
|
90
|
-
const fallback = (
|
|
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');
|
|
91
99
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
92
100
|
// Request numeric enum values if REST transport is used.
|
|
93
101
|
opts.numericEnums = true;
|
|
94
102
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
95
|
-
if (servicePath !==
|
|
103
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
96
104
|
opts['scopes'] = staticMembers.scopes;
|
|
97
105
|
}
|
|
98
106
|
// Load google-gax module synchronously if needed
|
|
@@ -110,9 +118,9 @@ class ConversationalSearchServiceClient {
|
|
|
110
118
|
// Set useJWTAccessWithScope on the auth object.
|
|
111
119
|
this.auth.useJWTAccessWithScope = true;
|
|
112
120
|
// Set defaultServicePath on the auth object.
|
|
113
|
-
this.auth.defaultServicePath =
|
|
121
|
+
this.auth.defaultServicePath = this._servicePath;
|
|
114
122
|
// Set the default scopes in auth client if needed.
|
|
115
|
-
if (servicePath ===
|
|
123
|
+
if (servicePath === this._servicePath) {
|
|
116
124
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
117
125
|
}
|
|
118
126
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
@@ -223,19 +231,38 @@ class ConversationalSearchServiceClient {
|
|
|
223
231
|
}
|
|
224
232
|
/**
|
|
225
233
|
* The DNS address for this API service.
|
|
234
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
226
235
|
* @returns {string} The DNS address for this service.
|
|
227
236
|
*/
|
|
228
237
|
static get servicePath() {
|
|
238
|
+
if (typeof process !== undefined &&
|
|
239
|
+
typeof process.emitWarning === 'function') {
|
|
240
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
241
|
+
}
|
|
229
242
|
return 'discoveryengine.googleapis.com';
|
|
230
243
|
}
|
|
231
244
|
/**
|
|
232
|
-
* The DNS address for this API service - same as servicePath
|
|
233
|
-
*
|
|
245
|
+
* The DNS address for this API service - same as servicePath.
|
|
246
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
234
247
|
* @returns {string} The DNS address for this service.
|
|
235
248
|
*/
|
|
236
249
|
static get apiEndpoint() {
|
|
250
|
+
if (typeof process !== undefined &&
|
|
251
|
+
typeof process.emitWarning === 'function') {
|
|
252
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
253
|
+
}
|
|
237
254
|
return 'discoveryengine.googleapis.com';
|
|
238
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* The DNS address for this API service.
|
|
258
|
+
* @returns {string} The DNS address for this service.
|
|
259
|
+
*/
|
|
260
|
+
get apiEndpoint() {
|
|
261
|
+
return this._servicePath;
|
|
262
|
+
}
|
|
263
|
+
get universeDomain() {
|
|
264
|
+
return this._universeDomain;
|
|
265
|
+
}
|
|
239
266
|
/**
|
|
240
267
|
* The port for this API service.
|
|
241
268
|
* @returns {number} The default port for this service.
|
|
@@ -17,6 +17,8 @@ export declare class DataStoreServiceClient {
|
|
|
17
17
|
private _gaxGrpc;
|
|
18
18
|
private _protos;
|
|
19
19
|
private _defaults;
|
|
20
|
+
private _universeDomain;
|
|
21
|
+
private _servicePath;
|
|
20
22
|
auth: gax.GoogleAuth;
|
|
21
23
|
descriptors: Descriptors;
|
|
22
24
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -87,15 +89,22 @@ export declare class DataStoreServiceClient {
|
|
|
87
89
|
}>;
|
|
88
90
|
/**
|
|
89
91
|
* The DNS address for this API service.
|
|
92
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
90
93
|
* @returns {string} The DNS address for this service.
|
|
91
94
|
*/
|
|
92
95
|
static get servicePath(): string;
|
|
93
96
|
/**
|
|
94
|
-
* The DNS address for this API service - same as servicePath
|
|
95
|
-
*
|
|
97
|
+
* The DNS address for this API service - same as servicePath.
|
|
98
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
96
99
|
* @returns {string} The DNS address for this service.
|
|
97
100
|
*/
|
|
98
101
|
static get apiEndpoint(): string;
|
|
102
|
+
/**
|
|
103
|
+
* The DNS address for this API service.
|
|
104
|
+
* @returns {string} The DNS address for this service.
|
|
105
|
+
*/
|
|
106
|
+
get apiEndpoint(): string;
|
|
107
|
+
get universeDomain(): string;
|
|
99
108
|
/**
|
|
100
109
|
* The port for this API service.
|
|
101
110
|
* @returns {number} The default port for this service.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -73,7 +73,7 @@ class DataStoreServiceClient {
|
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
75
|
constructor(opts, gaxInstance) {
|
|
76
|
-
var _a, _b;
|
|
76
|
+
var _a, _b, _c, _d;
|
|
77
77
|
this._terminated = false;
|
|
78
78
|
this.descriptors = {
|
|
79
79
|
page: {},
|
|
@@ -83,16 +83,24 @@ class DataStoreServiceClient {
|
|
|
83
83
|
};
|
|
84
84
|
// Ensure that options include all the required fields.
|
|
85
85
|
const staticMembers = this.constructor;
|
|
86
|
-
|
|
86
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
|
87
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
|
88
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
89
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
90
|
+
}
|
|
91
|
+
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';
|
|
93
|
+
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
|
94
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
87
95
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
88
96
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
89
|
-
const clientConfig = (
|
|
90
|
-
const fallback = (
|
|
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');
|
|
91
99
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
92
100
|
// Request numeric enum values if REST transport is used.
|
|
93
101
|
opts.numericEnums = true;
|
|
94
102
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
95
|
-
if (servicePath !==
|
|
103
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
96
104
|
opts['scopes'] = staticMembers.scopes;
|
|
97
105
|
}
|
|
98
106
|
// Load google-gax module synchronously if needed
|
|
@@ -110,9 +118,9 @@ class DataStoreServiceClient {
|
|
|
110
118
|
// Set useJWTAccessWithScope on the auth object.
|
|
111
119
|
this.auth.useJWTAccessWithScope = true;
|
|
112
120
|
// Set defaultServicePath on the auth object.
|
|
113
|
-
this.auth.defaultServicePath =
|
|
121
|
+
this.auth.defaultServicePath = this._servicePath;
|
|
114
122
|
// Set the default scopes in auth client if needed.
|
|
115
|
-
if (servicePath ===
|
|
123
|
+
if (servicePath === this._servicePath) {
|
|
116
124
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
117
125
|
}
|
|
118
126
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
@@ -328,19 +336,38 @@ class DataStoreServiceClient {
|
|
|
328
336
|
}
|
|
329
337
|
/**
|
|
330
338
|
* The DNS address for this API service.
|
|
339
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
331
340
|
* @returns {string} The DNS address for this service.
|
|
332
341
|
*/
|
|
333
342
|
static get servicePath() {
|
|
343
|
+
if (typeof process !== undefined &&
|
|
344
|
+
typeof process.emitWarning === 'function') {
|
|
345
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
346
|
+
}
|
|
334
347
|
return 'discoveryengine.googleapis.com';
|
|
335
348
|
}
|
|
336
349
|
/**
|
|
337
|
-
* The DNS address for this API service - same as servicePath
|
|
338
|
-
*
|
|
350
|
+
* The DNS address for this API service - same as servicePath.
|
|
351
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
339
352
|
* @returns {string} The DNS address for this service.
|
|
340
353
|
*/
|
|
341
354
|
static get apiEndpoint() {
|
|
355
|
+
if (typeof process !== undefined &&
|
|
356
|
+
typeof process.emitWarning === 'function') {
|
|
357
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
358
|
+
}
|
|
342
359
|
return 'discoveryengine.googleapis.com';
|
|
343
360
|
}
|
|
361
|
+
/**
|
|
362
|
+
* The DNS address for this API service.
|
|
363
|
+
* @returns {string} The DNS address for this service.
|
|
364
|
+
*/
|
|
365
|
+
get apiEndpoint() {
|
|
366
|
+
return this._servicePath;
|
|
367
|
+
}
|
|
368
|
+
get universeDomain() {
|
|
369
|
+
return this._universeDomain;
|
|
370
|
+
}
|
|
344
371
|
/**
|
|
345
372
|
* The port for this API service.
|
|
346
373
|
* @returns {number} The default port for this service.
|
|
@@ -18,6 +18,8 @@ export declare class DocumentServiceClient {
|
|
|
18
18
|
private _gaxGrpc;
|
|
19
19
|
private _protos;
|
|
20
20
|
private _defaults;
|
|
21
|
+
private _universeDomain;
|
|
22
|
+
private _servicePath;
|
|
21
23
|
auth: gax.GoogleAuth;
|
|
22
24
|
descriptors: Descriptors;
|
|
23
25
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -88,15 +90,22 @@ export declare class DocumentServiceClient {
|
|
|
88
90
|
}>;
|
|
89
91
|
/**
|
|
90
92
|
* The DNS address for this API service.
|
|
93
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
91
94
|
* @returns {string} The DNS address for this service.
|
|
92
95
|
*/
|
|
93
96
|
static get servicePath(): string;
|
|
94
97
|
/**
|
|
95
|
-
* The DNS address for this API service - same as servicePath
|
|
96
|
-
*
|
|
98
|
+
* The DNS address for this API service - same as servicePath.
|
|
99
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
97
100
|
* @returns {string} The DNS address for this service.
|
|
98
101
|
*/
|
|
99
102
|
static get apiEndpoint(): string;
|
|
103
|
+
/**
|
|
104
|
+
* The DNS address for this API service.
|
|
105
|
+
* @returns {string} The DNS address for this service.
|
|
106
|
+
*/
|
|
107
|
+
get apiEndpoint(): string;
|
|
108
|
+
get universeDomain(): string;
|
|
100
109
|
/**
|
|
101
110
|
* The port for this API service.
|
|
102
111
|
* @returns {number} The default port for this service.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -74,7 +74,7 @@ class DocumentServiceClient {
|
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
76
|
constructor(opts, gaxInstance) {
|
|
77
|
-
var _a, _b;
|
|
77
|
+
var _a, _b, _c, _d;
|
|
78
78
|
this._terminated = false;
|
|
79
79
|
this.descriptors = {
|
|
80
80
|
page: {},
|
|
@@ -84,16 +84,24 @@ class DocumentServiceClient {
|
|
|
84
84
|
};
|
|
85
85
|
// Ensure that options include all the required fields.
|
|
86
86
|
const staticMembers = this.constructor;
|
|
87
|
-
|
|
87
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
|
88
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
|
89
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
90
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
91
|
+
}
|
|
92
|
+
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';
|
|
94
|
+
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
|
95
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
88
96
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
89
97
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
90
|
-
const clientConfig = (
|
|
91
|
-
const fallback = (
|
|
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');
|
|
92
100
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
93
101
|
// Request numeric enum values if REST transport is used.
|
|
94
102
|
opts.numericEnums = true;
|
|
95
103
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
96
|
-
if (servicePath !==
|
|
104
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
97
105
|
opts['scopes'] = staticMembers.scopes;
|
|
98
106
|
}
|
|
99
107
|
// Load google-gax module synchronously if needed
|
|
@@ -111,9 +119,9 @@ class DocumentServiceClient {
|
|
|
111
119
|
// Set useJWTAccessWithScope on the auth object.
|
|
112
120
|
this.auth.useJWTAccessWithScope = true;
|
|
113
121
|
// Set defaultServicePath on the auth object.
|
|
114
|
-
this.auth.defaultServicePath =
|
|
122
|
+
this.auth.defaultServicePath = this._servicePath;
|
|
115
123
|
// Set the default scopes in auth client if needed.
|
|
116
|
-
if (servicePath ===
|
|
124
|
+
if (servicePath === this._servicePath) {
|
|
117
125
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
118
126
|
}
|
|
119
127
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
@@ -332,19 +340,38 @@ class DocumentServiceClient {
|
|
|
332
340
|
}
|
|
333
341
|
/**
|
|
334
342
|
* The DNS address for this API service.
|
|
343
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
335
344
|
* @returns {string} The DNS address for this service.
|
|
336
345
|
*/
|
|
337
346
|
static get servicePath() {
|
|
347
|
+
if (typeof process !== undefined &&
|
|
348
|
+
typeof process.emitWarning === 'function') {
|
|
349
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
350
|
+
}
|
|
338
351
|
return 'discoveryengine.googleapis.com';
|
|
339
352
|
}
|
|
340
353
|
/**
|
|
341
|
-
* The DNS address for this API service - same as servicePath
|
|
342
|
-
*
|
|
354
|
+
* The DNS address for this API service - same as servicePath.
|
|
355
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
343
356
|
* @returns {string} The DNS address for this service.
|
|
344
357
|
*/
|
|
345
358
|
static get apiEndpoint() {
|
|
359
|
+
if (typeof process !== undefined &&
|
|
360
|
+
typeof process.emitWarning === 'function') {
|
|
361
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
362
|
+
}
|
|
346
363
|
return 'discoveryengine.googleapis.com';
|
|
347
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* The DNS address for this API service.
|
|
367
|
+
* @returns {string} The DNS address for this service.
|
|
368
|
+
*/
|
|
369
|
+
get apiEndpoint() {
|
|
370
|
+
return this._servicePath;
|
|
371
|
+
}
|
|
372
|
+
get universeDomain() {
|
|
373
|
+
return this._universeDomain;
|
|
374
|
+
}
|
|
348
375
|
/**
|
|
349
376
|
* The port for this API service.
|
|
350
377
|
* @returns {number} The default port for this service.
|
|
@@ -17,6 +17,8 @@ export declare class EngineServiceClient {
|
|
|
17
17
|
private _gaxGrpc;
|
|
18
18
|
private _protos;
|
|
19
19
|
private _defaults;
|
|
20
|
+
private _universeDomain;
|
|
21
|
+
private _servicePath;
|
|
20
22
|
auth: gax.GoogleAuth;
|
|
21
23
|
descriptors: Descriptors;
|
|
22
24
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -87,15 +89,22 @@ export declare class EngineServiceClient {
|
|
|
87
89
|
}>;
|
|
88
90
|
/**
|
|
89
91
|
* The DNS address for this API service.
|
|
92
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
90
93
|
* @returns {string} The DNS address for this service.
|
|
91
94
|
*/
|
|
92
95
|
static get servicePath(): string;
|
|
93
96
|
/**
|
|
94
|
-
* The DNS address for this API service - same as servicePath
|
|
95
|
-
*
|
|
97
|
+
* The DNS address for this API service - same as servicePath.
|
|
98
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
96
99
|
* @returns {string} The DNS address for this service.
|
|
97
100
|
*/
|
|
98
101
|
static get apiEndpoint(): string;
|
|
102
|
+
/**
|
|
103
|
+
* The DNS address for this API service.
|
|
104
|
+
* @returns {string} The DNS address for this service.
|
|
105
|
+
*/
|
|
106
|
+
get apiEndpoint(): string;
|
|
107
|
+
get universeDomain(): string;
|
|
99
108
|
/**
|
|
100
109
|
* The port for this API service.
|
|
101
110
|
* @returns {number} The default port for this service.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -73,7 +73,7 @@ class EngineServiceClient {
|
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
75
|
constructor(opts, gaxInstance) {
|
|
76
|
-
var _a, _b;
|
|
76
|
+
var _a, _b, _c, _d;
|
|
77
77
|
this._terminated = false;
|
|
78
78
|
this.descriptors = {
|
|
79
79
|
page: {},
|
|
@@ -83,16 +83,24 @@ class EngineServiceClient {
|
|
|
83
83
|
};
|
|
84
84
|
// Ensure that options include all the required fields.
|
|
85
85
|
const staticMembers = this.constructor;
|
|
86
|
-
|
|
86
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
|
87
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
|
88
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
89
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
90
|
+
}
|
|
91
|
+
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';
|
|
93
|
+
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
|
94
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
87
95
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
88
96
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
89
|
-
const clientConfig = (
|
|
90
|
-
const fallback = (
|
|
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');
|
|
91
99
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
92
100
|
// Request numeric enum values if REST transport is used.
|
|
93
101
|
opts.numericEnums = true;
|
|
94
102
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
95
|
-
if (servicePath !==
|
|
103
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
96
104
|
opts['scopes'] = staticMembers.scopes;
|
|
97
105
|
}
|
|
98
106
|
// Load google-gax module synchronously if needed
|
|
@@ -110,9 +118,9 @@ class EngineServiceClient {
|
|
|
110
118
|
// Set useJWTAccessWithScope on the auth object.
|
|
111
119
|
this.auth.useJWTAccessWithScope = true;
|
|
112
120
|
// Set defaultServicePath on the auth object.
|
|
113
|
-
this.auth.defaultServicePath =
|
|
121
|
+
this.auth.defaultServicePath = this._servicePath;
|
|
114
122
|
// Set the default scopes in auth client if needed.
|
|
115
|
-
if (servicePath ===
|
|
123
|
+
if (servicePath === this._servicePath) {
|
|
116
124
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
117
125
|
}
|
|
118
126
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
@@ -334,19 +342,38 @@ class EngineServiceClient {
|
|
|
334
342
|
}
|
|
335
343
|
/**
|
|
336
344
|
* The DNS address for this API service.
|
|
345
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
337
346
|
* @returns {string} The DNS address for this service.
|
|
338
347
|
*/
|
|
339
348
|
static get servicePath() {
|
|
349
|
+
if (typeof process !== undefined &&
|
|
350
|
+
typeof process.emitWarning === 'function') {
|
|
351
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
352
|
+
}
|
|
340
353
|
return 'discoveryengine.googleapis.com';
|
|
341
354
|
}
|
|
342
355
|
/**
|
|
343
|
-
* The DNS address for this API service - same as servicePath
|
|
344
|
-
*
|
|
356
|
+
* The DNS address for this API service - same as servicePath.
|
|
357
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
345
358
|
* @returns {string} The DNS address for this service.
|
|
346
359
|
*/
|
|
347
360
|
static get apiEndpoint() {
|
|
361
|
+
if (typeof process !== undefined &&
|
|
362
|
+
typeof process.emitWarning === 'function') {
|
|
363
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
364
|
+
}
|
|
348
365
|
return 'discoveryengine.googleapis.com';
|
|
349
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* The DNS address for this API service.
|
|
369
|
+
* @returns {string} The DNS address for this service.
|
|
370
|
+
*/
|
|
371
|
+
get apiEndpoint() {
|
|
372
|
+
return this._servicePath;
|
|
373
|
+
}
|
|
374
|
+
get universeDomain() {
|
|
375
|
+
return this._universeDomain;
|
|
376
|
+
}
|
|
350
377
|
/**
|
|
351
378
|
* The port for this API service.
|
|
352
379
|
* @returns {number} The default port for this service.
|
|
@@ -14,6 +14,8 @@ export declare class RecommendationServiceClient {
|
|
|
14
14
|
private _gaxGrpc;
|
|
15
15
|
private _protos;
|
|
16
16
|
private _defaults;
|
|
17
|
+
private _universeDomain;
|
|
18
|
+
private _servicePath;
|
|
17
19
|
auth: gax.GoogleAuth;
|
|
18
20
|
descriptors: Descriptors;
|
|
19
21
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -83,15 +85,22 @@ export declare class RecommendationServiceClient {
|
|
|
83
85
|
}>;
|
|
84
86
|
/**
|
|
85
87
|
* The DNS address for this API service.
|
|
88
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
86
89
|
* @returns {string} The DNS address for this service.
|
|
87
90
|
*/
|
|
88
91
|
static get servicePath(): string;
|
|
89
92
|
/**
|
|
90
|
-
* The DNS address for this API service - same as servicePath
|
|
91
|
-
*
|
|
93
|
+
* The DNS address for this API service - same as servicePath.
|
|
94
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
92
95
|
* @returns {string} The DNS address for this service.
|
|
93
96
|
*/
|
|
94
97
|
static get apiEndpoint(): string;
|
|
98
|
+
/**
|
|
99
|
+
* The DNS address for this API service.
|
|
100
|
+
* @returns {string} The DNS address for this service.
|
|
101
|
+
*/
|
|
102
|
+
get apiEndpoint(): string;
|
|
103
|
+
get universeDomain(): string;
|
|
95
104
|
/**
|
|
96
105
|
* The port for this API service.
|
|
97
106
|
* @returns {number} The default port for this service.
|