@google-cloud/discoveryengine 1.0.0 → 1.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.
- package/CHANGELOG.md +13 -0
- package/README.md +7 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
- package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
- package/build/protos/protos.d.ts +10140 -6536
- package/build/protos/protos.js +26499 -17277
- package/build/protos/protos.json +2311 -1440
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/completion_service_client.d.ts +156 -6
- package/build/src/v1/completion_service_client.js +188 -4
- package/build/src/v1/conversational_search_service_client.d.ts +947 -0
- package/build/src/v1/conversational_search_service_client.js +1205 -0
- package/build/src/v1/conversational_search_service_client_config.json +68 -0
- package/build/src/v1/document_service_client.d.ts +165 -18
- package/build/src/v1/document_service_client.js +215 -11
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/schema_service_client.d.ts +148 -4
- package/build/src/v1/schema_service_client.js +207 -5
- package/build/src/v1/search_service_client.d.ts +238 -28
- package/build/src/v1/search_service_client.js +248 -20
- package/build/src/v1/user_event_service_client.d.ts +153 -9
- package/build/src/v1/user_event_service_client.js +207 -5
- package/build/src/v1beta/completion_service_client.d.ts +55 -4
- package/build/src/v1beta/completion_service_client.js +60 -4
- package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
- package/build/src/v1beta/conversational_search_service_client.js +60 -4
- package/build/src/v1beta/document_service_client.d.ts +55 -4
- package/build/src/v1beta/document_service_client.js +61 -5
- package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
- package/build/src/v1beta/recommendation_service_client.js +60 -4
- package/build/src/v1beta/schema_service_client.d.ts +55 -4
- package/build/src/v1beta/schema_service_client.js +61 -5
- package/build/src/v1beta/search_service_client.d.ts +142 -4
- package/build/src/v1beta/search_service_client.js +118 -4
- package/build/src/v1beta/user_event_service_client.d.ts +55 -4
- package/build/src/v1beta/user_event_service_client.js +61 -5
- package/package.json +3 -3
@@ -60,8 +60,7 @@ class ConversationalSearchServiceClient {
|
|
60
60
|
* API remote host.
|
61
61
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
62
62
|
* Follows the structure of {@link gapicConfig}.
|
63
|
-
* @param {boolean
|
64
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
63
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
65
64
|
* For more information, please check the
|
66
65
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
67
66
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -69,7 +68,7 @@ class ConversationalSearchServiceClient {
|
|
69
68
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
70
69
|
* ```
|
71
70
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
72
|
-
* const client = new ConversationalSearchServiceClient({fallback:
|
71
|
+
* const client = new ConversationalSearchServiceClient({fallback: true}, gax);
|
73
72
|
* ```
|
74
73
|
*/
|
75
74
|
constructor(opts, gaxInstance) {
|
@@ -116,6 +115,7 @@ class ConversationalSearchServiceClient {
|
|
116
115
|
if (servicePath === staticMembers.servicePath) {
|
117
116
|
this.auth.defaultScopes = staticMembers.scopes;
|
118
117
|
}
|
118
|
+
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
119
119
|
// Determine the client header string.
|
120
120
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
121
121
|
if (typeof process !== 'undefined' && 'versions' in process) {
|
@@ -127,7 +127,7 @@ class ConversationalSearchServiceClient {
|
|
127
127
|
if (!opts.fallback) {
|
128
128
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
129
129
|
}
|
130
|
-
else
|
130
|
+
else {
|
131
131
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
132
132
|
}
|
133
133
|
if (opts.libName && opts.libVersion) {
|
@@ -496,6 +496,61 @@ class ConversationalSearchServiceClient {
|
|
496
496
|
this.initialize();
|
497
497
|
return this.descriptors.page.listConversations.asyncIterate(this.innerApiCalls['listConversations'], request, callSettings);
|
498
498
|
}
|
499
|
+
/**
|
500
|
+
* Gets information about a location.
|
501
|
+
*
|
502
|
+
* @param {Object} request
|
503
|
+
* The request object that will be sent.
|
504
|
+
* @param {string} request.name
|
505
|
+
* Resource name for the location.
|
506
|
+
* @param {object} [options]
|
507
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
508
|
+
* @returns {Promise} - The promise which resolves to an array.
|
509
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
510
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
511
|
+
* for more details and examples.
|
512
|
+
* @example
|
513
|
+
* ```
|
514
|
+
* const [response] = await client.getLocation(request);
|
515
|
+
* ```
|
516
|
+
*/
|
517
|
+
getLocation(request, options, callback) {
|
518
|
+
return this.locationsClient.getLocation(request, options, callback);
|
519
|
+
}
|
520
|
+
/**
|
521
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
522
|
+
*
|
523
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
524
|
+
* @param {Object} request
|
525
|
+
* The request object that will be sent.
|
526
|
+
* @param {string} request.name
|
527
|
+
* The resource that owns the locations collection, if applicable.
|
528
|
+
* @param {string} request.filter
|
529
|
+
* The standard list filter.
|
530
|
+
* @param {number} request.pageSize
|
531
|
+
* The standard list page size.
|
532
|
+
* @param {string} request.pageToken
|
533
|
+
* The standard list page token.
|
534
|
+
* @param {object} [options]
|
535
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
536
|
+
* @returns {Object}
|
537
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
538
|
+
* When you iterate the returned iterable, each element will be an object representing
|
539
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
540
|
+
* so you can stop the iteration when you don't need more results.
|
541
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
542
|
+
* for more details and examples.
|
543
|
+
* @example
|
544
|
+
* ```
|
545
|
+
* const iterable = client.listLocationsAsync(request);
|
546
|
+
* for await (const response of iterable) {
|
547
|
+
* // process response
|
548
|
+
* }
|
549
|
+
* ```
|
550
|
+
*/
|
551
|
+
listLocationsAsync(request, options) {
|
552
|
+
return this.locationsClient.listLocationsAsync(request, options);
|
553
|
+
}
|
499
554
|
// --------------------
|
500
555
|
// -- Path templates --
|
501
556
|
// --------------------
|
@@ -1140,6 +1195,7 @@ class ConversationalSearchServiceClient {
|
|
1140
1195
|
return this.conversationalSearchServiceStub.then(stub => {
|
1141
1196
|
this._terminated = true;
|
1142
1197
|
stub.close();
|
1198
|
+
this.locationsClient.close();
|
1143
1199
|
});
|
1144
1200
|
}
|
1145
1201
|
return Promise.resolve();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import type * as gax from 'google-gax';
|
3
|
-
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
|
3
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
|
4
4
|
import { Transform } from 'stream';
|
5
5
|
import * as protos from '../../protos/protos';
|
6
6
|
/**
|
@@ -24,6 +24,7 @@ export declare class DocumentServiceClient {
|
|
24
24
|
innerApiCalls: {
|
25
25
|
[name: string]: Function;
|
26
26
|
};
|
27
|
+
locationsClient: LocationsClient;
|
27
28
|
pathTemplates: {
|
28
29
|
[name: string]: gax.PathTemplate;
|
29
30
|
};
|
@@ -59,8 +60,7 @@ export declare class DocumentServiceClient {
|
|
59
60
|
* API remote host.
|
60
61
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
61
62
|
* Follows the structure of {@link gapicConfig}.
|
62
|
-
* @param {boolean
|
63
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
63
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
64
64
|
* For more information, please check the
|
65
65
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
66
66
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -68,7 +68,7 @@ export declare class DocumentServiceClient {
|
|
68
68
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
69
69
|
* ```
|
70
70
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
71
|
-
* const client = new DocumentServiceClient({fallback:
|
71
|
+
* const client = new DocumentServiceClient({fallback: true}, gax);
|
72
72
|
* ```
|
73
73
|
*/
|
74
74
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
@@ -566,6 +566,57 @@ export declare class DocumentServiceClient {
|
|
566
566
|
* region_tag:discoveryengine_v1beta_generated_DocumentService_ListDocuments_async
|
567
567
|
*/
|
568
568
|
listDocumentsAsync(request?: protos.google.cloud.discoveryengine.v1beta.IListDocumentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.IDocument>;
|
569
|
+
/**
|
570
|
+
* Gets information about a location.
|
571
|
+
*
|
572
|
+
* @param {Object} request
|
573
|
+
* The request object that will be sent.
|
574
|
+
* @param {string} request.name
|
575
|
+
* Resource name for the location.
|
576
|
+
* @param {object} [options]
|
577
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
578
|
+
* @returns {Promise} - The promise which resolves to an array.
|
579
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
580
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
581
|
+
* for more details and examples.
|
582
|
+
* @example
|
583
|
+
* ```
|
584
|
+
* const [response] = await client.getLocation(request);
|
585
|
+
* ```
|
586
|
+
*/
|
587
|
+
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
588
|
+
/**
|
589
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
590
|
+
*
|
591
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
592
|
+
* @param {Object} request
|
593
|
+
* The request object that will be sent.
|
594
|
+
* @param {string} request.name
|
595
|
+
* The resource that owns the locations collection, if applicable.
|
596
|
+
* @param {string} request.filter
|
597
|
+
* The standard list filter.
|
598
|
+
* @param {number} request.pageSize
|
599
|
+
* The standard list page size.
|
600
|
+
* @param {string} request.pageToken
|
601
|
+
* The standard list page token.
|
602
|
+
* @param {object} [options]
|
603
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
604
|
+
* @returns {Object}
|
605
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
606
|
+
* When you iterate the returned iterable, each element will be an object representing
|
607
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
608
|
+
* so you can stop the iteration when you don't need more results.
|
609
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
610
|
+
* for more details and examples.
|
611
|
+
* @example
|
612
|
+
* ```
|
613
|
+
* const iterable = client.listLocationsAsync(request);
|
614
|
+
* for await (const response of iterable) {
|
615
|
+
* // process response
|
616
|
+
* }
|
617
|
+
* ```
|
618
|
+
*/
|
619
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
569
620
|
/**
|
570
621
|
* Gets the latest state of a long-running operation. Clients can use this
|
571
622
|
* method to poll the operation result at intervals as recommended by the API
|
@@ -62,8 +62,7 @@ class DocumentServiceClient {
|
|
62
62
|
* API remote host.
|
63
63
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
64
64
|
* Follows the structure of {@link gapicConfig}.
|
65
|
-
* @param {boolean
|
66
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
65
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
67
66
|
* For more information, please check the
|
68
67
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
69
68
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -71,7 +70,7 @@ class DocumentServiceClient {
|
|
71
70
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
72
71
|
* ```
|
73
72
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
74
|
-
* const client = new DocumentServiceClient({fallback:
|
73
|
+
* const client = new DocumentServiceClient({fallback: true}, gax);
|
75
74
|
* ```
|
76
75
|
*/
|
77
76
|
constructor(opts, gaxInstance) {
|
@@ -117,6 +116,7 @@ class DocumentServiceClient {
|
|
117
116
|
if (servicePath === staticMembers.servicePath) {
|
118
117
|
this.auth.defaultScopes = staticMembers.scopes;
|
119
118
|
}
|
119
|
+
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
120
120
|
// Determine the client header string.
|
121
121
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
122
122
|
if (typeof process !== 'undefined' && 'versions' in process) {
|
@@ -128,7 +128,7 @@ class DocumentServiceClient {
|
|
128
128
|
if (!opts.fallback) {
|
129
129
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
130
130
|
}
|
131
|
-
else
|
131
|
+
else {
|
132
132
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
133
133
|
}
|
134
134
|
if (opts.libName && opts.libVersion) {
|
@@ -163,7 +163,7 @@ class DocumentServiceClient {
|
|
163
163
|
auth: this.auth,
|
164
164
|
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
165
165
|
};
|
166
|
-
if (opts.fallback
|
166
|
+
if (opts.fallback) {
|
167
167
|
lroOptions.protoJson = protoFilesRoot;
|
168
168
|
lroOptions.httpRules = [
|
169
169
|
{
|
@@ -655,6 +655,61 @@ class DocumentServiceClient {
|
|
655
655
|
this.initialize();
|
656
656
|
return this.descriptors.page.listDocuments.asyncIterate(this.innerApiCalls['listDocuments'], request, callSettings);
|
657
657
|
}
|
658
|
+
/**
|
659
|
+
* Gets information about a location.
|
660
|
+
*
|
661
|
+
* @param {Object} request
|
662
|
+
* The request object that will be sent.
|
663
|
+
* @param {string} request.name
|
664
|
+
* Resource name for the location.
|
665
|
+
* @param {object} [options]
|
666
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
667
|
+
* @returns {Promise} - The promise which resolves to an array.
|
668
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
669
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
670
|
+
* for more details and examples.
|
671
|
+
* @example
|
672
|
+
* ```
|
673
|
+
* const [response] = await client.getLocation(request);
|
674
|
+
* ```
|
675
|
+
*/
|
676
|
+
getLocation(request, options, callback) {
|
677
|
+
return this.locationsClient.getLocation(request, options, callback);
|
678
|
+
}
|
679
|
+
/**
|
680
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
681
|
+
*
|
682
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
683
|
+
* @param {Object} request
|
684
|
+
* The request object that will be sent.
|
685
|
+
* @param {string} request.name
|
686
|
+
* The resource that owns the locations collection, if applicable.
|
687
|
+
* @param {string} request.filter
|
688
|
+
* The standard list filter.
|
689
|
+
* @param {number} request.pageSize
|
690
|
+
* The standard list page size.
|
691
|
+
* @param {string} request.pageToken
|
692
|
+
* The standard list page token.
|
693
|
+
* @param {object} [options]
|
694
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
695
|
+
* @returns {Object}
|
696
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
697
|
+
* When you iterate the returned iterable, each element will be an object representing
|
698
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
699
|
+
* so you can stop the iteration when you don't need more results.
|
700
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
701
|
+
* for more details and examples.
|
702
|
+
* @example
|
703
|
+
* ```
|
704
|
+
* const iterable = client.listLocationsAsync(request);
|
705
|
+
* for await (const response of iterable) {
|
706
|
+
* // process response
|
707
|
+
* }
|
708
|
+
* ```
|
709
|
+
*/
|
710
|
+
listLocationsAsync(request, options) {
|
711
|
+
return this.locationsClient.listLocationsAsync(request, options);
|
712
|
+
}
|
658
713
|
/**
|
659
714
|
* Gets the latest state of a long-running operation. Clients can use this
|
660
715
|
* method to poll the operation result at intervals as recommended by the API
|
@@ -1325,6 +1380,7 @@ class DocumentServiceClient {
|
|
1325
1380
|
return this.documentServiceStub.then(stub => {
|
1326
1381
|
this._terminated = true;
|
1327
1382
|
stub.close();
|
1383
|
+
this.locationsClient.close();
|
1328
1384
|
this.operationsClient.close();
|
1329
1385
|
});
|
1330
1386
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type * as gax from 'google-gax';
|
2
|
-
import type { Callback, CallOptions, Descriptors, ClientOptions } from 'google-gax';
|
2
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, LocationsClient, LocationProtos } from 'google-gax';
|
3
3
|
import * as protos from '../../protos/protos';
|
4
4
|
/**
|
5
5
|
* Service for making recommendations.
|
@@ -20,6 +20,7 @@ export declare class RecommendationServiceClient {
|
|
20
20
|
innerApiCalls: {
|
21
21
|
[name: string]: Function;
|
22
22
|
};
|
23
|
+
locationsClient: LocationsClient;
|
23
24
|
pathTemplates: {
|
24
25
|
[name: string]: gax.PathTemplate;
|
25
26
|
};
|
@@ -54,8 +55,7 @@ export declare class RecommendationServiceClient {
|
|
54
55
|
* API remote host.
|
55
56
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
56
57
|
* Follows the structure of {@link gapicConfig}.
|
57
|
-
* @param {boolean
|
58
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
58
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
59
59
|
* For more information, please check the
|
60
60
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
61
61
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -63,7 +63,7 @@ export declare class RecommendationServiceClient {
|
|
63
63
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
64
64
|
* ```
|
65
65
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
66
|
-
* const client = new RecommendationServiceClient({fallback:
|
66
|
+
* const client = new RecommendationServiceClient({fallback: true}, gax);
|
67
67
|
* ```
|
68
68
|
*/
|
69
69
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
@@ -222,6 +222,57 @@ export declare class RecommendationServiceClient {
|
|
222
222
|
]>;
|
223
223
|
recommend(request: protos.google.cloud.discoveryengine.v1beta.IRecommendRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IRecommendResponse, protos.google.cloud.discoveryengine.v1beta.IRecommendRequest | null | undefined, {} | null | undefined>): void;
|
224
224
|
recommend(request: protos.google.cloud.discoveryengine.v1beta.IRecommendRequest, callback: Callback<protos.google.cloud.discoveryengine.v1beta.IRecommendResponse, protos.google.cloud.discoveryengine.v1beta.IRecommendRequest | null | undefined, {} | null | undefined>): void;
|
225
|
+
/**
|
226
|
+
* Gets information about a location.
|
227
|
+
*
|
228
|
+
* @param {Object} request
|
229
|
+
* The request object that will be sent.
|
230
|
+
* @param {string} request.name
|
231
|
+
* Resource name for the location.
|
232
|
+
* @param {object} [options]
|
233
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
234
|
+
* @returns {Promise} - The promise which resolves to an array.
|
235
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
236
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
237
|
+
* for more details and examples.
|
238
|
+
* @example
|
239
|
+
* ```
|
240
|
+
* const [response] = await client.getLocation(request);
|
241
|
+
* ```
|
242
|
+
*/
|
243
|
+
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
244
|
+
/**
|
245
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
246
|
+
*
|
247
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
248
|
+
* @param {Object} request
|
249
|
+
* The request object that will be sent.
|
250
|
+
* @param {string} request.name
|
251
|
+
* The resource that owns the locations collection, if applicable.
|
252
|
+
* @param {string} request.filter
|
253
|
+
* The standard list filter.
|
254
|
+
* @param {number} request.pageSize
|
255
|
+
* The standard list page size.
|
256
|
+
* @param {string} request.pageToken
|
257
|
+
* The standard list page token.
|
258
|
+
* @param {object} [options]
|
259
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
260
|
+
* @returns {Object}
|
261
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
262
|
+
* When you iterate the returned iterable, each element will be an object representing
|
263
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
264
|
+
* so you can stop the iteration when you don't need more results.
|
265
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
266
|
+
* for more details and examples.
|
267
|
+
* @example
|
268
|
+
* ```
|
269
|
+
* const iterable = client.listLocationsAsync(request);
|
270
|
+
* for await (const response of iterable) {
|
271
|
+
* // process response
|
272
|
+
* }
|
273
|
+
* ```
|
274
|
+
*/
|
275
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
225
276
|
/**
|
226
277
|
* Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
|
227
278
|
*
|
@@ -60,8 +60,7 @@ class RecommendationServiceClient {
|
|
60
60
|
* API remote host.
|
61
61
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
62
62
|
* Follows the structure of {@link gapicConfig}.
|
63
|
-
* @param {boolean
|
64
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
63
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
65
64
|
* For more information, please check the
|
66
65
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
67
66
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -69,7 +68,7 @@ class RecommendationServiceClient {
|
|
69
68
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
70
69
|
* ```
|
71
70
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
72
|
-
* const client = new RecommendationServiceClient({fallback:
|
71
|
+
* const client = new RecommendationServiceClient({fallback: true}, gax);
|
73
72
|
* ```
|
74
73
|
*/
|
75
74
|
constructor(opts, gaxInstance) {
|
@@ -116,6 +115,7 @@ class RecommendationServiceClient {
|
|
116
115
|
if (servicePath === staticMembers.servicePath) {
|
117
116
|
this.auth.defaultScopes = staticMembers.scopes;
|
118
117
|
}
|
118
|
+
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
119
119
|
// Determine the client header string.
|
120
120
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
121
121
|
if (typeof process !== 'undefined' && 'versions' in process) {
|
@@ -127,7 +127,7 @@ class RecommendationServiceClient {
|
|
127
127
|
if (!opts.fallback) {
|
128
128
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
129
129
|
}
|
130
|
-
else
|
130
|
+
else {
|
131
131
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
132
132
|
}
|
133
133
|
if (opts.libName && opts.libVersion) {
|
@@ -261,6 +261,61 @@ class RecommendationServiceClient {
|
|
261
261
|
this.initialize();
|
262
262
|
return this.innerApiCalls.recommend(request, options, callback);
|
263
263
|
}
|
264
|
+
/**
|
265
|
+
* Gets information about a location.
|
266
|
+
*
|
267
|
+
* @param {Object} request
|
268
|
+
* The request object that will be sent.
|
269
|
+
* @param {string} request.name
|
270
|
+
* Resource name for the location.
|
271
|
+
* @param {object} [options]
|
272
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
273
|
+
* @returns {Promise} - The promise which resolves to an array.
|
274
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
275
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
276
|
+
* for more details and examples.
|
277
|
+
* @example
|
278
|
+
* ```
|
279
|
+
* const [response] = await client.getLocation(request);
|
280
|
+
* ```
|
281
|
+
*/
|
282
|
+
getLocation(request, options, callback) {
|
283
|
+
return this.locationsClient.getLocation(request, options, callback);
|
284
|
+
}
|
285
|
+
/**
|
286
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
287
|
+
*
|
288
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
289
|
+
* @param {Object} request
|
290
|
+
* The request object that will be sent.
|
291
|
+
* @param {string} request.name
|
292
|
+
* The resource that owns the locations collection, if applicable.
|
293
|
+
* @param {string} request.filter
|
294
|
+
* The standard list filter.
|
295
|
+
* @param {number} request.pageSize
|
296
|
+
* The standard list page size.
|
297
|
+
* @param {string} request.pageToken
|
298
|
+
* The standard list page token.
|
299
|
+
* @param {object} [options]
|
300
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
301
|
+
* @returns {Object}
|
302
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
303
|
+
* When you iterate the returned iterable, each element will be an object representing
|
304
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
305
|
+
* so you can stop the iteration when you don't need more results.
|
306
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
307
|
+
* for more details and examples.
|
308
|
+
* @example
|
309
|
+
* ```
|
310
|
+
* const iterable = client.listLocationsAsync(request);
|
311
|
+
* for await (const response of iterable) {
|
312
|
+
* // process response
|
313
|
+
* }
|
314
|
+
* ```
|
315
|
+
*/
|
316
|
+
listLocationsAsync(request, options) {
|
317
|
+
return this.locationsClient.listLocationsAsync(request, options);
|
318
|
+
}
|
264
319
|
// --------------------
|
265
320
|
// -- Path templates --
|
266
321
|
// --------------------
|
@@ -803,6 +858,7 @@ class RecommendationServiceClient {
|
|
803
858
|
return this.recommendationServiceStub.then(stub => {
|
804
859
|
this._terminated = true;
|
805
860
|
stub.close();
|
861
|
+
this.locationsClient.close();
|
806
862
|
});
|
807
863
|
}
|
808
864
|
return Promise.resolve();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import type * as gax from 'google-gax';
|
3
|
-
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
|
3
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
|
4
4
|
import { Transform } from 'stream';
|
5
5
|
import * as protos from '../../protos/protos';
|
6
6
|
/**
|
@@ -22,6 +22,7 @@ export declare class SchemaServiceClient {
|
|
22
22
|
innerApiCalls: {
|
23
23
|
[name: string]: Function;
|
24
24
|
};
|
25
|
+
locationsClient: LocationsClient;
|
25
26
|
pathTemplates: {
|
26
27
|
[name: string]: gax.PathTemplate;
|
27
28
|
};
|
@@ -57,8 +58,7 @@ export declare class SchemaServiceClient {
|
|
57
58
|
* API remote host.
|
58
59
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
59
60
|
* Follows the structure of {@link gapicConfig}.
|
60
|
-
* @param {boolean
|
61
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
61
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
62
62
|
* For more information, please check the
|
63
63
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
64
64
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -66,7 +66,7 @@ export declare class SchemaServiceClient {
|
|
66
66
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
67
67
|
* ```
|
68
68
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
69
|
-
* const client = new SchemaServiceClient({fallback:
|
69
|
+
* const client = new SchemaServiceClient({fallback: true}, gax);
|
70
70
|
* ```
|
71
71
|
*/
|
72
72
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
@@ -379,6 +379,57 @@ export declare class SchemaServiceClient {
|
|
379
379
|
* region_tag:discoveryengine_v1beta_generated_SchemaService_ListSchemas_async
|
380
380
|
*/
|
381
381
|
listSchemasAsync(request?: protos.google.cloud.discoveryengine.v1beta.IListSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.ISchema>;
|
382
|
+
/**
|
383
|
+
* Gets information about a location.
|
384
|
+
*
|
385
|
+
* @param {Object} request
|
386
|
+
* The request object that will be sent.
|
387
|
+
* @param {string} request.name
|
388
|
+
* Resource name for the location.
|
389
|
+
* @param {object} [options]
|
390
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
391
|
+
* @returns {Promise} - The promise which resolves to an array.
|
392
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
393
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
394
|
+
* for more details and examples.
|
395
|
+
* @example
|
396
|
+
* ```
|
397
|
+
* const [response] = await client.getLocation(request);
|
398
|
+
* ```
|
399
|
+
*/
|
400
|
+
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
401
|
+
/**
|
402
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
403
|
+
*
|
404
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
405
|
+
* @param {Object} request
|
406
|
+
* The request object that will be sent.
|
407
|
+
* @param {string} request.name
|
408
|
+
* The resource that owns the locations collection, if applicable.
|
409
|
+
* @param {string} request.filter
|
410
|
+
* The standard list filter.
|
411
|
+
* @param {number} request.pageSize
|
412
|
+
* The standard list page size.
|
413
|
+
* @param {string} request.pageToken
|
414
|
+
* The standard list page token.
|
415
|
+
* @param {object} [options]
|
416
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
417
|
+
* @returns {Object}
|
418
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
419
|
+
* When you iterate the returned iterable, each element will be an object representing
|
420
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
421
|
+
* so you can stop the iteration when you don't need more results.
|
422
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
423
|
+
* for more details and examples.
|
424
|
+
* @example
|
425
|
+
* ```
|
426
|
+
* const iterable = client.listLocationsAsync(request);
|
427
|
+
* for await (const response of iterable) {
|
428
|
+
* // process response
|
429
|
+
* }
|
430
|
+
* ```
|
431
|
+
*/
|
432
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
382
433
|
/**
|
383
434
|
* Gets the latest state of a long-running operation. Clients can use this
|
384
435
|
* method to poll the operation result at intervals as recommended by the API
|