@google-cloud/discoveryengine 3.0.0 → 3.2.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/build/protos/google/cloud/discoveryengine/v1/assistant_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/assistant_service.proto +19 -0
- package/build/protos/protos.d.ts +406 -0
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +64 -0
- package/build/src/v1/assistant_service_client.d.ts +2 -0
- package/build/src/v1/assistant_service_client.js +6 -4
- package/build/src/v1/cmek_config_service_client.js +9 -13
- package/build/src/v1/completion_service_client.js +10 -14
- package/build/src/v1/control_service_client.js +10 -10
- package/build/src/v1/conversational_search_service_client.js +21 -21
- package/build/src/v1/data_store_service_client.js +12 -16
- package/build/src/v1/document_service_client.js +15 -19
- package/build/src/v1/engine_service_client.js +12 -16
- package/build/src/v1/grounded_generation_service_client.js +6 -6
- package/build/src/v1/identity_mapping_store_service_client.js +16 -20
- package/build/src/v1/project_service_client.js +6 -10
- package/build/src/v1/rank_service_client.js +4 -4
- package/build/src/v1/recommendation_service_client.js +4 -4
- package/build/src/v1/schema_service_client.js +12 -16
- package/build/src/v1/search_service_client.js +9 -9
- package/build/src/v1/search_tuning_service_client.js +7 -11
- package/build/src/v1/serving_config_service_client.js +4 -4
- package/build/src/v1/session_service_client.js +10 -10
- package/build/src/v1/site_search_engine_service_client.js +24 -28
- package/build/src/v1/user_event_service_client.js +9 -13
- package/build/src/v1/user_license_service_client.js +9 -13
- package/build/src/v1alpha/acl_config_service_client.js +5 -5
- package/build/src/v1alpha/chunk_service_client.js +7 -7
- package/build/src/v1alpha/completion_service_client.js +8 -8
- package/build/src/v1alpha/control_service_client.js +10 -10
- package/build/src/v1alpha/conversational_search_service_client.js +20 -20
- package/build/src/v1alpha/data_store_service_client.js +12 -12
- package/build/src/v1alpha/document_service_client.js +14 -14
- package/build/src/v1alpha/engine_service_client.js +13 -13
- package/build/src/v1alpha/estimate_billing_service_client.js +4 -4
- package/build/src/v1alpha/evaluation_service_client.js +11 -11
- package/build/src/v1alpha/grounded_generation_service_client.js +4 -4
- package/build/src/v1alpha/project_service_client.js +6 -6
- package/build/src/v1alpha/rank_service_client.js +4 -4
- package/build/src/v1alpha/recommendation_service_client.js +4 -4
- package/build/src/v1alpha/sample_query_service_client.js +11 -11
- package/build/src/v1alpha/sample_query_set_service_client.js +10 -10
- package/build/src/v1alpha/schema_service_client.js +10 -10
- package/build/src/v1alpha/search_service_client.js +6 -6
- package/build/src/v1alpha/search_tuning_service_client.js +5 -5
- package/build/src/v1alpha/serving_config_service_client.js +8 -8
- package/build/src/v1alpha/session_service_client.js +13 -13
- package/build/src/v1alpha/site_search_engine_service_client.js +21 -21
- package/build/src/v1alpha/user_event_service_client.js +7 -7
- package/build/src/v1beta/acl_config_service_client.js +5 -5
- package/build/src/v1beta/assistant_service_client.d.ts +2 -0
- package/build/src/v1beta/assistant_service_client.js +13 -11
- package/build/src/v1beta/cmek_config_service_client.js +7 -7
- package/build/src/v1beta/completion_service_client.js +10 -10
- package/build/src/v1beta/control_service_client.js +10 -10
- package/build/src/v1beta/conversational_search_service_client.js +21 -21
- package/build/src/v1beta/data_store_service_client.js +10 -10
- package/build/src/v1beta/document_service_client.js +13 -13
- package/build/src/v1beta/engine_service_client.js +15 -15
- package/build/src/v1beta/evaluation_service_client.js +11 -11
- package/build/src/v1beta/grounded_generation_service_client.js +6 -6
- package/build/src/v1beta/identity_mapping_store_service_client.js +14 -14
- package/build/src/v1beta/license_config_service_client.js +11 -11
- package/build/src/v1beta/project_service_client.js +4 -4
- package/build/src/v1beta/rank_service_client.js +4 -4
- package/build/src/v1beta/recommendation_service_client.js +4 -4
- package/build/src/v1beta/sample_query_service_client.js +11 -11
- package/build/src/v1beta/sample_query_set_service_client.js +10 -10
- package/build/src/v1beta/schema_service_client.js +10 -10
- package/build/src/v1beta/search_service_client.js +9 -9
- package/build/src/v1beta/search_tuning_service_client.js +5 -5
- package/build/src/v1beta/serving_config_service_client.js +10 -10
- package/build/src/v1beta/session_service_client.js +10 -10
- package/build/src/v1beta/site_search_engine_service_client.js +22 -22
- package/build/src/v1beta/user_event_service_client.js +7 -7
- package/build/src/v1beta/user_license_service_client.js +8 -8
- package/build/src/v1beta/user_store_service_client.js +5 -5
- package/package.json +1 -1
|
@@ -253,7 +253,7 @@ class AclConfigServiceClient {
|
|
|
253
253
|
// and create an API call method for each.
|
|
254
254
|
const aclConfigServiceStubMethods = ['updateAclConfig', 'getAclConfig'];
|
|
255
255
|
for (const methodName of aclConfigServiceStubMethods) {
|
|
256
|
-
const callPromise = this.aclConfigServiceStub.then(
|
|
256
|
+
const callPromise = this.aclConfigServiceStub.then(stub => (...args) => {
|
|
257
257
|
if (this._terminated) {
|
|
258
258
|
return Promise.reject('The client has already been closed.');
|
|
259
259
|
}
|
|
@@ -349,7 +349,7 @@ class AclConfigServiceClient {
|
|
|
349
349
|
this._gaxModule.routingHeader.fromParams({
|
|
350
350
|
'acl_config.name': request.aclConfig.name ?? '',
|
|
351
351
|
});
|
|
352
|
-
this.initialize().catch(
|
|
352
|
+
this.initialize().catch(err => {
|
|
353
353
|
throw err;
|
|
354
354
|
});
|
|
355
355
|
this._log.info('updateAclConfig request %j', request);
|
|
@@ -392,7 +392,7 @@ class AclConfigServiceClient {
|
|
|
392
392
|
this._gaxModule.routingHeader.fromParams({
|
|
393
393
|
name: request.name ?? '',
|
|
394
394
|
});
|
|
395
|
-
this.initialize().catch(
|
|
395
|
+
this.initialize().catch(err => {
|
|
396
396
|
throw err;
|
|
397
397
|
});
|
|
398
398
|
this._log.info('getAclConfig request %j', request);
|
|
@@ -3401,11 +3401,11 @@ class AclConfigServiceClient {
|
|
|
3401
3401
|
*/
|
|
3402
3402
|
close() {
|
|
3403
3403
|
if (this.aclConfigServiceStub && !this._terminated) {
|
|
3404
|
-
return this.aclConfigServiceStub.then(
|
|
3404
|
+
return this.aclConfigServiceStub.then(stub => {
|
|
3405
3405
|
this._log.info('ending gRPC channel');
|
|
3406
3406
|
this._terminated = true;
|
|
3407
3407
|
stub.close();
|
|
3408
|
-
this.locationsClient.close().catch(
|
|
3408
|
+
this.locationsClient.close().catch(err => {
|
|
3409
3409
|
throw err;
|
|
3410
3410
|
});
|
|
3411
3411
|
});
|
|
@@ -274,6 +274,8 @@ export declare class AssistantServiceClient {
|
|
|
274
274
|
* `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
|
|
275
275
|
* @param {google.cloud.discoveryengine.v1beta.AssistUserMetadata} [request.userMetadata]
|
|
276
276
|
* Optional. Information about the user initiating the query.
|
|
277
|
+
* @param {google.cloud.discoveryengine.v1beta.StreamAssistRequest.AgentsSpec} [request.agentsSpec]
|
|
278
|
+
* Optional. Specification of agents that are used to serve the request.
|
|
277
279
|
* @param {google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec} [request.toolsSpec]
|
|
278
280
|
* Optional. Specification of tools that are used to serve the request.
|
|
279
281
|
* @param {google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec} [request.generationSpec]
|
|
@@ -272,7 +272,7 @@ class AssistantServiceClient {
|
|
|
272
272
|
'listAssistants',
|
|
273
273
|
];
|
|
274
274
|
for (const methodName of assistantServiceStubMethods) {
|
|
275
|
-
const callPromise = this.assistantServiceStub.then(
|
|
275
|
+
const callPromise = this.assistantServiceStub.then(stub => (...args) => {
|
|
276
276
|
if (this._terminated) {
|
|
277
277
|
if (methodName in this.descriptors.stream) {
|
|
278
278
|
const stream = new stream_1.PassThrough({ objectMode: true });
|
|
@@ -378,7 +378,7 @@ class AssistantServiceClient {
|
|
|
378
378
|
this._gaxModule.routingHeader.fromParams({
|
|
379
379
|
parent: request.parent ?? '',
|
|
380
380
|
});
|
|
381
|
-
this.initialize().catch(
|
|
381
|
+
this.initialize().catch(err => {
|
|
382
382
|
throw err;
|
|
383
383
|
});
|
|
384
384
|
this._log.info('createAssistant request %j', request);
|
|
@@ -421,7 +421,7 @@ class AssistantServiceClient {
|
|
|
421
421
|
this._gaxModule.routingHeader.fromParams({
|
|
422
422
|
name: request.name ?? '',
|
|
423
423
|
});
|
|
424
|
-
this.initialize().catch(
|
|
424
|
+
this.initialize().catch(err => {
|
|
425
425
|
throw err;
|
|
426
426
|
});
|
|
427
427
|
this._log.info('deleteAssistant request %j', request);
|
|
@@ -464,7 +464,7 @@ class AssistantServiceClient {
|
|
|
464
464
|
this._gaxModule.routingHeader.fromParams({
|
|
465
465
|
'assistant.name': request.assistant.name ?? '',
|
|
466
466
|
});
|
|
467
|
-
this.initialize().catch(
|
|
467
|
+
this.initialize().catch(err => {
|
|
468
468
|
throw err;
|
|
469
469
|
});
|
|
470
470
|
this._log.info('updateAssistant request %j', request);
|
|
@@ -507,7 +507,7 @@ class AssistantServiceClient {
|
|
|
507
507
|
this._gaxModule.routingHeader.fromParams({
|
|
508
508
|
name: request.name ?? '',
|
|
509
509
|
});
|
|
510
|
-
this.initialize().catch(
|
|
510
|
+
this.initialize().catch(err => {
|
|
511
511
|
throw err;
|
|
512
512
|
});
|
|
513
513
|
this._log.info('getAssistant request %j', request);
|
|
@@ -559,6 +559,8 @@ class AssistantServiceClient {
|
|
|
559
559
|
* `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}`
|
|
560
560
|
* @param {google.cloud.discoveryengine.v1beta.AssistUserMetadata} [request.userMetadata]
|
|
561
561
|
* Optional. Information about the user initiating the query.
|
|
562
|
+
* @param {google.cloud.discoveryengine.v1beta.StreamAssistRequest.AgentsSpec} [request.agentsSpec]
|
|
563
|
+
* Optional. Specification of agents that are used to serve the request.
|
|
562
564
|
* @param {google.cloud.discoveryengine.v1beta.StreamAssistRequest.ToolsSpec} [request.toolsSpec]
|
|
563
565
|
* Optional. Specification of tools that are used to serve the request.
|
|
564
566
|
* @param {google.cloud.discoveryengine.v1beta.StreamAssistRequest.GenerationSpec} [request.generationSpec]
|
|
@@ -581,7 +583,7 @@ class AssistantServiceClient {
|
|
|
581
583
|
this._gaxModule.routingHeader.fromParams({
|
|
582
584
|
name: request.name ?? '',
|
|
583
585
|
});
|
|
584
|
-
this.initialize().catch(
|
|
586
|
+
this.initialize().catch(err => {
|
|
585
587
|
throw err;
|
|
586
588
|
});
|
|
587
589
|
this._log.info('streamAssist stream %j', options);
|
|
@@ -604,7 +606,7 @@ class AssistantServiceClient {
|
|
|
604
606
|
this._gaxModule.routingHeader.fromParams({
|
|
605
607
|
parent: request.parent ?? '',
|
|
606
608
|
});
|
|
607
|
-
this.initialize().catch(
|
|
609
|
+
this.initialize().catch(err => {
|
|
608
610
|
throw err;
|
|
609
611
|
});
|
|
610
612
|
const wrappedCallback = callback
|
|
@@ -666,7 +668,7 @@ class AssistantServiceClient {
|
|
|
666
668
|
});
|
|
667
669
|
const defaultCallSettings = this._defaults['listAssistants'];
|
|
668
670
|
const callSettings = defaultCallSettings.merge(options);
|
|
669
|
-
this.initialize().catch(
|
|
671
|
+
this.initialize().catch(err => {
|
|
670
672
|
throw err;
|
|
671
673
|
});
|
|
672
674
|
this._log.info('listAssistants stream %j', request);
|
|
@@ -720,7 +722,7 @@ class AssistantServiceClient {
|
|
|
720
722
|
});
|
|
721
723
|
const defaultCallSettings = this._defaults['listAssistants'];
|
|
722
724
|
const callSettings = defaultCallSettings.merge(options);
|
|
723
|
-
this.initialize().catch(
|
|
725
|
+
this.initialize().catch(err => {
|
|
724
726
|
throw err;
|
|
725
727
|
});
|
|
726
728
|
this._log.info('listAssistants iterate %j', request);
|
|
@@ -3709,11 +3711,11 @@ class AssistantServiceClient {
|
|
|
3709
3711
|
*/
|
|
3710
3712
|
close() {
|
|
3711
3713
|
if (this.assistantServiceStub && !this._terminated) {
|
|
3712
|
-
return this.assistantServiceStub.then(
|
|
3714
|
+
return this.assistantServiceStub.then(stub => {
|
|
3713
3715
|
this._log.info('ending gRPC channel');
|
|
3714
3716
|
this._terminated = true;
|
|
3715
3717
|
stub.close();
|
|
3716
|
-
this.locationsClient.close().catch(
|
|
3718
|
+
this.locationsClient.close().catch(err => {
|
|
3717
3719
|
throw err;
|
|
3718
3720
|
});
|
|
3719
3721
|
});
|
|
@@ -394,7 +394,7 @@ class CmekConfigServiceClient {
|
|
|
394
394
|
'deleteCmekConfig',
|
|
395
395
|
];
|
|
396
396
|
for (const methodName of cmekConfigServiceStubMethods) {
|
|
397
|
-
const callPromise = this.cmekConfigServiceStub.then(
|
|
397
|
+
const callPromise = this.cmekConfigServiceStub.then(stub => (...args) => {
|
|
398
398
|
if (this._terminated) {
|
|
399
399
|
return Promise.reject('The client has already been closed.');
|
|
400
400
|
}
|
|
@@ -490,7 +490,7 @@ class CmekConfigServiceClient {
|
|
|
490
490
|
this._gaxModule.routingHeader.fromParams({
|
|
491
491
|
name: request.name ?? '',
|
|
492
492
|
});
|
|
493
|
-
this.initialize().catch(
|
|
493
|
+
this.initialize().catch(err => {
|
|
494
494
|
throw err;
|
|
495
495
|
});
|
|
496
496
|
this._log.info('getCmekConfig request %j', request);
|
|
@@ -533,7 +533,7 @@ class CmekConfigServiceClient {
|
|
|
533
533
|
this._gaxModule.routingHeader.fromParams({
|
|
534
534
|
parent: request.parent ?? '',
|
|
535
535
|
});
|
|
536
|
-
this.initialize().catch(
|
|
536
|
+
this.initialize().catch(err => {
|
|
537
537
|
throw err;
|
|
538
538
|
});
|
|
539
539
|
this._log.info('listCmekConfigs request %j', request);
|
|
@@ -576,7 +576,7 @@ class CmekConfigServiceClient {
|
|
|
576
576
|
this._gaxModule.routingHeader.fromParams({
|
|
577
577
|
'config.name': request.config.name ?? '',
|
|
578
578
|
});
|
|
579
|
-
this.initialize().catch(
|
|
579
|
+
this.initialize().catch(err => {
|
|
580
580
|
throw err;
|
|
581
581
|
});
|
|
582
582
|
const wrappedCallback = callback
|
|
@@ -628,7 +628,7 @@ class CmekConfigServiceClient {
|
|
|
628
628
|
this._gaxModule.routingHeader.fromParams({
|
|
629
629
|
name: request.name ?? '',
|
|
630
630
|
});
|
|
631
|
-
this.initialize().catch(
|
|
631
|
+
this.initialize().catch(err => {
|
|
632
632
|
throw err;
|
|
633
633
|
});
|
|
634
634
|
const wrappedCallback = callback
|
|
@@ -3989,11 +3989,11 @@ class CmekConfigServiceClient {
|
|
|
3989
3989
|
*/
|
|
3990
3990
|
close() {
|
|
3991
3991
|
if (this.cmekConfigServiceStub && !this._terminated) {
|
|
3992
|
-
return this.cmekConfigServiceStub.then(
|
|
3992
|
+
return this.cmekConfigServiceStub.then(stub => {
|
|
3993
3993
|
this._log.info('ending gRPC channel');
|
|
3994
3994
|
this._terminated = true;
|
|
3995
3995
|
stub.close();
|
|
3996
|
-
this.locationsClient.close().catch(
|
|
3996
|
+
this.locationsClient.close().catch(err => {
|
|
3997
3997
|
throw err;
|
|
3998
3998
|
});
|
|
3999
3999
|
void this.operationsClient.close();
|
|
@@ -403,7 +403,7 @@ class CompletionServiceClient {
|
|
|
403
403
|
'removeSuggestion',
|
|
404
404
|
];
|
|
405
405
|
for (const methodName of completionServiceStubMethods) {
|
|
406
|
-
const callPromise = this.completionServiceStub.then(
|
|
406
|
+
const callPromise = this.completionServiceStub.then(stub => (...args) => {
|
|
407
407
|
if (this._terminated) {
|
|
408
408
|
return Promise.reject('The client has already been closed.');
|
|
409
409
|
}
|
|
@@ -501,7 +501,7 @@ class CompletionServiceClient {
|
|
|
501
501
|
this._gaxModule.routingHeader.fromParams({
|
|
502
502
|
data_store: request.dataStore ?? '',
|
|
503
503
|
});
|
|
504
|
-
this.initialize().catch(
|
|
504
|
+
this.initialize().catch(err => {
|
|
505
505
|
throw err;
|
|
506
506
|
});
|
|
507
507
|
this._log.info('completeQuery request %j', request);
|
|
@@ -544,7 +544,7 @@ class CompletionServiceClient {
|
|
|
544
544
|
this._gaxModule.routingHeader.fromParams({
|
|
545
545
|
completion_config: request.completionConfig ?? '',
|
|
546
546
|
});
|
|
547
|
-
this.initialize().catch(
|
|
547
|
+
this.initialize().catch(err => {
|
|
548
548
|
throw err;
|
|
549
549
|
});
|
|
550
550
|
this._log.info('advancedCompleteQuery request %j', request);
|
|
@@ -587,7 +587,7 @@ class CompletionServiceClient {
|
|
|
587
587
|
this._gaxModule.routingHeader.fromParams({
|
|
588
588
|
completion_config: request.completionConfig ?? '',
|
|
589
589
|
});
|
|
590
|
-
this.initialize().catch(
|
|
590
|
+
this.initialize().catch(err => {
|
|
591
591
|
throw err;
|
|
592
592
|
});
|
|
593
593
|
this._log.info('removeSuggestion request %j', request);
|
|
@@ -630,7 +630,7 @@ class CompletionServiceClient {
|
|
|
630
630
|
this._gaxModule.routingHeader.fromParams({
|
|
631
631
|
parent: request.parent ?? '',
|
|
632
632
|
});
|
|
633
|
-
this.initialize().catch(
|
|
633
|
+
this.initialize().catch(err => {
|
|
634
634
|
throw err;
|
|
635
635
|
});
|
|
636
636
|
const wrappedCallback = callback
|
|
@@ -682,7 +682,7 @@ class CompletionServiceClient {
|
|
|
682
682
|
this._gaxModule.routingHeader.fromParams({
|
|
683
683
|
parent: request.parent ?? '',
|
|
684
684
|
});
|
|
685
|
-
this.initialize().catch(
|
|
685
|
+
this.initialize().catch(err => {
|
|
686
686
|
throw err;
|
|
687
687
|
});
|
|
688
688
|
const wrappedCallback = callback
|
|
@@ -734,7 +734,7 @@ class CompletionServiceClient {
|
|
|
734
734
|
this._gaxModule.routingHeader.fromParams({
|
|
735
735
|
parent: request.parent ?? '',
|
|
736
736
|
});
|
|
737
|
-
this.initialize().catch(
|
|
737
|
+
this.initialize().catch(err => {
|
|
738
738
|
throw err;
|
|
739
739
|
});
|
|
740
740
|
const wrappedCallback = callback
|
|
@@ -786,7 +786,7 @@ class CompletionServiceClient {
|
|
|
786
786
|
this._gaxModule.routingHeader.fromParams({
|
|
787
787
|
parent: request.parent ?? '',
|
|
788
788
|
});
|
|
789
|
-
this.initialize().catch(
|
|
789
|
+
this.initialize().catch(err => {
|
|
790
790
|
throw err;
|
|
791
791
|
});
|
|
792
792
|
const wrappedCallback = callback
|
|
@@ -4143,11 +4143,11 @@ class CompletionServiceClient {
|
|
|
4143
4143
|
*/
|
|
4144
4144
|
close() {
|
|
4145
4145
|
if (this.completionServiceStub && !this._terminated) {
|
|
4146
|
-
return this.completionServiceStub.then(
|
|
4146
|
+
return this.completionServiceStub.then(stub => {
|
|
4147
4147
|
this._log.info('ending gRPC channel');
|
|
4148
4148
|
this._terminated = true;
|
|
4149
4149
|
stub.close();
|
|
4150
|
-
this.locationsClient.close().catch(
|
|
4150
|
+
this.locationsClient.close().catch(err => {
|
|
4151
4151
|
throw err;
|
|
4152
4152
|
});
|
|
4153
4153
|
void this.operationsClient.close();
|
|
@@ -269,7 +269,7 @@ class ControlServiceClient {
|
|
|
269
269
|
'listControls',
|
|
270
270
|
];
|
|
271
271
|
for (const methodName of controlServiceStubMethods) {
|
|
272
|
-
const callPromise = this.controlServiceStub.then(
|
|
272
|
+
const callPromise = this.controlServiceStub.then(stub => (...args) => {
|
|
273
273
|
if (this._terminated) {
|
|
274
274
|
return Promise.reject('The client has already been closed.');
|
|
275
275
|
}
|
|
@@ -365,7 +365,7 @@ class ControlServiceClient {
|
|
|
365
365
|
this._gaxModule.routingHeader.fromParams({
|
|
366
366
|
parent: request.parent ?? '',
|
|
367
367
|
});
|
|
368
|
-
this.initialize().catch(
|
|
368
|
+
this.initialize().catch(err => {
|
|
369
369
|
throw err;
|
|
370
370
|
});
|
|
371
371
|
this._log.info('createControl request %j', request);
|
|
@@ -408,7 +408,7 @@ class ControlServiceClient {
|
|
|
408
408
|
this._gaxModule.routingHeader.fromParams({
|
|
409
409
|
name: request.name ?? '',
|
|
410
410
|
});
|
|
411
|
-
this.initialize().catch(
|
|
411
|
+
this.initialize().catch(err => {
|
|
412
412
|
throw err;
|
|
413
413
|
});
|
|
414
414
|
this._log.info('deleteControl request %j', request);
|
|
@@ -451,7 +451,7 @@ class ControlServiceClient {
|
|
|
451
451
|
this._gaxModule.routingHeader.fromParams({
|
|
452
452
|
'control.name': request.control.name ?? '',
|
|
453
453
|
});
|
|
454
|
-
this.initialize().catch(
|
|
454
|
+
this.initialize().catch(err => {
|
|
455
455
|
throw err;
|
|
456
456
|
});
|
|
457
457
|
this._log.info('updateControl request %j', request);
|
|
@@ -494,7 +494,7 @@ class ControlServiceClient {
|
|
|
494
494
|
this._gaxModule.routingHeader.fromParams({
|
|
495
495
|
name: request.name ?? '',
|
|
496
496
|
});
|
|
497
|
-
this.initialize().catch(
|
|
497
|
+
this.initialize().catch(err => {
|
|
498
498
|
throw err;
|
|
499
499
|
});
|
|
500
500
|
this._log.info('getControl request %j', request);
|
|
@@ -537,7 +537,7 @@ class ControlServiceClient {
|
|
|
537
537
|
this._gaxModule.routingHeader.fromParams({
|
|
538
538
|
parent: request.parent ?? '',
|
|
539
539
|
});
|
|
540
|
-
this.initialize().catch(
|
|
540
|
+
this.initialize().catch(err => {
|
|
541
541
|
throw err;
|
|
542
542
|
});
|
|
543
543
|
const wrappedCallback = callback
|
|
@@ -597,7 +597,7 @@ class ControlServiceClient {
|
|
|
597
597
|
});
|
|
598
598
|
const defaultCallSettings = this._defaults['listControls'];
|
|
599
599
|
const callSettings = defaultCallSettings.merge(options);
|
|
600
|
-
this.initialize().catch(
|
|
600
|
+
this.initialize().catch(err => {
|
|
601
601
|
throw err;
|
|
602
602
|
});
|
|
603
603
|
this._log.info('listControls stream %j', request);
|
|
@@ -649,7 +649,7 @@ class ControlServiceClient {
|
|
|
649
649
|
});
|
|
650
650
|
const defaultCallSettings = this._defaults['listControls'];
|
|
651
651
|
const callSettings = defaultCallSettings.merge(options);
|
|
652
|
-
this.initialize().catch(
|
|
652
|
+
this.initialize().catch(err => {
|
|
653
653
|
throw err;
|
|
654
654
|
});
|
|
655
655
|
this._log.info('listControls iterate %j', request);
|
|
@@ -3671,11 +3671,11 @@ class ControlServiceClient {
|
|
|
3671
3671
|
*/
|
|
3672
3672
|
close() {
|
|
3673
3673
|
if (this.controlServiceStub && !this._terminated) {
|
|
3674
|
-
return this.controlServiceStub.then(
|
|
3674
|
+
return this.controlServiceStub.then(stub => {
|
|
3675
3675
|
this._log.info('ending gRPC channel');
|
|
3676
3676
|
this._terminated = true;
|
|
3677
3677
|
stub.close();
|
|
3678
|
-
this.locationsClient.close().catch(
|
|
3678
|
+
this.locationsClient.close().catch(err => {
|
|
3679
3679
|
throw err;
|
|
3680
3680
|
});
|
|
3681
3681
|
});
|
|
@@ -282,7 +282,7 @@ class ConversationalSearchServiceClient {
|
|
|
282
282
|
'listSessions',
|
|
283
283
|
];
|
|
284
284
|
for (const methodName of conversationalSearchServiceStubMethods) {
|
|
285
|
-
const callPromise = this.conversationalSearchServiceStub.then(
|
|
285
|
+
const callPromise = this.conversationalSearchServiceStub.then(stub => (...args) => {
|
|
286
286
|
if (this._terminated) {
|
|
287
287
|
if (methodName in this.descriptors.stream) {
|
|
288
288
|
const stream = new stream_1.PassThrough({ objectMode: true });
|
|
@@ -387,7 +387,7 @@ class ConversationalSearchServiceClient {
|
|
|
387
387
|
this._gaxModule.routingHeader.fromParams({
|
|
388
388
|
name: request.name ?? '',
|
|
389
389
|
});
|
|
390
|
-
this.initialize().catch(
|
|
390
|
+
this.initialize().catch(err => {
|
|
391
391
|
throw err;
|
|
392
392
|
});
|
|
393
393
|
this._log.info('converseConversation request %j', request);
|
|
@@ -430,7 +430,7 @@ class ConversationalSearchServiceClient {
|
|
|
430
430
|
this._gaxModule.routingHeader.fromParams({
|
|
431
431
|
parent: request.parent ?? '',
|
|
432
432
|
});
|
|
433
|
-
this.initialize().catch(
|
|
433
|
+
this.initialize().catch(err => {
|
|
434
434
|
throw err;
|
|
435
435
|
});
|
|
436
436
|
this._log.info('createConversation request %j', request);
|
|
@@ -473,7 +473,7 @@ class ConversationalSearchServiceClient {
|
|
|
473
473
|
this._gaxModule.routingHeader.fromParams({
|
|
474
474
|
name: request.name ?? '',
|
|
475
475
|
});
|
|
476
|
-
this.initialize().catch(
|
|
476
|
+
this.initialize().catch(err => {
|
|
477
477
|
throw err;
|
|
478
478
|
});
|
|
479
479
|
this._log.info('deleteConversation request %j', request);
|
|
@@ -516,7 +516,7 @@ class ConversationalSearchServiceClient {
|
|
|
516
516
|
this._gaxModule.routingHeader.fromParams({
|
|
517
517
|
'conversation.name': request.conversation.name ?? '',
|
|
518
518
|
});
|
|
519
|
-
this.initialize().catch(
|
|
519
|
+
this.initialize().catch(err => {
|
|
520
520
|
throw err;
|
|
521
521
|
});
|
|
522
522
|
this._log.info('updateConversation request %j', request);
|
|
@@ -559,7 +559,7 @@ class ConversationalSearchServiceClient {
|
|
|
559
559
|
this._gaxModule.routingHeader.fromParams({
|
|
560
560
|
name: request.name ?? '',
|
|
561
561
|
});
|
|
562
|
-
this.initialize().catch(
|
|
562
|
+
this.initialize().catch(err => {
|
|
563
563
|
throw err;
|
|
564
564
|
});
|
|
565
565
|
this._log.info('getConversation request %j', request);
|
|
@@ -602,7 +602,7 @@ class ConversationalSearchServiceClient {
|
|
|
602
602
|
this._gaxModule.routingHeader.fromParams({
|
|
603
603
|
serving_config: request.servingConfig ?? '',
|
|
604
604
|
});
|
|
605
|
-
this.initialize().catch(
|
|
605
|
+
this.initialize().catch(err => {
|
|
606
606
|
throw err;
|
|
607
607
|
});
|
|
608
608
|
this._log.info('answerQuery request %j', request);
|
|
@@ -645,7 +645,7 @@ class ConversationalSearchServiceClient {
|
|
|
645
645
|
this._gaxModule.routingHeader.fromParams({
|
|
646
646
|
name: request.name ?? '',
|
|
647
647
|
});
|
|
648
|
-
this.initialize().catch(
|
|
648
|
+
this.initialize().catch(err => {
|
|
649
649
|
throw err;
|
|
650
650
|
});
|
|
651
651
|
this._log.info('getAnswer request %j', request);
|
|
@@ -688,7 +688,7 @@ class ConversationalSearchServiceClient {
|
|
|
688
688
|
this._gaxModule.routingHeader.fromParams({
|
|
689
689
|
parent: request.parent ?? '',
|
|
690
690
|
});
|
|
691
|
-
this.initialize().catch(
|
|
691
|
+
this.initialize().catch(err => {
|
|
692
692
|
throw err;
|
|
693
693
|
});
|
|
694
694
|
this._log.info('createSession request %j', request);
|
|
@@ -731,7 +731,7 @@ class ConversationalSearchServiceClient {
|
|
|
731
731
|
this._gaxModule.routingHeader.fromParams({
|
|
732
732
|
name: request.name ?? '',
|
|
733
733
|
});
|
|
734
|
-
this.initialize().catch(
|
|
734
|
+
this.initialize().catch(err => {
|
|
735
735
|
throw err;
|
|
736
736
|
});
|
|
737
737
|
this._log.info('deleteSession request %j', request);
|
|
@@ -774,7 +774,7 @@ class ConversationalSearchServiceClient {
|
|
|
774
774
|
this._gaxModule.routingHeader.fromParams({
|
|
775
775
|
'session.name': request.session.name ?? '',
|
|
776
776
|
});
|
|
777
|
-
this.initialize().catch(
|
|
777
|
+
this.initialize().catch(err => {
|
|
778
778
|
throw err;
|
|
779
779
|
});
|
|
780
780
|
this._log.info('updateSession request %j', request);
|
|
@@ -817,7 +817,7 @@ class ConversationalSearchServiceClient {
|
|
|
817
817
|
this._gaxModule.routingHeader.fromParams({
|
|
818
818
|
name: request.name ?? '',
|
|
819
819
|
});
|
|
820
|
-
this.initialize().catch(
|
|
820
|
+
this.initialize().catch(err => {
|
|
821
821
|
throw err;
|
|
822
822
|
});
|
|
823
823
|
this._log.info('getSession request %j', request);
|
|
@@ -949,7 +949,7 @@ class ConversationalSearchServiceClient {
|
|
|
949
949
|
this._gaxModule.routingHeader.fromParams({
|
|
950
950
|
serving_config: request.servingConfig ?? '',
|
|
951
951
|
});
|
|
952
|
-
this.initialize().catch(
|
|
952
|
+
this.initialize().catch(err => {
|
|
953
953
|
throw err;
|
|
954
954
|
});
|
|
955
955
|
this._log.info('streamAnswerQuery stream %j', options);
|
|
@@ -972,7 +972,7 @@ class ConversationalSearchServiceClient {
|
|
|
972
972
|
this._gaxModule.routingHeader.fromParams({
|
|
973
973
|
parent: request.parent ?? '',
|
|
974
974
|
});
|
|
975
|
-
this.initialize().catch(
|
|
975
|
+
this.initialize().catch(err => {
|
|
976
976
|
throw err;
|
|
977
977
|
});
|
|
978
978
|
const wrappedCallback = callback
|
|
@@ -1041,7 +1041,7 @@ class ConversationalSearchServiceClient {
|
|
|
1041
1041
|
});
|
|
1042
1042
|
const defaultCallSettings = this._defaults['listConversations'];
|
|
1043
1043
|
const callSettings = defaultCallSettings.merge(options);
|
|
1044
|
-
this.initialize().catch(
|
|
1044
|
+
this.initialize().catch(err => {
|
|
1045
1045
|
throw err;
|
|
1046
1046
|
});
|
|
1047
1047
|
this._log.info('listConversations stream %j', request);
|
|
@@ -1102,7 +1102,7 @@ class ConversationalSearchServiceClient {
|
|
|
1102
1102
|
});
|
|
1103
1103
|
const defaultCallSettings = this._defaults['listConversations'];
|
|
1104
1104
|
const callSettings = defaultCallSettings.merge(options);
|
|
1105
|
-
this.initialize().catch(
|
|
1105
|
+
this.initialize().catch(err => {
|
|
1106
1106
|
throw err;
|
|
1107
1107
|
});
|
|
1108
1108
|
this._log.info('listConversations iterate %j', request);
|
|
@@ -1125,7 +1125,7 @@ class ConversationalSearchServiceClient {
|
|
|
1125
1125
|
this._gaxModule.routingHeader.fromParams({
|
|
1126
1126
|
parent: request.parent ?? '',
|
|
1127
1127
|
});
|
|
1128
|
-
this.initialize().catch(
|
|
1128
|
+
this.initialize().catch(err => {
|
|
1129
1129
|
throw err;
|
|
1130
1130
|
});
|
|
1131
1131
|
const wrappedCallback = callback
|
|
@@ -1220,7 +1220,7 @@ class ConversationalSearchServiceClient {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
const defaultCallSettings = this._defaults['listSessions'];
|
|
1222
1222
|
const callSettings = defaultCallSettings.merge(options);
|
|
1223
|
-
this.initialize().catch(
|
|
1223
|
+
this.initialize().catch(err => {
|
|
1224
1224
|
throw err;
|
|
1225
1225
|
});
|
|
1226
1226
|
this._log.info('listSessions stream %j', request);
|
|
@@ -1307,7 +1307,7 @@ class ConversationalSearchServiceClient {
|
|
|
1307
1307
|
});
|
|
1308
1308
|
const defaultCallSettings = this._defaults['listSessions'];
|
|
1309
1309
|
const callSettings = defaultCallSettings.merge(options);
|
|
1310
|
-
this.initialize().catch(
|
|
1310
|
+
this.initialize().catch(err => {
|
|
1311
1311
|
throw err;
|
|
1312
1312
|
});
|
|
1313
1313
|
this._log.info('listSessions iterate %j', request);
|
|
@@ -4296,11 +4296,11 @@ class ConversationalSearchServiceClient {
|
|
|
4296
4296
|
*/
|
|
4297
4297
|
close() {
|
|
4298
4298
|
if (this.conversationalSearchServiceStub && !this._terminated) {
|
|
4299
|
-
return this.conversationalSearchServiceStub.then(
|
|
4299
|
+
return this.conversationalSearchServiceStub.then(stub => {
|
|
4300
4300
|
this._log.info('ending gRPC channel');
|
|
4301
4301
|
this._terminated = true;
|
|
4302
4302
|
stub.close();
|
|
4303
|
-
this.locationsClient.close().catch(
|
|
4303
|
+
this.locationsClient.close().catch(err => {
|
|
4304
4304
|
throw err;
|
|
4305
4305
|
});
|
|
4306
4306
|
});
|
|
@@ -400,7 +400,7 @@ class DataStoreServiceClient {
|
|
|
400
400
|
'updateDataStore',
|
|
401
401
|
];
|
|
402
402
|
for (const methodName of dataStoreServiceStubMethods) {
|
|
403
|
-
const callPromise = this.dataStoreServiceStub.then(
|
|
403
|
+
const callPromise = this.dataStoreServiceStub.then(stub => (...args) => {
|
|
404
404
|
if (this._terminated) {
|
|
405
405
|
return Promise.reject('The client has already been closed.');
|
|
406
406
|
}
|
|
@@ -498,7 +498,7 @@ class DataStoreServiceClient {
|
|
|
498
498
|
this._gaxModule.routingHeader.fromParams({
|
|
499
499
|
name: request.name ?? '',
|
|
500
500
|
});
|
|
501
|
-
this.initialize().catch(
|
|
501
|
+
this.initialize().catch(err => {
|
|
502
502
|
throw err;
|
|
503
503
|
});
|
|
504
504
|
this._log.info('getDataStore request %j', request);
|
|
@@ -541,7 +541,7 @@ class DataStoreServiceClient {
|
|
|
541
541
|
this._gaxModule.routingHeader.fromParams({
|
|
542
542
|
'data_store.name': request.dataStore.name ?? '',
|
|
543
543
|
});
|
|
544
|
-
this.initialize().catch(
|
|
544
|
+
this.initialize().catch(err => {
|
|
545
545
|
throw err;
|
|
546
546
|
});
|
|
547
547
|
this._log.info('updateDataStore request %j', request);
|
|
@@ -584,7 +584,7 @@ class DataStoreServiceClient {
|
|
|
584
584
|
this._gaxModule.routingHeader.fromParams({
|
|
585
585
|
parent: request.parent ?? '',
|
|
586
586
|
});
|
|
587
|
-
this.initialize().catch(
|
|
587
|
+
this.initialize().catch(err => {
|
|
588
588
|
throw err;
|
|
589
589
|
});
|
|
590
590
|
const wrappedCallback = callback
|
|
@@ -636,7 +636,7 @@ class DataStoreServiceClient {
|
|
|
636
636
|
this._gaxModule.routingHeader.fromParams({
|
|
637
637
|
name: request.name ?? '',
|
|
638
638
|
});
|
|
639
|
-
this.initialize().catch(
|
|
639
|
+
this.initialize().catch(err => {
|
|
640
640
|
throw err;
|
|
641
641
|
});
|
|
642
642
|
const wrappedCallback = callback
|
|
@@ -688,7 +688,7 @@ class DataStoreServiceClient {
|
|
|
688
688
|
this._gaxModule.routingHeader.fromParams({
|
|
689
689
|
parent: request.parent ?? '',
|
|
690
690
|
});
|
|
691
|
-
this.initialize().catch(
|
|
691
|
+
this.initialize().catch(err => {
|
|
692
692
|
throw err;
|
|
693
693
|
});
|
|
694
694
|
const wrappedCallback = callback
|
|
@@ -760,7 +760,7 @@ class DataStoreServiceClient {
|
|
|
760
760
|
});
|
|
761
761
|
const defaultCallSettings = this._defaults['listDataStores'];
|
|
762
762
|
const callSettings = defaultCallSettings.merge(options);
|
|
763
|
-
this.initialize().catch(
|
|
763
|
+
this.initialize().catch(err => {
|
|
764
764
|
throw err;
|
|
765
765
|
});
|
|
766
766
|
this._log.info('listDataStores stream %j', request);
|
|
@@ -824,7 +824,7 @@ class DataStoreServiceClient {
|
|
|
824
824
|
});
|
|
825
825
|
const defaultCallSettings = this._defaults['listDataStores'];
|
|
826
826
|
const callSettings = defaultCallSettings.merge(options);
|
|
827
|
-
this.initialize().catch(
|
|
827
|
+
this.initialize().catch(err => {
|
|
828
828
|
throw err;
|
|
829
829
|
});
|
|
830
830
|
this._log.info('listDataStores iterate %j', request);
|
|
@@ -4041,11 +4041,11 @@ class DataStoreServiceClient {
|
|
|
4041
4041
|
*/
|
|
4042
4042
|
close() {
|
|
4043
4043
|
if (this.dataStoreServiceStub && !this._terminated) {
|
|
4044
|
-
return this.dataStoreServiceStub.then(
|
|
4044
|
+
return this.dataStoreServiceStub.then(stub => {
|
|
4045
4045
|
this._log.info('ending gRPC channel');
|
|
4046
4046
|
this._terminated = true;
|
|
4047
4047
|
stub.close();
|
|
4048
|
-
this.locationsClient.close().catch(
|
|
4048
|
+
this.locationsClient.close().catch(err => {
|
|
4049
4049
|
throw err;
|
|
4050
4050
|
});
|
|
4051
4051
|
void this.operationsClient.close();
|