@google-cloud/discoveryengine 1.2.0 → 1.3.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 +7 -0
- package/README.md +13 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +39 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +26 -3
- package/build/protos/protos.d.ts +5578 -1800
- package/build/protos/protos.js +14034 -5272
- package/build/protos/protos.json +1337 -340
- package/build/src/v1alpha/completion_service_client.d.ts +42 -0
- package/build/src/v1alpha/completion_service_client.js +58 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +42 -0
- package/build/src/v1alpha/conversational_search_service_client.js +58 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
- package/build/src/v1alpha/data_store_service_client.js +1431 -0
- package/build/src/v1alpha/data_store_service_client_config.json +46 -0
- package/build/src/v1alpha/document_service_client.d.ts +117 -0
- package/build/src/v1alpha/document_service_client.js +162 -0
- package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
- package/build/src/v1alpha/engine_service_client.js +1481 -0
- package/build/src/v1alpha/engine_service_client_config.json +58 -0
- package/build/src/v1alpha/index.d.ts +2 -0
- package/build/src/v1alpha/index.js +5 -1
- package/build/src/v1alpha/recommendation_service_client.d.ts +126 -3
- package/build/src/v1alpha/recommendation_service_client.js +162 -0
- package/build/src/v1alpha/schema_service_client.d.ts +42 -0
- package/build/src/v1alpha/schema_service_client.js +58 -0
- package/build/src/v1alpha/search_service_client.d.ts +195 -9
- package/build/src/v1alpha/search_service_client.js +214 -6
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +117 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +162 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +42 -0
- package/build/src/v1alpha/user_event_service_client.js +58 -0
- package/package.json +3 -3
@@ -322,6 +322,90 @@ export declare class SiteSearchEngineServiceClient {
|
|
322
322
|
* ```
|
323
323
|
*/
|
324
324
|
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
|
325
|
+
/**
|
326
|
+
* Return a fully-qualified engine resource name string.
|
327
|
+
*
|
328
|
+
* @param {string} project
|
329
|
+
* @param {string} location
|
330
|
+
* @param {string} collection
|
331
|
+
* @param {string} engine
|
332
|
+
* @returns {string} Resource name string.
|
333
|
+
*/
|
334
|
+
enginePath(project: string, location: string, collection: string, engine: string): string;
|
335
|
+
/**
|
336
|
+
* Parse the project from Engine resource.
|
337
|
+
*
|
338
|
+
* @param {string} engineName
|
339
|
+
* A fully-qualified path representing Engine resource.
|
340
|
+
* @returns {string} A string representing the project.
|
341
|
+
*/
|
342
|
+
matchProjectFromEngineName(engineName: string): string | number;
|
343
|
+
/**
|
344
|
+
* Parse the location from Engine resource.
|
345
|
+
*
|
346
|
+
* @param {string} engineName
|
347
|
+
* A fully-qualified path representing Engine resource.
|
348
|
+
* @returns {string} A string representing the location.
|
349
|
+
*/
|
350
|
+
matchLocationFromEngineName(engineName: string): string | number;
|
351
|
+
/**
|
352
|
+
* Parse the collection from Engine resource.
|
353
|
+
*
|
354
|
+
* @param {string} engineName
|
355
|
+
* A fully-qualified path representing Engine resource.
|
356
|
+
* @returns {string} A string representing the collection.
|
357
|
+
*/
|
358
|
+
matchCollectionFromEngineName(engineName: string): string | number;
|
359
|
+
/**
|
360
|
+
* Parse the engine from Engine resource.
|
361
|
+
*
|
362
|
+
* @param {string} engineName
|
363
|
+
* A fully-qualified path representing Engine resource.
|
364
|
+
* @returns {string} A string representing the engine.
|
365
|
+
*/
|
366
|
+
matchEngineFromEngineName(engineName: string): string | number;
|
367
|
+
/**
|
368
|
+
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
369
|
+
*
|
370
|
+
* @param {string} project
|
371
|
+
* @param {string} location
|
372
|
+
* @param {string} collection
|
373
|
+
* @param {string} data_store
|
374
|
+
* @returns {string} Resource name string.
|
375
|
+
*/
|
376
|
+
projectLocationCollectionDataStorePath(project: string, location: string, collection: string, dataStore: string): string;
|
377
|
+
/**
|
378
|
+
* Parse the project from ProjectLocationCollectionDataStore resource.
|
379
|
+
*
|
380
|
+
* @param {string} projectLocationCollectionDataStoreName
|
381
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
382
|
+
* @returns {string} A string representing the project.
|
383
|
+
*/
|
384
|
+
matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
385
|
+
/**
|
386
|
+
* Parse the location from ProjectLocationCollectionDataStore resource.
|
387
|
+
*
|
388
|
+
* @param {string} projectLocationCollectionDataStoreName
|
389
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
390
|
+
* @returns {string} A string representing the location.
|
391
|
+
*/
|
392
|
+
matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
393
|
+
/**
|
394
|
+
* Parse the collection from ProjectLocationCollectionDataStore resource.
|
395
|
+
*
|
396
|
+
* @param {string} projectLocationCollectionDataStoreName
|
397
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
398
|
+
* @returns {string} A string representing the collection.
|
399
|
+
*/
|
400
|
+
matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
401
|
+
/**
|
402
|
+
* Parse the data_store from ProjectLocationCollectionDataStore resource.
|
403
|
+
*
|
404
|
+
* @param {string} projectLocationCollectionDataStoreName
|
405
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
406
|
+
* @returns {string} A string representing the data_store.
|
407
|
+
*/
|
408
|
+
matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName: string): string | number;
|
325
409
|
/**
|
326
410
|
* Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
|
327
411
|
*
|
@@ -526,6 +610,39 @@ export declare class SiteSearchEngineServiceClient {
|
|
526
610
|
* @returns {string} A string representing the data_store.
|
527
611
|
*/
|
528
612
|
matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName: string): string | number;
|
613
|
+
/**
|
614
|
+
* Return a fully-qualified projectLocationDataStore resource name string.
|
615
|
+
*
|
616
|
+
* @param {string} project
|
617
|
+
* @param {string} location
|
618
|
+
* @param {string} data_store
|
619
|
+
* @returns {string} Resource name string.
|
620
|
+
*/
|
621
|
+
projectLocationDataStorePath(project: string, location: string, dataStore: string): string;
|
622
|
+
/**
|
623
|
+
* Parse the project from ProjectLocationDataStore resource.
|
624
|
+
*
|
625
|
+
* @param {string} projectLocationDataStoreName
|
626
|
+
* A fully-qualified path representing project_location_data_store resource.
|
627
|
+
* @returns {string} A string representing the project.
|
628
|
+
*/
|
629
|
+
matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName: string): string | number;
|
630
|
+
/**
|
631
|
+
* Parse the location from ProjectLocationDataStore resource.
|
632
|
+
*
|
633
|
+
* @param {string} projectLocationDataStoreName
|
634
|
+
* A fully-qualified path representing project_location_data_store resource.
|
635
|
+
* @returns {string} A string representing the location.
|
636
|
+
*/
|
637
|
+
matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName: string): string | number;
|
638
|
+
/**
|
639
|
+
* Parse the data_store from ProjectLocationDataStore resource.
|
640
|
+
*
|
641
|
+
* @param {string} projectLocationDataStoreName
|
642
|
+
* A fully-qualified path representing project_location_data_store resource.
|
643
|
+
* @returns {string} A string representing the data_store.
|
644
|
+
*/
|
645
|
+
matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName: string): string | number;
|
529
646
|
/**
|
530
647
|
* Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
|
531
648
|
*
|
@@ -139,10 +139,13 @@ class SiteSearchEngineServiceClient {
|
|
139
139
|
// identifiers to uniquely identify resources within the API.
|
140
140
|
// Create useful helper objects for these.
|
141
141
|
this.pathTemplates = {
|
142
|
+
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
143
|
+
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
142
144
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
143
145
|
projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
|
144
146
|
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
145
147
|
projectLocationCollectionDataStoreSiteSearchEnginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine'),
|
148
|
+
projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
|
146
149
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
147
150
|
projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
|
148
151
|
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
@@ -561,6 +564,120 @@ class SiteSearchEngineServiceClient {
|
|
561
564
|
// --------------------
|
562
565
|
// -- Path templates --
|
563
566
|
// --------------------
|
567
|
+
/**
|
568
|
+
* Return a fully-qualified engine resource name string.
|
569
|
+
*
|
570
|
+
* @param {string} project
|
571
|
+
* @param {string} location
|
572
|
+
* @param {string} collection
|
573
|
+
* @param {string} engine
|
574
|
+
* @returns {string} Resource name string.
|
575
|
+
*/
|
576
|
+
enginePath(project, location, collection, engine) {
|
577
|
+
return this.pathTemplates.enginePathTemplate.render({
|
578
|
+
project: project,
|
579
|
+
location: location,
|
580
|
+
collection: collection,
|
581
|
+
engine: engine,
|
582
|
+
});
|
583
|
+
}
|
584
|
+
/**
|
585
|
+
* Parse the project from Engine resource.
|
586
|
+
*
|
587
|
+
* @param {string} engineName
|
588
|
+
* A fully-qualified path representing Engine resource.
|
589
|
+
* @returns {string} A string representing the project.
|
590
|
+
*/
|
591
|
+
matchProjectFromEngineName(engineName) {
|
592
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).project;
|
593
|
+
}
|
594
|
+
/**
|
595
|
+
* Parse the location from Engine resource.
|
596
|
+
*
|
597
|
+
* @param {string} engineName
|
598
|
+
* A fully-qualified path representing Engine resource.
|
599
|
+
* @returns {string} A string representing the location.
|
600
|
+
*/
|
601
|
+
matchLocationFromEngineName(engineName) {
|
602
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).location;
|
603
|
+
}
|
604
|
+
/**
|
605
|
+
* Parse the collection from Engine resource.
|
606
|
+
*
|
607
|
+
* @param {string} engineName
|
608
|
+
* A fully-qualified path representing Engine resource.
|
609
|
+
* @returns {string} A string representing the collection.
|
610
|
+
*/
|
611
|
+
matchCollectionFromEngineName(engineName) {
|
612
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).collection;
|
613
|
+
}
|
614
|
+
/**
|
615
|
+
* Parse the engine from Engine resource.
|
616
|
+
*
|
617
|
+
* @param {string} engineName
|
618
|
+
* A fully-qualified path representing Engine resource.
|
619
|
+
* @returns {string} A string representing the engine.
|
620
|
+
*/
|
621
|
+
matchEngineFromEngineName(engineName) {
|
622
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
623
|
+
}
|
624
|
+
/**
|
625
|
+
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
626
|
+
*
|
627
|
+
* @param {string} project
|
628
|
+
* @param {string} location
|
629
|
+
* @param {string} collection
|
630
|
+
* @param {string} data_store
|
631
|
+
* @returns {string} Resource name string.
|
632
|
+
*/
|
633
|
+
projectLocationCollectionDataStorePath(project, location, collection, dataStore) {
|
634
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.render({
|
635
|
+
project: project,
|
636
|
+
location: location,
|
637
|
+
collection: collection,
|
638
|
+
data_store: dataStore,
|
639
|
+
});
|
640
|
+
}
|
641
|
+
/**
|
642
|
+
* Parse the project from ProjectLocationCollectionDataStore resource.
|
643
|
+
*
|
644
|
+
* @param {string} projectLocationCollectionDataStoreName
|
645
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
646
|
+
* @returns {string} A string representing the project.
|
647
|
+
*/
|
648
|
+
matchProjectFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
649
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).project;
|
650
|
+
}
|
651
|
+
/**
|
652
|
+
* Parse the location from ProjectLocationCollectionDataStore resource.
|
653
|
+
*
|
654
|
+
* @param {string} projectLocationCollectionDataStoreName
|
655
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
656
|
+
* @returns {string} A string representing the location.
|
657
|
+
*/
|
658
|
+
matchLocationFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
659
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).location;
|
660
|
+
}
|
661
|
+
/**
|
662
|
+
* Parse the collection from ProjectLocationCollectionDataStore resource.
|
663
|
+
*
|
664
|
+
* @param {string} projectLocationCollectionDataStoreName
|
665
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
666
|
+
* @returns {string} A string representing the collection.
|
667
|
+
*/
|
668
|
+
matchCollectionFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
669
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).collection;
|
670
|
+
}
|
671
|
+
/**
|
672
|
+
* Parse the data_store from ProjectLocationCollectionDataStore resource.
|
673
|
+
*
|
674
|
+
* @param {string} projectLocationCollectionDataStoreName
|
675
|
+
* A fully-qualified path representing project_location_collection_data_store resource.
|
676
|
+
* @returns {string} A string representing the data_store.
|
677
|
+
*/
|
678
|
+
matchDataStoreFromProjectLocationCollectionDataStoreName(projectLocationCollectionDataStoreName) {
|
679
|
+
return this.pathTemplates.projectLocationCollectionDataStorePathTemplate.match(projectLocationCollectionDataStoreName).data_store;
|
680
|
+
}
|
564
681
|
/**
|
565
682
|
* Return a fully-qualified projectLocationCollectionDataStoreBranchDocument resource name string.
|
566
683
|
*
|
@@ -837,6 +954,51 @@ class SiteSearchEngineServiceClient {
|
|
837
954
|
matchDataStoreFromProjectLocationCollectionDataStoreSiteSearchEngineName(projectLocationCollectionDataStoreSiteSearchEngineName) {
|
838
955
|
return this.pathTemplates.projectLocationCollectionDataStoreSiteSearchEnginePathTemplate.match(projectLocationCollectionDataStoreSiteSearchEngineName).data_store;
|
839
956
|
}
|
957
|
+
/**
|
958
|
+
* Return a fully-qualified projectLocationDataStore resource name string.
|
959
|
+
*
|
960
|
+
* @param {string} project
|
961
|
+
* @param {string} location
|
962
|
+
* @param {string} data_store
|
963
|
+
* @returns {string} Resource name string.
|
964
|
+
*/
|
965
|
+
projectLocationDataStorePath(project, location, dataStore) {
|
966
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.render({
|
967
|
+
project: project,
|
968
|
+
location: location,
|
969
|
+
data_store: dataStore,
|
970
|
+
});
|
971
|
+
}
|
972
|
+
/**
|
973
|
+
* Parse the project from ProjectLocationDataStore resource.
|
974
|
+
*
|
975
|
+
* @param {string} projectLocationDataStoreName
|
976
|
+
* A fully-qualified path representing project_location_data_store resource.
|
977
|
+
* @returns {string} A string representing the project.
|
978
|
+
*/
|
979
|
+
matchProjectFromProjectLocationDataStoreName(projectLocationDataStoreName) {
|
980
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).project;
|
981
|
+
}
|
982
|
+
/**
|
983
|
+
* Parse the location from ProjectLocationDataStore resource.
|
984
|
+
*
|
985
|
+
* @param {string} projectLocationDataStoreName
|
986
|
+
* A fully-qualified path representing project_location_data_store resource.
|
987
|
+
* @returns {string} A string representing the location.
|
988
|
+
*/
|
989
|
+
matchLocationFromProjectLocationDataStoreName(projectLocationDataStoreName) {
|
990
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).location;
|
991
|
+
}
|
992
|
+
/**
|
993
|
+
* Parse the data_store from ProjectLocationDataStore resource.
|
994
|
+
*
|
995
|
+
* @param {string} projectLocationDataStoreName
|
996
|
+
* A fully-qualified path representing project_location_data_store resource.
|
997
|
+
* @returns {string} A string representing the data_store.
|
998
|
+
*/
|
999
|
+
matchDataStoreFromProjectLocationDataStoreName(projectLocationDataStoreName) {
|
1000
|
+
return this.pathTemplates.projectLocationDataStorePathTemplate.match(projectLocationDataStoreName).data_store;
|
1001
|
+
}
|
840
1002
|
/**
|
841
1003
|
* Return a fully-qualified projectLocationDataStoreBranchDocument resource name string.
|
842
1004
|
*
|
@@ -471,6 +471,48 @@ export declare class UserEventServiceClient {
|
|
471
471
|
* ```
|
472
472
|
*/
|
473
473
|
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;
|
474
|
+
/**
|
475
|
+
* Return a fully-qualified engine resource name string.
|
476
|
+
*
|
477
|
+
* @param {string} project
|
478
|
+
* @param {string} location
|
479
|
+
* @param {string} collection
|
480
|
+
* @param {string} engine
|
481
|
+
* @returns {string} Resource name string.
|
482
|
+
*/
|
483
|
+
enginePath(project: string, location: string, collection: string, engine: string): string;
|
484
|
+
/**
|
485
|
+
* Parse the project from Engine resource.
|
486
|
+
*
|
487
|
+
* @param {string} engineName
|
488
|
+
* A fully-qualified path representing Engine resource.
|
489
|
+
* @returns {string} A string representing the project.
|
490
|
+
*/
|
491
|
+
matchProjectFromEngineName(engineName: string): string | number;
|
492
|
+
/**
|
493
|
+
* Parse the location from Engine resource.
|
494
|
+
*
|
495
|
+
* @param {string} engineName
|
496
|
+
* A fully-qualified path representing Engine resource.
|
497
|
+
* @returns {string} A string representing the location.
|
498
|
+
*/
|
499
|
+
matchLocationFromEngineName(engineName: string): string | number;
|
500
|
+
/**
|
501
|
+
* Parse the collection from Engine resource.
|
502
|
+
*
|
503
|
+
* @param {string} engineName
|
504
|
+
* A fully-qualified path representing Engine resource.
|
505
|
+
* @returns {string} A string representing the collection.
|
506
|
+
*/
|
507
|
+
matchCollectionFromEngineName(engineName: string): string | number;
|
508
|
+
/**
|
509
|
+
* Parse the engine from Engine resource.
|
510
|
+
*
|
511
|
+
* @param {string} engineName
|
512
|
+
* A fully-qualified path representing Engine resource.
|
513
|
+
* @returns {string} A string representing the engine.
|
514
|
+
*/
|
515
|
+
matchEngineFromEngineName(engineName: string): string | number;
|
474
516
|
/**
|
475
517
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
476
518
|
*
|
@@ -138,6 +138,7 @@ class UserEventServiceClient {
|
|
138
138
|
// identifiers to uniquely identify resources within the API.
|
139
139
|
// Create useful helper objects for these.
|
140
140
|
this.pathTemplates = {
|
141
|
+
enginePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/engines/{engine}'),
|
141
142
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
142
143
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
143
144
|
projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
|
@@ -648,6 +649,63 @@ class UserEventServiceClient {
|
|
648
649
|
// --------------------
|
649
650
|
// -- Path templates --
|
650
651
|
// --------------------
|
652
|
+
/**
|
653
|
+
* Return a fully-qualified engine resource name string.
|
654
|
+
*
|
655
|
+
* @param {string} project
|
656
|
+
* @param {string} location
|
657
|
+
* @param {string} collection
|
658
|
+
* @param {string} engine
|
659
|
+
* @returns {string} Resource name string.
|
660
|
+
*/
|
661
|
+
enginePath(project, location, collection, engine) {
|
662
|
+
return this.pathTemplates.enginePathTemplate.render({
|
663
|
+
project: project,
|
664
|
+
location: location,
|
665
|
+
collection: collection,
|
666
|
+
engine: engine,
|
667
|
+
});
|
668
|
+
}
|
669
|
+
/**
|
670
|
+
* Parse the project from Engine resource.
|
671
|
+
*
|
672
|
+
* @param {string} engineName
|
673
|
+
* A fully-qualified path representing Engine resource.
|
674
|
+
* @returns {string} A string representing the project.
|
675
|
+
*/
|
676
|
+
matchProjectFromEngineName(engineName) {
|
677
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).project;
|
678
|
+
}
|
679
|
+
/**
|
680
|
+
* Parse the location from Engine resource.
|
681
|
+
*
|
682
|
+
* @param {string} engineName
|
683
|
+
* A fully-qualified path representing Engine resource.
|
684
|
+
* @returns {string} A string representing the location.
|
685
|
+
*/
|
686
|
+
matchLocationFromEngineName(engineName) {
|
687
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).location;
|
688
|
+
}
|
689
|
+
/**
|
690
|
+
* Parse the collection from Engine resource.
|
691
|
+
*
|
692
|
+
* @param {string} engineName
|
693
|
+
* A fully-qualified path representing Engine resource.
|
694
|
+
* @returns {string} A string representing the collection.
|
695
|
+
*/
|
696
|
+
matchCollectionFromEngineName(engineName) {
|
697
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).collection;
|
698
|
+
}
|
699
|
+
/**
|
700
|
+
* Parse the engine from Engine resource.
|
701
|
+
*
|
702
|
+
* @param {string} engineName
|
703
|
+
* A fully-qualified path representing Engine resource.
|
704
|
+
* @returns {string} A string representing the engine.
|
705
|
+
*/
|
706
|
+
matchEngineFromEngineName(engineName) {
|
707
|
+
return this.pathTemplates.enginePathTemplate.match(engineName).engine;
|
708
|
+
}
|
651
709
|
/**
|
652
710
|
* Return a fully-qualified projectLocationCollectionDataStore resource name string.
|
653
711
|
*
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@google-cloud/discoveryengine",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.3.0",
|
4
4
|
"description": "Discovery Engine API client for Node.js",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
"devDependencies": {
|
52
52
|
"@types/mocha": "^9.0.0",
|
53
53
|
"@types/node": "^20.4.5",
|
54
|
-
"@types/sinon": "^
|
54
|
+
"@types/sinon": "^17.0.0",
|
55
55
|
"c8": "^8.0.1",
|
56
56
|
"gapic-tools": "^0.2.0",
|
57
57
|
"gts": "^5.0.0",
|
@@ -62,7 +62,7 @@
|
|
62
62
|
"long": "^5.2.3",
|
63
63
|
"mocha": "^9.2.2",
|
64
64
|
"pack-n-play": "^2.0.0",
|
65
|
-
"sinon": "^
|
65
|
+
"sinon": "^17.0.0",
|
66
66
|
"typescript": "^5.1.6"
|
67
67
|
},
|
68
68
|
"engines": {
|