@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.
Files changed (37) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +8 -0
  3. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +43 -10
  4. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +116 -0
  5. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +45 -3
  6. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +46 -12
  7. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -8
  8. package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +86 -0
  9. package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +15 -14
  10. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +58 -0
  11. package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +259 -0
  12. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +546 -0
  13. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +31 -25
  14. package/build/protos/protos.d.ts +5965 -1866
  15. package/build/protos/protos.js +39781 -1
  16. package/build/protos/protos.json +3963 -1
  17. package/build/src/index.d.ts +10 -1
  18. package/build/src/index.js +10 -1
  19. package/build/src/v1beta/completion_service_client.d.ts +455 -0
  20. package/build/src/v1beta/completion_service_client.js +659 -0
  21. package/build/src/v1beta/completion_service_client_config.json +43 -0
  22. package/build/src/v1beta/document_service_client.d.ts +174 -18
  23. package/build/src/v1beta/document_service_client.js +177 -6
  24. package/build/src/v1beta/document_service_client_config.json +5 -0
  25. package/build/src/v1beta/index.d.ts +3 -0
  26. package/build/src/v1beta/index.js +7 -1
  27. package/build/src/v1beta/recommendation_service_client.d.ts +108 -14
  28. package/build/src/v1beta/recommendation_service_client.js +128 -0
  29. package/build/src/v1beta/schema_service_client.d.ts +798 -0
  30. package/build/src/v1beta/schema_service_client.js +1122 -0
  31. package/build/src/v1beta/schema_service_client_config.json +63 -0
  32. package/build/src/v1beta/search_service_client.d.ts +851 -0
  33. package/build/src/v1beta/search_service_client.js +1070 -0
  34. package/build/src/v1beta/search_service_client_config.json +43 -0
  35. package/build/src/v1beta/user_event_service_client.d.ts +93 -0
  36. package/build/src/v1beta/user_event_service_client.js +128 -0
  37. package/package.json +8 -6
