@google-cloud/discoveryengine 1.0.0 → 1.1.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 (53) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +7 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
  15. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
  17. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
  18. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
  19. package/build/protos/protos.d.ts +10140 -6536
  20. package/build/protos/protos.js +26499 -17277
  21. package/build/protos/protos.json +2311 -1440
  22. package/build/src/index.d.ts +4 -1
  23. package/build/src/index.js +4 -1
  24. package/build/src/v1/completion_service_client.d.ts +156 -6
  25. package/build/src/v1/completion_service_client.js +188 -4
  26. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  27. package/build/src/v1/conversational_search_service_client.js +1205 -0
  28. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  29. package/build/src/v1/document_service_client.d.ts +165 -18
  30. package/build/src/v1/document_service_client.js +215 -11
  31. package/build/src/v1/index.d.ts +1 -0
  32. package/build/src/v1/index.js +3 -1
  33. package/build/src/v1/schema_service_client.d.ts +148 -4
  34. package/build/src/v1/schema_service_client.js +207 -5
  35. package/build/src/v1/search_service_client.d.ts +238 -28
  36. package/build/src/v1/search_service_client.js +248 -20
  37. package/build/src/v1/user_event_service_client.d.ts +153 -9
  38. package/build/src/v1/user_event_service_client.js +207 -5
  39. package/build/src/v1beta/completion_service_client.d.ts +55 -4
  40. package/build/src/v1beta/completion_service_client.js +60 -4
  41. package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
  42. package/build/src/v1beta/conversational_search_service_client.js +60 -4
  43. package/build/src/v1beta/document_service_client.d.ts +55 -4
  44. package/build/src/v1beta/document_service_client.js +61 -5
  45. package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
  46. package/build/src/v1beta/recommendation_service_client.js +60 -4
  47. package/build/src/v1beta/schema_service_client.d.ts +55 -4
  48. package/build/src/v1beta/schema_service_client.js +61 -5
  49. package/build/src/v1beta/search_service_client.d.ts +142 -4
  50. package/build/src/v1beta/search_service_client.js +118 -4
  51. package/build/src/v1beta/user_event_service_client.d.ts +55 -4
  52. package/build/src/v1beta/user_event_service_client.js +61 -5
  53. package/package.json +3 -3
