@google-cloud/discoveryengine 0.7.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -27,7 +27,7 @@ const jsonProtos = require("../../protos/protos.json");
27
27
  const gapicConfig = require("./schema_service_client_config.json");
28
28
  const version = require('../../../package.json').version;
29
29
  /**
30
- * Service for managing {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s.
30
+ * Service for managing {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema}s.
31
31
  * @class
32
32
  * @memberof v1beta
33
33
  */
@@ -140,9 +140,11 @@ class SchemaServiceClient {
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
  // Some of the methods on this service return "paged" results,
@@ -175,6 +177,15 @@ class SchemaServiceClient {
175
177
  {
176
178
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*/operations/*}',
177
179
  },
180
+ {
181
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/operations/*}',
182
+ },
183
+ {
184
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites/operations/*}',
185
+ },
186
+ {
187
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*/operations/*}',
188
+ },
178
189
  {
179
190
  get: '/v1beta/{name=projects/*/locations/*/collections/*/operations/*}',
180
191
  },
@@ -201,9 +212,18 @@ class SchemaServiceClient {
201
212
  {
202
213
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}/operations',
203
214
  },
215
+ {
216
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/targetSites}/operations',
217
+ },
218
+ {
219
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine}/operations',
220
+ },
204
221
  {
205
222
  get: '/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*}/operations',
206
223
  },
224
+ {
225
+ get: '/v1beta/{name=projects/*/locations/*/collections/*/engines/*}/operations',
226
+ },
207
227
  {
208
228
  get: '/v1beta/{name=projects/*/locations/*/collections/*}/operations',
209
229
  },
@@ -384,8 +404,7 @@ class SchemaServiceClient {
384
404
  * The operation name that will be passed.
385
405
  * @returns {Promise} - The promise which resolves to an object.
386
406
  * The decoded operation object has result and metadata field to get information from.
387
- * Please see the
388
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
407
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
389
408
  * for more details and examples.
390
409
  * @example <caption>include:samples/generated/v1beta/schema_service.create_schema.js</caption>
391
410
  * region_tag:discoveryengine_v1beta_generated_SchemaService_CreateSchema_async
@@ -423,8 +442,7 @@ class SchemaServiceClient {
423
442
  * The operation name that will be passed.
424
443
  * @returns {Promise} - The promise which resolves to an object.
425
444
  * The decoded operation object has result and metadata field to get information from.
426
- * Please see the
427
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
445
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
428
446
  * for more details and examples.
429
447
  * @example <caption>include:samples/generated/v1beta/schema_service.update_schema.js</caption>
430
448
  * region_tag:discoveryengine_v1beta_generated_SchemaService_UpdateSchema_async
@@ -462,8 +480,7 @@ class SchemaServiceClient {
462
480
  * The operation name that will be passed.
463
481
  * @returns {Promise} - The promise which resolves to an object.
464
482
  * The decoded operation object has result and metadata field to get information from.
465
- * Please see the
466
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations)
483
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
467
484
  * for more details and examples.
468
485
  * @example <caption>include:samples/generated/v1beta/schema_service.delete_schema.js</caption>
469
486
  * region_tag:discoveryengine_v1beta_generated_SchemaService_DeleteSchema_async
@@ -503,31 +520,30 @@ class SchemaServiceClient {
503
520
  * Required. The parent data store resource name, in the format of
504
521
  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
505
522
  * @param {number} request.pageSize
506
- * The maximum number of {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s
523
+ * The maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema}s
507
524
  * to return. The service may return fewer than this value.
508
525
  *
509
526
  * If unspecified, at most 100
510
- * {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned.
527
+ * {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned.
511
528
  *
512
529
  * The maximum value is 1000; values above 1000 will be coerced to 1000.
513
530
  * @param {string} request.pageToken
514
531
  * A page token, received from a previous
515
- * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
532
+ * {@link protos.google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
516
533
  * call. Provide this to retrieve the subsequent page.
517
534
  *
518
535
  * When paginating, all other parameters provided to
519
- * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
536
+ * {@link protos.google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
520
537
  * must match the call that provided the page token.
521
538
  * @param {object} [options]
522
539
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
523
540
  * @returns {Stream}
524
- * An object stream which emits an object representing {@link google.cloud.discoveryengine.v1beta.Schema | Schema} on 'data' event.
541
+ * An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema} on 'data' event.
525
542
  * The client library will perform auto-pagination by default: it will call the API as many
526
543
  * times as needed. Note that it can affect your quota.
527
544
  * We recommend using `listSchemasAsync()`
528
545
  * method described below for async iteration which you can stop as needed.
529
- * Please see the
530
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
546
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
531
547
  * for more details and examples.
532
548
  */
533
549
  listSchemasStream(request, options) {
@@ -555,30 +571,29 @@ class SchemaServiceClient {
555
571
  * Required. The parent data store resource name, in the format of
556
572
  * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
557
573
  * @param {number} request.pageSize
558
- * The maximum number of {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s
574
+ * The maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema}s
559
575
  * to return. The service may return fewer than this value.
560
576
  *
561
577
  * If unspecified, at most 100
562
- * {@link google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned.
578
+ * {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema}s will be returned.
563
579
  *
564
580
  * The maximum value is 1000; values above 1000 will be coerced to 1000.
565
581
  * @param {string} request.pageToken
566
582
  * A page token, received from a previous
567
- * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
583
+ * {@link protos.google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
568
584
  * call. Provide this to retrieve the subsequent page.
569
585
  *
570
586
  * When paginating, all other parameters provided to
571
- * {@link google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
587
+ * {@link protos.google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas|SchemaService.ListSchemas}
572
588
  * must match the call that provided the page token.
573
589
  * @param {object} [options]
574
590
  * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
575
591
  * @returns {Object}
576
- * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
592
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
577
593
  * When you iterate the returned iterable, each element will be an object representing
578
- * {@link google.cloud.discoveryengine.v1beta.Schema | Schema}. The API will be called under the hood as needed, once per the page,
594
+ * {@link protos.google.cloud.discoveryengine.v1beta.Schema|Schema}. The API will be called under the hood as needed, once per the page,
579
595
  * so you can stop the iteration when you don't need more results.
580
- * Please see the
581
- * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
596
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
582
597
  * for more details and examples.
583
598
  * @example <caption>include:samples/generated/v1beta/schema_service.list_schemas.js</caption>
584
599
  * region_tag:discoveryengine_v1beta_generated_SchemaService_ListSchemas_async
@@ -867,6 +882,75 @@ class SchemaServiceClient {
867
882
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName) {
868
883
  return this.pathTemplates.projectLocationCollectionDataStoreBranchDocumentPathTemplate.match(projectLocationCollectionDataStoreBranchDocumentName).document;
869
884
  }
885
+ /**
886
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
887
+ *
888
+ * @param {string} project
889
+ * @param {string} location
890
+ * @param {string} collection
891
+ * @param {string} data_store
892
+ * @param {string} conversation
893
+ * @returns {string} Resource name string.
894
+ */
895
+ projectLocationCollectionDataStoreConversationPath(project, location, collection, dataStore, conversation) {
896
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.render({
897
+ project: project,
898
+ location: location,
899
+ collection: collection,
900
+ data_store: dataStore,
901
+ conversation: conversation,
902
+ });
903
+ }
904
+ /**
905
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
906
+ *
907
+ * @param {string} projectLocationCollectionDataStoreConversationName
908
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
909
+ * @returns {string} A string representing the project.
910
+ */
911
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
912
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).project;
913
+ }
914
+ /**
915
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
916
+ *
917
+ * @param {string} projectLocationCollectionDataStoreConversationName
918
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
919
+ * @returns {string} A string representing the location.
920
+ */
921
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
922
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).location;
923
+ }
924
+ /**
925
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
926
+ *
927
+ * @param {string} projectLocationCollectionDataStoreConversationName
928
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
929
+ * @returns {string} A string representing the collection.
930
+ */
931
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
932
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).collection;
933
+ }
934
+ /**
935
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
936
+ *
937
+ * @param {string} projectLocationCollectionDataStoreConversationName
938
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
939
+ * @returns {string} A string representing the data_store.
940
+ */
941
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
942
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).data_store;
943
+ }
944
+ /**
945
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
946
+ *
947
+ * @param {string} projectLocationCollectionDataStoreConversationName
948
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
949
+ * @returns {string} A string representing the conversation.
950
+ */
951
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName) {
952
+ return this.pathTemplates.projectLocationCollectionDataStoreConversationPathTemplate.match(projectLocationCollectionDataStoreConversationName).conversation;
953
+ }
870
954
  /**
871
955
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
872
956
  *
@@ -1050,6 +1134,63 @@ class SchemaServiceClient {
1050
1134
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName) {
1051
1135
  return this.pathTemplates.projectLocationDataStoreBranchDocumentPathTemplate.match(projectLocationDataStoreBranchDocumentName).document;
1052
1136
  }
1137
+ /**
1138
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1139
+ *
1140
+ * @param {string} project
1141
+ * @param {string} location
1142
+ * @param {string} data_store
1143
+ * @param {string} conversation
1144
+ * @returns {string} Resource name string.
1145
+ */
1146
+ projectLocationDataStoreConversationPath(project, location, dataStore, conversation) {
1147
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.render({
1148
+ project: project,
1149
+ location: location,
1150
+ data_store: dataStore,
1151
+ conversation: conversation,
1152
+ });
1153
+ }
1154
+ /**
1155
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1156
+ *
1157
+ * @param {string} projectLocationDataStoreConversationName
1158
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1159
+ * @returns {string} A string representing the project.
1160
+ */
1161
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1162
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).project;
1163
+ }
1164
+ /**
1165
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1166
+ *
1167
+ * @param {string} projectLocationDataStoreConversationName
1168
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1169
+ * @returns {string} A string representing the location.
1170
+ */
1171
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1172
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).location;
1173
+ }
1174
+ /**
1175
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1176
+ *
1177
+ * @param {string} projectLocationDataStoreConversationName
1178
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1179
+ * @returns {string} A string representing the data_store.
1180
+ */
1181
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1182
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).data_store;
1183
+ }
1184
+ /**
1185
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1186
+ *
1187
+ * @param {string} projectLocationDataStoreConversationName
1188
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1189
+ * @returns {string} A string representing the conversation.
1190
+ */
1191
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName) {
1192
+ return this.pathTemplates.projectLocationDataStoreConversationPathTemplate.match(projectLocationDataStoreConversationName).conversation;
1193
+ }
1053
1194
  /**
1054
1195
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
1055
1196
  *