@google-cloud/discoveryengine 0.7.0 → 1.0.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +6 -0
  3. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +1 -2
  4. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +131 -0
  6. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +281 -0
  7. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +6 -5
  8. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
  9. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -22
  10. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +193 -47
  12. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +41 -36
  13. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
  14. package/build/protos/protos.d.ts +6529 -4472
  15. package/build/protos/protos.js +16561 -11622
  16. package/build/protos/protos.json +1842 -1317
  17. package/build/src/v1/completion_service_client.d.ts +6 -7
  18. package/build/src/v1/document_service_client.d.ts +83 -94
  19. package/build/src/v1/document_service_client.js +18 -22
  20. package/build/src/v1/schema_service_client.d.ts +39 -49
  21. package/build/src/v1/schema_service_client.js +17 -22
  22. package/build/src/v1/search_service_client.d.ts +31 -34
  23. package/build/src/v1/search_service_client.js +21 -23
  24. package/build/src/v1/user_event_service_client.d.ts +6 -10
  25. package/build/src/v1/user_event_service_client.js +1 -2
  26. package/build/src/v1beta/completion_service_client.d.ts +106 -8
  27. package/build/src/v1beta/completion_service_client.js +128 -0
  28. package/build/src/v1beta/conversational_search_service_client.d.ts +876 -0
  29. package/build/src/v1beta/conversational_search_service_client.js +1149 -0
  30. package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
  31. package/build/src/v1beta/document_service_client.d.ts +183 -98
  32. package/build/src/v1beta/document_service_client.js +166 -22
  33. package/build/src/v1beta/index.d.ts +1 -0
  34. package/build/src/v1beta/index.js +3 -1
  35. package/build/src/v1beta/recommendation_service_client.d.ts +103 -11
  36. package/build/src/v1beta/recommendation_service_client.js +128 -0
  37. package/build/src/v1beta/schema_service_client.d.ts +132 -49
  38. package/build/src/v1beta/schema_service_client.js +163 -22
  39. package/build/src/v1beta/search_service_client.d.ts +163 -67
  40. package/build/src/v1beta/search_service_client.js +175 -45
  41. package/build/src/v1beta/user_event_service_client.d.ts +104 -15
  42. package/build/src/v1beta/user_event_service_client.js +147 -2
  43. package/package.json +8 -11
@@ -140,9 +140,11 @@ class UserEventServiceClient {
140
140
  this.pathTemplates = {
141
141
  projectLocationCollectionDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}'),
142
142
  projectLocationCollectionDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
143
+ projectLocationCollectionDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}'),
143
144
  projectLocationCollectionDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}'),
144
145
  projectLocationDataStorePathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}'),
145
146
  projectLocationDataStoreBranchDocumentPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}/documents/{document}'),
147
+ projectLocationDataStoreConversationPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}'),
146
148
  projectLocationDataStoreSchemaPathTemplate: new this._gaxModule.PathTemplate('projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}'),
147
149
  };
148
150
  const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos);
