@google-cloud/discoveryengine 1.2.0 → 1.3.1

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 (63) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +25 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +38 -8
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +3 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +39 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +1 -1
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +9 -3
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +123 -3
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +147 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +164 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +540 -0
  16. package/build/protos/protos.d.ts +10923 -3222
  17. package/build/protos/protos.js +29891 -12914
  18. package/build/protos/protos.json +2367 -668
  19. package/build/src/index.js +1 -1
  20. package/build/src/v1/completion_service_client.js +1 -1
  21. package/build/src/v1/conversational_search_service_client.js +1 -1
  22. package/build/src/v1/document_service_client.js +1 -1
  23. package/build/src/v1/index.js +1 -1
  24. package/build/src/v1/schema_service_client.js +1 -1
  25. package/build/src/v1/search_service_client.js +1 -1
  26. package/build/src/v1/user_event_service_client.js +1 -1
  27. package/build/src/v1alpha/completion_service_client.d.ts +261 -0
  28. package/build/src/v1alpha/completion_service_client.js +360 -0
  29. package/build/src/v1alpha/conversational_search_service_client.d.ts +278 -0
  30. package/build/src/v1alpha/conversational_search_service_client.js +360 -0
  31. package/build/src/v1alpha/data_store_service_client.d.ts +1279 -0
  32. package/build/src/v1alpha/data_store_service_client.js +1739 -0
  33. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  34. package/build/src/v1alpha/document_service_client.d.ts +336 -0
  35. package/build/src/v1alpha/document_service_client.js +472 -2
  36. package/build/src/v1alpha/engine_service_client.d.ts +1298 -0
  37. package/build/src/v1alpha/engine_service_client.js +1789 -0
  38. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  39. package/build/src/v1alpha/index.d.ts +3 -0
  40. package/build/src/v1alpha/index.js +7 -1
  41. package/build/src/v1alpha/recommendation_service_client.d.ts +345 -3
  42. package/build/src/v1alpha/recommendation_service_client.js +464 -0
  43. package/build/src/v1alpha/schema_service_client.d.ts +261 -0
  44. package/build/src/v1alpha/schema_service_client.js +368 -2
  45. package/build/src/v1alpha/search_service_client.d.ts +453 -9
  46. package/build/src/v1alpha/search_service_client.js +542 -6
  47. package/build/src/v1alpha/search_tuning_service_client.d.ts +968 -0
  48. package/build/src/v1alpha/search_tuning_service_client.js +1452 -0
  49. package/build/src/v1alpha/search_tuning_service_client_config.json +30 -0
  50. package/build/src/v1alpha/site_search_engine_service_client.d.ts +856 -1
  51. package/build/src/v1alpha/site_search_engine_service_client.js +993 -34
  52. package/build/src/v1alpha/site_search_engine_service_client_config.json +44 -0
  53. package/build/src/v1alpha/user_event_service_client.d.ts +261 -0
  54. package/build/src/v1alpha/user_event_service_client.js +368 -2
  55. package/build/src/v1beta/completion_service_client.js +1 -1
  56. package/build/src/v1beta/conversational_search_service_client.js +1 -1
  57. package/build/src/v1beta/document_service_client.js +1 -1
  58. package/build/src/v1beta/index.js +1 -1
  59. package/build/src/v1beta/recommendation_service_client.js +1 -1
  60. package/build/src/v1beta/schema_service_client.js +1 -1
  61. package/build/src/v1beta/search_service_client.js +1 -1
  62. package/build/src/v1beta/user_event_service_client.js +1 -1
  63. package/package.json +4 -4
