@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 UserEventServiceClient {
|
|
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 UserEventServiceClient {
|
|
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 UserEventServiceClient({fallback:
|
71
|
+
* const client = new UserEventServiceClient({fallback: true}, gax);
|
73
72
|
* ```
|
74
73
|
*/
|
75
74
|
constructor(opts, gaxInstance) {
|
@@ -115,6 +114,7 @@ class UserEventServiceClient {
|
|
115
114
|
if (servicePath === staticMembers.servicePath) {
|
116
115
|
this.auth.defaultScopes = staticMembers.scopes;
|
117
116
|
}
|
117
|
+
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
118
118
|
// Determine the client header string.
|
119
119
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
120
120
|
if (typeof process !== 'undefined' && 'versions' in process) {
|
@@ -126,7 +126,7 @@ class UserEventServiceClient {
|
|
126
126
|
if (!opts.fallback) {
|
127
127
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
128
128
|
}
|
129
|
-
else
|
129
|
+
else {
|
130
130
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
131
131
|
}
|
132
132
|
if (opts.libName && opts.libVersion) {
|
@@ -140,9 +140,11 @@ class UserEventServiceClient {
|
|
140
140
|
this.pathTemplates = {
|
141
141
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
142
142
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
143
|
+
projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
|
143
144
|
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
144
145
|
projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
|
145
146
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
147
|
+
projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
|
146
148
|
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
147
149
|
};
|
148
150
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
@@ -153,7 +155,7 @@ class UserEventServiceClient {
|
|
153
155
|
auth: this.auth,
|
154
156
|
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
155
157
|
};
|
156
|
-
if (opts.fallback
|
158
|
+
if (opts.fallback) {
|
157
159
|
lroOptions.protoJson = protoFilesRoot;
|
158
160
|
lroOptions.httpRules = [
|
159
161
|
{
|
@@ -172,6 +174,15 @@ class UserEventServiceClient {
|
|
172
174
|
{
|
173
175
|
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
174
176
|
},
|
177
|
+
{
|
178
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
179
|
+
},
|
180
|
+
{
|
181
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
182
|
+
},
|
183
|
+
{
|
184
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
185
|
+
},
|
175
186
|
{
|
176
187
|
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
177
188
|
},
|
@@ -201,9 +212,18 @@ class UserEventServiceClient {
|
|
201
212
|
{
|
202
213
|
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
203
214
|
},
|
215
|
+
{
|
216
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
217
|
+
},
|
218
|
+
{
|
219
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
220
|
+
},
|
204
221
|
{
|
205
222
|
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
206
223
|
},
|
224
|
+
{
|
225
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
226
|
+
},
|
207
227
|
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
208
228
|
{
|
209
229
|
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
@@ -402,6 +422,61 @@ class UserEventServiceClient {
|
|
402
422
|
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importUserEvents, this._gaxModule.createDefaultBackoffSettings());
|
403
423
|
return decodeOperation;
|
404
424
|
}
|
425
|
+
/**
|
426
|
+
* Gets information about a location.
|
427
|
+
*
|
428
|
+
* @param {Object} request
|
429
|
+
* The request object that will be sent.
|
430
|
+
* @param {string} request.name
|
431
|
+
* Resource name for the location.
|
432
|
+
* @param {object} [options]
|
433
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
434
|
+
* @returns {Promise} - The promise which resolves to an array.
|
435
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
436
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
437
|
+
* for more details and examples.
|
438
|
+
* @example
|
439
|
+
* ```
|
440
|
+
* const [response] = await client.getLocation(request);
|
441
|
+
* ```
|
442
|
+
*/
|
443
|
+
getLocation(request, options, callback) {
|
444
|
+
return this.locationsClient.getLocation(request, options, callback);
|
445
|
+
}
|
446
|
+
/**
|
447
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
448
|
+
*
|
449
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
450
|
+
* @param {Object} request
|
451
|
+
* The request object that will be sent.
|
452
|
+
* @param {string} request.name
|
453
|
+
* The resource that owns the locations collection, if applicable.
|
454
|
+
* @param {string} request.filter
|
455
|
+
* The standard list filter.
|
456
|
+
* @param {number} request.pageSize
|
457
|
+
* The standard list page size.
|
458
|
+
* @param {string} request.pageToken
|
459
|
+
* The standard list page token.
|
460
|
+
* @param {object} [options]
|
461
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
462
|
+
* @returns {Object}
|
463
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
464
|
+
* When you iterate the returned iterable, each element will be an object representing
|
465
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
466
|
+
* so you can stop the iteration when you don't need more results.
|
467
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
468
|
+
* for more details and examples.
|
469
|
+
* @example
|
470
|
+
* ```
|
471
|
+
* const iterable = client.listLocationsAsync(request);
|
472
|
+
* for await (const response of iterable) {
|
473
|
+
* // process response
|
474
|
+
* }
|
475
|
+
* ```
|
476
|
+
*/
|
477
|
+
listLocationsAsync(request, options) {
|
478
|
+
return this.locationsClient.listLocationsAsync(request, options);
|
479
|
+
}
|
405
480
|
/**
|
406
481
|
* Gets the latest state of a long-running operation. Clients can use this
|
407
482
|
* method to poll the operation result at intervals as recommended by the API
|
@@ -671,6 +746,75 @@ class UserEventServiceClient {
|
|
671
746
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
|
672
747
|
return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
|
673
748
|
}
|
749
|
+
/**
|
750
|
+
* Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
|
751
|
+
*
|
752
|
+
* @param {string} project
|
753
|
+
* @param {string} location
|
754
|
+
* @param {string} collection
|
755
|
+
* @param {string} data_store
|
756
|
+
* @param {string} conversation
|
757
|
+
* @returns {string} Resource name string.
|
758
|
+
*/
|
759
|
+
projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
|
760
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
|
761
|
+
project: project,
|
762
|
+
location: location,
|
763
|
+
collection: collection,
|
764
|
+
data_store: dataStore,
|
765
|
+
conversation: conversation,
|
766
|
+
});
|
767
|
+
}
|
768
|
+
/**
|
769
|
+
* Parse the project from ProjectLocationCollectionDataStoreConversation resource.
|
770
|
+
*
|
771
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
772
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
773
|
+
* @returns {string} A string representing the project.
|
774
|
+
*/
|
775
|
+
matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
776
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
|
777
|
+
}
|
778
|
+
/**
|
779
|
+
* Parse the location from ProjectLocationCollectionDataStoreConversation resource.
|
780
|
+
*
|
781
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
782
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
783
|
+
* @returns {string} A string representing the location.
|
784
|
+
*/
|
785
|
+
matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
786
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
|
787
|
+
}
|
788
|
+
/**
|
789
|
+
* Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
|
790
|
+
*
|
791
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
792
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
793
|
+
* @returns {string} A string representing the collection.
|
794
|
+
*/
|
795
|
+
matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
796
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
|
797
|
+
}
|
798
|
+
/**
|
799
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
|
800
|
+
*
|
801
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
802
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
803
|
+
* @returns {string} A string representing the data_store.
|
804
|
+
*/
|
805
|
+
matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
806
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
|
807
|
+
}
|
808
|
+
/**
|
809
|
+
* Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
|
810
|
+
*
|
811
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
812
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
813
|
+
* @returns {string} A string representing the conversation.
|
814
|
+
*/
|
815
|
+
matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
816
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
|
817
|
+
}
|
674
818
|
/**
|
675
819
|
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
676
820
|
*
|
@@ -854,6 +998,63 @@ class UserEventServiceClient {
|
|
854
998
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
|
855
999
|
return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
|
856
1000
|
}
|
1001
|
+
/**
|
1002
|
+
* Return a fully-qualified projectLocationDataStoreConversation resource name string.
|
1003
|
+
*
|
1004
|
+
* @param {string} project
|
1005
|
+
* @param {string} location
|
1006
|
+
* @param {string} data_store
|
1007
|
+
* @param {string} conversation
|
1008
|
+
* @returns {string} Resource name string.
|
1009
|
+
*/
|
1010
|
+
projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
|
1011
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
|
1012
|
+
project: project,
|
1013
|
+
location: location,
|
1014
|
+
data_store: dataStore,
|
1015
|
+
conversation: conversation,
|
1016
|
+
});
|
1017
|
+
}
|
1018
|
+
/**
|
1019
|
+
* Parse the project from ProjectLocationDataStoreConversation resource.
|
1020
|
+
*
|
1021
|
+
* @param {string} projectLocationDataStoreConversationName
|
1022
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1023
|
+
* @returns {string} A string representing the project.
|
1024
|
+
*/
|
1025
|
+
matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1026
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
|
1027
|
+
}
|
1028
|
+
/**
|
1029
|
+
* Parse the location from ProjectLocationDataStoreConversation resource.
|
1030
|
+
*
|
1031
|
+
* @param {string} projectLocationDataStoreConversationName
|
1032
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1033
|
+
* @returns {string} A string representing the location.
|
1034
|
+
*/
|
1035
|
+
matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1036
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
|
1037
|
+
}
|
1038
|
+
/**
|
1039
|
+
* Parse the data_store from ProjectLocationDataStoreConversation resource.
|
1040
|
+
*
|
1041
|
+
* @param {string} projectLocationDataStoreConversationName
|
1042
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1043
|
+
* @returns {string} A string representing the data_store.
|
1044
|
+
*/
|
1045
|
+
matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1046
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
|
1047
|
+
}
|
1048
|
+
/**
|
1049
|
+
* Parse the conversation from ProjectLocationDataStoreConversation resource.
|
1050
|
+
*
|
1051
|
+
* @param {string} projectLocationDataStoreConversationName
|
1052
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1053
|
+
* @returns {string} A string representing the conversation.
|
1054
|
+
*/
|
1055
|
+
matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1056
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
|
1057
|
+
}
|
857
1058
|
/**
|
858
1059
|
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
859
1060
|
*
|
@@ -922,6 +1123,7 @@ class UserEventServiceClient {
|
|
922
1123
|
return this.userEventServiceStub.then(stub => {
|
923
1124
|
this._terminated = true;
|
924
1125
|
stub.close();
|
1126
|
+
this.locationsClient.close();
|
925
1127
|
this.operationsClient.close();
|
926
1128
|
});
|
927
1129
|
}
|
@@ -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 Auto-Completion.
|
@@ -20,6 +20,7 @@ export declare class CompletionServiceClient {
|
|
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 CompletionServiceClient {
|
|
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 CompletionServiceClient {
|
|
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 CompletionServiceClient({fallback:
|
66
|
+
* const client = new CompletionServiceClient({fallback: true}, gax);
|
67
67
|
* ```
|
68
68
|
*/
|
69
69
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
@@ -171,6 +171,57 @@ export declare class CompletionServiceClient {
|
|
171
171
|
]>;
|
172
172
|
completeQuery(request: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, options: CallOptions, callback: Callback<protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest | null | undefined, {} | null | undefined>): void;
|
173
173
|
completeQuery(request: protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest, callback: Callback<protos.google.cloud.discoveryengine.v1beta.ICompleteQueryResponse, protos.google.cloud.discoveryengine.v1beta.ICompleteQueryRequest | null | undefined, {} | null | undefined>): void;
|
174
|
+
/**
|
175
|
+
* Gets information about a location.
|
176
|
+
*
|
177
|
+
* @param {Object} request
|
178
|
+
* The request object that will be sent.
|
179
|
+
* @param {string} request.name
|
180
|
+
* Resource name for the location.
|
181
|
+
* @param {object} [options]
|
182
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
183
|
+
* @returns {Promise} - The promise which resolves to an array.
|
184
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
185
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
186
|
+
* for more details and examples.
|
187
|
+
* @example
|
188
|
+
* ```
|
189
|
+
* const [response] = await client.getLocation(request);
|
190
|
+
* ```
|
191
|
+
*/
|
192
|
+
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>;
|
193
|
+
/**
|
194
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
195
|
+
*
|
196
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
197
|
+
* @param {Object} request
|
198
|
+
* The request object that will be sent.
|
199
|
+
* @param {string} request.name
|
200
|
+
* The resource that owns the locations collection, if applicable.
|
201
|
+
* @param {string} request.filter
|
202
|
+
* The standard list filter.
|
203
|
+
* @param {number} request.pageSize
|
204
|
+
* The standard list page size.
|
205
|
+
* @param {string} request.pageToken
|
206
|
+
* The standard list page token.
|
207
|
+
* @param {object} [options]
|
208
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
209
|
+
* @returns {Object}
|
210
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
211
|
+
* When you iterate the returned iterable, each element will be an object representing
|
212
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
213
|
+
* so you can stop the iteration when you don't need more results.
|
214
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
215
|
+
* for more details and examples.
|
216
|
+
* @example
|
217
|
+
* ```
|
218
|
+
* const iterable = client.listLocationsAsync(request);
|
219
|
+
* for await (const response of iterable) {
|
220
|
+
* // process response
|
221
|
+
* }
|
222
|
+
* ```
|
223
|
+
*/
|
224
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
174
225
|
/**
|
175
226
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
176
227
|
*
|
@@ -60,8 +60,7 @@ class CompletionServiceClient {
|
|
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 CompletionServiceClient {
|
|
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 CompletionServiceClient({fallback:
|
71
|
+
* const client = new CompletionServiceClient({fallback: true}, gax);
|
73
72
|
* ```
|
74
73
|
*/
|
75
74
|
constructor(opts, gaxInstance) {
|
@@ -115,6 +114,7 @@ class CompletionServiceClient {
|
|
115
114
|
if (servicePath === staticMembers.servicePath) {
|
116
115
|
this.auth.defaultScopes = staticMembers.scopes;
|
117
116
|
}
|
117
|
+
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
118
118
|
// Determine the client header string.
|
119
119
|
const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];
|
120
120
|
if (typeof process !== 'undefined' && 'versions' in process) {
|
@@ -126,7 +126,7 @@ class CompletionServiceClient {
|
|
126
126
|
if (!opts.fallback) {
|
127
127
|
clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
|
128
128
|
}
|
129
|
-
else
|
129
|
+
else {
|
130
130
|
clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
|
131
131
|
}
|
132
132
|
if (opts.libName && opts.libVersion) {
|
@@ -260,6 +260,61 @@ class CompletionServiceClient {
|
|
260
260
|
this.initialize();
|
261
261
|
return this.innerApiCalls.completeQuery(request, options, callback);
|
262
262
|
}
|
263
|
+
/**
|
264
|
+
* Gets information about a location.
|
265
|
+
*
|
266
|
+
* @param {Object} request
|
267
|
+
* The request object that will be sent.
|
268
|
+
* @param {string} request.name
|
269
|
+
* Resource name for the location.
|
270
|
+
* @param {object} [options]
|
271
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
272
|
+
* @returns {Promise} - The promise which resolves to an array.
|
273
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
274
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
275
|
+
* for more details and examples.
|
276
|
+
* @example
|
277
|
+
* ```
|
278
|
+
* const [response] = await client.getLocation(request);
|
279
|
+
* ```
|
280
|
+
*/
|
281
|
+
getLocation(request, options, callback) {
|
282
|
+
return this.locationsClient.getLocation(request, options, callback);
|
283
|
+
}
|
284
|
+
/**
|
285
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
286
|
+
*
|
287
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
288
|
+
* @param {Object} request
|
289
|
+
* The request object that will be sent.
|
290
|
+
* @param {string} request.name
|
291
|
+
* The resource that owns the locations collection, if applicable.
|
292
|
+
* @param {string} request.filter
|
293
|
+
* The standard list filter.
|
294
|
+
* @param {number} request.pageSize
|
295
|
+
* The standard list page size.
|
296
|
+
* @param {string} request.pageToken
|
297
|
+
* The standard list page token.
|
298
|
+
* @param {object} [options]
|
299
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
300
|
+
* @returns {Object}
|
301
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
302
|
+
* When you iterate the returned iterable, each element will be an object representing
|
303
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
304
|
+
* so you can stop the iteration when you don't need more results.
|
305
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
306
|
+
* for more details and examples.
|
307
|
+
* @example
|
308
|
+
* ```
|
309
|
+
* const iterable = client.listLocationsAsync(request);
|
310
|
+
* for await (const response of iterable) {
|
311
|
+
* // process response
|
312
|
+
* }
|
313
|
+
* ```
|
314
|
+
*/
|
315
|
+
listLocationsAsync(request, options) {
|
316
|
+
return this.locationsClient.listLocationsAsync(request, options);
|
317
|
+
}
|
263
318
|
// --------------------
|
264
319
|
// -- Path templates --
|
265
320
|
// --------------------
|
@@ -778,6 +833,7 @@ class CompletionServiceClient {
|
|
778
833
|
return this.completionServiceStub.then(stub => {
|
779
834
|
this._terminated = true;
|
780
835
|
stub.close();
|
836
|
+
this.locationsClient.close();
|
781
837
|
});
|
782
838
|
}
|
783
839
|
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, PaginationCallback } from 'google-gax';
|
3
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, 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 ConversationalSearchServiceClient {
|
|
22
22
|
innerApiCalls: {
|
23
23
|
[name: string]: Function;
|
24
24
|
};
|
25
|
+
locationsClient: LocationsClient;
|
25
26
|
pathTemplates: {
|
26
27
|
[name: string]: gax.PathTemplate;
|
27
28
|
};
|
@@ -56,8 +57,7 @@ export declare class ConversationalSearchServiceClient {
|
|
56
57
|
* API remote host.
|
57
58
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
58
59
|
* Follows the structure of {@link gapicConfig}.
|
59
|
-
* @param {boolean
|
60
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
60
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
61
61
|
* For more information, please check the
|
62
62
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
63
63
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -65,7 +65,7 @@ export declare class ConversationalSearchServiceClient {
|
|
65
65
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
66
66
|
* ```
|
67
67
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
68
|
-
* const client = new ConversationalSearchServiceClient({fallback:
|
68
|
+
* const client = new ConversationalSearchServiceClient({fallback: true}, gax);
|
69
69
|
* ```
|
70
70
|
*/
|
71
71
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
@@ -131,6 +131,26 @@ export declare class ConversationalSearchServiceClient {
|
|
131
131
|
* session.
|
132
132
|
* @param {boolean} request.safeSearch
|
133
133
|
* Whether to turn on safe search.
|
134
|
+
* @param {number[]} request.userLabels
|
135
|
+
* The user labels applied to a resource must meet the following requirements:
|
136
|
+
*
|
137
|
+
* * Each resource can have multiple labels, up to a maximum of 64.
|
138
|
+
* * Each label must be a key-value pair.
|
139
|
+
* * Keys have a minimum length of 1 character and a maximum length of 63
|
140
|
+
* characters and cannot be empty. Values can be empty and have a maximum
|
141
|
+
* length of 63 characters.
|
142
|
+
* * Keys and values can contain only lowercase letters, numeric characters,
|
143
|
+
* underscores, and dashes. All characters must use UTF-8 encoding, and
|
144
|
+
* international characters are allowed.
|
145
|
+
* * The key portion of a label must be unique. However, you can use the same
|
146
|
+
* key with multiple resources.
|
147
|
+
* * Keys must start with a lowercase letter or international character.
|
148
|
+
*
|
149
|
+
* See [Google Cloud
|
150
|
+
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
151
|
+
* for more details.
|
152
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec} request.summarySpec
|
153
|
+
* A specification for configuring the summary returned in the response.
|
134
154
|
* @param {object} [options]
|
135
155
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
136
156
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -401,6 +421,57 @@ export declare class ConversationalSearchServiceClient {
|
|
401
421
|
* region_tag:discoveryengine_v1beta_generated_ConversationalSearchService_ListConversations_async
|
402
422
|
*/
|
403
423
|
listConversationsAsync(request?: protos.google.cloud.discoveryengine.v1beta.IListConversationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.IConversation>;
|
424
|
+
/**
|
425
|
+
* Gets information about a location.
|
426
|
+
*
|
427
|
+
* @param {Object} request
|
428
|
+
* The request object that will be sent.
|
429
|
+
* @param {string} request.name
|
430
|
+
* Resource name for the location.
|
431
|
+
* @param {object} [options]
|
432
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
433
|
+
* @returns {Promise} - The promise which resolves to an array.
|
434
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
435
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
436
|
+
* for more details and examples.
|
437
|
+
* @example
|
438
|
+
* ```
|
439
|
+
* const [response] = await client.getLocation(request);
|
440
|
+
* ```
|
441
|
+
*/
|
442
|
+
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>;
|
443
|
+
/**
|
444
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
445
|
+
*
|
446
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
447
|
+
* @param {Object} request
|
448
|
+
* The request object that will be sent.
|
449
|
+
* @param {string} request.name
|
450
|
+
* The resource that owns the locations collection, if applicable.
|
451
|
+
* @param {string} request.filter
|
452
|
+
* The standard list filter.
|
453
|
+
* @param {number} request.pageSize
|
454
|
+
* The standard list page size.
|
455
|
+
* @param {string} request.pageToken
|
456
|
+
* The standard list page token.
|
457
|
+
* @param {object} [options]
|
458
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
459
|
+
* @returns {Object}
|
460
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
461
|
+
* When you iterate the returned iterable, each element will be an object representing
|
462
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
463
|
+
* so you can stop the iteration when you don't need more results.
|
464
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
465
|
+
* for more details and examples.
|
466
|
+
* @example
|
467
|
+
* ```
|
468
|
+
* const iterable = client.listLocationsAsync(request);
|
469
|
+
* for await (const response of iterable) {
|
470
|
+
* // process response
|
471
|
+
* }
|
472
|
+
* ```
|
473
|
+
*/
|
474
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
404
475
|
/**
|
405
476
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
406
477
|
*
|