@@ -0,0 +1,68 @@
1
+ {
2
+ "interfaces": {
3
+ "google.cloud.discoveryengine.v1.ConversationalSearchService": {
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
+ "ce5b960a6ed052e690863808e4f0deff3dc7d49f": {
25
+ "initial_retry_delay_millis": 1000,
26
+ "retry_delay_multiplier": 1.3,
27
+ "max_retry_delay_millis": 10000,
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
+ "ConverseConversation": {
36
+ "timeout_millis": 30000,
37
+ "retry_codes_name": "unavailable",
38
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
39
+ },
40
+ "CreateConversation": {
41
+ "timeout_millis": 30000,
42
+ "retry_codes_name": "unavailable",
43
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
44
+ },
45
+ "DeleteConversation": {
46
+ "timeout_millis": 30000,
47
+ "retry_codes_name": "unavailable",
48
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
49
+ },
50
+ "UpdateConversation": {
51
+ "timeout_millis": 30000,
52
+ "retry_codes_name": "unavailable",
53
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
54
+ },
55
+ "GetConversation": {
56
+ "timeout_millis": 30000,
57
+ "retry_codes_name": "unavailable",
58
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
59
+ },
60
+ "ListConversations": {
61
+ "timeout_millis": 30000,
62
+ "retry_codes_name": "unavailable",
63
+ "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import type * as gax from 'google-gax';
3
- import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax';
3
+ import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
4
4
  import { Transform } from 'stream';
5
5
  import * as protos from '../../protos/protos';
6
6
  /**
@@ -23,6 +23,7 @@ export declare class DocumentServiceClient {
23
23
  innerApiCalls: {
24
24
  [name: string]: Function;
25
25
  };
26
+ locationsClient: LocationsClient;
26
27
  pathTemplates: {
27
28
  [name: string]: gax.PathTemplate;
28
29
  };
@@ -58,8 +59,7 @@ export declare class DocumentServiceClient {
58
59
  * API remote host.
59
60
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
60
61
  * Follows the structure of {@link gapicConfig}.
61
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
62
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
62
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
63
63
  * For more information, please check the
64
64
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
65
65
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -67,7 +67,7 @@ export declare class DocumentServiceClient {
67
67
  * HTTP implementation. Load only fallback version and pass it to the constructor:
68
68
  * ```
69
69
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
70
- * const client = new DocumentServiceClient({fallback: 'rest'}, gax);
70
+ * const client = new DocumentServiceClient({fallback: true}, gax);
71
71
  * ```
72
72
  */
73
73
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -293,7 +293,7 @@ export declare class DocumentServiceClient {
293
293
  * `false`, {@link protos.google.cloud.discoveryengine.v1.Document.id|Document.id}s have
294
294
  * to be specified using
295
295
  * {@link protos.google.cloud.discoveryengine.v1.ImportDocumentsRequest.id_field|id_field},
296
- * otherwises, documents without IDs will fail to be imported.
296
+ * otherwise, documents without IDs fail to be imported.
297
297
  *
298
298
  * Only set this field when using
299
299
  * {@link protos.google.cloud.discoveryengine.v1.GcsSource|GcsSource} or
@@ -301,7 +301,7 @@ export declare class DocumentServiceClient {
301
301
  * {@link protos.google.cloud.discoveryengine.v1.GcsSource.data_schema|GcsSource.data_schema}
302
302
  * or
303
303
  * {@link protos.google.cloud.discoveryengine.v1.BigQuerySource.data_schema|BigQuerySource.data_schema}
304
- * is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
304
+ * is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
305
305
  * @param {string} request.idField
306
306
  * The field in the Cloud Storage and BigQuery sources that indicates the
307
307
  * unique IDs of the documents.
@@ -311,12 +311,12 @@ export declare class DocumentServiceClient {
311
311
  * For {@link protos.google.cloud.discoveryengine.v1.BigQuerySource|BigQuerySource} it is
312
312
  * the column name of the BigQuery table where the unique ids are stored.
313
313
  *
314
- * The values of the JSON field or the BigQuery column will be used as the
314
+ * The values of the JSON field or the BigQuery column are used as the
315
315
  * {@link protos.google.cloud.discoveryengine.v1.Document.id|Document.id}s. The JSON field
316
316
  * or the BigQuery column must be of string type, and the values must be set
317
317
  * as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
318
- * with 1-63 characters. Otherwise, documents without valid IDs will fail to
319
- * be imported.
318
+ * with 1-63 characters. Otherwise, documents without valid IDs fail to be
319
+ * imported.
320
320
  *
321
321
  * Only set this field when using
322
322
  * {@link protos.google.cloud.discoveryengine.v1.GcsSource|GcsSource} or
@@ -431,9 +431,10 @@ export declare class DocumentServiceClient {
431
431
  * Use `default_branch` as the branch ID, to list documents under the default
432
432
  * branch.
433
433
  *
434
- * If the caller does not have permission to list {@link protos.|Documents}s under this
435
- * branch, regardless of whether or not this branch exists, a
436
- * `PERMISSION_DENIED` error is returned.
434
+ * If the caller does not have permission to list
435
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s under this branch,
436
+ * regardless of whether or not this branch exists, a `PERMISSION_DENIED`
437
+ * error is returned.
437
438
  * @param {number} request.pageSize
438
439
  * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
439
440
  * return. If unspecified, defaults to 100. The maximum allowed value is 1000.
@@ -480,9 +481,10 @@ export declare class DocumentServiceClient {
480
481
  * Use `default_branch` as the branch ID, to list documents under the default
481
482
  * branch.
482
483
  *
483
- * If the caller does not have permission to list {@link protos.|Documents}s under this
484
- * branch, regardless of whether or not this branch exists, a
485
- * `PERMISSION_DENIED` error is returned.
484
+ * If the caller does not have permission to list
485
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s under this branch,
486
+ * regardless of whether or not this branch exists, a `PERMISSION_DENIED`
487
+ * error is returned.
486
488
  * @param {number} request.pageSize
487
489
  * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
488
490
  * return. If unspecified, defaults to 100. The maximum allowed value is 1000.
@@ -524,9 +526,10 @@ export declare class DocumentServiceClient {
524
526
  * Use `default_branch` as the branch ID, to list documents under the default
525
527
  * branch.
526
528
  *
527
- * If the caller does not have permission to list {@link protos.|Documents}s under this
528
- * branch, regardless of whether or not this branch exists, a
529
- * `PERMISSION_DENIED` error is returned.
529
+ * If the caller does not have permission to list
530
+ * {@link protos.google.cloud.discoveryengine.v1.Document|Document}s under this branch,
531
+ * regardless of whether or not this branch exists, a `PERMISSION_DENIED`
532
+ * error is returned.
530
533
  * @param {number} request.pageSize
531
534
  * Maximum number of {@link protos.google.cloud.discoveryengine.v1.Document|Document}s to
532
535
  * return. If unspecified, defaults to 100. The maximum allowed value is 1000.
@@ -557,6 +560,57 @@ export declare class DocumentServiceClient {
557
560
  * region_tag:discoveryengine_v1_generated_DocumentService_ListDocuments_async
558
561
  */
559
562
  listDocumentsAsync(request?: protos.google.cloud.discoveryengine.v1.IListDocumentsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1.IDocument>;
563
+ /**
564
+ * Gets information about a location.
565
+ *
566
+ * @param {Object} request
567
+ * The request object that will be sent.
568
+ * @param {string} request.name
569
+ * Resource name for the location.
570
+ * @param {object} [options]
571
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
572
+ * @returns {Promise} - The promise which resolves to an array.
573
+ * The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
574
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
575
+ * for more details and examples.
576
+ * @example
577
+ * ```
578
+ * const [response] = await client.getLocation(request);
579
+ * ```
580
+ */
581
+ getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
582
+ /**
583
+ * Lists information about the supported locations for this service. Returns an iterable object.
584
+ *
585
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
586
+ * @param {Object} request
587
+ * The request object that will be sent.
588
+ * @param {string} request.name
589
+ * The resource that owns the locations collection, if applicable.
590
+ * @param {string} request.filter
591
+ * The standard list filter.
592
+ * @param {number} request.pageSize
593
+ * The standard list page size.
594
+ * @param {string} request.pageToken
595
+ * The standard list page token.
596
+ * @param {object} [options]
597
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
598
+ * @returns {Object}
599
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
600
+ * When you iterate the returned iterable, each element will be an object representing
601
+ * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
602
+ * so you can stop the iteration when you don't need more results.
603
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
604
+ * for more details and examples.
605
+ * @example
606
+ * ```
607
+ * const iterable = client.listLocationsAsync(request);
608
+ * for await (const response of iterable) {
609
+ * // process response
610
+ * }
611
+ * ```
612
+ */
613
+ listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
560
614
  /**
561
615
  * Gets the latest state of a long-running operation. Clients can use this
562
616
  * method to poll the operation result at intervals as recommended by the API
@@ -788,6 +842,57 @@ export declare class DocumentServiceClient {
788
842
  * @returns {string} A string representing the document.
789
843
  */
790
844
  matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
845
+ /**
846
+ * Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
847
+ *
848
+ * @param {string} project
849
+ * @param {string} location
850
+ * @param {string} collection
851
+ * @param {string} data_store
852
+ * @param {string} conversation
853
+ * @returns {string} Resource name string.
854
+ */
855
+ projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;
856
+ /**
857
+ * Parse the project from ProjectLocationCollectionDataStoreConversation resource.
858
+ *
859
+ * @param {string} projectLocationCollectionDataStoreConversationName
860
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
861
+ * @returns {string} A string representing the project.
862
+ */
863
+ matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
864
+ /**
865
+ * Parse the location from ProjectLocationCollectionDataStoreConversation resource.
866
+ *
867
+ * @param {string} projectLocationCollectionDataStoreConversationName
868
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
869
+ * @returns {string} A string representing the location.
870
+ */
871
+ matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
872
+ /**
873
+ * Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
874
+ *
875
+ * @param {string} projectLocationCollectionDataStoreConversationName
876
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
877
+ * @returns {string} A string representing the collection.
878
+ */
879
+ matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
880
+ /**
881
+ * Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
882
+ *
883
+ * @param {string} projectLocationCollectionDataStoreConversationName
884
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
885
+ * @returns {string} A string representing the data_store.
886
+ */
887
+ matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
888
+ /**
889
+ * Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
890
+ *
891
+ * @param {string} projectLocationCollectionDataStoreConversationName
892
+ * A fully-qualified path representing project_location_collection_data_store_conversation resource.
893
+ * @returns {string} A string representing the conversation.
894
+ */
895
+ matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
791
896
  /**
792
897
  * Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
793
898
  *
@@ -932,6 +1037,48 @@ export declare class DocumentServiceClient {
932
1037
  * @returns {string} A string representing the document.
933
1038
  */
934
1039
  matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
1040
+ /**
1041
+ * Return a fully-qualified projectLocationDataStoreConversation resource name string.
1042
+ *
1043
+ * @param {string} project
1044
+ * @param {string} location
1045
+ * @param {string} data_store
1046
+ * @param {string} conversation
1047
+ * @returns {string} Resource name string.
1048
+ */
1049
+ projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;
1050
+ /**
1051
+ * Parse the project from ProjectLocationDataStoreConversation resource.
1052
+ *
1053
+ * @param {string} projectLocationDataStoreConversationName
1054
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1055
+ * @returns {string} A string representing the project.
1056
+ */
1057
+ matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
1058
+ /**
1059
+ * Parse the location from ProjectLocationDataStoreConversation resource.
1060
+ *
1061
+ * @param {string} projectLocationDataStoreConversationName
1062
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1063
+ * @returns {string} A string representing the location.
1064
+ */
1065
+ matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
1066
+ /**
1067
+ * Parse the data_store from ProjectLocationDataStoreConversation resource.
1068
+ *
1069
+ * @param {string} projectLocationDataStoreConversationName
1070
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1071
+ * @returns {string} A string representing the data_store.
1072
+ */
1073
+ matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
1074
+ /**
1075
+ * Parse the conversation from ProjectLocationDataStoreConversation resource.
1076
+ *
1077
+ * @param {string} projectLocationDataStoreConversationName
1078
+ * A fully-qualified path representing project_location_data_store_conversation resource.
1079
+ * @returns {string} A string representing the conversation.
1080
+ */
1081
+ matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
935
1082
  /**
936
1083
  * Return a fully-qualified projectLocationDataStoreSchema resource name string.
937
1084
  *