@@ -55,7 +55,7 @@ service RecommendationService {
55
55
  // Request message for Recommend method.
56
56
  message RecommendRequest {
57
57
  // Required. Full resource name of the format:
58
- // projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*
58
+ // `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
59
59
  //
60
60
  // Before you can request recommendations from your model, you must create at
61
61
  // least one serving config for it.
@@ -97,8 +97,8 @@ message RecommendRequest {
97
97
  //
98
98
  // Examples:
99
99
  //
100
- // * (filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))
101
- // * (filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))
100
+ // * `(filter_tags: ANY("Red", "Blue") OR filter_tags: ANY("Hot", "Cold"))`
101
+ // * `(filter_tags: ANY("Red", "Blue")) AND NOT (filter_tags: ANY("Green"))`
102
102
  //
103
103
  // If your filter blocks all results, the API will return generic
104
104
  // (unfiltered) popular Documents. If you only want results strictly matching
@@ -106,8 +106,9 @@ message RecommendRequest {
106
106
  // [RecommendRequest.params][google.cloud.discoveryengine.v1beta.RecommendRequest.params]
107
107
  // to receive empty results instead.
108
108
  //
109
- // Note that the API will never return Documents with storageStatus of
110
- // "EXPIRED" or "DELETED" regardless of filter choices.
109
+ // Note that the API will never return
110
+ // [Document][google.cloud.discoveryengine.v1beta.Document]s with
111
+ // `storageStatus` of `EXPIRED` or `DELETED` regardless of filter choices.
111
112
  string filter = 4;
112
113
 
113
114
  // Use validate only mode for this recommendation query. If set to true, a
@@ -122,22 +123,22 @@ message RecommendRequest {
122
123
  //
123
124
  // * `returnDocument`: Boolean. If set to true, the associated Document
124
125
  // object will be returned in
125
- // [RecommendResponse.results.document][RecommendationResult.document].
126
+ // [RecommendResponse.RecommendationResult.document][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document].
126
127
  // * `returnScore`: Boolean. If set to true, the recommendation 'score'
127
128
  // corresponding to each returned Document will be set in
128
- // [RecommendResponse.results.metadata][RecommendationResult.metadata]. The
129
- // given 'score' indicates the probability of a Document conversion given
130
- // the user's context and history.
129
+ // [RecommendResponse.RecommendationResult.metadata][google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata].
130
+ // The given 'score' indicates the probability of a Document conversion
131
+ // given the user's context and history.
131
132
  // * `strictFiltering`: Boolean. True by default. If set to false, the service
132
133
  // will return generic (unfiltered) popular Documents instead of empty if
133
134
  // your filter blocks all recommendation results.
134
135
  // * `diversityLevel`: String. Default empty. If set to be non-empty, then
135
136
  // it needs to be one of:
136
- // * 'no-diversity'
137
- // * 'low-diversity'
138
- // * 'medium-diversity'
139
- // * 'high-diversity'
140
- // * 'auto-diversity'
137
+ // * `no-diversity`
138
+ // * `low-diversity`
139
+ // * `medium-diversity`
140
+ // * `high-diversity`
141
+ // * `auto-diversity`
141
142
  // This gives request-level control and adjusts recommendation results
142
143
  // based on Document category.
143
144
  map<string, google.protobuf.Value> params = 6;
@@ -0,0 +1,58 @@
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.v1beta;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/struct.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "SchemaProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
31
+
32
+ // Defines the structure and layout of a type of document data.
33
+ message Schema {
34
+ option (google.api.resource) = {
35
+ type: "discoveryengine.googleapis.com/Schema"
36
+ pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/schemas/{schema}"
37
+ pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}"
38
+ };
39
+
40
+ // Schema representation. One of
41
+ // [struct_schema][google.cloud.discoveryengine.v1beta.Schema.struct_schema]
42
+ // or [json_schema][google.cloud.discoveryengine.v1beta.Schema.json_schema]
43
+ // should be provided otherwise an INVALID_ARGUMENT error is thrown.
44
+ oneof schema {
45
+ // The structured representation of the schema.
46
+ google.protobuf.Struct struct_schema = 2;
47
+
48
+ // The JSON representation of the schema.
49
+ string json_schema = 3;
50
+ }
51
+
52
+ // Immutable. The full resource name of the schema, in the format of
53
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
54
+ //
55
+ // This field must be a UTF-8 encoded string with a length limit of 1024
56
+ // characters.
57
+ string name = 1 [(google.api.field_behavior) = IMMUTABLE];
58
+ }
@@ -0,0 +1,259 @@
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.v1beta;
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/v1beta/schema.proto";
24
+ import "google/longrunning/operations.proto";
25
+ import "google/protobuf/empty.proto";
26
+ import "google/protobuf/timestamp.proto";
27
+
28
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
29
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
30
+ option java_multiple_files = true;
31
+ option java_outer_classname = "SchemaServiceProto";
32
+ option java_package = "com.google.cloud.discoveryengine.v1beta";
33
+ option objc_class_prefix = "DISCOVERYENGINE";
34
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
35
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
36
+
37
+ // Service for managing [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
38
+ service SchemaService {
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
+ // Gets a [Schema][google.cloud.discoveryengine.v1beta.Schema].
44
+ rpc GetSchema(GetSchemaRequest) returns (Schema) {
45
+ option (google.api.http) = {
46
+ get: "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}"
47
+ additional_bindings {
48
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}"
49
+ }
50
+ };
51
+ option (google.api.method_signature) = "name";
52
+ }
53
+
54
+ // Gets a list of [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
55
+ rpc ListSchemas(ListSchemasRequest) returns (ListSchemasResponse) {
56
+ option (google.api.http) = {
57
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas"
58
+ additional_bindings {
59
+ get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas"
60
+ }
61
+ };
62
+ option (google.api.method_signature) = "parent";
63
+ }
64
+
65
+ // Creates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
66
+ rpc CreateSchema(CreateSchemaRequest) returns (google.longrunning.Operation) {
67
+ option (google.api.http) = {
68
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/schemas"
69
+ body: "schema"
70
+ additional_bindings {
71
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/schemas"
72
+ body: "schema"
73
+ }
74
+ };
75
+ option (google.api.method_signature) = "parent,schema,schema_id";
76
+ option (google.longrunning.operation_info) = {
77
+ response_type: "google.cloud.discoveryengine.v1beta.Schema"
78
+ metadata_type: "google.cloud.discoveryengine.v1beta.CreateSchemaMetadata"
79
+ };
80
+ }
81
+
82
+ // Updates a [Schema][google.cloud.discoveryengine.v1beta.Schema].
83
+ rpc UpdateSchema(UpdateSchemaRequest) returns (google.longrunning.Operation) {
84
+ option (google.api.http) = {
85
+ patch: "/v1beta/{schema.name=projects/*/locations/*/dataStores/*/schemas/*}"
86
+ body: "schema"
87
+ additional_bindings {
88
+ patch: "/v1beta/{schema.name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}"
89
+ body: "schema"
90
+ }
91
+ };
92
+ option (google.longrunning.operation_info) = {
93
+ response_type: "google.cloud.discoveryengine.v1beta.Schema"
94
+ metadata_type: "google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata"
95
+ };
96
+ }
97
+
98
+ // Deletes a [Schema][google.cloud.discoveryengine.v1beta.Schema].
99
+ rpc DeleteSchema(DeleteSchemaRequest) returns (google.longrunning.Operation) {
100
+ option (google.api.http) = {
101
+ delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/schemas/*}"
102
+ additional_bindings {
103
+ delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/schemas/*}"
104
+ }
105
+ };
106
+ option (google.api.method_signature) = "name";
107
+ option (google.longrunning.operation_info) = {
108
+ response_type: "google.protobuf.Empty"
109
+ metadata_type: "google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata"
110
+ };
111
+ }
112
+ }
113
+
114
+ // Request message for
115
+ // [SchemaService.GetSchema][google.cloud.discoveryengine.v1beta.SchemaService.GetSchema]
116
+ // method.
117
+ message GetSchemaRequest {
118
+ // Required. The full resource name of the schema, in the format of
119
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
120
+ string name = 1 [
121
+ (google.api.field_behavior) = REQUIRED,
122
+ (google.api.resource_reference) = {
123
+ type: "discoveryengine.googleapis.com/Schema"
124
+ }
125
+ ];
126
+ }
127
+
128
+ // Request message for
129
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas]
130
+ // method.
131
+ message ListSchemasRequest {
132
+ // Required. The parent data store resource name, in the format of
133
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
134
+ string parent = 1 [
135
+ (google.api.field_behavior) = REQUIRED,
136
+ (google.api.resource_reference) = {
137
+ type: "discoveryengine.googleapis.com/DataStore"
138
+ }
139
+ ];
140
+
141
+ // The maximum number of [Schema][google.cloud.discoveryengine.v1beta.Schema]s
142
+ // to return. The service may return fewer than this value.
143
+ //
144
+ // If unspecified, at most 100
145
+ // [Schema][google.cloud.discoveryengine.v1beta.Schema]s will be returned.
146
+ //
147
+ // The maximum value is 1000; values above 1000 will be coerced to 1000.
148
+ int32 page_size = 2;
149
+
150
+ // A page token, received from a previous
151
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas]
152
+ // call. Provide this to retrieve the subsequent page.
153
+ //
154
+ // When paginating, all other parameters provided to
155
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas]
156
+ // must match the call that provided the page token.
157
+ string page_token = 3;
158
+ }
159
+
160
+ // Response message for
161
+ // [SchemaService.ListSchemas][google.cloud.discoveryengine.v1beta.SchemaService.ListSchemas]
162
+ // method.
163
+ message ListSchemasResponse {
164
+ // The [Schema][google.cloud.discoveryengine.v1beta.Schema]s.
165
+ repeated Schema schemas = 1;
166
+
167
+ // A token that can be sent as
168
+ // [ListSchemasRequest.page_token][google.cloud.discoveryengine.v1beta.ListSchemasRequest.page_token]
169
+ // to retrieve the next page. If this field is omitted, there are no
170
+ // subsequent pages.
171
+ string next_page_token = 2;
172
+ }
173
+
174
+ // Request message for
175
+ // [SchemaService.CreateSchema][google.cloud.discoveryengine.v1beta.SchemaService.CreateSchema]
176
+ // method.
177
+ message CreateSchemaRequest {
178
+ // Required. The parent data store resource name, in the format of
179
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
180
+ string parent = 1 [
181
+ (google.api.field_behavior) = REQUIRED,
182
+ (google.api.resource_reference) = {
183
+ type: "discoveryengine.googleapis.com/DataStore"
184
+ }
185
+ ];
186
+
187
+ // Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to
188
+ // create.
189
+ Schema schema = 2 [(google.api.field_behavior) = REQUIRED];
190
+
191
+ // Required. The ID to use for the
192
+ // [Schema][google.cloud.discoveryengine.v1beta.Schema], which will become the
193
+ // final component of the
194
+ // [Schema.name][google.cloud.discoveryengine.v1beta.Schema.name].
195
+ //
196
+ // This field should conform to
197
+ // [RFC-1034](https://tools.ietf.org/html/rfc1034) standard with a length
198
+ // limit of 63 characters.
199
+ string schema_id = 3 [(google.api.field_behavior) = REQUIRED];
200
+ }
201
+
202
+ // Request message for
203
+ // [SchemaService.UpdateSchema][google.cloud.discoveryengine.v1beta.SchemaService.UpdateSchema]
204
+ // method.
205
+ message UpdateSchemaRequest {
206
+ // Required. The [Schema][google.cloud.discoveryengine.v1beta.Schema] to
207
+ // update.
208
+ Schema schema = 1 [(google.api.field_behavior) = REQUIRED];
209
+
210
+ // If set to true, and the
211
+ // [Schema][google.cloud.discoveryengine.v1beta.Schema] is not found, a new
212
+ // [Schema][google.cloud.discoveryengine.v1beta.Schema] will be created. In
213
+ // this situation, `update_mask` is ignored.
214
+ bool allow_missing = 3;
215
+ }
216
+
217
+ // Request message for
218
+ // [SchemaService.DeleteSchema][google.cloud.discoveryengine.v1beta.SchemaService.DeleteSchema]
219
+ // method.
220
+ message DeleteSchemaRequest {
221
+ // Required. The full resource name of the schema, in the format of
222
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`.
223
+ string name = 1 [
224
+ (google.api.field_behavior) = REQUIRED,
225
+ (google.api.resource_reference) = {
226
+ type: "discoveryengine.googleapis.com/Schema"
227
+ }
228
+ ];
229
+ }
230
+
231
+ // Metadata for Create Schema LRO.
232
+ message CreateSchemaMetadata {
233
+ // Operation create time.
234
+ google.protobuf.Timestamp create_time = 1;
235
+
236
+ // Operation last update time. If the operation is done, this is also the
237
+ // finish time.
238
+ google.protobuf.Timestamp update_time = 2;
239
+ }
240
+
241
+ // Metadata for UpdateSchema LRO.
242
+ message UpdateSchemaMetadata {
243
+ // Operation create time.
244
+ google.protobuf.Timestamp create_time = 1;
245
+
246
+ // Operation last update time. If the operation is done, this is also the
247
+ // finish time.
248
+ google.protobuf.Timestamp update_time = 2;
249
+ }
250
+
251
+ // Metadata for DeleteSchema LRO.
252
+ message DeleteSchemaMetadata {
253
+ // Operation create time.
254
+ google.protobuf.Timestamp create_time = 1;
255
+
256
+ // Operation last update time. If the operation is done, this is also the
257
+ // finish time.
258
+ google.protobuf.Timestamp update_time = 2;
259
+ }