@@ -0,0 +1,147 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/import_config.proto";
24
+ import "google/longrunning/operations.proto";
25
+ import "google/protobuf/timestamp.proto";
26
+ import "google/rpc/status.proto";
27
+
28
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
29
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "SearchTuningServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
36
+
37
+ // Service for search tuning.
38
+ service SearchTuningService {
39
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
40
+ option (google.api.oauth_scopes) =
41
+ "https://www.googleapis.com/auth/cloud-platform";
42
+
43
+ // Trains a custom model.
44
+ rpc TrainCustomModel(TrainCustomModelRequest)
45
+ returns (google.longrunning.Operation) {
46
+ option (google.api.http) = {
47
+ post: "/v1alpha/{data_store=projects/*/locations/*/collections/*/dataStores/*}:trainCustomModel"
48
+ body: "*"
49
+ };
50
+ option (google.longrunning.operation_info) = {
51
+ response_type: "google.cloud.discoveryengine.v1alpha.TrainCustomModelResponse"
52
+ metadata_type: "google.cloud.discoveryengine.v1alpha.TrainCustomModelMetadata"
53
+ };
54
+ }
55
+ }
56
+
57
+ // Request message for
58
+ // [SearchTuningService.TrainCustomModel][google.cloud.discoveryengine.v1alpha.SearchTuningService.TrainCustomModel]
59
+ // method.
60
+ message TrainCustomModelRequest {
61
+ // Gcs training data input.
62
+ message GcsTrainingInput {
63
+ // The gcs corpus data which could be associated in train data.
64
+ // The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
65
+ // A newline delimited jsonl/ndjson file.
66
+ // * For search-tuning model, each line should have the _id, title
67
+ // and text. Example: {"_id": "doc1", title: "relevant doc", "text":
68
+ // "relevant text"}
69
+ string corpus_data_path = 1;
70
+
71
+ // The gcs query data which could be associated in train data.
72
+ // The data path format is gs://<bucket_to_data>/<jsonl_file_name>.
73
+ // A newline delimited jsonl/ndjson file.
74
+ // * For search-tuning model, each line should have the _id
75
+ // and text. Example: {"_id": "query1", "text": "example query"}
76
+ string query_data_path = 2;
77
+
78
+ // Gcs training data path whose format should be
79
+ // gs://<bucket_to_data>/<tsv_file_name>. The file should be in tsv format.
80
+ // Each line should have the doc_id and query_id and score (number).
81
+ // * For search-tuning model, it should have the query-id corpus-id
82
+ // score as tsv file header. The score should be a number in [0, inf+). The
83
+ // larger the number is, the more relevant the pair is. Example:
84
+ // query-id\tcorpus-id\tscore
85
+ // query1\tdoc1\t1
86
+ string train_data_path = 3;
87
+
88
+ // Gcs test data. Same format as train_data_path. If not provided, a
89
+ // random 80/20 train/test split will be performed on train_data_path.
90
+ string test_data_path = 4;
91
+ }
92
+
93
+ // Model training input.
94
+ oneof training_input {
95
+ // Gcs training input.
96
+ GcsTrainingInput gcs_training_input = 2;
97
+ }
98
+
99
+ // Required. The resource name of the Data Store, such as
100
+ // `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
101
+ // This field is used to identify the data store where to train the models.
102
+ string data_store = 1 [
103
+ (google.api.field_behavior) = REQUIRED,
104
+ (google.api.resource_reference) = {
105
+ type: "discoveryengine.googleapis.com/DataStore"
106
+ }
107
+ ];
108
+
109
+ // Model to be trained. Supported values are:
110
+ //
111
+ // * **search-tuning**: Fine tuning the search system based on data provided.
112
+ string model_type = 3;
113
+
114
+ // The desired location of errors incurred during the data ingestion and
115
+ // training.
116
+ ImportErrorConfig error_config = 4;
117
+ }
118
+
119
+ // Response of the
120
+ // [TrainCustomModelRequest][google.cloud.discoveryengine.v1alpha.TrainCustomModelRequest].
121
+ // This message is returned by the google.longrunning.Operations.response field.
122
+ message TrainCustomModelResponse {
123
+ // A sample of errors encountered while processing the data.
124
+ repeated google.rpc.Status error_samples = 1;
125
+
126
+ // Echoes the destination for the complete errors in the request if set.
127
+ ImportErrorConfig error_config = 2;
128
+
129
+ // The trained model status. Possible values are:
130
+ //
131
+ // * **bad-data**: The training data quality is bad.
132
+ // * **no-improvement**: Tuning didn't improve performance. Won't deploy.
133
+ // * **in-progress**: Model training is in progress.
134
+ // * **ready**: The model is ready for serving.
135
+ string model_status = 3;
136
+ }
137
+
138
+ // Metadata related to the progress of the TrainCustomModel operation. This is
139
+ // returned by the google.longrunning.Operation.metadata field.
140
+ message TrainCustomModelMetadata {
141
+ // Operation create time.
142
+ google.protobuf.Timestamp create_time = 1;
143
+
144
+ // Operation last update time. If the operation is done, this is also the
145
+ // finish time.
146
+ google.protobuf.Timestamp update_time = 2;
147
+ }
@@ -0,0 +1,164 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SiteSearchEngineProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // SiteSearchEngine captures DataStore level site search persisting
33
+ // configurations. It is a singleton value per data store.
34
+ message SiteSearchEngine {
35
+ option (google.api.resource) = {
36
+ type: "discoveryengine.googleapis.com/SiteSearchEngine"
37
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine"
38
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine"
39
+ };
40
+
41
+ // The fully qualified resource name of the site search engine.
42
+ // Format: `projects/*/locations/*/dataStores/*/siteSearchEngine`
43
+ string name = 1;
44
+ }
45
+
46
+ // A target site for the SiteSearchEngine.
47
+ message TargetSite {
48
+ option (google.api.resource) = {
49
+ type: "discoveryengine.googleapis.com/TargetSite"
50
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}"
51
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}"
52
+ };
53
+
54
+ // Site search indexing failure reasons.
55
+ message FailureReason {
56
+ message QuotaFailure {}
57
+
58
+ oneof failure {
59
+ // Failed due to insufficient quota.
60
+ QuotaFailure quota_failure = 1;
61
+ }
62
+ }
63
+
64
+ // Possible target site types.
65
+ enum Type {
66
+ // This value is unused. In this case, server behavior defaults to
67
+ // [Type.INCLUDE][google.cloud.discoveryengine.v1alpha.TargetSite.Type.INCLUDE].
68
+ TYPE_UNSPECIFIED = 0;
69
+
70
+ // Include the target site.
71
+ INCLUDE = 1;
72
+
73
+ // Exclude the target site.
74
+ EXCLUDE = 2;
75
+ }
76
+
77
+ // Target site indexing status enumeration.
78
+ enum IndexingStatus {
79
+ // Defaults to SUCCEEDED.
80
+ INDEXING_STATUS_UNSPECIFIED = 0;
81
+
82
+ // The target site is in the update queue and will be picked up by indexing
83
+ // pipeline.
84
+ PENDING = 1;
85
+
86
+ // The target site fails to be indexed.
87
+ FAILED = 2;
88
+
89
+ // The target site has been indexed.
90
+ SUCCEEDED = 3;
91
+
92
+ // The previously indexed target site has been marked to be deleted. This is
93
+ // a transitioning state which will resulted in either:
94
+ // 1. target site deleted if unindexing is successful;
95
+ // 2. state reverts to SUCCEEDED if the unindexing fails.
96
+ DELETING = 4;
97
+ }
98
+
99
+ // Output only. The fully qualified resource name of the target site.
100
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`
101
+ // The `target_site_id` is system-generated.
102
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
103
+
104
+ // Required. Input only. The user provided URI pattern from which the
105
+ // `generated_uri_pattern` is generated.
106
+ string provided_uri_pattern = 2 [
107
+ (google.api.field_behavior) = REQUIRED,
108
+ (google.api.field_behavior) = INPUT_ONLY
109
+ ];
110
+
111
+ // The type of the target site, e.g. whether the site is to be included or
112
+ // excluded.
113
+ Type type = 3;
114
+
115
+ // Input only. If set to false, a uri_pattern is generated to include all
116
+ // pages whose address contains the provided_uri_pattern. If set to true, an
117
+ // uri_pattern is generated to try to be an exact match of the
118
+ // provided_uri_pattern or just the specific page if the provided_uri_pattern
119
+ // is a specific one. provided_uri_pattern is always normalized to
120
+ // generate the URI pattern to be used by the search engine.
121
+ bool exact_match = 6 [(google.api.field_behavior) = INPUT_ONLY];
122
+
123
+ // Output only. This is system-generated based on the provided_uri_pattern.
124
+ string generated_uri_pattern = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
125
+
126
+ // Output only. Site ownership and validity verification status.
127
+ SiteVerificationInfo site_verification_info = 7
128
+ [(google.api.field_behavior) = OUTPUT_ONLY];
129
+
130
+ // Output only. Indexing status.
131
+ IndexingStatus indexing_status = 8
132
+ [(google.api.field_behavior) = OUTPUT_ONLY];
133
+
134
+ // Output only. The target site's last updated time.
135
+ google.protobuf.Timestamp update_time = 5
136
+ [(google.api.field_behavior) = OUTPUT_ONLY];
137
+
138
+ // Output only. Failure reason.
139
+ FailureReason failure_reason = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
140
+ }
141
+
142
+ // Verification information for target sites in advanced site search.
143
+ message SiteVerificationInfo {
144
+ // Site verification state.
145
+ enum SiteVerificationState {
146
+ // Defaults to VERIFIED.
147
+ SITE_VERIFICATION_STATE_UNSPECIFIED = 0;
148
+
149
+ // Site ownership verified.
150
+ VERIFIED = 1;
151
+
152
+ // Site ownership pending verification or verification failed.
153
+ UNVERIFIED = 2;
154
+
155
+ // Site exempt from verification, e.g. a public website that opens to all.
156
+ EXEMPTED = 3;
157
+ }
158
+
159
+ // Site verification state indicating the ownership and validity.
160
+ SiteVerificationState site_verification_state = 1;
161
+
162
+ // Latest site verification time.
163
+ google.protobuf.Timestamp verify_time = 2;
164
+ }