@google-cloud/discoveryengine 1.1.0 → 1.3.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 (59) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +39 -0
  3. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +190 -0
  4. package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
  5. package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
  6. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
  7. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +98 -0
  8. package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +307 -0
  9. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
  10. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
  11. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +370 -0
  12. package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +336 -0
  13. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +227 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +874 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
  22. package/build/protos/protos.d.ts +16365 -7
  23. package/build/protos/protos.js +42499 -1945
  24. package/build/protos/protos.json +4455 -5
  25. package/build/src/index.d.ts +3 -1
  26. package/build/src/index.js +4 -1
  27. package/build/src/v1alpha/completion_service_client.d.ts +645 -0
  28. package/build/src/v1alpha/completion_service_client.js +901 -0
  29. package/build/src/v1alpha/completion_service_client_config.json +43 -0
  30. package/build/src/v1alpha/conversational_search_service_client.d.ts +1040 -0
  31. package/build/src/v1alpha/conversational_search_service_client.js +1333 -0
  32. package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
  33. package/build/src/v1alpha/data_store_service_client.d.ts +1060 -0
  34. package/build/src/v1alpha/data_store_service_client.js +1431 -0
  35. package/build/src/v1alpha/data_store_service_client_config.json +46 -0
  36. package/build/src/v1alpha/document_service_client.d.ts +1257 -0
  37. package/build/src/v1alpha/document_service_client.js +1555 -0
  38. package/build/src/v1alpha/document_service_client_config.json +82 -0
  39. package/build/src/v1alpha/engine_service_client.d.ts +1079 -0
  40. package/build/src/v1alpha/engine_service_client.js +1481 -0
  41. package/build/src/v1alpha/engine_service_client_config.json +58 -0
  42. package/build/src/v1alpha/index.d.ts +10 -0
  43. package/build/src/v1alpha/index.js +41 -0
  44. package/build/src/v1alpha/recommendation_service_client.d.ts +858 -0
  45. package/build/src/v1alpha/recommendation_service_client.js +1100 -0
  46. package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
  47. package/build/src/v1alpha/schema_service_client.d.ts +977 -0
  48. package/build/src/v1alpha/schema_service_client.js +1385 -0
  49. package/build/src/v1alpha/schema_service_client_config.json +63 -0
  50. package/build/src/v1alpha/search_service_client.d.ts +1394 -0
  51. package/build/src/v1alpha/search_service_client.js +1640 -0
  52. package/build/src/v1alpha/search_service_client_config.json +43 -0
  53. package/build/src/v1alpha/site_search_engine_service_client.d.ts +821 -0
  54. package/build/src/v1alpha/site_search_engine_service_client.js +1249 -0
  55. package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
  56. package/build/src/v1alpha/user_event_service_client.d.ts +895 -0
  57. package/build/src/v1alpha/user_event_service_client.js +1232 -0
  58. package/build/src/v1alpha/user_event_service_client_config.json +67 -0
  59. package/package.json +5 -5
