@google-cloud/discoveryengine 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +202 -0
  3. package/README.md +209 -0
  4. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +93 -0
  5. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +77 -0
  6. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +261 -0
  7. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +265 -0
  8. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +182 -0
  9. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +453 -0
  10. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +122 -0
  11. package/build/protos/protos.d.ts +10120 -0
  12. package/build/protos/protos.js +26118 -0
  13. package/build/protos/protos.json +2682 -0
  14. package/build/src/index.d.ts +17 -0
  15. package/build/src/index.js +37 -0
  16. package/build/src/index.js.map +1 -0
  17. package/build/src/v1beta/document_service_client.d.ts +684 -0
  18. package/build/src/v1beta/document_service_client.js +830 -0
  19. package/build/src/v1beta/document_service_client.js.map +1 -0
  20. package/build/src/v1beta/document_service_client_config.json +77 -0
  21. package/build/src/v1beta/index.d.ts +3 -0
  22. package/build/src/v1beta/index.js +27 -0
  23. package/build/src/v1beta/index.js.map +1 -0
  24. package/build/src/v1beta/recommendation_service_client.d.ts +307 -0
  25. package/build/src/v1beta/recommendation_service_client.js +407 -0
  26. package/build/src/v1beta/recommendation_service_client.js.map +1 -0
  27. package/build/src/v1beta/recommendation_service_client_config.json +43 -0
  28. package/build/src/v1beta/user_event_service_client.d.ts +445 -0
  29. package/build/src/v1beta/user_event_service_client.js +628 -0
  30. package/build/src/v1beta/user_event_service_client.js.map +1 -0
  31. package/build/src/v1beta/user_event_service_client_config.json +62 -0
  32. package/package.json +66 -0
