@google-cloud/discoveryengine 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +20 -0
- package/README.md +33 -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/v1alpha/common.proto +155 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
- 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 +22864 -6680
- package/build/protos/protos.js +57205 -16191
- package/build/protos/protos.json +5548 -1224
- package/build/src/index.d.ts +6 -1
- package/build/src/index.js +7 -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/v1alpha/completion_service_client.d.ts +603 -0
- package/build/src/v1alpha/completion_service_client.js +843 -0
- package/build/src/v1alpha/completion_service_client_config.json +43 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
- package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
- package/build/src/v1alpha/document_service_client.d.ts +1140 -0
- package/build/src/v1alpha/document_service_client.js +1393 -0
- package/build/src/v1alpha/document_service_client_config.json +82 -0
- package/build/src/v1alpha/index.d.ts +8 -0
- package/build/src/v1alpha/index.js +37 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
- package/build/src/v1alpha/recommendation_service_client.js +938 -0
- package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
- package/build/src/v1alpha/schema_service_client.d.ts +935 -0
- package/build/src/v1alpha/schema_service_client.js +1327 -0
- package/build/src/v1alpha/schema_service_client_config.json +63 -0
- package/build/src/v1alpha/search_service_client.d.ts +1208 -0
- package/build/src/v1alpha/search_service_client.js +1432 -0
- package/build/src/v1alpha/search_service_client_config.json +43 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
- package/build/src/v1alpha/user_event_service_client.js +1174 -0
- package/build/src/v1alpha/user_event_service_client_config.json +67 -0
- 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 +5 -5
@@ -61,8 +61,7 @@ class DocumentServiceClient {
|
|
61
61
|
* API remote host.
|
62
62
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
63
63
|
* Follows the structure of {@link gapicConfig}.
|
64
|
-
* @param {boolean
|
65
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
64
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
66
65
|
* For more information, please check the
|
67
66
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
68
67
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -70,7 +69,7 @@ class DocumentServiceClient {
|
|
70
69
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
71
70
|
* ```
|
72
71
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
73
|
-
* const client = new DocumentServiceClient({fallback:
|
72
|
+
* const client = new DocumentServiceClient({fallback: true}, gax);
|
74
73
|
* ```
|
75
74
|
*/
|
76
75
|
constructor(opts, gaxInstance) {
|
@@ -116,6 +115,7 @@ class DocumentServiceClient {
|
|
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 DocumentServiceClient {
|
|
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) {
|
@@ -141,9 +141,11 @@ class DocumentServiceClient {
|
|
141
141
|
this.pathTemplates = {
|
142
142
|
projectLocationCollectionDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}'),
|
143
143
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
144
|
+
projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
|
144
145
|
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
145
146
|
projectLocationDataStoreBranchPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}'),
|
146
147
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
148
|
+
projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
|
147
149
|
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
148
150
|
};
|
149
151
|
// Some of the methods on this service return "paged" results,
|
@@ -160,7 +162,7 @@ class DocumentServiceClient {
|
|
160
162
|
auth: this.auth,
|
161
163
|
grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined,
|
162
164
|
};
|
163
|
-
if (opts.fallback
|
165
|
+
if (opts.fallback) {
|
164
166
|
lroOptions.protoJson = protoFilesRoot;
|
165
167
|
lroOptions.httpRules = [
|
166
168
|
{
|
@@ -179,6 +181,15 @@ class DocumentServiceClient {
|
|
179
181
|
{
|
180
182
|
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
|
181
183
|
},
|
184
|
+
{
|
185
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
|
186
|
+
},
|
187
|
+
{
|
188
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
|
189
|
+
},
|
190
|
+
{
|
191
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
|
192
|
+
},
|
182
193
|
{
|
183
194
|
get: '/v1/{name=projects/*/locations/*/collections/*/operations/*}',
|
184
195
|
},
|
@@ -208,9 +219,18 @@ class DocumentServiceClient {
|
|
208
219
|
{
|
209
220
|
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
|
210
221
|
},
|
222
|
+
{
|
223
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
|
224
|
+
},
|
225
|
+
{
|
226
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
|
227
|
+
},
|
211
228
|
{
|
212
229
|
get: '/v1/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
|
213
230
|
},
|
231
|
+
{
|
232
|
+
get: '/v1/{name=projects/*/locations/*/collections/*/engines/*}/operations',
|
233
|
+
},
|
214
234
|
{ get: '/v1/{name=projects/*/locations/*/collections/*}/operations' },
|
215
235
|
{
|
216
236
|
get: '/v1/{name=projects/*/locations/*/dataStores/*/branches/*}/operations',
|
@@ -528,9 +548,10 @@ class DocumentServiceClient {
|
|
528
548
|
* Use `default_branch` as the branch ID, to list documents under the default
|
529
549
|
* branch.
|
530
550
|
*
|
531
|
-
* If the caller does not have permission to list
|
532
|
-
*
|
533
|
-
* `PERMISSION_DENIED`
|
551
|
+
* If the caller does not have permission to list
|
552
|
+
* {@link protos.google.cloud.discoveryengine.v1.Document|Document}s under this branch,
|
553
|
+
* regardless of whether or not this branch exists, a `PERMISSION_DENIED`
|
554
|
+
* error is returned.
|
534
555
|
* @param {number} request.pageSize
|
535
556
|
* Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
|
536
557
|
* return. If unspecified, defaults to 100. The maximum allowed value is 1000.
|
@@ -586,9 +607,10 @@ class DocumentServiceClient {
|
|
586
607
|
* Use `default_branch` as the branch ID, to list documents under the default
|
587
608
|
* branch.
|
588
609
|
*
|
589
|
-
* If the caller does not have permission to list
|
590
|
-
*
|
591
|
-
* `PERMISSION_DENIED`
|
610
|
+
* If the caller does not have permission to list
|
611
|
+
* {@link protos.google.cloud.discoveryengine.v1.Document|Document}s under this branch,
|
612
|
+
* regardless of whether or not this branch exists, a `PERMISSION_DENIED`
|
613
|
+
* error is returned.
|
592
614
|
* @param {number} request.pageSize
|
593
615
|
* Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
|
594
616
|
* return. If unspecified, defaults to 100. The maximum allowed value is 1000.
|
@@ -633,6 +655,61 @@ class DocumentServiceClient {
|
|
633
655
|
this.initialize();
|
634
656
|
return this.descriptors.page.listDocuments.asyncIterate(this.innerApiCalls['listDocuments'], request, callSettings);
|
635
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
|
+
}
|
636
713
|
/**
|
637
714
|
* Gets the latest state of a long-running operation. Clients can use this
|
638
715
|
* method to poll the operation result at intervals as recommended by the API
|
@@ -914,6 +991,75 @@ class DocumentServiceClient {
|
|
914
991
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
|
915
992
|
return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
|
916
993
|
}
|
994
|
+
/**
|
995
|
+
* Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
|
996
|
+
*
|
997
|
+
* @param {string} project
|
998
|
+
* @param {string} location
|
999
|
+
* @param {string} collection
|
1000
|
+
* @param {string} data_store
|
1001
|
+
* @param {string} conversation
|
1002
|
+
* @returns {string} Resource name string.
|
1003
|
+
*/
|
1004
|
+
projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
|
1005
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
|
1006
|
+
project: project,
|
1007
|
+
location: location,
|
1008
|
+
collection: collection,
|
1009
|
+
data_store: dataStore,
|
1010
|
+
conversation: conversation,
|
1011
|
+
});
|
1012
|
+
}
|
1013
|
+
/**
|
1014
|
+
* Parse the project from ProjectLocationCollectionDataStoreConversation resource.
|
1015
|
+
*
|
1016
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
1017
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
1018
|
+
* @returns {string} A string representing the project.
|
1019
|
+
*/
|
1020
|
+
matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
1021
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
|
1022
|
+
}
|
1023
|
+
/**
|
1024
|
+
* Parse the location from ProjectLocationCollectionDataStoreConversation resource.
|
1025
|
+
*
|
1026
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
1027
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
1028
|
+
* @returns {string} A string representing the location.
|
1029
|
+
*/
|
1030
|
+
matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
1031
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
|
1032
|
+
}
|
1033
|
+
/**
|
1034
|
+
* Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
|
1035
|
+
*
|
1036
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
1037
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
1038
|
+
* @returns {string} A string representing the collection.
|
1039
|
+
*/
|
1040
|
+
matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
1041
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
|
1042
|
+
}
|
1043
|
+
/**
|
1044
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
|
1045
|
+
*
|
1046
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
1047
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
1048
|
+
* @returns {string} A string representing the data_store.
|
1049
|
+
*/
|
1050
|
+
matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
1051
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
|
1052
|
+
}
|
1053
|
+
/**
|
1054
|
+
* Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
|
1055
|
+
*
|
1056
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
1057
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
1058
|
+
* @returns {string} A string representing the conversation.
|
1059
|
+
*/
|
1060
|
+
matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
|
1061
|
+
return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
|
1062
|
+
}
|
917
1063
|
/**
|
918
1064
|
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
919
1065
|
*
|
@@ -1109,6 +1255,63 @@ class DocumentServiceClient {
|
|
1109
1255
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
|
1110
1256
|
return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
|
1111
1257
|
}
|
1258
|
+
/**
|
1259
|
+
* Return a fully-qualified projectLocationDataStoreConversation resource name string.
|
1260
|
+
*
|
1261
|
+
* @param {string} project
|
1262
|
+
* @param {string} location
|
1263
|
+
* @param {string} data_store
|
1264
|
+
* @param {string} conversation
|
1265
|
+
* @returns {string} Resource name string.
|
1266
|
+
*/
|
1267
|
+
projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
|
1268
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
|
1269
|
+
project: project,
|
1270
|
+
location: location,
|
1271
|
+
data_store: dataStore,
|
1272
|
+
conversation: conversation,
|
1273
|
+
});
|
1274
|
+
}
|
1275
|
+
/**
|
1276
|
+
* Parse the project from ProjectLocationDataStoreConversation resource.
|
1277
|
+
*
|
1278
|
+
* @param {string} projectLocationDataStoreConversationName
|
1279
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1280
|
+
* @returns {string} A string representing the project.
|
1281
|
+
*/
|
1282
|
+
matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1283
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
|
1284
|
+
}
|
1285
|
+
/**
|
1286
|
+
* Parse the location from ProjectLocationDataStoreConversation resource.
|
1287
|
+
*
|
1288
|
+
* @param {string} projectLocationDataStoreConversationName
|
1289
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1290
|
+
* @returns {string} A string representing the location.
|
1291
|
+
*/
|
1292
|
+
matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1293
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
|
1294
|
+
}
|
1295
|
+
/**
|
1296
|
+
* Parse the data_store from ProjectLocationDataStoreConversation resource.
|
1297
|
+
*
|
1298
|
+
* @param {string} projectLocationDataStoreConversationName
|
1299
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1300
|
+
* @returns {string} A string representing the data_store.
|
1301
|
+
*/
|
1302
|
+
matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1303
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
|
1304
|
+
}
|
1305
|
+
/**
|
1306
|
+
* Parse the conversation from ProjectLocationDataStoreConversation resource.
|
1307
|
+
*
|
1308
|
+
* @param {string} projectLocationDataStoreConversationName
|
1309
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1310
|
+
* @returns {string} A string representing the conversation.
|
1311
|
+
*/
|
1312
|
+
matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
|
1313
|
+
return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
|
1314
|
+
}
|
1112
1315
|
/**
|
1113
1316
|
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
1114
1317
|
*
|
@@ -1177,6 +1380,7 @@ class DocumentServiceClient {
|
|
1177
1380
|
return this.documentServiceStub.then(stub => {
|
1178
1381
|
this._terminated = true;
|
1179
1382
|
stub.close();
|
1383
|
+
this.locationsClient.close();
|
1180
1384
|
this.operationsClient.close();
|
1181
1385
|
});
|
1182
1386
|
}
|
package/build/src/v1/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export { CompletionServiceClient } from './completion_service_client';
|
2
|
+
export { ConversationalSearchServiceClient } from './conversational_search_service_client';
|
2
3
|
export { DocumentServiceClient } from './document_service_client';
|
3
4
|
export { SchemaServiceClient } from './schema_service_client';
|
4
5
|
export { SearchServiceClient } from './search_service_client';
|
package/build/src/v1/index.js
CHANGED
@@ -17,9 +17,11 @@
|
|
17
17
|
// ** https://github.com/googleapis/gapic-generator-typescript **
|
18
18
|
// ** All changes to this file may be overwritten. **
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.UserEventServiceClient = exports.SearchServiceClient = exports.SchemaServiceClient = exports.DocumentServiceClient = exports.CompletionServiceClient = void 0;
|
20
|
+
exports.UserEventServiceClient = exports.SearchServiceClient = exports.SchemaServiceClient = exports.DocumentServiceClient = exports.ConversationalSearchServiceClient = exports.CompletionServiceClient = void 0;
|
21
21
|
var completion_service_client_1 = require("./completion_service_client");
|
22
22
|
Object.defineProperty(exports, "CompletionServiceClient", { enumerable: true, get: function () { return completion_service_client_1.CompletionServiceClient; } });
|
23
|
+
var conversational_search_service_client_1 = require("./conversational_search_service_client");
|
24
|
+
Object.defineProperty(exports, "ConversationalSearchServiceClient", { enumerable: true, get: function () { return conversational_search_service_client_1.ConversationalSearchServiceClient; } });
|
23
25
|
var document_service_client_1 = require("./document_service_client");
|
24
26
|
Object.defineProperty(exports, "DocumentServiceClient", { enumerable: true, get: function () { return document_service_client_1.DocumentServiceClient; } });
|
25
27
|
var schema_service_client_1 = require("./schema_service_client");
|
@@ -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);
|
@@ -376,6 +376,57 @@ export declare class SchemaServiceClient {
|
|
376
376
|
* region_tag:discoveryengine_v1_generated_SchemaService_ListSchemas_async
|
377
377
|
*/
|
378
378
|
listSchemasAsync(request?: protos.google.cloud.discoveryengine.v1.IListSchemasRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1.ISchema>;
|
379
|
+
/**
|
380
|
+
* Gets information about a location.
|
381
|
+
*
|
382
|
+
* @param {Object} request
|
383
|
+
* The request object that will be sent.
|
384
|
+
* @param {string} request.name
|
385
|
+
* Resource name for the location.
|
386
|
+
* @param {object} [options]
|
387
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
388
|
+
* @returns {Promise} - The promise which resolves to an array.
|
389
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
390
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
391
|
+
* for more details and examples.
|
392
|
+
* @example
|
393
|
+
* ```
|
394
|
+
* const [response] = await client.getLocation(request);
|
395
|
+
* ```
|
396
|
+
*/
|
397
|
+
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>;
|
398
|
+
/**
|
399
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
400
|
+
*
|
401
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
402
|
+
* @param {Object} request
|
403
|
+
* The request object that will be sent.
|
404
|
+
* @param {string} request.name
|
405
|
+
* The resource that owns the locations collection, if applicable.
|
406
|
+
* @param {string} request.filter
|
407
|
+
* The standard list filter.
|
408
|
+
* @param {number} request.pageSize
|
409
|
+
* The standard list page size.
|
410
|
+
* @param {string} request.pageToken
|
411
|
+
* The standard list page token.
|
412
|
+
* @param {object} [options]
|
413
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
414
|
+
* @returns {Object}
|
415
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
416
|
+
* When you iterate the returned iterable, each element will be an object representing
|
417
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
418
|
+
* so you can stop the iteration when you don't need more results.
|
419
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
420
|
+
* for more details and examples.
|
421
|
+
* @example
|
422
|
+
* ```
|
423
|
+
* const iterable = client.listLocationsAsync(request);
|
424
|
+
* for await (const response of iterable) {
|
425
|
+
* // process response
|
426
|
+
* }
|
427
|
+
* ```
|
428
|
+
*/
|
429
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
379
430
|
/**
|
380
431
|
* Gets the latest state of a long-running operation. Clients can use this
|
381
432
|
* method to poll the operation result at intervals as recommended by the API
|
@@ -598,6 +649,57 @@ export declare class SchemaServiceClient {
|
|
598
649
|
* @returns {string} A string representing the document.
|
599
650
|
*/
|
600
651
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
|
652
|
+
/**
|
653
|
+
* Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
|
654
|
+
*
|
655
|
+
* @param {string} project
|
656
|
+
* @param {string} location
|
657
|
+
* @param {string} collection
|
658
|
+
* @param {string} data_store
|
659
|
+
* @param {string} conversation
|
660
|
+
* @returns {string} Resource name string.
|
661
|
+
*/
|
662
|
+
projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;
|
663
|
+
/**
|
664
|
+
* Parse the project from ProjectLocationCollectionDataStoreConversation resource.
|
665
|
+
*
|
666
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
667
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
668
|
+
* @returns {string} A string representing the project.
|
669
|
+
*/
|
670
|
+
matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
671
|
+
/**
|
672
|
+
* Parse the location from ProjectLocationCollectionDataStoreConversation resource.
|
673
|
+
*
|
674
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
675
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
676
|
+
* @returns {string} A string representing the location.
|
677
|
+
*/
|
678
|
+
matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
679
|
+
/**
|
680
|
+
* Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
|
681
|
+
*
|
682
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
683
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
684
|
+
* @returns {string} A string representing the collection.
|
685
|
+
*/
|
686
|
+
matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
687
|
+
/**
|
688
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
|
689
|
+
*
|
690
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
691
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
692
|
+
* @returns {string} A string representing the data_store.
|
693
|
+
*/
|
694
|
+
matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
695
|
+
/**
|
696
|
+
* Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
|
697
|
+
*
|
698
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
699
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
700
|
+
* @returns {string} A string representing the conversation.
|
701
|
+
*/
|
702
|
+
matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
601
703
|
/**
|
602
704
|
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
603
705
|
*
|
@@ -733,6 +835,48 @@ export declare class SchemaServiceClient {
|
|
733
835
|
* @returns {string} A string representing the document.
|
734
836
|
*/
|
735
837
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
|
838
|
+
/**
|
839
|
+
* Return a fully-qualified projectLocationDataStoreConversation resource name string.
|
840
|
+
*
|
841
|
+
* @param {string} project
|
842
|
+
* @param {string} location
|
843
|
+
* @param {string} data_store
|
844
|
+
* @param {string} conversation
|
845
|
+
* @returns {string} Resource name string.
|
846
|
+
*/
|
847
|
+
projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;
|
848
|
+
/**
|
849
|
+
* Parse the project from ProjectLocationDataStoreConversation resource.
|
850
|
+
*
|
851
|
+
* @param {string} projectLocationDataStoreConversationName
|
852
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
853
|
+
* @returns {string} A string representing the project.
|
854
|
+
*/
|
855
|
+
matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
856
|
+
/**
|
857
|
+
* Parse the location from ProjectLocationDataStoreConversation resource.
|
858
|
+
*
|
859
|
+
* @param {string} projectLocationDataStoreConversationName
|
860
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
861
|
+
* @returns {string} A string representing the location.
|
862
|
+
*/
|
863
|
+
matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
864
|
+
/**
|
865
|
+
* Parse the data_store from ProjectLocationDataStoreConversation resource.
|
866
|
+
*
|
867
|
+
* @param {string} projectLocationDataStoreConversationName
|
868
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
869
|
+
* @returns {string} A string representing the data_store.
|
870
|
+
*/
|
871
|
+
matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
872
|
+
/**
|
873
|
+
* Parse the conversation from ProjectLocationDataStoreConversation resource.
|
874
|
+
*
|
875
|
+
* @param {string} projectLocationDataStoreConversationName
|
876
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
877
|
+
* @returns {string} A string representing the conversation.
|
878
|
+
*/
|
879
|
+
matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
736
880
|
/**
|
737
881
|
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
738
882
|
*
|