@google-cloud/discoveryengine 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -14,6 +14,8 @@ export declare class UserEventServiceClient {
|
|
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;
|
@@ -84,15 +86,22 @@ export declare class UserEventServiceClient {
|
|
84
86
|
}>;
|
85
87
|
/**
|
86
88
|
* The DNS address for this API service.
|
89
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
87
90
|
* @returns {string} The DNS address for this service.
|
88
91
|
*/
|
89
92
|
static get servicePath(): string;
|
90
93
|
/**
|
91
|
-
* The DNS address for this API service - same as servicePath
|
92
|
-
*
|
94
|
+
* The DNS address for this API service - same as servicePath.
|
95
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
93
96
|
* @returns {string} The DNS address for this service.
|
94
97
|
*/
|
95
98
|
static get apiEndpoint(): string;
|
99
|
+
/**
|
100
|
+
* The DNS address for this API service.
|
101
|
+
* @returns {string} The DNS address for this service.
|
102
|
+
*/
|
103
|
+
get apiEndpoint(): string;
|
104
|
+
get universeDomain(): string;
|
96
105
|
/**
|
97
106
|
* The port for this API service.
|
98
107
|
* @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 UserEventServiceClient {
|
|
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: {},
|
@@ -82,16 +82,24 @@ class UserEventServiceClient {
|
|
82
82
|
};
|
83
83
|
// Ensure that options include all the required fields.
|
84
84
|
const staticMembers = this.constructor;
|
85
|
-
|
85
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
86
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
87
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
88
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
89
|
+
}
|
90
|
+
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';
|
92
|
+
this._servicePath = 'discoveryengine.' + this._universeDomain;
|
93
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
86
94
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
87
95
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
88
|
-
const clientConfig = (
|
89
|
-
const fallback = (
|
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');
|
90
98
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
91
99
|
// Request numeric enum values if REST transport is used.
|
92
100
|
opts.numericEnums = true;
|
93
101
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
94
|
-
if (servicePath !==
|
102
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
95
103
|
opts['scopes'] = staticMembers.scopes;
|
96
104
|
}
|
97
105
|
// Load google-gax module synchronously if needed
|
@@ -109,9 +117,9 @@ class UserEventServiceClient {
|
|
109
117
|
// Set useJWTAccessWithScope on the auth object.
|
110
118
|
this.auth.useJWTAccessWithScope = true;
|
111
119
|
// Set defaultServicePath on the auth object.
|
112
|
-
this.auth.defaultServicePath =
|
120
|
+
this.auth.defaultServicePath = this._servicePath;
|
113
121
|
// Set the default scopes in auth client if needed.
|
114
|
-
if (servicePath ===
|
122
|
+
if (servicePath === this._servicePath) {
|
115
123
|
this.auth.defaultScopes = staticMembers.scopes;
|
116
124
|
}
|
117
125
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
@@ -317,19 +325,38 @@ class UserEventServiceClient {
|
|
317
325
|
}
|
318
326
|
/**
|
319
327
|
* The DNS address for this API service.
|
328
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
320
329
|
* @returns {string} The DNS address for this service.
|
321
330
|
*/
|
322
331
|
static get servicePath() {
|
332
|
+
if (typeof process !== undefined &&
|
333
|
+
typeof process.emitWarning === 'function') {
|
334
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
335
|
+
}
|
323
336
|
return 'discoveryengine.googleapis.com';
|
324
337
|
}
|
325
338
|
/**
|
326
|
-
* The DNS address for this API service - same as servicePath
|
327
|
-
*
|
339
|
+
* The DNS address for this API service - same as servicePath.
|
340
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
328
341
|
* @returns {string} The DNS address for this service.
|
329
342
|
*/
|
330
343
|
static get apiEndpoint() {
|
344
|
+
if (typeof process !== undefined &&
|
345
|
+
typeof process.emitWarning === 'function') {
|
346
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
347
|
+
}
|
331
348
|
return 'discoveryengine.googleapis.com';
|
332
349
|
}
|
350
|
+
/**
|
351
|
+
* The DNS address for this API service.
|
352
|
+
* @returns {string} The DNS address for this service.
|
353
|
+
*/
|
354
|
+
get apiEndpoint() {
|
355
|
+
return this._servicePath;
|
356
|
+
}
|
357
|
+
get universeDomain() {
|
358
|
+
return this._universeDomain;
|
359
|
+
}
|
333
360
|
/**
|
334
361
|
* The port for this API service.
|
335
362
|
* @returns {number} The default port for this service.
|