@google-cloud/discoveryengine 0.4.1 → 0.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 +7 -0
- package/README.md +7 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +40 -9
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +116 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +45 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +12 -12
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +15 -14
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +58 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +259 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +546 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +14 -12
- package/build/protos/protos.d.ts +5625 -1874
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +1 -1
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1beta/completion_service_client.d.ts +455 -0
- package/build/src/v1beta/completion_service_client.js +659 -0
- package/build/src/v1beta/completion_service_client_config.json +43 -0
- package/build/src/v1beta/document_service_client.d.ts +111 -18
- package/build/src/v1beta/document_service_client.js +134 -6
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +7 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +108 -14
- package/build/src/v1beta/recommendation_service_client.js +128 -0
- package/build/src/v1beta/schema_service_client.d.ts +798 -0
- package/build/src/v1beta/schema_service_client.js +1122 -0
- package/build/src/v1beta/schema_service_client_config.json +63 -0
- package/build/src/v1beta/search_service_client.d.ts +851 -0
- package/build/src/v1beta/search_service_client.js +1070 -0
- package/build/src/v1beta/search_service_client_config.json +43 -0
- package/build/src/v1beta/user_event_service_client.d.ts +93 -0
- package/build/src/v1beta/user_event_service_client.js +128 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.4.1...discoveryengine-v0.5.0) (2023-04-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* [discoveryengine] add search, autocomplete and schema services ([#4201](https://github.com/googleapis/google-cloud-node/issues/4201)) ([de00e1d](https://github.com/googleapis/google-cloud-node/commit/de00e1d88877dd674dfd20b78a3de4476d65eb29))
|
9
|
+
|
3
10
|
## [0.4.1](https://github.com/googleapis/google-cloud-node/compare/discoveryengine-v0.4.0...discoveryengine-v0.4.1) (2023-04-13)
|
4
11
|
|
5
12
|
|
package/README.md
CHANGED
@@ -125,6 +125,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
125
125
|
|
126
126
|
| Sample | Source Code | Try it |
|
127
127
|
| --------------------------- | --------------------------------- | ------ |
|
128
|
+
| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/completion_service.complete_query.js,samples/README.md) |
|
128
129
|
| Document_service.create_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.create_document.js,samples/README.md) |
|
129
130
|
| Document_service.delete_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.delete_document.js,samples/README.md) |
|
130
131
|
| Document_service.get_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.get_document.js,samples/README.md) |
|
@@ -132,6 +133,12 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
|
|
132
133
|
| Document_service.list_documents | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.list_documents.js,samples/README.md) |
|
133
134
|
| Document_service.update_document | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/document_service.update_document.js,samples/README.md) |
|
134
135
|
| Recommendation_service.recommend | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/recommendation_service.recommend.js,samples/README.md) |
|
136
|
+
| Schema_service.create_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.create_schema.js,samples/README.md) |
|
137
|
+
| Schema_service.delete_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.delete_schema.js,samples/README.md) |
|
138
|
+
| Schema_service.get_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.get_schema.js,samples/README.md) |
|
139
|
+
| Schema_service.list_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.list_schemas.js,samples/README.md) |
|
140
|
+
| Schema_service.update_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/schema_service.update_schema.js,samples/README.md) |
|
141
|
+
| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/search_service.search.js,samples/README.md) |
|
135
142
|
| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.collect_user_event.js,samples/README.md) |
|
136
143
|
| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.import_user_events.js,samples/README.md) |
|
137
144
|
| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-discoveryengine/samples/generated/v1beta/user_event_service.write_user_event.js,samples/README.md) |
|
@@ -42,28 +42,59 @@ option (google.api.resource_definition) = {
|
|
42
42
|
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
43
43
|
};
|
44
44
|
|
45
|
+
// A floating point interval.
|
46
|
+
message Interval {
|
47
|
+
// The lower bound of the interval. If neither of the min fields are
|
48
|
+
// set, then the lower bound is negative infinity.
|
49
|
+
//
|
50
|
+
// This field must be not larger than max.
|
51
|
+
// Otherwise, an `INVALID_ARGUMENT` error is returned.
|
52
|
+
oneof min {
|
53
|
+
// Inclusive lower bound.
|
54
|
+
double minimum = 1;
|
55
|
+
|
56
|
+
// Exclusive lower bound.
|
57
|
+
double exclusive_minimum = 2;
|
58
|
+
}
|
59
|
+
|
60
|
+
// The upper bound of the interval. If neither of the max fields are
|
61
|
+
// set, then the upper bound is positive infinity.
|
62
|
+
//
|
63
|
+
// This field must be not smaller than min.
|
64
|
+
// Otherwise, an `INVALID_ARGUMENT` error is returned.
|
65
|
+
oneof max {
|
66
|
+
// Inclusive upper bound.
|
67
|
+
double maximum = 3;
|
68
|
+
|
69
|
+
// Exclusive upper bound.
|
70
|
+
double exclusive_maximum = 4;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
45
74
|
// A custom attribute that is not explicitly modeled in a resource, e.g.
|
46
75
|
// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent].
|
47
76
|
message CustomAttribute {
|
48
77
|
// The textual values of this custom attribute. For example, `["yellow",
|
49
78
|
// "green"]` when the key is "color".
|
50
79
|
//
|
51
|
-
// Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is
|
80
|
+
// Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
|
52
81
|
// returned.
|
53
82
|
//
|
54
83
|
// Exactly one of
|
55
|
-
// [text][google.cloud.discoveryengine.v1beta.CustomAttribute.text]
|
56
|
-
//
|
57
|
-
//
|
84
|
+
// [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text]
|
85
|
+
// or
|
86
|
+
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers]
|
87
|
+
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
58
88
|
repeated string text = 1;
|
59
89
|
|
60
90
|
// The numerical values of this custom attribute. For example, `[2.3, 15.4]`
|
61
91
|
// when the key is "lengths_cm".
|
62
92
|
//
|
63
93
|
// Exactly one of
|
64
|
-
// [text][google.cloud.discoveryengine.v1beta.CustomAttribute.text]
|
65
|
-
//
|
66
|
-
//
|
94
|
+
// [CustomAttribute.text][google.cloud.discoveryengine.v1beta.CustomAttribute.text]
|
95
|
+
// or
|
96
|
+
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1beta.CustomAttribute.numbers]
|
97
|
+
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
67
98
|
repeated double numbers = 2;
|
68
99
|
}
|
69
100
|
|
@@ -79,14 +110,14 @@ message UserInfo {
|
|
79
110
|
// model quality.
|
80
111
|
//
|
81
112
|
// The field must be a UTF-8 encoded string with a length limit of 128
|
82
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
113
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
83
114
|
string user_id = 1;
|
84
115
|
|
85
116
|
// User agent as included in the HTTP header. Required for getting
|
86
117
|
// [SearchResponse.sponsored_results][].
|
87
118
|
//
|
88
119
|
// The field must be a UTF-8 encoded string with a length limit of 1,000
|
89
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
120
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
90
121
|
//
|
91
122
|
// This should not be set when using the client side event reporting with
|
92
123
|
// GTM or JavaScript tag in
|
@@ -0,0 +1,116 @@
|
|
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
|
+
|
24
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
|
25
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
|
26
|
+
option java_multiple_files = true;
|
27
|
+
option java_outer_classname = "CompletionServiceProto";
|
28
|
+
option java_package = "com.google.cloud.discoveryengine.v1beta";
|
29
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
30
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
|
31
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
|
32
|
+
|
33
|
+
// Service for Auto-Completion.
|
34
|
+
service CompletionService {
|
35
|
+
option (google.api.default_host) = "discoveryengine.googleapis.com";
|
36
|
+
option (google.api.oauth_scopes) =
|
37
|
+
"https://www.googleapis.com/auth/cloud-platform";
|
38
|
+
|
39
|
+
// Completes the specified user input with keyword suggestions.
|
40
|
+
rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
|
41
|
+
option (google.api.http) = {
|
42
|
+
get: "/v1beta/{data_store=projects/*/locations/*/dataStores/*}:completeQuery"
|
43
|
+
additional_bindings {
|
44
|
+
get: "/v1beta/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery"
|
45
|
+
}
|
46
|
+
};
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
// Request message for
|
51
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]
|
52
|
+
// method.
|
53
|
+
message CompleteQueryRequest {
|
54
|
+
// Required. The parent data store resource name for which the completion is
|
55
|
+
// performed, such as
|
56
|
+
// `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
|
57
|
+
string data_store = 1 [
|
58
|
+
(google.api.field_behavior) = REQUIRED,
|
59
|
+
(google.api.resource_reference) = {
|
60
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
61
|
+
}
|
62
|
+
];
|
63
|
+
|
64
|
+
// Required. The typeahead input used to fetch suggestions. Maximum length is
|
65
|
+
// 128 characters.
|
66
|
+
string query = 2 [(google.api.field_behavior) = REQUIRED];
|
67
|
+
|
68
|
+
// Selects data model of query suggestions for serving. Currently supported
|
69
|
+
// values:
|
70
|
+
//
|
71
|
+
// * `document` - Using suggestions generated from user-imported documents.
|
72
|
+
// * `search-history` - Using suggestions generated from the past history of
|
73
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
|
74
|
+
// API calls. Do not use it when there is no traffic for Search API.
|
75
|
+
// * `user-event` - Using suggestions generated from user-imported search
|
76
|
+
// events.
|
77
|
+
//
|
78
|
+
// Default values:
|
79
|
+
//
|
80
|
+
// * `document` is the default model for regular dataStores.
|
81
|
+
// * `search-history` is the default model for
|
82
|
+
// [IndustryVertical.SITE_SEARCH][google.cloud.discoveryengine.v1beta.IndustryVertical.SITE_SEARCH]
|
83
|
+
// dataStores.
|
84
|
+
string query_model = 3;
|
85
|
+
|
86
|
+
// A unique identifier for tracking visitors. For example, this could be
|
87
|
+
// implemented with an HTTP cookie, which should be able to uniquely identify
|
88
|
+
// a visitor on a single device. This unique identifier should not change if
|
89
|
+
// the visitor logs in or out of the website.
|
90
|
+
//
|
91
|
+
// This field should NOT have a fixed value such as `unknown_visitor`.
|
92
|
+
//
|
93
|
+
// This should be the same identifier as
|
94
|
+
// [UserEvent.user_pseudo_id][google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id]
|
95
|
+
// and
|
96
|
+
// [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1beta.SearchRequest.user_pseudo_id].
|
97
|
+
//
|
98
|
+
// The field must be a UTF-8 encoded string with a length limit of 128
|
99
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
100
|
+
string user_pseudo_id = 4;
|
101
|
+
}
|
102
|
+
|
103
|
+
// Response message for
|
104
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]
|
105
|
+
// method.
|
106
|
+
message CompleteQueryResponse {
|
107
|
+
// Suggestions as search queries.
|
108
|
+
message QuerySuggestion {
|
109
|
+
// The suggestion for the query.
|
110
|
+
string suggestion = 1;
|
111
|
+
}
|
112
|
+
|
113
|
+
// Results of the matched query suggestions. The result list is ordered and
|
114
|
+
// the first result is a top suggestion.
|
115
|
+
repeated QuerySuggestion query_suggestions = 1;
|
116
|
+
}
|
@@ -38,17 +38,49 @@ message Document {
|
|
38
38
|
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}"
|
39
39
|
};
|
40
40
|
|
41
|
+
// Unstructured data linked to this document.
|
42
|
+
message Content {
|
43
|
+
oneof content {
|
44
|
+
// The content represented as a stream of bytes. The maximum length is
|
45
|
+
// 1,000,000 bytes (1 MB / ~0.95 MiB).
|
46
|
+
//
|
47
|
+
// Note: As with all `bytes` fields, this field is represented as pure
|
48
|
+
// binary in Protocol Buffers and base64-encoded string in JSON. For
|
49
|
+
// example, `abc123!?$*&()'-=@~` should be represented as
|
50
|
+
// `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
|
51
|
+
// https://developers.google.com/protocol-buffers/docs/proto3#json.
|
52
|
+
bytes raw_bytes = 2;
|
53
|
+
|
54
|
+
// The URI of the content. Only Cloud Storage URIs (e.g.
|
55
|
+
// `gs://bucket-name/path/to/file`) are supported. The maximum file size
|
56
|
+
// is 100 MB.
|
57
|
+
string uri = 3;
|
58
|
+
}
|
59
|
+
|
60
|
+
// The MIME type of the content. Supported types:
|
61
|
+
//
|
62
|
+
// * `application/pdf` (PDF)
|
63
|
+
// * `text/html` (HTML)
|
64
|
+
//
|
65
|
+
// See https://www.iana.org/assignments/media-types/media-types.xhtml.
|
66
|
+
string mime_type = 1;
|
67
|
+
}
|
68
|
+
|
41
69
|
// Data representation. One of
|
42
70
|
// [struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data] or
|
43
71
|
// [json_data][google.cloud.discoveryengine.v1beta.Document.json_data] should
|
44
|
-
// be provided otherwise an INVALID_ARGUMENT error is thrown.
|
72
|
+
// be provided otherwise an `INVALID_ARGUMENT` error is thrown.
|
45
73
|
oneof data {
|
46
74
|
// The structured JSON data for the document. It should conform to the
|
47
|
-
// registered
|
75
|
+
// registered
|
76
|
+
// [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
|
77
|
+
// `INVALID_ARGUMENT` error is thrown.
|
48
78
|
google.protobuf.Struct struct_data = 4;
|
49
79
|
|
50
80
|
// The JSON string representation of the document. It should conform to the
|
51
|
-
// registered
|
81
|
+
// registered
|
82
|
+
// [Schema.schema][google.cloud.discoveryengine.v1beta.Schema.schema] or an
|
83
|
+
// `INVALID_ARGUMENT` error is thrown.
|
52
84
|
string json_data = 5;
|
53
85
|
}
|
54
86
|
|
@@ -69,10 +101,20 @@ message Document {
|
|
69
101
|
// The identifier of the schema located in the same data store.
|
70
102
|
string schema_id = 3;
|
71
103
|
|
104
|
+
// The unstructured data linked to this document. Content must be set if this
|
105
|
+
// document is under a
|
106
|
+
// `CONTENT_REQUIRED` data store.
|
107
|
+
Content content = 10;
|
108
|
+
|
72
109
|
// The identifier of the parent document. Currently supports at most two level
|
73
110
|
// document hierarchy.
|
74
111
|
//
|
75
112
|
// Id should conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
76
113
|
// standard with a length limit of 63 characters.
|
77
114
|
string parent_document_id = 7;
|
115
|
+
|
116
|
+
// Output only. This field is OUTPUT_ONLY.
|
117
|
+
// It contains derived data that are not in the original input document.
|
118
|
+
google.protobuf.Struct derived_struct_data = 6
|
119
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
78
120
|
}
|
@@ -134,10 +134,10 @@ message GetDocumentRequest {
|
|
134
134
|
//
|
135
135
|
// If the caller does not have permission to access the
|
136
136
|
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
137
|
-
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
137
|
+
// whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
138
138
|
//
|
139
139
|
// If the requested [Document][google.cloud.discoveryengine.v1beta.Document]
|
140
|
-
// does not exist, a NOT_FOUND error is returned.
|
140
|
+
// does not exist, a `NOT_FOUND` error is returned.
|
141
141
|
string name = 1 [
|
142
142
|
(google.api.field_behavior) = REQUIRED,
|
143
143
|
(google.api.resource_reference) = {
|
@@ -157,7 +157,7 @@ message ListDocumentsRequest {
|
|
157
157
|
//
|
158
158
|
// If the caller does not have permission to list [Documents][]s under this
|
159
159
|
// branch, regardless of whether or not this branch exists, a
|
160
|
-
// PERMISSION_DENIED error is returned.
|
160
|
+
// `PERMISSION_DENIED` error is returned.
|
161
161
|
string parent = 1 [
|
162
162
|
(google.api.field_behavior) = REQUIRED,
|
163
163
|
(google.api.resource_reference) = {
|
@@ -169,7 +169,7 @@ message ListDocumentsRequest {
|
|
169
169
|
// to return. If unspecified, defaults to 100. The maximum allowed value is
|
170
170
|
// 1000. Values above 1000 will be coerced to 1000.
|
171
171
|
//
|
172
|
-
// If this field is negative, an INVALID_ARGUMENT error is returned.
|
172
|
+
// If this field is negative, an `INVALID_ARGUMENT` error is returned.
|
173
173
|
int32 page_size = 2;
|
174
174
|
|
175
175
|
// A page token
|
@@ -181,7 +181,7 @@ message ListDocumentsRequest {
|
|
181
181
|
// When paginating, all other parameters provided to
|
182
182
|
// [DocumentService.ListDocuments][google.cloud.discoveryengine.v1beta.DocumentService.ListDocuments]
|
183
183
|
// must match the call that provided the page token. Otherwise, an
|
184
|
-
// INVALID_ARGUMENT error is returned.
|
184
|
+
// `INVALID_ARGUMENT` error is returned.
|
185
185
|
string page_token = 3;
|
186
186
|
}
|
187
187
|
|
@@ -223,16 +223,16 @@ message CreateDocumentRequest {
|
|
223
223
|
//
|
224
224
|
// If the caller does not have permission to create the
|
225
225
|
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
226
|
-
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
226
|
+
// whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
227
227
|
//
|
228
228
|
// This field must be unique among all
|
229
229
|
// [Document][google.cloud.discoveryengine.v1beta.Document]s with the same
|
230
230
|
// [parent][google.cloud.discoveryengine.v1beta.CreateDocumentRequest.parent].
|
231
|
-
// Otherwise, an ALREADY_EXISTS error is returned.
|
231
|
+
// Otherwise, an `ALREADY_EXISTS` error is returned.
|
232
232
|
//
|
233
233
|
// This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
234
234
|
// standard with a length limit of 63 characters. Otherwise, an
|
235
|
-
// INVALID_ARGUMENT error is returned.
|
235
|
+
// `INVALID_ARGUMENT` error is returned.
|
236
236
|
string document_id = 3 [(google.api.field_behavior) = REQUIRED];
|
237
237
|
}
|
238
238
|
|
@@ -244,12 +244,12 @@ message UpdateDocumentRequest {
|
|
244
244
|
//
|
245
245
|
// If the caller does not have permission to update the
|
246
246
|
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
247
|
-
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
247
|
+
// whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
248
248
|
//
|
249
249
|
// If the [Document][google.cloud.discoveryengine.v1beta.Document] to update
|
250
250
|
// does not exist and
|
251
251
|
// [allow_missing][google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.allow_missing]
|
252
|
-
// is not set, a NOT_FOUND error is returned.
|
252
|
+
// is not set, a `NOT_FOUND` error is returned.
|
253
253
|
Document document = 1 [(google.api.field_behavior) = REQUIRED];
|
254
254
|
|
255
255
|
// If set to true, and the
|
@@ -269,10 +269,10 @@ message DeleteDocumentRequest {
|
|
269
269
|
//
|
270
270
|
// If the caller does not have permission to delete the
|
271
271
|
// [Document][google.cloud.discoveryengine.v1beta.Document], regardless of
|
272
|
-
// whether or not it exists, a PERMISSION_DENIED error is returned.
|
272
|
+
// whether or not it exists, a `PERMISSION_DENIED` error is returned.
|
273
273
|
//
|
274
274
|
// If the [Document][google.cloud.discoveryengine.v1beta.Document] to delete
|
275
|
-
// does not exist, a NOT_FOUND error is returned.
|
275
|
+
// does not exist, a `NOT_FOUND` error is returned.
|
276
276
|
string name = 1 [
|
277
277
|
(google.api.field_behavior) = REQUIRED,
|
278
278
|
(google.api.resource_reference) = {
|
@@ -38,8 +38,11 @@ message GcsSource {
|
|
38
38
|
// Required. Cloud Storage URIs to input files. URI can be up to
|
39
39
|
// 2000 characters long. URIs can match the full object path (for example,
|
40
40
|
// `gs://bucket/directory/object.json`) or a pattern matching one or more
|
41
|
-
// files, such as `gs://bucket/directory/*.json`.
|
42
|
-
//
|
41
|
+
// files, such as `gs://bucket/directory/*.json`.
|
42
|
+
//
|
43
|
+
// A request can contain at most 100 files (or 100,000 files if `data_schema`
|
44
|
+
// is `content`). Each file can be up to 2 GB (or 100 MB if `data_schema` is
|
45
|
+
// `content`).
|
43
46
|
repeated string input_uris = 1 [(google.api.field_behavior) = REQUIRED];
|
44
47
|
|
45
48
|
// The schema to use when parsing the data from the source.
|
@@ -51,6 +54,12 @@ message GcsSource {
|
|
51
54
|
// document must
|
52
55
|
// have a valid
|
53
56
|
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id].
|
57
|
+
// * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
|
58
|
+
// `input_uris` will become a document, with the ID set to the first 128
|
59
|
+
// bits of SHA256(URI) encoded as a hex string.
|
60
|
+
// * `custom`: One custom data JSON per row in arbitrary format that conforms
|
61
|
+
// the defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the
|
62
|
+
// data store. This can only be used by the GENERIC Data Store vertical.
|
54
63
|
//
|
55
64
|
// Supported values for user even imports:
|
56
65
|
//
|
@@ -88,14 +97,23 @@ message BigQuerySource {
|
|
88
97
|
|
89
98
|
// The schema to use when parsing the data from the source.
|
90
99
|
//
|
91
|
-
// Supported values for imports:
|
100
|
+
// Supported values for user event imports:
|
92
101
|
//
|
93
|
-
// * `user_event` (default): One
|
94
|
-
// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per
|
102
|
+
// * `user_event` (default): One
|
103
|
+
// [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] per row.
|
95
104
|
//
|
96
|
-
//
|
97
|
-
//
|
98
|
-
// document
|
105
|
+
// Supported values for document imports:
|
106
|
+
//
|
107
|
+
// * `document` (default): One
|
108
|
+
// [Document][google.cloud.discoveryengine.v1beta.Document] format per
|
109
|
+
// row. Each document must have a valid
|
110
|
+
// [Document.id][google.cloud.discoveryengine.v1beta.Document.id] and one of
|
111
|
+
// [Document.json_data][google.cloud.discoveryengine.v1beta.Document.json_data]
|
112
|
+
// or
|
113
|
+
// [Document.struct_data][google.cloud.discoveryengine.v1beta.Document.struct_data].
|
114
|
+
// * `custom`: One custom data per row in arbitrary format that conforms the
|
115
|
+
// defined [Schema][google.cloud.discoveryengine.v1beta.Schema] of the data
|
116
|
+
// store. This can only be used by the GENERIC Data Store vertical.
|
99
117
|
string data_schema = 6;
|
100
118
|
}
|
101
119
|
|
@@ -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
|
110
|
-
//
|
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.
|
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.
|
129
|
-
// given 'score' indicates the probability of a Document conversion
|
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
|
-
//
|
137
|
-
//
|
138
|
-
//
|
139
|
-
//
|
140
|
-
//
|
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
|
+
}
|