@@ -0,0 +1,318 @@
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/document.proto";
24
+ import "google/cloud/discoveryengine/v1alpha/import_config.proto";
25
+ import "google/cloud/discoveryengine/v1alpha/purge_config.proto";
26
+ import "google/longrunning/operations.proto";
27
+ import "google/protobuf/empty.proto";
28
+
29
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
30
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
31
+ option java_multiple_files = true;
32
+ option java_outer_classname = "DocumentServiceProto";
33
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
34
+ option objc_class_prefix = "DISCOVERYENGINE";
35
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
36
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
37
+
38
+ // Service for ingesting
39
+ // [Document][google.cloud.discoveryengine.v1alpha.Document] information of the
40
+ // customer's website.
41
+ service DocumentService {
42
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
43
+ option (google.api.oauth_scopes) =
44
+ "https://www.googleapis.com/auth/cloud-platform";
45
+
46
+ // Gets a [Document][google.cloud.discoveryengine.v1alpha.Document].
47
+ rpc GetDocument(GetDocumentRequest) returns (Document) {
48
+ option (google.api.http) = {
49
+ get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
50
+ additional_bindings {
51
+ get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}"
52
+ }
53
+ };
54
+ option (google.api.method_signature) = "name";
55
+ }
56
+
57
+ // Gets a list of [Document][google.cloud.discoveryengine.v1alpha.Document]s.
58
+ rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
59
+ option (google.api.http) = {
60
+ get: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents"
61
+ additional_bindings {
62
+ get: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents"
63
+ }
64
+ };
65
+ option (google.api.method_signature) = "parent";
66
+ }
67
+
68
+ // Creates a [Document][google.cloud.discoveryengine.v1alpha.Document].
69
+ rpc CreateDocument(CreateDocumentRequest) returns (Document) {
70
+ option (google.api.http) = {
71
+ post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents"
72
+ body: "document"
73
+ additional_bindings {
74
+ post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents"
75
+ body: "document"
76
+ }
77
+ };
78
+ option (google.api.method_signature) = "parent,document,document_id";
79
+ }
80
+
81
+ // Updates a [Document][google.cloud.discoveryengine.v1alpha.Document].
82
+ rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
83
+ option (google.api.http) = {
84
+ patch: "/v1alpha/{document.name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
85
+ body: "document"
86
+ additional_bindings {
87
+ patch: "/v1alpha/{document.name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}"
88
+ body: "document"
89
+ }
90
+ };
91
+ }
92
+
93
+ // Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
94
+ rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
95
+ option (google.api.http) = {
96
+ delete: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}"
97
+ additional_bindings {
98
+ delete: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}"
99
+ }
100
+ };
101
+ option (google.api.method_signature) = "name";
102
+ }
103
+
104
+ // Bulk import of multiple
105
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s. Request
106
+ // processing may be synchronous. Non-existing items will be created.
107
+ //
108
+ // Note: It is possible for a subset of the
109
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s to be
110
+ // successfully updated.
111
+ rpc ImportDocuments(ImportDocumentsRequest)
112
+ returns (google.longrunning.Operation) {
113
+ option (google.api.http) = {
114
+ post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:import"
115
+ body: "*"
116
+ additional_bindings {
117
+ post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:import"
118
+ body: "*"
119
+ }
120
+ };
121
+ option (google.longrunning.operation_info) = {
122
+ response_type: "google.cloud.discoveryengine.v1alpha.ImportDocumentsResponse"
123
+ metadata_type: "google.cloud.discoveryengine.v1alpha.ImportDocumentsMetadata"
124
+ };
125
+ }
126
+
127
+ // Permanently deletes all selected
128
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s in a branch.
129
+ //
130
+ // This process is asynchronous. Depending on the number of
131
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
132
+ // this operation can take hours to complete. Before the delete operation
133
+ // completes, some [Document][google.cloud.discoveryengine.v1alpha.Document]s
134
+ // might still be returned by
135
+ // [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
136
+ // or
137
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
138
+ //
139
+ // To get a list of the
140
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s to be deleted,
141
+ // set
142
+ // [PurgeDocumentsRequest.force][google.cloud.discoveryengine.v1alpha.PurgeDocumentsRequest.force]
143
+ // to false.
144
+ rpc PurgeDocuments(PurgeDocumentsRequest)
145
+ returns (google.longrunning.Operation) {
146
+ option (google.api.http) = {
147
+ post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*/branches/*}/documents:purge"
148
+ body: "*"
149
+ additional_bindings {
150
+ post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*/branches/*}/documents:purge"
151
+ body: "*"
152
+ }
153
+ };
154
+ option (google.longrunning.operation_info) = {
155
+ response_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsResponse"
156
+ metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata"
157
+ };
158
+ }
159
+ }
160
+
161
+ // Request message for
162
+ // [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
163
+ // method.
164
+ message GetDocumentRequest {
165
+ // Required. Full resource name of
166
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], such as
167
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
168
+ //
169
+ // If the caller does not have permission to access the
170
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
171
+ // whether or not it exists, a `PERMISSION_DENIED` error is returned.
172
+ //
173
+ // If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
174
+ // does not exist, a `NOT_FOUND` error is returned.
175
+ string name = 1 [
176
+ (google.api.field_behavior) = REQUIRED,
177
+ (google.api.resource_reference) = {
178
+ type: "discoveryengine.googleapis.com/Document"
179
+ }
180
+ ];
181
+ }
182
+
183
+ // Request message for
184
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
185
+ // method.
186
+ message ListDocumentsRequest {
187
+ // Required. The parent branch resource name, such as
188
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
189
+ // Use `default_branch` as the branch ID, to list documents under the default
190
+ // branch.
191
+ //
192
+ // If the caller does not have permission to list
193
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s under this
194
+ // branch, regardless of whether or not this branch exists, a
195
+ // `PERMISSION_DENIED` error is returned.
196
+ string parent = 1 [
197
+ (google.api.field_behavior) = REQUIRED,
198
+ (google.api.resource_reference) = {
199
+ type: "discoveryengine.googleapis.com/Branch"
200
+ }
201
+ ];
202
+
203
+ // Maximum number of
204
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
205
+ // unspecified, defaults to 100. The maximum allowed value is 1000. Values
206
+ // above 1000 will be coerced to 1000.
207
+ //
208
+ // If this field is negative, an `INVALID_ARGUMENT` error is returned.
209
+ int32 page_size = 2;
210
+
211
+ // A page token
212
+ // [ListDocumentsResponse.next_page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsResponse.next_page_token],
213
+ // received from a previous
214
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
215
+ // call. Provide this to retrieve the subsequent page.
216
+ //
217
+ // When paginating, all other parameters provided to
218
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
219
+ // must match the call that provided the page token. Otherwise, an
220
+ // `INVALID_ARGUMENT` error is returned.
221
+ string page_token = 3;
222
+ }
223
+
224
+ // Response message for
225
+ // [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments]
226
+ // method.
227
+ message ListDocumentsResponse {
228
+ // The [Document][google.cloud.discoveryengine.v1alpha.Document]s.
229
+ repeated Document documents = 1;
230
+
231
+ // A token that can be sent as
232
+ // [ListDocumentsRequest.page_token][google.cloud.discoveryengine.v1alpha.ListDocumentsRequest.page_token]
233
+ // to retrieve the next page. If this field is omitted, there are no
234
+ // subsequent pages.
235
+ string next_page_token = 2;
236
+ }
237
+
238
+ // Request message for
239
+ // [DocumentService.CreateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.CreateDocument]
240
+ // method.
241
+ message CreateDocumentRequest {
242
+ // Required. The parent resource name, such as
243
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
244
+ string parent = 1 [
245
+ (google.api.field_behavior) = REQUIRED,
246
+ (google.api.resource_reference) = {
247
+ type: "discoveryengine.googleapis.com/Branch"
248
+ }
249
+ ];
250
+
251
+ // Required. The [Document][google.cloud.discoveryengine.v1alpha.Document] to
252
+ // create.
253
+ Document document = 2 [(google.api.field_behavior) = REQUIRED];
254
+
255
+ // Required. The ID to use for the
256
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], which will
257
+ // become the final component of the
258
+ // [Document.name][google.cloud.discoveryengine.v1alpha.Document.name].
259
+ //
260
+ // If the caller does not have permission to create the
261
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
262
+ // whether or not it exists, a `PERMISSION_DENIED` error is returned.
263
+ //
264
+ // This field must be unique among all
265
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s with the same
266
+ // [parent][google.cloud.discoveryengine.v1alpha.CreateDocumentRequest.parent].
267
+ // Otherwise, an `ALREADY_EXISTS` error is returned.
268
+ //
269
+ // This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
270
+ // standard with a length limit of 63 characters. Otherwise, an
271
+ // `INVALID_ARGUMENT` error is returned.
272
+ string document_id = 3 [(google.api.field_behavior) = REQUIRED];
273
+ }
274
+
275
+ // Request message for
276
+ // [DocumentService.UpdateDocument][google.cloud.discoveryengine.v1alpha.DocumentService.UpdateDocument]
277
+ // method.
278
+ message UpdateDocumentRequest {
279
+ // Required. The document to update/create.
280
+ //
281
+ // If the caller does not have permission to update the
282
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
283
+ // whether or not it exists, a `PERMISSION_DENIED` error is returned.
284
+ //
285
+ // If the [Document][google.cloud.discoveryengine.v1alpha.Document] to update
286
+ // does not exist and
287
+ // [allow_missing][google.cloud.discoveryengine.v1alpha.UpdateDocumentRequest.allow_missing]
288
+ // is not set, a `NOT_FOUND` error is returned.
289
+ Document document = 1 [(google.api.field_behavior) = REQUIRED];
290
+
291
+ // If set to true, and the
292
+ // [Document][google.cloud.discoveryengine.v1alpha.Document] is not found, a
293
+ // new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
294
+ // created.
295
+ bool allow_missing = 2;
296
+ }
297
+
298
+ // Request message for
299
+ // [DocumentService.DeleteDocument][google.cloud.discoveryengine.v1alpha.DocumentService.DeleteDocument]
300
+ // method.
301
+ message DeleteDocumentRequest {
302
+ // Required. Full resource name of
303
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], such as
304
+ // `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
305
+ //
306
+ // If the caller does not have permission to delete the
307
+ // [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
308
+ // whether or not it exists, a `PERMISSION_DENIED` error is returned.
309
+ //
310
+ // If the [Document][google.cloud.discoveryengine.v1alpha.Document] to delete
311
+ // does not exist, a `NOT_FOUND` error is returned.
312
+ string name = 1 [
313
+ (google.api.field_behavior) = REQUIRED,
314
+ (google.api.resource_reference) = {
315
+ type: "discoveryengine.googleapis.com/Document"
316
+ }
317
+ ];
318
+ }