@@ -169,6 +171,15 @@ class UserEventServiceClient {
169
171
  {
170
172
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
171
173
  },
174
+ {
175
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
176
+ },
177
+ {
178
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
179
+ },
180
+ {
181
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
182
+ },
172
183
  {
173
184
  get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
174
185
  },
@@ -195,9 +206,18 @@ class UserEventServiceClient {
195
206
  {
196
207
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
197
208
  },
209
+ {
210
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
211
+ },
212
+ {
213
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
214
+ },
198
215
  {
199
216
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
200
217
  },
218
+ {
219
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
220
+ },
201
221
  {
202
222
  get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
203
223
  },
@@ -389,8 +409,7 @@ class UserEventServiceClient {
389
409
  * The operation name that will be passed.
390
410
  * @returns {Promise} - The promise which resolves to an object.
391
411
  * The decoded operation object has result and metadata field to get information from.
392
- * Please see the
393
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
412
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
394
413
  * for more details and examples.
395
414
  * @example <caption>include:samples/generated/v1beta/user_event_service.import_user_events.js</caption>
396
415
  * region_tag:discoveryengine_v1beta_generated_UserEventService_ImportUserEvents_async
@@ -670,6 +689,75 @@ class UserEventServiceClient {
670
689
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
671
690
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
672
691
  }
692
+ /**
693
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
694
+ *
695
+ * @param {string} project
696
+ * @param {string} location
697
+ * @param {string} collection
698
+ * @param {string} data_store
699
+ * @param {string} conversation
700
+ * @returns {string} Resource name string.
701
+ */
702
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
703
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
704
+ project: project,
705
+ location: location,
706
+ collection: collection,
707
+ data_store: dataStore,
708
+ conversation: conversation,
709
+ });
710
+ }
711
+ /**
712
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
713
+ *
714
+ * @param {string} projectLocationCollectionDataStoreConversationName
715
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
716
+ * @returns {string} A string representing the project.
717
+ */
718
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
719
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
720
+ }
721
+ /**
722
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
723
+ *
724
+ * @param {string} projectLocationCollectionDataStoreConversationName
725
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
726
+ * @returns {string} A string representing the location.
727
+ */
728
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
729
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
730
+ }
731
+ /**
732
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
733
+ *
734
+ * @param {string} projectLocationCollectionDataStoreConversationName
735
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
736
+ * @returns {string} A string representing the collection.
737
+ */
738
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
739
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
740
+ }
741
+ /**
742
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
743
+ *
744
+ * @param {string} projectLocationCollectionDataStoreConversationName
745
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
746
+ * @returns {string} A string representing the data_store.
747
+ */
748
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
749
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
750
+ }
751
+ /**
752
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
753
+ *
754
+ * @param {string} projectLocationCollectionDataStoreConversationName
755
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
756
+ * @returns {string} A string representing the conversation.
757
+ */
758
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
759
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
760
+ }
673
761
  /**
674
762
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
675
763
  *
@@ -853,6 +941,63 @@ class UserEventServiceClient {
853
941
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
854
942
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
855
943
  }
944
+ /**
945
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
946
+ *
947
+ * @param {string} project
948
+ * @param {string} location
949
+ * @param {string} data_store
950
+ * @param {string} conversation
951
+ * @returns {string} Resource name string.
952
+ */
953
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
954
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
955
+ project: project,
956
+ location: location,
957
+ data_store: dataStore,
958
+ conversation: conversation,
959
+ });
960
+ }
961
+ /**
962
+ * Parse the project from ProjectLocationDataStoreConversation resource.
963
+ *
964
+ * @param {string} projectLocationDataStoreConversationName
965
+ * A fully-qualified path representing project_location_data_store_conversation resource.
966
+ * @returns {string} A string representing the project.
967
+ */
968
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
969
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
970
+ }
971
+ /**
972
+ * Parse the location from ProjectLocationDataStoreConversation resource.
973
+ *
974
+ * @param {string} projectLocationDataStoreConversationName
975
+ * A fully-qualified path representing project_location_data_store_conversation resource.
976
+ * @returns {string} A string representing the location.
977
+ */
978
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
979
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
980
+ }
981
+ /**
982
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
983
+ *
984
+ * @param {string} projectLocationDataStoreConversationName
985
+ * A fully-qualified path representing project_location_data_store_conversation resource.
986
+ * @returns {string} A string representing the data_store.
987
+ */
988
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
989
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
990
+ }
991
+ /**
992
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
993
+ *
994
+ * @param {string} projectLocationDataStoreConversationName
995
+ * A fully-qualified path representing project_location_data_store_conversation resource.
996
+ * @returns {string} A string representing the conversation.
997
+ */
998
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
999
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1000
+ }
856
1001
  /**
857
1002
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
858
1003
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google-cloud/discoveryengine",
3
- "version": "0.7.0",
3
+ "version": "1.0.0",
4
4
  "description": "Discovery Engine API client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,29 +46,26 @@
46
46
  "test": "c8 mocha build/test"
47
47
  },
48
48
  "dependencies": {
49
- "google-gax": "^3.5.8"
49
+ "google-gax": "^4.0.3"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/mocha": "^9.0.0",
53
- "@types/node": "^18.0.0",
53
+ "@types/node": "^20.4.5",
54
54
  "@types/sinon": "^10.0.0",
55
- "c8": "^7.3.5",
56
- "gts": "^3.1.0",
55
+ "c8": "^8.0.1",
56
+ "gapic-tools": "^0.1.8",
57
+ "gts": "^5.0.0",
57
58
  "jsdoc": "^4.0.0",
58
59
  "jsdoc-fresh": "^2.0.0",
59
60
  "jsdoc-region-tag": "^2.0.0",
60
61
  "linkinator": "4.1.2",
61
62
  "long": "^5.2.3",
62
63
  "mocha": "^9.2.2",
63
- "null-loader": "^4.0.1",
64
64
  "pack-n-play": "^1.0.0-2",
65
65
  "sinon": "^15.0.0",
66
- "ts-loader": "^9.0.0",
67
- "typescript": "^4.6.4",
68
- "webpack": "^5.9.0",
69
- "webpack-cli": "^5.0.0"
66
+ "typescript": "^5.1.6"
70
67
  },
71
68
  "engines": {
72
- "node": ">=12.0.0"
69
+ "node": ">=14.0.0"
73
70
  }
74
71
  }