@@ -0,0 +1,407 @@
1
+ "use strict";
2
+ // Copyright 2022 Google LLC
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // ** This file is automatically generated by gapic-generator-typescript. **
17
+ // ** https://github.com/googleapis/gapic-generator-typescript **
18
+ // ** All changes to this file may be overwritten. **
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.RecommendationServiceClient = void 0;
21
+ const jsonProtos = require("../../protos/protos.json");
22
+ /**
23
+ * Client JSON configuration object, loaded from
24
+ * `src/v1beta/recommendation_service_client_config.json`.
25
+ * This file defines retry strategy and timeouts for all API methods in this library.
26
+ */
27
+ const gapicConfig = require("./recommendation_service_client_config.json");
28
+ const version = require('../../../package.json').version;
29
+ /**
30
+ * Service for making recommendations.
31
+ * @class
32
+ * @memberof v1beta
33
+ */
34
+ class RecommendationServiceClient {
35
+ /**
36
+ * Construct an instance of RecommendationServiceClient.
37
+ *
38
+ * @param {object} [options] - The configuration object.
39
+ * The options accepted by the constructor are described in detail
40
+ * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
41
+ * The common options are:
42
+ * @param {object} [options.credentials] - Credentials object.
43
+ * @param {string} [options.credentials.client_email]
44
+ * @param {string} [options.credentials.private_key]
45
+ * @param {string} [options.email] - Account email address. Required when
46
+ * using a .pem or .p12 keyFilename.
47
+ * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
48
+ * .p12 key downloaded from the Google Developers Console. If you provide
49
+ * a path to a JSON file, the projectId option below is not necessary.
50
+ * NOTE: .pem and .p12 require you to specify options.email as well.
51
+ * @param {number} [options.port] - The port on which to connect to
52
+ * the remote host.
53
+ * @param {string} [options.projectId] - The project ID from the Google
54
+ * Developer's Console, e.g. 'grape-spaceship-123'. We will also check
55
+ * the environment variable GCLOUD_PROJECT for your project ID. If your
56
+ * app is running in an environment which supports
57
+ * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials},
58
+ * your project ID will be detected automatically.
59
+ * @param {string} [options.apiEndpoint] - The domain name of the
60
+ * API remote host.
61
+ * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
62
+ * Follows the structure of {@link gapicConfig}.
63
+ * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
64
+ * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
65
+ * For more information, please check the
66
+ * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
67
+ * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
68
+ * need to avoid loading the default gRPC version and want to use the fallback
69
+ * HTTP implementation. Load only fallback version and pass it to the constructor:
70
+ * ```
71
+ * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
72
+ * const client = new RecommendationServiceClient({fallback: 'rest'}, gax);
73
+ * ```
74
+ */
75
+ constructor(opts, gaxInstance) {
76
+ var _a, _b;
77
+ this._terminated = false;
78
+ this.descriptors = {
79
+ page: {},
80
+ stream: {},
81
+ longrunning: {},
82
+ batching: {},
83
+ };
84
+ // Ensure that options include all the required fields.
85
+ const staticMembers = this
86
+ .constructor;
87
+ const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
88
+ this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
89
+ const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
90
+ const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
91
+ const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
92
+ opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
93
+ // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
94
+ if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) {
95
+ opts['scopes'] = staticMembers.scopes;
96
+ }
97
+ // Load google-gax module synchronously if needed
98
+ if (!gaxInstance) {
99
+ gaxInstance = require('google-gax');
100
+ }
101
+ // Choose either gRPC or proto-over-HTTP implementation of google-gax.
102
+ this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance;
103
+ // Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
104
+ this._gaxGrpc = new this._gaxModule.GrpcClient(opts);
105
+ // Save options to use in initialize() method.
106
+ this._opts = opts;
107
+ // Save the auth object to the client, for use by other methods.
108
+ this.auth = this._gaxGrpc.auth;
109
+ // Set useJWTAccessWithScope on the auth object.
110
+ this.auth.useJWTAccessWithScope = true;
111
+ // Set defaultServicePath on the auth object.
112
+ this.auth.defaultServicePath = staticMembers.servicePath;
113
+ // Set the default scopes in auth client if needed.
114
+ if (servicePath === staticMembers.servicePath) {
115
+ this.auth.defaultScopes = staticMembers.scopes;
116
+ }
117
+ // Determine the client header string.
118
+ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
119
+ if (typeof process !== 'undefined' && 'versions' in process) {
120
+ clientHeader.push(`gl-node/${process.versions.node}`);
121
+ }
122
+ else {
123
+ clientHeader.push(`gl-web/${this._gaxModule.version}`);
124
+ }
125
+ if (!opts.fallback) {
126
+ clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
127
+ }
128
+ else if (opts.fallback === 'rest') {
129
+ clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
130
+ }
131
+ if (opts.libName && opts.libVersion) {
132
+ clientHeader.push(`${opts.libName}/${opts.libVersion}`);
133
+ }
134
+ // Load the applicable protos.
135
+ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos);
136
+ // This API contains "path templates"; forward-slash-separated
137
+ // identifiers to uniquely identify resources within the API.
138
+ // Create useful helper objects for these.
139
+ this.pathTemplates = {
140
+ documentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
141
+ servingConfigPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}'),
142
+ };
143
+ // Put together the default options sent with requests.
144
+ this._defaults = this._gaxGrpc.constructSettings('google.cloud.discoveryengine.v1beta.RecommendationService', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
145
+ // Set up a dictionary of "inner API calls"; the core implementation
146
+ // of calling the API is handled in `google-gax`, with this code
147
+ // merely providing the destination and request information.
148
+ this.innerApiCalls = {};
149
+ // Add a warn function to the client constructor so it can be easily tested.
150
+ this.warn = this._gaxModule.warn;
151
+ }
152
+ /**
153
+ * Initialize the client.
154
+ * Performs asynchronous operations (such as authentication) and prepares the client.
155
+ * This function will be called automatically when any class method is called for the
156
+ * first time, but if you need to initialize it before calling an actual method,
157
+ * feel free to call initialize() directly.
158
+ *
159
+ * You can await on this method if you want to make sure the client is initialized.
160
+ *
161
+ * @returns {Promise} A promise that resolves to an authenticated service stub.
162
+ */
163
+ initialize() {
164
+ // If the client stub promise is already initialized, return immediately.
165
+ if (this.recommendationServiceStub) {
166
+ return this.recommendationServiceStub;
167
+ }
168
+ // Put together the "service stub" for
169
+ // google.cloud.discoveryengine.v1beta.RecommendationService.
170
+ this.recommendationServiceStub = this._gaxGrpc.createStub(this._opts.fallback
171
+ ? this._protos.lookupService('google.cloud.discoveryengine.v1beta.RecommendationService')
172
+ : // eslint-disable-next-line @typescript-eslint/no-explicit-any
173
+ this._protos.google.cloud.discoveryengine.v1beta
174
+ .RecommendationService, this._opts, this._providedCustomServicePath);
175
+ // Iterate over each of the methods that the service provides
176
+ // and create an API call method for each.
177
+ const recommendationServiceStubMethods = ['recommend'];
178
+ for (const methodName of recommendationServiceStubMethods) {
179
+ const callPromise = this.recommendationServiceStub.then(stub => (...args) => {
180
+ if (this._terminated) {
181
+ return Promise.reject('The client has already been closed.');
182
+ }
183
+ const func = stub[methodName];
184
+ return func.apply(stub, args);
185
+ }, (err) => () => {
186
+ throw err;
187
+ });
188
+ const descriptor = undefined;
189
+ const apiCall = this._gaxModule.createApiCall(callPromise, this._defaults[methodName], descriptor, this._opts.fallback);
190
+ this.innerApiCalls[methodName] = apiCall;
191
+ }
192
+ return this.recommendationServiceStub;
193
+ }
194
+ /**
195
+ * The DNS address for this API service.
196
+ * @returns {string} The DNS address for this service.
197
+ */
198
+ static get servicePath() {
199
+ return 'discoveryengine.googleapis.com';
200
+ }
201
+ /**
202
+ * The DNS address for this API service - same as servicePath(),
203
+ * exists for compatibility reasons.
204
+ * @returns {string} The DNS address for this service.
205
+ */
206
+ static get apiEndpoint() {
207
+ return 'discoveryengine.googleapis.com';
208
+ }
209
+ /**
210
+ * The port for this API service.
211
+ * @returns {number} The default port for this service.
212
+ */
213
+ static get port() {
214
+ return 443;
215
+ }
216
+ /**
217
+ * The scopes needed to make gRPC calls for every method defined
218
+ * in this service.
219
+ * @returns {string[]} List of default scopes.
220
+ */
221
+ static get scopes() {
222
+ return ['https://www.googleapis.com/auth/cloud-platform'];
223
+ }
224
+ /**
225
+ * Return the project ID used by this class.
226
+ * @returns {Promise} A promise that resolves to string containing the project ID.
227
+ */
228
+ getProjectId(callback) {
229
+ if (callback) {
230
+ this.auth.getProjectId(callback);
231
+ return;
232
+ }
233
+ return this.auth.getProjectId();
234
+ }
235
+ recommend(request, optionsOrCallback, callback) {
236
+ var _a;
237
+ request = request || {};
238
+ let options;
239
+ if (typeof optionsOrCallback === 'function' && callback === undefined) {
240
+ callback = optionsOrCallback;
241
+ options = {};
242
+ }
243
+ else {
244
+ options = optionsOrCallback;
245
+ }
246
+ options = options || {};
247
+ options.otherArgs = options.otherArgs || {};
248
+ options.otherArgs.headers = options.otherArgs.headers || {};
249
+ options.otherArgs.headers['x-goog-request-params'] =
250
+ this._gaxModule.routingHeader.fromParams({
251
+ serving_config: (_a = request.servingConfig) !== null && _a !== void 0 ? _a : '',
252
+ });
253
+ this.initialize();
254
+ return this.innerApiCalls.recommend(request, options, callback);
255
+ }
256
+ // --------------------
257
+ // -- Path templates --
258
+ // --------------------
259
+ /**
260
+ * Return a fully-qualified document resource name string.
261
+ *
262
+ * @param {string} project
263
+ * @param {string} location
264
+ * @param {string} data_store
265
+ * @param {string} branch
266
+ * @param {string} document
267
+ * @returns {string} Resource name string.
268
+ */
269
+ documentPath(project, location, dataStore, branch, document) {
270
+ return this.pathTemplates.documentPathTemplate.render({
271
+ project: project,
272
+ location: location,
273
+ data_store: dataStore,
274
+ branch: branch,
275
+ document: document,
276
+ });
277
+ }
278
+ /**
279
+ * Parse the project from Document resource.
280
+ *
281
+ * @param {string} documentName
282
+ * A fully-qualified path representing Document resource.
283
+ * @returns {string} A string representing the project.
284
+ */
285
+ matchProjectFromDocumentName(documentName) {
286
+ return this.pathTemplates.documentPathTemplate.match(documentName).project;
287
+ }
288
+ /**
289
+ * Parse the location from Document resource.
290
+ *
291
+ * @param {string} documentName
292
+ * A fully-qualified path representing Document resource.
293
+ * @returns {string} A string representing the location.
294
+ */
295
+ matchLocationFromDocumentName(documentName) {
296
+ return this.pathTemplates.documentPathTemplate.match(documentName).location;
297
+ }
298
+ /**
299
+ * Parse the data_store from Document resource.
300
+ *
301
+ * @param {string} documentName
302
+ * A fully-qualified path representing Document resource.
303
+ * @returns {string} A string representing the data_store.
304
+ */
305
+ matchDataStoreFromDocumentName(documentName) {
306
+ return this.pathTemplates.documentPathTemplate.match(documentName)
307
+ .data_store;
308
+ }
309
+ /**
310
+ * Parse the branch from Document resource.
311
+ *
312
+ * @param {string} documentName
313
+ * A fully-qualified path representing Document resource.
314
+ * @returns {string} A string representing the branch.
315
+ */
316
+ matchBranchFromDocumentName(documentName) {
317
+ return this.pathTemplates.documentPathTemplate.match(documentName).branch;
318
+ }
319
+ /**
320
+ * Parse the document from Document resource.
321
+ *
322
+ * @param {string} documentName
323
+ * A fully-qualified path representing Document resource.
324
+ * @returns {string} A string representing the document.
325
+ */
326
+ matchDocumentFromDocumentName(documentName) {
327
+ return this.pathTemplates.documentPathTemplate.match(documentName).document;
328
+ }
329
+ /**
330
+ * Return a fully-qualified servingConfig resource name string.
331
+ *
332
+ * @param {string} project
333
+ * @param {string} location
334
+ * @param {string} data_store
335
+ * @param {string} serving_config
336
+ * @returns {string} Resource name string.
337
+ */
338
+ servingConfigPath(project, location, dataStore, servingConfig) {
339
+ return this.pathTemplates.servingConfigPathTemplate.render({
340
+ project: project,
341
+ location: location,
342
+ data_store: dataStore,
343
+ serving_config: servingConfig,
344
+ });
345
+ }
346
+ /**
347
+ * Parse the project from ServingConfig resource.
348
+ *
349
+ * @param {string} servingConfigName
350
+ * A fully-qualified path representing ServingConfig resource.
351
+ * @returns {string} A string representing the project.
352
+ */
353
+ matchProjectFromServingConfigName(servingConfigName) {
354
+ return this.pathTemplates.servingConfigPathTemplate.match(servingConfigName)
355
+ .project;
356
+ }
357
+ /**
358
+ * Parse the location from ServingConfig resource.
359
+ *
360
+ * @param {string} servingConfigName
361
+ * A fully-qualified path representing ServingConfig resource.
362
+ * @returns {string} A string representing the location.
363
+ */
364
+ matchLocationFromServingConfigName(servingConfigName) {
365
+ return this.pathTemplates.servingConfigPathTemplate.match(servingConfigName)
366
+ .location;
367
+ }
368
+ /**
369
+ * Parse the data_store from ServingConfig resource.
370
+ *
371
+ * @param {string} servingConfigName
372
+ * A fully-qualified path representing ServingConfig resource.
373
+ * @returns {string} A string representing the data_store.
374
+ */
375
+ matchDataStoreFromServingConfigName(servingConfigName) {
376
+ return this.pathTemplates.servingConfigPathTemplate.match(servingConfigName)
377
+ .data_store;
378
+ }
379
+ /**
380
+ * Parse the serving_config from ServingConfig resource.
381
+ *
382
+ * @param {string} servingConfigName
383
+ * A fully-qualified path representing ServingConfig resource.
384
+ * @returns {string} A string representing the serving_config.
385
+ */
386
+ matchServingConfigFromServingConfigName(servingConfigName) {
387
+ return this.pathTemplates.servingConfigPathTemplate.match(servingConfigName)
388
+ .serving_config;
389
+ }
390
+ /**
391
+ * Terminate the gRPC channel and close the client.
392
+ *
393
+ * The client will no longer be usable and all future behavior is undefined.
394
+ * @returns {Promise} A promise that resolves when the client is closed.
395
+ */
396
+ close() {
397
+ if (this.recommendationServiceStub && !this._terminated) {
398
+ return this.recommendationServiceStub.then(stub => {
399
+ this._terminated = true;
400
+ stub.close();
401
+ });
402
+ }
403
+ return Promise.resolve();
404
+ }
405
+ }
406
+ exports.RecommendationServiceClient = RecommendationServiceClient;
407
+ //# sourceMappingURL=recommendation_service_client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recommendation_service_client.js","sourceRoot":"","sources":["../../../src/v1beta/recommendation_service_client.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAYrD,uDAAwD;AACxD;;;;GAIG;AACH,2EAA2E;AAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC;AAEzD;;;;GAIG;AACH,MAAa,2BAA2B;IAoBtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,YACE,IAAoB,EACpB,WAA8C;;QA7DxC,gBAAW,GAAG,KAAK,CAAC;QAQ5B,gBAAW,GAAg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C"}
@@ -0,0 +1,43 @@
1
+ {
2
+ "interfaces": {
3
+ "google.cloud.discoveryengine.v1beta.RecommendationService": {
4
+ "retry_codes": {
5
+ "non_idempotent": [],
6
+ "idempotent": [
7
+ "DEADLINE_EXCEEDED",
8
+ "UNAVAILABLE"
9
+ ],
10
+ "unavailable": [
11
+ "UNAVAILABLE"
12
+ ]
13
+ },
14
+ "retry_params": {
15
+ "default": {
16
+ "initial_retry_delay_millis": 100,
17
+ "retry_delay_multiplier": 1.3,
18
+ "max_retry_delay_millis": 60000,
19
+ "initial_rpc_timeout_millis": 60000,
20
+ "rpc_timeout_multiplier": 1,
21
+ "max_rpc_timeout_millis": 60000,
22
+ "total_timeout_millis": 600000
23
+ },
24
+ "319f27672a8be83550d842a373549dd84649a57e": {
25
+ "initial_retry_delay_millis": 100,
26
+ "retry_delay_multiplier": 1.3,
27
+ "max_retry_delay_millis": 5000,
28
+ "initial_rpc_timeout_millis": 60000,
29
+ "rpc_timeout_multiplier": 1,
30
+ "max_rpc_timeout_millis": 60000,
31
+ "total_timeout_millis": 600000
32
+ }
33
+ },
34
+ "methods": {
35
+ "Recommend": {
36
+ "timeout_millis": 5000,
37
+ "retry_codes_name": "unavailable",
38
+ "retry_params_name": "319f27672a8be83550d842a373549dd84649a57e"
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }