@google-cloud/discoveryengine 0.4.1 → 0.6.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 +14 -0
- package/README.md +8 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +43 -10
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +116 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +45 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +46 -12
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +86 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +15 -14
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +58 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +259 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +546 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +31 -25
- package/build/protos/protos.d.ts +5965 -1866
- package/build/protos/protos.js +39781 -1
- package/build/protos/protos.json +3963 -1
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1beta/completion_service_client.d.ts +455 -0
- package/build/src/v1beta/completion_service_client.js +659 -0
- package/build/src/v1beta/completion_service_client_config.json +43 -0
- package/build/src/v1beta/document_service_client.d.ts +174 -18
- package/build/src/v1beta/document_service_client.js +177 -6
- package/build/src/v1beta/document_service_client_config.json +5 -0
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +7 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +108 -14
- package/build/src/v1beta/recommendation_service_client.js +128 -0
- package/build/src/v1beta/schema_service_client.d.ts +798 -0
- package/build/src/v1beta/schema_service_client.js +1122 -0
- package/build/src/v1beta/schema_service_client_config.json +63 -0
- package/build/src/v1beta/search_service_client.d.ts +851 -0
- package/build/src/v1beta/search_service_client.js +1070 -0
- package/build/src/v1beta/search_service_client_config.json +43 -0
- package/build/src/v1beta/user_event_service_client.d.ts +93 -0
- package/build/src/v1beta/user_event_service_client.js +128 -0
- package/package.json +8 -6
@@ -0,0 +1,43 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.cloud.discoveryengine.v1beta.SearchService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"non_idempotent": [],
|
6
|
+
"idempotent": [
|
7
|
+
"DEADLINE_EXCEEDED",
|
8
|
+
"UNAVAILABLE"
|
9
|
+
],
|
10
|
+
"unavailable": [
|
11
|
+
"UNAVAILABLE"
|
12
|
+
]
|
13
|
+
},
|
14
|
+
"retry_params": {
|
15
|
+
"default": {
|
16
|
+
"initial_retry_delay_millis": 100,
|
17
|
+
"retry_delay_multiplier": 1.3,
|
18
|
+
"max_retry_delay_millis": 60000,
|
19
|
+
"initial_rpc_timeout_millis": 60000,
|
20
|
+
"rpc_timeout_multiplier": 1,
|
21
|
+
"max_rpc_timeout_millis": 60000,
|
22
|
+
"total_timeout_millis": 600000
|
23
|
+
},
|
24
|
+
"319f27672a8be83550d842a373549dd84649a57e": {
|
25
|
+
"initial_retry_delay_millis": 100,
|
26
|
+
"retry_delay_multiplier": 1.3,
|
27
|
+
"max_retry_delay_millis": 5000,
|
28
|
+
"initial_rpc_timeout_millis": 60000,
|
29
|
+
"rpc_timeout_multiplier": 1,
|
30
|
+
"max_rpc_timeout_millis": 60000,
|
31
|
+
"total_timeout_millis": 600000
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"methods": {
|
35
|
+
"Search": {
|
36
|
+
"timeout_millis": 5000,
|
37
|
+
"retry_codes_name": "unavailable",
|
38
|
+
"retry_params_name": "319f27672a8be83550d842a373549dd84649a57e"
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
@@ -451,6 +451,57 @@ export declare class UserEventServiceClient {
|
|
451
451
|
* @returns {string} A string representing the document.
|
452
452
|
*/
|
453
453
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
|
454
|
+
/**
|
455
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
456
|
+
*
|
457
|
+
* @param {string} project
|
458
|
+
* @param {string} location
|
459
|
+
* @param {string} collection
|
460
|
+
* @param {string} data_store
|
461
|
+
* @param {string} schema
|
462
|
+
* @returns {string} Resource name string.
|
463
|
+
*/
|
464
|
+
projectLocationCollectionDataStoreSchemaPath(project: string, location: string, collection: string, dataStore: string, schema: string): string;
|
465
|
+
/**
|
466
|
+
* Parse the project from ProjectLocationCollectionDataStoreSchema resource.
|
467
|
+
*
|
468
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
469
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
470
|
+
* @returns {string} A string representing the project.
|
471
|
+
*/
|
472
|
+
matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
473
|
+
/**
|
474
|
+
* Parse the location from ProjectLocationCollectionDataStoreSchema resource.
|
475
|
+
*
|
476
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
477
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
478
|
+
* @returns {string} A string representing the location.
|
479
|
+
*/
|
480
|
+
matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
481
|
+
/**
|
482
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
|
483
|
+
*
|
484
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
485
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
486
|
+
* @returns {string} A string representing the collection.
|
487
|
+
*/
|
488
|
+
matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
489
|
+
/**
|
490
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
|
491
|
+
*
|
492
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
493
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
494
|
+
* @returns {string} A string representing the data_store.
|
495
|
+
*/
|
496
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
497
|
+
/**
|
498
|
+
* Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
|
499
|
+
*
|
500
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
501
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
502
|
+
* @returns {string} A string representing the schema.
|
503
|
+
*/
|
504
|
+
matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName: string): string | number;
|
454
505
|
/**
|
455
506
|
* Return a fully-qualified projectLocationDataStore resource name string.
|
456
507
|
*
|
@@ -535,6 +586,48 @@ export declare class UserEventServiceClient {
|
|
535
586
|
* @returns {string} A string representing the document.
|
536
587
|
*/
|
537
588
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
|
589
|
+
/**
|
590
|
+
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
591
|
+
*
|
592
|
+
* @param {string} project
|
593
|
+
* @param {string} location
|
594
|
+
* @param {string} data_store
|
595
|
+
* @param {string} schema
|
596
|
+
* @returns {string} Resource name string.
|
597
|
+
*/
|
598
|
+
projectLocationDataStoreSchemaPath(project: string, location: string, dataStore: string, schema: string): string;
|
599
|
+
/**
|
600
|
+
* Parse the project from ProjectLocationDataStoreSchema resource.
|
601
|
+
*
|
602
|
+
* @param {string} projectLocationDataStoreSchemaName
|
603
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
604
|
+
* @returns {string} A string representing the project.
|
605
|
+
*/
|
606
|
+
matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
607
|
+
/**
|
608
|
+
* Parse the location from ProjectLocationDataStoreSchema resource.
|
609
|
+
*
|
610
|
+
* @param {string} projectLocationDataStoreSchemaName
|
611
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
612
|
+
* @returns {string} A string representing the location.
|
613
|
+
*/
|
614
|
+
matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
615
|
+
/**
|
616
|
+
* Parse the data_store from ProjectLocationDataStoreSchema resource.
|
617
|
+
*
|
618
|
+
* @param {string} projectLocationDataStoreSchemaName
|
619
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
620
|
+
* @returns {string} A string representing the data_store.
|
621
|
+
*/
|
622
|
+
matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
623
|
+
/**
|
624
|
+
* Parse the schema from ProjectLocationDataStoreSchema resource.
|
625
|
+
*
|
626
|
+
* @param {string} projectLocationDataStoreSchemaName
|
627
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
628
|
+
* @returns {string} A string representing the schema.
|
629
|
+
*/
|
630
|
+
matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName: string): string | number;
|
538
631
|
/**
|
539
632
|
* Terminate the gRPC channel and close the client.
|
540
633
|
*
|
@@ -140,8 +140,10 @@ class UserEventServiceClient {
|
|
140
140
|
this.pathTemplates = {
|
141
141
|
projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
|
142
142
|
projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
143
|
+
projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
|
143
144
|
projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
|
144
145
|
projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
|
146
|
+
projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
|
145
147
|
};
|
146
148
|
const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
|
147
149
|
// This API contains "long-running operations", which return a
|
@@ -662,6 +664,75 @@ class UserEventServiceClient {
|
|
662
664
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
|
663
665
|
return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
|
664
666
|
}
|
667
|
+
/**
|
668
|
+
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
669
|
+
*
|
670
|
+
* @param {string} project
|
671
|
+
* @param {string} location
|
672
|
+
* @param {string} collection
|
673
|
+
* @param {string} data_store
|
674
|
+
* @param {string} schema
|
675
|
+
* @returns {string} Resource name string.
|
676
|
+
*/
|
677
|
+
projectLocationCollectionDataStoreSchemaPath(project, location, collection, dataStore, schema) {
|
678
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.render({
|
679
|
+
project: project,
|
680
|
+
location: location,
|
681
|
+
collection: collection,
|
682
|
+
data_store: dataStore,
|
683
|
+
schema: schema,
|
684
|
+
});
|
685
|
+
}
|
686
|
+
/**
|
687
|
+
* Parse the project from ProjectLocationCollectionDataStoreSchema resource.
|
688
|
+
*
|
689
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
690
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
691
|
+
* @returns {string} A string representing the project.
|
692
|
+
*/
|
693
|
+
matchProjectFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
694
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).project;
|
695
|
+
}
|
696
|
+
/**
|
697
|
+
* Parse the location from ProjectLocationCollectionDataStoreSchema resource.
|
698
|
+
*
|
699
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
700
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
701
|
+
* @returns {string} A string representing the location.
|
702
|
+
*/
|
703
|
+
matchLocationFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
704
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).location;
|
705
|
+
}
|
706
|
+
/**
|
707
|
+
* Parse the collection from ProjectLocationCollectionDataStoreSchema resource.
|
708
|
+
*
|
709
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
710
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
711
|
+
* @returns {string} A string representing the collection.
|
712
|
+
*/
|
713
|
+
matchCollectionFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
714
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).collection;
|
715
|
+
}
|
716
|
+
/**
|
717
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreSchema resource.
|
718
|
+
*
|
719
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
720
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
721
|
+
* @returns {string} A string representing the data_store.
|
722
|
+
*/
|
723
|
+
matchDataStoreFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
724
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).data_store;
|
725
|
+
}
|
726
|
+
/**
|
727
|
+
* Parse the schema from ProjectLocationCollectionDataStoreSchema resource.
|
728
|
+
*
|
729
|
+
* @param {string} projectLocationCollectionDataStoreSchemaName
|
730
|
+
* A fully-qualified path representing project_location_collection_data_store_schema resource.
|
731
|
+
* @returns {string} A string representing the schema.
|
732
|
+
*/
|
733
|
+
matchSchemaFromProjectLocationCollectionDataStoreSchemaName(projectLocationCollectionDataStoreSchemaName) {
|
734
|
+
return this.pathTemplates.projectLocationCollectionDataStoreSchemaPathTemplate.match(projectLocationCollectionDataStoreSchemaName).schema;
|
735
|
+
}
|
665
736
|
/**
|
666
737
|
* Return a fully-qualified projectLocationDataStore resource name string.
|
667
738
|
*
|
@@ -776,6 +847,63 @@ class UserEventServiceClient {
|
|
776
847
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
|
777
848
|
return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
|
778
849
|
}
|
850
|
+
/**
|
851
|
+
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
852
|
+
*
|
853
|
+
* @param {string} project
|
854
|
+
* @param {string} location
|
855
|
+
* @param {string} data_store
|
856
|
+
* @param {string} schema
|
857
|
+
* @returns {string} Resource name string.
|
858
|
+
*/
|
859
|
+
projectLocationDataStoreSchemaPath(project, location, dataStore, schema) {
|
860
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.render({
|
861
|
+
project: project,
|
862
|
+
location: location,
|
863
|
+
data_store: dataStore,
|
864
|
+
schema: schema,
|
865
|
+
});
|
866
|
+
}
|
867
|
+
/**
|
868
|
+
* Parse the project from ProjectLocationDataStoreSchema resource.
|
869
|
+
*
|
870
|
+
* @param {string} projectLocationDataStoreSchemaName
|
871
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
872
|
+
* @returns {string} A string representing the project.
|
873
|
+
*/
|
874
|
+
matchProjectFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
875
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).project;
|
876
|
+
}
|
877
|
+
/**
|
878
|
+
* Parse the location from ProjectLocationDataStoreSchema resource.
|
879
|
+
*
|
880
|
+
* @param {string} projectLocationDataStoreSchemaName
|
881
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
882
|
+
* @returns {string} A string representing the location.
|
883
|
+
*/
|
884
|
+
matchLocationFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
885
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).location;
|
886
|
+
}
|
887
|
+
/**
|
888
|
+
* Parse the data_store from ProjectLocationDataStoreSchema resource.
|
889
|
+
*
|
890
|
+
* @param {string} projectLocationDataStoreSchemaName
|
891
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
892
|
+
* @returns {string} A string representing the data_store.
|
893
|
+
*/
|
894
|
+
matchDataStoreFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
895
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).data_store;
|
896
|
+
}
|
897
|
+
/**
|
898
|
+
* Parse the schema from ProjectLocationDataStoreSchema resource.
|
899
|
+
*
|
900
|
+
* @param {string} projectLocationDataStoreSchemaName
|
901
|
+
* A fully-qualified path representing project_location_data_store_schema resource.
|
902
|
+
* @returns {string} A string representing the schema.
|
903
|
+
*/
|
904
|
+
matchSchemaFromProjectLocationDataStoreSchemaName(projectLocationDataStoreSchemaName) {
|
905
|
+
return this.pathTemplates.projectLocationDataStoreSchemaPathTemplate.match(projectLocationDataStoreSchemaName).schema;
|
906
|
+
}
|
779
907
|
/**
|
780
908
|
* Terminate the gRPC channel and close the client.
|
781
909
|
*
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@google-cloud/discoveryengine",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.6.0",
|
4
4
|
"description": "Discovery Engine API client for Node.js",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -31,7 +31,7 @@
|
|
31
31
|
],
|
32
32
|
"scripts": {
|
33
33
|
"clean": "gts clean",
|
34
|
-
"compile": "tsc -p . && cp -r protos build/
|
34
|
+
"compile": "tsc -p . && cp -r protos build/",
|
35
35
|
"compile-protos": "compileProtos src",
|
36
36
|
"docs": "jsdoc -c .jsdoc.js",
|
37
37
|
"predocs-test": "npm run docs",
|
@@ -39,10 +39,11 @@
|
|
39
39
|
"fix": "gts fix",
|
40
40
|
"lint": "gts check",
|
41
41
|
"prepare": "npm run compile-protos && npm run compile",
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"samples-test": "
|
45
|
-
"
|
42
|
+
"prelint": "cd samples; npm link ../; npm i",
|
43
|
+
"postpack": "minifyProtoJson",
|
44
|
+
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
|
45
|
+
"system-test": "c8 mocha build/system-test",
|
46
|
+
"test": "c8 mocha build/test"
|
46
47
|
},
|
47
48
|
"dependencies": {
|
48
49
|
"google-gax": "^3.5.8"
|
@@ -57,6 +58,7 @@
|
|
57
58
|
"jsdoc-fresh": "^2.0.0",
|
58
59
|
"jsdoc-region-tag": "^2.0.0",
|
59
60
|
"linkinator": "^4.0.0",
|
61
|
+
"long": "^5.2.3",
|
60
62
|
"mocha": "^9.2.2",
|
61
63
|
"null-loader": "^4.0.1",
|
62
64
|
"pack-n-play": "^1.0.0-2",
|