@google-cloud/discoveryengine 1.4.0 → 1.5.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.
- package/CHANGELOG.md +14 -0
- package/README.md +15 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config.proto +49 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/acl_config_service.proto +79 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +106 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk_service.proto +137 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +97 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +52 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +44 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +6 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +44 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +80 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +102 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +127 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +70 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +13 -8
- package/build/protos/google/cloud/discoveryengine/v1alpha/engine_service.proto +3 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/estimate_billing_service.proto +130 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +376 -21
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +66 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/rank_service.proto +115 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +221 -30
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +27 -20
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +148 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine.proto +9 -3
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +7 -4
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +5 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +22 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +9 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +94 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +19 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +151 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/serving_config_service.proto +6 -5
- package/build/protos/protos.d.ts +18160 -8292
- package/build/protos/protos.js +50325 -25400
- package/build/protos/protos.json +4864 -2447
- package/build/src/v1/completion_service_client.js +10 -7
- package/build/src/v1/conversational_search_service_client.js +10 -7
- package/build/src/v1/data_store_service_client.js +10 -7
- package/build/src/v1/document_service_client.js +10 -7
- package/build/src/v1/engine_service_client.js +10 -7
- package/build/src/v1/schema_service_client.js +10 -7
- package/build/src/v1/search_service_client.js +10 -7
- package/build/src/v1/site_search_engine_service_client.js +10 -7
- package/build/src/v1/user_event_service_client.js +10 -7
- package/build/src/v1alpha/acl_config_service_client.d.ts +1233 -0
- package/build/src/v1alpha/acl_config_service_client.js +1768 -0
- package/build/src/v1alpha/acl_config_service_client_config.json +34 -0
- package/build/src/v1alpha/chunk_service_client.d.ts +1350 -0
- package/build/src/v1alpha/chunk_service_client.js +1889 -0
- package/build/src/v1alpha/chunk_service_client_config.json +34 -0
- package/build/src/v1alpha/completion_service_client.d.ts +588 -3
- package/build/src/v1alpha/completion_service_client.js +844 -9
- package/build/src/v1alpha/completion_service_client_config.json +10 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +233 -1
- package/build/src/v1alpha/conversational_search_service_client.js +326 -7
- package/build/src/v1alpha/data_store_service_client.d.ts +451 -3
- package/build/src/v1alpha/data_store_service_client.js +575 -9
- package/build/src/v1alpha/data_store_service_client_config.json +8 -0
- package/build/src/v1alpha/document_service_client.d.ts +462 -21
- package/build/src/v1alpha/document_service_client.js +549 -7
- package/build/src/v1alpha/document_service_client_config.json +5 -0
- package/build/src/v1alpha/engine_service_client.d.ts +375 -2
- package/build/src/v1alpha/engine_service_client.js +527 -7
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +1367 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +2034 -0
- package/build/src/v1alpha/estimate_billing_service_client_config.json +30 -0
- package/build/src/v1alpha/index.d.ts +5 -0
- package/build/src/v1alpha/index.js +11 -1
- package/build/src/v1alpha/rank_service_client.d.ts +1254 -0
- package/build/src/v1alpha/rank_service_client.js +1796 -0
- package/build/src/v1alpha/rank_service_client_config.json +30 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +231 -1
- package/build/src/v1alpha/recommendation_service_client.js +326 -7
- package/build/src/v1alpha/schema_service_client.d.ts +372 -0
- package/build/src/v1alpha/schema_service_client.js +527 -7
- package/build/src/v1alpha/search_service_client.d.ts +288 -30
- package/build/src/v1alpha/search_service_client.js +366 -27
- package/build/src/v1alpha/search_tuning_service_client.d.ts +373 -1
- package/build/src/v1alpha/search_tuning_service_client.js +527 -7
- package/build/src/v1alpha/serving_config_service_client.d.ts +1370 -0
- package/build/src/v1alpha/serving_config_service_client.js +1939 -0
- package/build/src/v1alpha/serving_config_service_client_config.json +38 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +372 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +527 -7
- package/build/src/v1alpha/user_event_service_client.d.ts +372 -0
- package/build/src/v1alpha/user_event_service_client.js +527 -7
- package/build/src/v1beta/completion_service_client.d.ts +75 -0
- package/build/src/v1beta/completion_service_client.js +114 -7
- package/build/src/v1beta/conversational_search_service_client.d.ts +79 -0
- package/build/src/v1beta/conversational_search_service_client.js +114 -7
- package/build/src/v1beta/data_store_service_client.d.ts +75 -0
- package/build/src/v1beta/data_store_service_client.js +114 -7
- package/build/src/v1beta/document_service_client.d.ts +75 -0
- package/build/src/v1beta/document_service_client.js +114 -7
- package/build/src/v1beta/engine_service_client.d.ts +75 -0
- package/build/src/v1beta/engine_service_client.js +114 -7
- package/build/src/v1beta/index.d.ts +1 -0
- package/build/src/v1beta/index.js +3 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +75 -0
- package/build/src/v1beta/recommendation_service_client.js +114 -7
- package/build/src/v1beta/schema_service_client.d.ts +75 -0
- package/build/src/v1beta/schema_service_client.js +114 -7
- package/build/src/v1beta/search_service_client.d.ts +81 -0
- package/build/src/v1beta/search_service_client.js +118 -7
- package/build/src/v1beta/search_tuning_service_client.d.ts +1196 -0
- package/build/src/v1beta/search_tuning_service_client.js +1784 -0
- package/build/src/v1beta/search_tuning_service_client_config.json +30 -0
- package/build/src/v1beta/serving_config_service_client.d.ts +123 -8
- package/build/src/v1beta/serving_config_service_client.js +176 -12
- package/build/src/v1beta/site_search_engine_service_client.d.ts +75 -0
- package/build/src/v1beta/site_search_engine_service_client.js +114 -7
- package/build/src/v1beta/user_event_service_client.d.ts +75 -0
- package/build/src/v1beta/user_event_service_client.js +114 -7
- package/package.json +3 -3
@@ -0,0 +1,52 @@
|
|
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
|
+
|
21
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
22
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
23
|
+
option java_multiple_files = true;
|
24
|
+
option java_outer_classname = "CompletionProto";
|
25
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
26
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
27
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
28
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
29
|
+
|
30
|
+
// Suggestion deny list entry identifying the phrase to block from suggestions
|
31
|
+
// and the applied operation for the phrase.
|
32
|
+
message SuggestionDenyListEntry {
|
33
|
+
// Operator for matching with the generated suggestions.
|
34
|
+
enum MatchOperator {
|
35
|
+
// Default value. Should not be used
|
36
|
+
MATCH_OPERATOR_UNSPECIFIED = 0;
|
37
|
+
|
38
|
+
// If the suggestion is an exact match to the block_phrase, then block it.
|
39
|
+
EXACT_MATCH = 1;
|
40
|
+
|
41
|
+
// If the suggestion contains the block_phrase, then block it.
|
42
|
+
CONTAINS = 2;
|
43
|
+
}
|
44
|
+
|
45
|
+
// Required. Phrase to block from suggestions served. Can be maximum 125
|
46
|
+
// characters.
|
47
|
+
string block_phrase = 1 [(google.api.field_behavior) = REQUIRED];
|
48
|
+
|
49
|
+
// Required. The match operator to apply for this phrase. Whether to block the
|
50
|
+
// exact phrase, or block any suggestions containing this phrase.
|
51
|
+
MatchOperator match_operator = 2 [(google.api.field_behavior) = REQUIRED];
|
52
|
+
}
|
@@ -20,6 +20,9 @@ import "google/api/annotations.proto";
|
|
20
20
|
import "google/api/client.proto";
|
21
21
|
import "google/api/field_behavior.proto";
|
22
22
|
import "google/api/resource.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1alpha/import_config.proto";
|
24
|
+
import "google/cloud/discoveryengine/v1alpha/purge_config.proto";
|
25
|
+
import "google/longrunning/operations.proto";
|
23
26
|
|
24
27
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
25
28
|
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
@@ -45,6 +48,44 @@ service CompletionService {
|
|
45
48
|
}
|
46
49
|
};
|
47
50
|
}
|
51
|
+
|
52
|
+
// Imports all
|
53
|
+
// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry]
|
54
|
+
// for a DataStore.
|
55
|
+
rpc ImportSuggestionDenyListEntries(ImportSuggestionDenyListEntriesRequest)
|
56
|
+
returns (google.longrunning.Operation) {
|
57
|
+
option (google.api.http) = {
|
58
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/suggestionDenyListEntries:import"
|
59
|
+
body: "*"
|
60
|
+
additional_bindings {
|
61
|
+
post: "/v1alpha/{parent=projects/*/locations/*/dataStores/*}/suggestionDenyListEntries:import"
|
62
|
+
body: "*"
|
63
|
+
}
|
64
|
+
};
|
65
|
+
option (google.longrunning.operation_info) = {
|
66
|
+
response_type: "google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesResponse"
|
67
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.ImportSuggestionDenyListEntriesMetadata"
|
68
|
+
};
|
69
|
+
}
|
70
|
+
|
71
|
+
// Permanently deletes all
|
72
|
+
// [SuggestionDenyListEntry][google.cloud.discoveryengine.v1alpha.SuggestionDenyListEntry]
|
73
|
+
// for a DataStore.
|
74
|
+
rpc PurgeSuggestionDenyListEntries(PurgeSuggestionDenyListEntriesRequest)
|
75
|
+
returns (google.longrunning.Operation) {
|
76
|
+
option (google.api.http) = {
|
77
|
+
post: "/v1alpha/{parent=projects/*/locations/*/collections/*/dataStores/*}/suggestionDenyListEntries:purge"
|
78
|
+
body: "*"
|
79
|
+
additional_bindings {
|
80
|
+
post: "/v1alpha/{parent=projects/*/locations/*/dataStores/**}/suggestionDenyListEntries:purge"
|
81
|
+
body: "*"
|
82
|
+
}
|
83
|
+
};
|
84
|
+
option (google.longrunning.operation_info) = {
|
85
|
+
response_type: "google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesResponse"
|
86
|
+
metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeSuggestionDenyListEntriesMetadata"
|
87
|
+
};
|
88
|
+
}
|
48
89
|
}
|
49
90
|
|
50
91
|
// Request message for
|
@@ -65,8 +106,9 @@ message CompleteQueryRequest {
|
|
65
106
|
// 128 characters.
|
66
107
|
string query = 2 [(google.api.field_behavior) = REQUIRED];
|
67
108
|
|
68
|
-
//
|
69
|
-
//
|
109
|
+
// Specifies the autocomplete data model. This overrides any model specified
|
110
|
+
// in the Configuration > Autocomplete section of the Cloud console. Currently
|
111
|
+
// supported values:
|
70
112
|
//
|
71
113
|
// * `document` - Using suggestions generated from user-imported documents.
|
72
114
|
// * `search-history` - Using suggestions generated from the past history of
|
package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto
CHANGED
@@ -223,6 +223,11 @@ message ConverseConversationRequest {
|
|
223
223
|
// operators, see
|
224
224
|
// [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
225
225
|
string filter = 9;
|
226
|
+
|
227
|
+
// Boost specification to boost certain documents in search results which may
|
228
|
+
// affect the converse response. For more information on boosting, see
|
229
|
+
// [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
230
|
+
SearchRequest.BoostSpec boost_spec = 10;
|
226
231
|
}
|
227
232
|
|
228
233
|
// Response message for
|
@@ -266,7 +271,7 @@ message UpdateConversationRequest {
|
|
266
271
|
// [Conversation][google.cloud.discoveryengine.v1alpha.Conversation] to
|
267
272
|
// update. The following are NOT supported:
|
268
273
|
//
|
269
|
-
// * [
|
274
|
+
// * [Conversation.name][google.cloud.discoveryengine.v1alpha.Conversation.name]
|
270
275
|
//
|
271
276
|
// If not set or empty, all supported fields are updated.
|
272
277
|
google.protobuf.FieldMask update_mask = 2;
|
@@ -19,6 +19,8 @@ package google.cloud.discoveryengine.v1alpha;
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
21
|
import "google/cloud/discoveryengine/v1alpha/common.proto";
|
22
|
+
import "google/cloud/discoveryengine/v1alpha/document_processing_config.proto";
|
23
|
+
import "google/cloud/discoveryengine/v1alpha/schema.proto";
|
22
24
|
import "google/protobuf/timestamp.proto";
|
23
25
|
|
24
26
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
@@ -95,4 +97,46 @@ message DataStore {
|
|
95
97
|
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] was created at.
|
96
98
|
google.protobuf.Timestamp create_time = 4
|
97
99
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
100
|
+
|
101
|
+
// Output only. Data store level identity provider config.
|
102
|
+
IdpConfig idp_config = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
|
103
|
+
|
104
|
+
// Immutable. Whether data in the
|
105
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] has ACL
|
106
|
+
// information. If set to `true`, the source data must have ACL. ACL will be
|
107
|
+
// ingested when data is ingested by
|
108
|
+
// [DocumentService.ImportDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ImportDocuments]
|
109
|
+
// methods.
|
110
|
+
//
|
111
|
+
// When ACL is enabled for the
|
112
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore],
|
113
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document] can't be accessed
|
114
|
+
// by calling
|
115
|
+
// [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
|
116
|
+
// or
|
117
|
+
// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1alpha.DocumentService.ListDocuments].
|
118
|
+
//
|
119
|
+
// Currently ACL is only supported in `GENERIC` industry vertical with
|
120
|
+
// non-`PUBLIC_WEBSITE` content config.
|
121
|
+
bool acl_enabled = 24 [(google.api.field_behavior) = IMMUTABLE];
|
122
|
+
|
123
|
+
// Configuration for Document understanding and enrichment.
|
124
|
+
DocumentProcessingConfig document_processing_config = 27;
|
125
|
+
|
126
|
+
// The start schema to use for this
|
127
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] when
|
128
|
+
// provisioning it. If unset, a default vertical specialized schema will be
|
129
|
+
// used.
|
130
|
+
//
|
131
|
+
// This field is only used by [CreateDataStore][] API, and will be ignored if
|
132
|
+
// used in other APIs. This field will be omitted from all API responses
|
133
|
+
// including [CreateDataStore][] API. To retrieve a schema of a
|
134
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore], use
|
135
|
+
// [SchemaService.GetSchema][google.cloud.discoveryengine.v1alpha.SchemaService.GetSchema]
|
136
|
+
// API instead.
|
137
|
+
//
|
138
|
+
// The provided schema will be validated against certain rules on schema.
|
139
|
+
// Learn more from [this
|
140
|
+
// doc](https://cloud.google.com/generative-ai-app-builder/docs/provide-schema).
|
141
|
+
Schema starting_schema = 28;
|
98
142
|
}
|
@@ -21,6 +21,7 @@ import "google/api/client.proto";
|
|
21
21
|
import "google/api/field_behavior.proto";
|
22
22
|
import "google/api/resource.proto";
|
23
23
|
import "google/cloud/discoveryengine/v1alpha/data_store.proto";
|
24
|
+
import "google/cloud/discoveryengine/v1alpha/document_processing_config.proto";
|
24
25
|
import "google/longrunning/operations.proto";
|
25
26
|
import "google/protobuf/empty.proto";
|
26
27
|
import "google/protobuf/field_mask.proto";
|
@@ -117,6 +118,41 @@ service DataStoreService {
|
|
117
118
|
};
|
118
119
|
option (google.api.method_signature) = "data_store,update_mask";
|
119
120
|
}
|
121
|
+
|
122
|
+
// Gets a
|
123
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
|
124
|
+
rpc GetDocumentProcessingConfig(GetDocumentProcessingConfigRequest)
|
125
|
+
returns (DocumentProcessingConfig) {
|
126
|
+
option (google.api.http) = {
|
127
|
+
get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/documentProcessingConfig}"
|
128
|
+
additional_bindings {
|
129
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig}"
|
130
|
+
}
|
131
|
+
};
|
132
|
+
option (google.api.method_signature) = "name";
|
133
|
+
}
|
134
|
+
|
135
|
+
// Updates the
|
136
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
|
137
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]
|
138
|
+
// is a singleon resource of
|
139
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. It's empty
|
140
|
+
// when [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is
|
141
|
+
// created. The first call to this method will set up
|
142
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig].
|
143
|
+
rpc UpdateDocumentProcessingConfig(UpdateDocumentProcessingConfigRequest)
|
144
|
+
returns (DocumentProcessingConfig) {
|
145
|
+
option (google.api.http) = {
|
146
|
+
patch: "/v1alpha/{document_processing_config.name=projects/*/locations/*/dataStores/*/documentProcessingConfig}"
|
147
|
+
body: "document_processing_config"
|
148
|
+
additional_bindings {
|
149
|
+
patch: "/v1alpha/{document_processing_config.name=projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig}"
|
150
|
+
body: "document_processing_config"
|
151
|
+
}
|
152
|
+
};
|
153
|
+
option (google.api.method_signature) =
|
154
|
+
"document_processing_config,update_mask";
|
155
|
+
}
|
120
156
|
}
|
121
157
|
|
122
158
|
// Request for
|
@@ -198,7 +234,8 @@ message ListDataStoresRequest {
|
|
198
234
|
// Required. The parent branch resource name, such as
|
199
235
|
// `projects/{project}/locations/{location}/collections/{collection_id}`.
|
200
236
|
//
|
201
|
-
// If the caller does not have permission to list
|
237
|
+
// If the caller does not have permission to list
|
238
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]s under this
|
202
239
|
// location, regardless of whether or not this data store exists, a
|
203
240
|
// PERMISSION_DENIED error is returned.
|
204
241
|
string parent = 1 [
|
@@ -305,3 +342,45 @@ message DeleteDataStoreMetadata {
|
|
305
342
|
// finish time.
|
306
343
|
google.protobuf.Timestamp update_time = 2;
|
307
344
|
}
|
345
|
+
|
346
|
+
// Request for
|
347
|
+
// [DataStoreService.GetDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.GetDocumentProcessingConfig]
|
348
|
+
// method.
|
349
|
+
message GetDocumentProcessingConfigRequest {
|
350
|
+
// Required. Full DocumentProcessingConfig resource name. Format:
|
351
|
+
// `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/documentProcessingConfig`
|
352
|
+
string name = 1 [
|
353
|
+
(google.api.field_behavior) = REQUIRED,
|
354
|
+
(google.api.resource_reference) = {
|
355
|
+
type: "discoveryengine.googleapis.com/DocumentProcessingConfig"
|
356
|
+
}
|
357
|
+
];
|
358
|
+
}
|
359
|
+
|
360
|
+
// Request for
|
361
|
+
// [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig]
|
362
|
+
// method.
|
363
|
+
message UpdateDocumentProcessingConfigRequest {
|
364
|
+
// Required. The
|
365
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]
|
366
|
+
// to update.
|
367
|
+
//
|
368
|
+
// If the caller does not have permission to update the
|
369
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig],
|
370
|
+
// then a PERMISSION_DENIED error is returned.
|
371
|
+
//
|
372
|
+
// If the
|
373
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]
|
374
|
+
// to update does not exist, a NOT_FOUND error is returned.
|
375
|
+
DocumentProcessingConfig document_processing_config = 1
|
376
|
+
[(google.api.field_behavior) = REQUIRED];
|
377
|
+
|
378
|
+
// Indicates which fields in the provided
|
379
|
+
// [DocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig]
|
380
|
+
// to update. The following are the only supported fields:
|
381
|
+
//
|
382
|
+
// * [DocumentProcessingConfig.ocr_config][google.cloud.discoveryengine.v1alpha.DocumentProcessingConfig.ocr_config]
|
383
|
+
//
|
384
|
+
// If not set, all supported fields are updated.
|
385
|
+
google.protobuf.FieldMask update_mask = 2;
|
386
|
+
}
|
@@ -18,7 +18,9 @@ package google.cloud.discoveryengine.v1alpha;
|
|
18
18
|
|
19
19
|
import "google/api/field_behavior.proto";
|
20
20
|
import "google/api/resource.proto";
|
21
|
+
import "google/cloud/discoveryengine/v1alpha/common.proto";
|
21
22
|
import "google/protobuf/struct.proto";
|
23
|
+
import "google/protobuf/timestamp.proto";
|
22
24
|
|
23
25
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
24
26
|
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
@@ -69,6 +71,76 @@ message Document {
|
|
69
71
|
string mime_type = 1;
|
70
72
|
}
|
71
73
|
|
74
|
+
// ACL Information of the Document.
|
75
|
+
message AclInfo {
|
76
|
+
// AclRestriction to model complex inheritance restrictions.
|
77
|
+
//
|
78
|
+
// Example: Modeling a "Both Permit" inheritance, where to access a
|
79
|
+
// child document, user needs to have access to parent document.
|
80
|
+
//
|
81
|
+
// Document Hierarchy - Space_S --> Page_P.
|
82
|
+
//
|
83
|
+
// Readers:
|
84
|
+
// Space_S: group_1, user_1
|
85
|
+
// Page_P: group_2, group_3, user_2
|
86
|
+
//
|
87
|
+
// Space_S ACL Restriction -
|
88
|
+
// {
|
89
|
+
// "acl_info": {
|
90
|
+
// "readers": [
|
91
|
+
// {
|
92
|
+
// "principals": [
|
93
|
+
// {
|
94
|
+
// "group_id": "group_1"
|
95
|
+
// },
|
96
|
+
// {
|
97
|
+
// "user_id": "user_1"
|
98
|
+
// }
|
99
|
+
// ]
|
100
|
+
// }
|
101
|
+
// ]
|
102
|
+
// }
|
103
|
+
// }
|
104
|
+
//
|
105
|
+
// Page_P ACL Restriction.
|
106
|
+
// {
|
107
|
+
// "acl_info": {
|
108
|
+
// "readers": [
|
109
|
+
// {
|
110
|
+
// "principals": [
|
111
|
+
// {
|
112
|
+
// "group_id": "group_2"
|
113
|
+
// },
|
114
|
+
// {
|
115
|
+
// "group_id": "group_3"
|
116
|
+
// },
|
117
|
+
// {
|
118
|
+
// "user_id": "user_2"
|
119
|
+
// }
|
120
|
+
// ],
|
121
|
+
// },
|
122
|
+
// {
|
123
|
+
// "principals": [
|
124
|
+
// {
|
125
|
+
// "group_id": "group_1"
|
126
|
+
// },
|
127
|
+
// {
|
128
|
+
// "user_id": "user_1"
|
129
|
+
// }
|
130
|
+
// ],
|
131
|
+
// }
|
132
|
+
// ]
|
133
|
+
// }
|
134
|
+
// }
|
135
|
+
message AccessRestriction {
|
136
|
+
// List of principals.
|
137
|
+
repeated Principal principals = 1;
|
138
|
+
}
|
139
|
+
|
140
|
+
// Readers of the document.
|
141
|
+
repeated AccessRestriction readers = 1;
|
142
|
+
}
|
143
|
+
|
72
144
|
// Data representation. One of
|
73
145
|
// [struct_data][google.cloud.discoveryengine.v1alpha.Document.struct_data] or
|
74
146
|
// [json_data][google.cloud.discoveryengine.v1alpha.Document.json_data] should
|
@@ -118,4 +190,34 @@ message Document {
|
|
118
190
|
// It contains derived data that are not in the original input document.
|
119
191
|
google.protobuf.Struct derived_struct_data = 6
|
120
192
|
[(google.api.field_behavior) = OUTPUT_ONLY];
|
193
|
+
|
194
|
+
// Access control information for the document.
|
195
|
+
AclInfo acl_info = 11;
|
196
|
+
|
197
|
+
// Output only. The last time the document was indexed. If this field is set,
|
198
|
+
// the document could be returned in search results.
|
199
|
+
//
|
200
|
+
// This field is OUTPUT_ONLY. If this field is not populated, it means the
|
201
|
+
// document has never been indexed.
|
202
|
+
google.protobuf.Timestamp index_time = 13
|
203
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
204
|
+
}
|
205
|
+
|
206
|
+
// Document captures all raw metadata information of items to be recommended or
|
207
|
+
// searched.
|
208
|
+
message ProcessedDocument {
|
209
|
+
// Output format of the processed document.
|
210
|
+
oneof processed_data_format {
|
211
|
+
// The JSON string representation of the processed document.
|
212
|
+
string json_data = 2;
|
213
|
+
}
|
214
|
+
|
215
|
+
// Required. Full resource name of the referenced document, in the format
|
216
|
+
// `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
|
217
|
+
string document = 1 [
|
218
|
+
(google.api.field_behavior) = REQUIRED,
|
219
|
+
(google.api.resource_reference) = {
|
220
|
+
type: "discoveryengine.googleapis.com/Document"
|
221
|
+
}
|
222
|
+
];
|
121
223
|
}
|
@@ -0,0 +1,127 @@
|
|
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
|
+
|
22
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
23
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
24
|
+
option java_multiple_files = true;
|
25
|
+
option java_outer_classname = "DocumentProcessingConfigProto";
|
26
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
27
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
28
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
29
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
30
|
+
|
31
|
+
// A singleton resource of
|
32
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore]. It's empty when
|
33
|
+
// [DataStore][google.cloud.discoveryengine.v1alpha.DataStore] is created, which
|
34
|
+
// defaults to digital parser. The first call to
|
35
|
+
// [DataStoreService.UpdateDocumentProcessingConfig][google.cloud.discoveryengine.v1alpha.DataStoreService.UpdateDocumentProcessingConfig]
|
36
|
+
// method will initialize the config.
|
37
|
+
message DocumentProcessingConfig {
|
38
|
+
option (google.api.resource) = {
|
39
|
+
type: "discoveryengine.googleapis.com/DocumentProcessingConfig"
|
40
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/documentProcessingConfig"
|
41
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/documentProcessingConfig"
|
42
|
+
};
|
43
|
+
|
44
|
+
// Configuration for chunking config.
|
45
|
+
message ChunkingConfig {
|
46
|
+
// Configuration for the layout based chunking.
|
47
|
+
message LayoutBasedChunkingConfig {
|
48
|
+
// The token size limit for each chunk.
|
49
|
+
//
|
50
|
+
// Supported values: 100-500 (inclusive).
|
51
|
+
// Default value: 500.
|
52
|
+
int32 chunk_size = 1;
|
53
|
+
|
54
|
+
// Whether to include appending different levels of headings to chunks
|
55
|
+
// from the middle of the document to prevent context loss.
|
56
|
+
//
|
57
|
+
// Default value: False.
|
58
|
+
bool include_ancestor_headings = 2;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Additional configs that defines the behavior of the chunking.
|
62
|
+
oneof chunk_mode {
|
63
|
+
// Configuration for the layout based chunking.
|
64
|
+
LayoutBasedChunkingConfig layout_based_chunking_config = 1;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// Related configurations applied to a specific type of document parser.
|
69
|
+
message ParsingConfig {
|
70
|
+
// The digital parsing configurations for documents.
|
71
|
+
message DigitalParsingConfig {}
|
72
|
+
|
73
|
+
// The OCR parsing configurations for documents.
|
74
|
+
message OcrParsingConfig {
|
75
|
+
// Apply additional enhanced OCR processing to a list of document
|
76
|
+
// elements.
|
77
|
+
//
|
78
|
+
// Supported values:
|
79
|
+
// * `table`: advanced table parsing model.
|
80
|
+
repeated string enhanced_document_elements = 1;
|
81
|
+
|
82
|
+
// If true, will use native text instead of OCR text on pages containing
|
83
|
+
// native text.
|
84
|
+
bool use_native_text = 2;
|
85
|
+
}
|
86
|
+
|
87
|
+
// The layout parsing configurations for documents.
|
88
|
+
message LayoutParsingConfig {}
|
89
|
+
|
90
|
+
// Configs for document processing types.
|
91
|
+
oneof type_dedicated_config {
|
92
|
+
// Configurations applied to digital parser.
|
93
|
+
DigitalParsingConfig digital_parsing_config = 1;
|
94
|
+
|
95
|
+
// Configurations applied to OCR parser. Currently it only applies to
|
96
|
+
// PDFs.
|
97
|
+
OcrParsingConfig ocr_parsing_config = 2;
|
98
|
+
|
99
|
+
// Configurations applied to layout parser.
|
100
|
+
LayoutParsingConfig layout_parsing_config = 3;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
// The full resource name of the Document Processing Config.
|
105
|
+
// Format:
|
106
|
+
// `projects/*/locations/*/collections/*/dataStores/*/documentProcessingConfig`.
|
107
|
+
string name = 1;
|
108
|
+
|
109
|
+
// Whether chunking mode is enabled.
|
110
|
+
ChunkingConfig chunking_config = 3;
|
111
|
+
|
112
|
+
// Configurations for default Document parser.
|
113
|
+
// If not specified, we will configure it as default DigitalParsingConfig, and
|
114
|
+
// the default parsing config will be applied to all file types for Document
|
115
|
+
// parsing.
|
116
|
+
ParsingConfig default_parsing_config = 4;
|
117
|
+
|
118
|
+
// Map from file type to override the default parsing configuration based on
|
119
|
+
// the file type. Supported keys:
|
120
|
+
// * `pdf`: Override parsing config for PDF files, either digital parsing, ocr
|
121
|
+
// parsing or layout parsing is supported.
|
122
|
+
// * `html`: Override parsing config for HTML files, only digital parsing and
|
123
|
+
// or layout parsing are supported.
|
124
|
+
// * `docx`: Override parsing config for DOCX files, only digital parsing and
|
125
|
+
// or layout parsing are supported.
|
126
|
+
map<string, ParsingConfig> parsing_config_overrides = 5;
|
127
|
+
}
|
@@ -25,6 +25,7 @@ import "google/cloud/discoveryengine/v1alpha/import_config.proto";
|
|
25
25
|
import "google/cloud/discoveryengine/v1alpha/purge_config.proto";
|
26
26
|
import "google/longrunning/operations.proto";
|
27
27
|
import "google/protobuf/empty.proto";
|
28
|
+
import "google/protobuf/field_mask.proto";
|
28
29
|
|
29
30
|
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
30
31
|
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
@@ -88,6 +89,7 @@ service DocumentService {
|
|
88
89
|
body: "document"
|
89
90
|
}
|
90
91
|
};
|
92
|
+
option (google.api.method_signature) = "document,update_mask";
|
91
93
|
}
|
92
94
|
|
93
95
|
// Deletes a [Document][google.cloud.discoveryengine.v1alpha.Document].
|
@@ -156,6 +158,19 @@ service DocumentService {
|
|
156
158
|
metadata_type: "google.cloud.discoveryengine.v1alpha.PurgeDocumentsMetadata"
|
157
159
|
};
|
158
160
|
}
|
161
|
+
|
162
|
+
// Gets the parsed layout information for a
|
163
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document].
|
164
|
+
rpc GetProcessedDocument(GetProcessedDocumentRequest)
|
165
|
+
returns (ProcessedDocument) {
|
166
|
+
option (google.api.http) = {
|
167
|
+
get: "/v1alpha/{name=projects/*/locations/*/dataStores/*/branches/*/documents/*}:getProcessedDocument"
|
168
|
+
additional_bindings {
|
169
|
+
get: "/v1alpha/{name=projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*}:getProcessedDocument"
|
170
|
+
}
|
171
|
+
};
|
172
|
+
option (google.api.method_signature) = "name";
|
173
|
+
}
|
159
174
|
}
|
160
175
|
|
161
176
|
// Request message for
|
@@ -293,6 +308,10 @@ message UpdateDocumentRequest {
|
|
293
308
|
// new [Document][google.cloud.discoveryengine.v1alpha.Document] will be
|
294
309
|
// created.
|
295
310
|
bool allow_missing = 2;
|
311
|
+
|
312
|
+
// Indicates which fields in the provided imported 'document' to update. If
|
313
|
+
// not set, will by default update all fields.
|
314
|
+
google.protobuf.FieldMask update_mask = 3;
|
296
315
|
}
|
297
316
|
|
298
317
|
// Request message for
|
@@ -316,3 +335,54 @@ message DeleteDocumentRequest {
|
|
316
335
|
}
|
317
336
|
];
|
318
337
|
}
|
338
|
+
|
339
|
+
// Request message for
|
340
|
+
// [DocumentService.GetDocument][google.cloud.discoveryengine.v1alpha.DocumentService.GetDocument]
|
341
|
+
// method.
|
342
|
+
message GetProcessedDocumentRequest {
|
343
|
+
// The type of processing to return in the response.
|
344
|
+
enum ProcessedDocumentType {
|
345
|
+
// Default value.
|
346
|
+
PROCESSED_DOCUMENT_TYPE_UNSPECIFIED = 0;
|
347
|
+
|
348
|
+
// Available for all data store parsing configs.
|
349
|
+
PARSED_DOCUMENT = 1;
|
350
|
+
|
351
|
+
// Only available if ChunkingConfig is enabeld on the data store.
|
352
|
+
CHUNKED_DOCUMENT = 2;
|
353
|
+
}
|
354
|
+
|
355
|
+
// The format of the returned processed document. If unspecified, defaults to
|
356
|
+
// JSON.
|
357
|
+
enum ProcessedDocumentFormat {
|
358
|
+
// Default value.
|
359
|
+
PROCESSED_DOCUMENT_FORMAT_UNSPECIFIED = 0;
|
360
|
+
|
361
|
+
// output format will be a JSON string representation of processed document.
|
362
|
+
JSON = 1;
|
363
|
+
}
|
364
|
+
|
365
|
+
// Required. Full resource name of
|
366
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document], such as
|
367
|
+
// `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.
|
368
|
+
//
|
369
|
+
// If the caller does not have permission to access the
|
370
|
+
// [Document][google.cloud.discoveryengine.v1alpha.Document], regardless of
|
371
|
+
// whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
372
|
+
//
|
373
|
+
// If the requested [Document][google.cloud.discoveryengine.v1alpha.Document]
|
374
|
+
// does not exist, a `NOT_FOUND` error is returned.
|
375
|
+
string name = 1 [
|
376
|
+
(google.api.field_behavior) = REQUIRED,
|
377
|
+
(google.api.resource_reference) = {
|
378
|
+
type: "discoveryengine.googleapis.com/Document"
|
379
|
+
}
|
380
|
+
];
|
381
|
+
|
382
|
+
// Required. What type of processing to return.
|
383
|
+
ProcessedDocumentType processed_document_type = 2
|
384
|
+
[(google.api.field_behavior) = REQUIRED];
|
385
|
+
|
386
|
+
// What format output should be. If unspecified, defaults to JSON.
|
387
|
+
ProcessedDocumentFormat processed_document_format = 3;
|
388
|
+
}
|