@google-cloud/discoveryengine 1.0.0 → 1.2.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 +20 -0
- package/README.md +33 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
- package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +155 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +134 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversation.proto +138 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +121 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +318 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +343 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +159 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/recommendation_service.proto +221 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +312 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema_service.proto +260 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +851 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +152 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +475 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +154 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +9 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +25 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +115 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +4 -0
- package/build/protos/protos.d.ts +22864 -6680
- package/build/protos/protos.js +57205 -16191
- package/build/protos/protos.json +5548 -1224
- package/build/src/index.d.ts +6 -1
- package/build/src/index.js +7 -1
- package/build/src/v1/completion_service_client.d.ts +156 -6
- package/build/src/v1/completion_service_client.js +188 -4
- package/build/src/v1/conversational_search_service_client.d.ts +947 -0
- package/build/src/v1/conversational_search_service_client.js +1205 -0
- package/build/src/v1/conversational_search_service_client_config.json +68 -0
- package/build/src/v1/document_service_client.d.ts +165 -18
- package/build/src/v1/document_service_client.js +215 -11
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/schema_service_client.d.ts +148 -4
- package/build/src/v1/schema_service_client.js +207 -5
- package/build/src/v1/search_service_client.d.ts +238 -28
- package/build/src/v1/search_service_client.js +248 -20
- package/build/src/v1/user_event_service_client.d.ts +153 -9
- package/build/src/v1/user_event_service_client.js +207 -5
- package/build/src/v1alpha/completion_service_client.d.ts +603 -0
- package/build/src/v1alpha/completion_service_client.js +843 -0
- package/build/src/v1alpha/completion_service_client_config.json +43 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +998 -0
- package/build/src/v1alpha/conversational_search_service_client.js +1275 -0
- package/build/src/v1alpha/conversational_search_service_client_config.json +68 -0
- package/build/src/v1alpha/document_service_client.d.ts +1140 -0
- package/build/src/v1alpha/document_service_client.js +1393 -0
- package/build/src/v1alpha/document_service_client_config.json +82 -0
- package/build/src/v1alpha/index.d.ts +8 -0
- package/build/src/v1alpha/index.js +37 -0
- package/build/src/v1alpha/recommendation_service_client.d.ts +735 -0
- package/build/src/v1alpha/recommendation_service_client.js +938 -0
- package/build/src/v1alpha/recommendation_service_client_config.json +43 -0
- package/build/src/v1alpha/schema_service_client.d.ts +935 -0
- package/build/src/v1alpha/schema_service_client.js +1327 -0
- package/build/src/v1alpha/schema_service_client_config.json +63 -0
- package/build/src/v1alpha/search_service_client.d.ts +1208 -0
- package/build/src/v1alpha/search_service_client.js +1432 -0
- package/build/src/v1alpha/search_service_client_config.json +43 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +704 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +1087 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +30 -0
- package/build/src/v1alpha/user_event_service_client.d.ts +853 -0
- package/build/src/v1alpha/user_event_service_client.js +1174 -0
- package/build/src/v1alpha/user_event_service_client_config.json +67 -0
- package/build/src/v1beta/completion_service_client.d.ts +55 -4
- package/build/src/v1beta/completion_service_client.js +60 -4
- package/build/src/v1beta/conversational_search_service_client.d.ts +75 -4
- package/build/src/v1beta/conversational_search_service_client.js +60 -4
- package/build/src/v1beta/document_service_client.d.ts +55 -4
- package/build/src/v1beta/document_service_client.js +61 -5
- package/build/src/v1beta/recommendation_service_client.d.ts +55 -4
- package/build/src/v1beta/recommendation_service_client.js +60 -4
- package/build/src/v1beta/schema_service_client.d.ts +55 -4
- package/build/src/v1beta/schema_service_client.js +61 -5
- package/build/src/v1beta/search_service_client.d.ts +142 -4
- package/build/src/v1beta/search_service_client.js +118 -4
- package/build/src/v1beta/user_event_service_client.d.ts +55 -4
- package/build/src/v1beta/user_event_service_client.js +61 -5
- package/package.json +5 -5
|
@@ -66,7 +66,7 @@ message UserEvent {
|
|
|
66
66
|
// quality.
|
|
67
67
|
//
|
|
68
68
|
// The field must be a UTF-8 encoded string with a length limit of 128
|
|
69
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
69
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
70
70
|
//
|
|
71
71
|
// The field should not contain PII or user-data. We recommend to use Google
|
|
72
72
|
// Analytics [Client
|
|
@@ -119,20 +119,17 @@ message UserEvent {
|
|
|
119
119
|
//
|
|
120
120
|
// The value must be one of:
|
|
121
121
|
//
|
|
122
|
-
// * [
|
|
122
|
+
// * [RecommendResponse.attribution_token][] for events that are the result of
|
|
123
123
|
// [RecommendationService.Recommend][].
|
|
124
124
|
// * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1.SearchResponse.attribution_token] for events that are the result of
|
|
125
125
|
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search].
|
|
126
|
-
// * [CompleteQueryResponse.attribution_token][] for events that are the
|
|
127
|
-
// result of
|
|
128
|
-
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery].
|
|
129
126
|
//
|
|
130
127
|
// This token enables us to accurately attribute page view or conversion
|
|
131
128
|
// completion back to the event and the particular predict response containing
|
|
132
129
|
// this clicked/purchased product. If user clicks on product K in the
|
|
133
|
-
// recommendation results, pass [
|
|
134
|
-
// parameter to product K's page. When recording events on product K's
|
|
135
|
-
// log the [
|
|
130
|
+
// recommendation results, pass [RecommendResponse.attribution_token][] as a
|
|
131
|
+
// URL parameter to product K's page. When recording events on product K's
|
|
132
|
+
// page, log the [RecommendResponse.attribution_token][] to this field.
|
|
136
133
|
string attribution_token = 8;
|
|
137
134
|
|
|
138
135
|
// The filter syntax consists of an expression language for constructing a
|
|
@@ -140,8 +137,9 @@ message UserEvent {
|
|
|
140
137
|
//
|
|
141
138
|
// One example is for `search` events, the associated
|
|
142
139
|
// [SearchRequest][google.cloud.discoveryengine.v1.SearchRequest] may contain
|
|
143
|
-
// a filter expression in
|
|
144
|
-
//
|
|
140
|
+
// a filter expression in
|
|
141
|
+
// [SearchRequest.filter][google.cloud.discoveryengine.v1.SearchRequest.filter]
|
|
142
|
+
// conforming to https://google.aip.dev/160#filtering.
|
|
145
143
|
//
|
|
146
144
|
// Similarly, for `view-item-list` events that are generated from a
|
|
147
145
|
// [RecommendationService.RecommendRequest][], this field may be populated
|
|
@@ -149,10 +147,11 @@ message UserEvent {
|
|
|
149
147
|
// to https://google.aip.dev/160#filtering.
|
|
150
148
|
//
|
|
151
149
|
// The value must be a UTF-8 encoded string with a length limit of 1,000
|
|
152
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
150
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
153
151
|
string filter = 9;
|
|
154
152
|
|
|
155
|
-
// List of
|
|
153
|
+
// List of [Document][google.cloud.discoveryengine.v1.Document]s associated
|
|
154
|
+
// with this user event.
|
|
156
155
|
//
|
|
157
156
|
// This field is optional except for the following event types:
|
|
158
157
|
//
|
|
@@ -174,12 +173,14 @@ message UserEvent {
|
|
|
174
173
|
// Panel metadata associated with this user event.
|
|
175
174
|
PanelInfo panel = 11;
|
|
176
175
|
|
|
177
|
-
// Search
|
|
176
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1.SearchService.Search]
|
|
177
|
+
// details related to the event.
|
|
178
178
|
//
|
|
179
179
|
// This field should be set for `search` event.
|
|
180
180
|
SearchInfo search_info = 12;
|
|
181
181
|
|
|
182
|
-
// CompleteQuery
|
|
182
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1.CompletionService.CompleteQuery]
|
|
183
|
+
// details related to the event.
|
|
183
184
|
//
|
|
184
185
|
// This field should be set for `search` event when autocomplete function is
|
|
185
186
|
// enabled and the user clicks a suggestion for search.
|
|
@@ -219,7 +220,7 @@ message UserEvent {
|
|
|
219
220
|
// * For number attributes, at most 400 values are allowed.
|
|
220
221
|
//
|
|
221
222
|
// For product recommendations, an example of extra user information is
|
|
222
|
-
// `
|
|
223
|
+
// `traffic_channel`, which is how a user arrives at the site. Users can
|
|
223
224
|
// arrive
|
|
224
225
|
// at the site by coming to the site directly, coming through Google
|
|
225
226
|
// search, or in other ways.
|
|
@@ -235,7 +236,7 @@ message PageInfo {
|
|
|
235
236
|
//
|
|
236
237
|
// This should be kept the same for all user events triggered from the same
|
|
237
238
|
// pageview. For example, an item detail page view could trigger multiple
|
|
238
|
-
// events as the user is browsing the page. The `
|
|
239
|
+
// events as the user is browsing the page. The `pageview_id` property should
|
|
239
240
|
// be kept the same for all these events so that they can be grouped together
|
|
240
241
|
// properly.
|
|
241
242
|
//
|
|
@@ -251,10 +252,10 @@ message PageInfo {
|
|
|
251
252
|
//
|
|
252
253
|
// Category pages include special pages such as sales or promotions. For
|
|
253
254
|
// instance, a special sale page may have the category hierarchy:
|
|
254
|
-
// "pageCategory" : "Sales > 2017 Black Friday Deals"
|
|
255
|
+
// `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
|
|
255
256
|
//
|
|
256
257
|
// Required for `view-category-page` events. Other event types should not set
|
|
257
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
258
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
258
259
|
string page_category = 2;
|
|
259
260
|
|
|
260
261
|
// Complete URL (window.location.href) of the user's current page.
|
|
@@ -281,24 +282,26 @@ message SearchInfo {
|
|
|
281
282
|
// for definition.
|
|
282
283
|
//
|
|
283
284
|
// The value must be a UTF-8 encoded string with a length limit of 5,000
|
|
284
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
285
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
285
286
|
//
|
|
286
287
|
// At least one of
|
|
287
288
|
// [search_query][google.cloud.discoveryengine.v1.SearchInfo.search_query] or
|
|
288
289
|
// [PageInfo.page_category][google.cloud.discoveryengine.v1.PageInfo.page_category]
|
|
289
290
|
// is required for `search` events. Other event types should not set this
|
|
290
|
-
// field. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
291
|
+
// field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
291
292
|
string search_query = 1;
|
|
292
293
|
|
|
293
294
|
// The order in which products are returned, if applicable.
|
|
294
295
|
//
|
|
295
|
-
// See
|
|
296
|
+
// See
|
|
297
|
+
// [SearchRequest.order_by][google.cloud.discoveryengine.v1.SearchRequest.order_by]
|
|
298
|
+
// for definition and syntax.
|
|
296
299
|
//
|
|
297
300
|
// The value must be a UTF-8 encoded string with a length limit of 1,000
|
|
298
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
301
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
299
302
|
//
|
|
300
303
|
// This can only be set for `search` events. Other event types should not set
|
|
301
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
304
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
302
305
|
string order_by = 2;
|
|
303
306
|
|
|
304
307
|
// An integer that specifies the current offset for pagination (the 0-indexed
|
|
@@ -308,20 +311,22 @@ message SearchInfo {
|
|
|
308
311
|
// [SearchRequest.offset][google.cloud.discoveryengine.v1.SearchRequest.offset]
|
|
309
312
|
// for definition.
|
|
310
313
|
//
|
|
311
|
-
// If this field is negative, an INVALID_ARGUMENT is returned.
|
|
314
|
+
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
|
312
315
|
//
|
|
313
316
|
// This can only be set for `search` events. Other event types should not set
|
|
314
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
|
317
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
315
318
|
optional int32 offset = 3;
|
|
316
319
|
}
|
|
317
320
|
|
|
318
321
|
// Detailed completion information including completion attribution token and
|
|
319
322
|
// clicked completion info.
|
|
320
323
|
message CompletionInfo {
|
|
321
|
-
// End user selected
|
|
324
|
+
// End user selected
|
|
325
|
+
// [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.suggestion].
|
|
322
326
|
string selected_suggestion = 1;
|
|
323
327
|
|
|
324
|
-
// End user selected
|
|
328
|
+
// End user selected
|
|
329
|
+
// [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1.CompleteQueryResponse.QuerySuggestion.suggestion]
|
|
325
330
|
// position, starting from 0.
|
|
326
331
|
int32 selected_position = 2;
|
|
327
332
|
}
|
|
@@ -389,17 +394,19 @@ message DocumentInfo {
|
|
|
389
394
|
// `{location}`, `{collection_id}`, `{data_store_id}`, and
|
|
390
395
|
// `{branch_id}` are used when annotating with the stored Document.
|
|
391
396
|
oneof document_descriptor {
|
|
392
|
-
//
|
|
393
|
-
string id = 1
|
|
397
|
+
// The [Document][google.cloud.discoveryengine.v1.Document] resource ID.
|
|
398
|
+
string id = 1;
|
|
394
399
|
|
|
395
|
-
//
|
|
400
|
+
// The [Document][google.cloud.discoveryengine.v1.Document] resource full
|
|
401
|
+
// name, of the form:
|
|
396
402
|
// `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
|
|
397
|
-
string name = 2 [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
+
string name = 2 [(google.api.resource_reference) = {
|
|
404
|
+
type: "discoveryengine.googleapis.com/Document"
|
|
405
|
+
}];
|
|
406
|
+
|
|
407
|
+
// The [Document][google.cloud.discoveryengine.v1.Document] URI - only
|
|
408
|
+
// allowed for website data stores.
|
|
409
|
+
string uri = 6;
|
|
403
410
|
}
|
|
404
411
|
|
|
405
412
|
// Quantity of the Document associated with the user event. Defaults to 1.
|
|
@@ -443,11 +450,13 @@ message PanelInfo {
|
|
|
443
450
|
message MediaInfo {
|
|
444
451
|
// The media progress time in seconds, if applicable.
|
|
445
452
|
// For example, if the end user has finished 90 seconds of a playback video,
|
|
446
|
-
// then
|
|
447
|
-
//
|
|
453
|
+
// then
|
|
454
|
+
// [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
|
|
455
|
+
// should be set to 90.
|
|
448
456
|
google.protobuf.Duration media_progress_duration = 1;
|
|
449
457
|
|
|
450
|
-
// Media progress should be computed using only the
|
|
458
|
+
// Media progress should be computed using only the
|
|
459
|
+
// [media_progress_duration][google.cloud.discoveryengine.v1.MediaInfo.media_progress_duration]
|
|
451
460
|
// relative to the media total length.
|
|
452
461
|
//
|
|
453
462
|
// This value must be between `[0, 1.0]` inclusive.
|
|
@@ -53,7 +53,7 @@ service UserEventService {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// Writes a single user event from the browser. This uses a GET request to
|
|
56
|
-
// due to browser restriction of POST-ing to a
|
|
56
|
+
// due to browser restriction of POST-ing to a third-party domain.
|
|
57
57
|
//
|
|
58
58
|
// This method is used only by the Discovery Engine API JavaScript pixel and
|
|
59
59
|
// Google Tag Manager. Users should not call this method directly.
|
|
@@ -122,7 +122,7 @@ message CollectUserEventRequest {
|
|
|
122
122
|
|
|
123
123
|
// The URL including cgi-parameters but excluding the hash fragment with a
|
|
124
124
|
// length limit of 5,000 characters. This is often more useful than the
|
|
125
|
-
// referer URL, because many browsers only send the domain for
|
|
125
|
+
// referer URL, because many browsers only send the domain for third-party
|
|
126
126
|
// requests.
|
|
127
127
|
optional string uri = 3;
|
|
128
128
|
|
|
@@ -0,0 +1,155 @@
|
|
|
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/resource.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 = "CommonProto";
|
|
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
|
+
option (google.api.resource_definition) = {
|
|
30
|
+
type: "discoveryengine.googleapis.com/Branch"
|
|
31
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}"
|
|
32
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}"
|
|
33
|
+
};
|
|
34
|
+
option (google.api.resource_definition) = {
|
|
35
|
+
type: "discoveryengine.googleapis.com/DataStore"
|
|
36
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}"
|
|
37
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}"
|
|
38
|
+
};
|
|
39
|
+
option (google.api.resource_definition) = {
|
|
40
|
+
type: "discoveryengine.googleapis.com/ServingConfig"
|
|
41
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
|
42
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}"
|
|
43
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}"
|
|
44
|
+
};
|
|
45
|
+
option (google.api.resource_definition) = {
|
|
46
|
+
type: "discoveryengine.googleapis.com/SiteSearchEngine",
|
|
47
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine"
|
|
48
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine"
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// The type of solution.
|
|
52
|
+
enum SolutionType {
|
|
53
|
+
// Default value.
|
|
54
|
+
SOLUTION_TYPE_UNSPECIFIED = 0;
|
|
55
|
+
|
|
56
|
+
// Used for Recommendations AI.
|
|
57
|
+
SOLUTION_TYPE_RECOMMENDATION = 1;
|
|
58
|
+
|
|
59
|
+
// Used for Discovery Search.
|
|
60
|
+
SOLUTION_TYPE_SEARCH = 2;
|
|
61
|
+
|
|
62
|
+
// Used for use cases related to the Generative AI agent.
|
|
63
|
+
SOLUTION_TYPE_CHAT = 3;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// A floating point interval.
|
|
67
|
+
message Interval {
|
|
68
|
+
// The lower bound of the interval. If neither of the min fields are
|
|
69
|
+
// set, then the lower bound is negative infinity.
|
|
70
|
+
//
|
|
71
|
+
// This field must be not larger than max.
|
|
72
|
+
// Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
73
|
+
oneof min {
|
|
74
|
+
// Inclusive lower bound.
|
|
75
|
+
double minimum = 1;
|
|
76
|
+
|
|
77
|
+
// Exclusive lower bound.
|
|
78
|
+
double exclusive_minimum = 2;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// The upper bound of the interval. If neither of the max fields are
|
|
82
|
+
// set, then the upper bound is positive infinity.
|
|
83
|
+
//
|
|
84
|
+
// This field must be not smaller than min.
|
|
85
|
+
// Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
86
|
+
oneof max {
|
|
87
|
+
// Inclusive upper bound.
|
|
88
|
+
double maximum = 3;
|
|
89
|
+
|
|
90
|
+
// Exclusive upper bound.
|
|
91
|
+
double exclusive_maximum = 4;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// A custom attribute that is not explicitly modeled in a resource, e.g.
|
|
96
|
+
// [UserEvent][google.cloud.discoveryengine.v1alpha.UserEvent].
|
|
97
|
+
message CustomAttribute {
|
|
98
|
+
// The textual values of this custom attribute. For example, `["yellow",
|
|
99
|
+
// "green"]` when the key is "color".
|
|
100
|
+
//
|
|
101
|
+
// Empty string is not allowed. Otherwise, an `INVALID_ARGUMENT` error is
|
|
102
|
+
// returned.
|
|
103
|
+
//
|
|
104
|
+
// Exactly one of
|
|
105
|
+
// [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
|
|
106
|
+
// or
|
|
107
|
+
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
|
|
108
|
+
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
109
|
+
repeated string text = 1;
|
|
110
|
+
|
|
111
|
+
// The numerical values of this custom attribute. For example, `[2.3, 15.4]`
|
|
112
|
+
// when the key is "lengths_cm".
|
|
113
|
+
//
|
|
114
|
+
// Exactly one of
|
|
115
|
+
// [CustomAttribute.text][google.cloud.discoveryengine.v1alpha.CustomAttribute.text]
|
|
116
|
+
// or
|
|
117
|
+
// [CustomAttribute.numbers][google.cloud.discoveryengine.v1alpha.CustomAttribute.numbers]
|
|
118
|
+
// should be set. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
119
|
+
repeated double numbers = 2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Information of an end user.
|
|
123
|
+
message UserInfo {
|
|
124
|
+
// Highly recommended for logged-in users. Unique identifier for logged-in
|
|
125
|
+
// user, such as a user name. Don't set for anonymous users.
|
|
126
|
+
//
|
|
127
|
+
// Always use a hashed value for this ID.
|
|
128
|
+
//
|
|
129
|
+
// Don't set the field to the same fixed ID for different users. This mixes
|
|
130
|
+
// the event history of those users together, which results in degraded
|
|
131
|
+
// model quality.
|
|
132
|
+
//
|
|
133
|
+
// The field must be a UTF-8 encoded string with a length limit of 128
|
|
134
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
135
|
+
string user_id = 1;
|
|
136
|
+
|
|
137
|
+
// User agent as included in the HTTP header.
|
|
138
|
+
//
|
|
139
|
+
// The field must be a UTF-8 encoded string with a length limit of 1,000
|
|
140
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
|
141
|
+
//
|
|
142
|
+
// This should not be set when using the client side event reporting with
|
|
143
|
+
// GTM or JavaScript tag in
|
|
144
|
+
// [UserEventService.CollectUserEvent][google.cloud.discoveryengine.v1alpha.UserEventService.CollectUserEvent]
|
|
145
|
+
// or if
|
|
146
|
+
// [UserEvent.direct_user_request][google.cloud.discoveryengine.v1alpha.UserEvent.direct_user_request]
|
|
147
|
+
// is set.
|
|
148
|
+
string user_agent = 2;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// Double list.
|
|
152
|
+
message DoubleList {
|
|
153
|
+
// Double values.
|
|
154
|
+
repeated double values = 1;
|
|
155
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
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
|
+
|
|
24
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
|
25
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
|
26
|
+
option java_multiple_files = true;
|
|
27
|
+
option java_outer_classname = "CompletionServiceProto";
|
|
28
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
|
29
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
|
30
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
|
31
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
|
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: "/v1alpha/{data_store=projects/*/locations/*/dataStores/*}:completeQuery"
|
|
43
|
+
additional_bindings {
|
|
44
|
+
get: "/v1alpha/{data_store=projects/*/locations/*/collections/*/dataStores/*}:completeQuery"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Request message for
|
|
51
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.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.v1alpha.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
|
+
// * `document-completable` - Using suggestions taken directly from
|
|
78
|
+
// user-imported document fields marked as completable.
|
|
79
|
+
//
|
|
80
|
+
// Default values:
|
|
81
|
+
//
|
|
82
|
+
// * `document` is the default model for regular dataStores.
|
|
83
|
+
// * `search-history` is the default model for site search 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.v1alpha.UserEvent.user_pseudo_id]
|
|
95
|
+
// and
|
|
96
|
+
// [SearchRequest.user_pseudo_id][google.cloud.discoveryengine.v1alpha.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
|
+
// Indicates if tail suggestions should be returned if there are no
|
|
103
|
+
// suggestions that match the full query. Even if set to true, if there are
|
|
104
|
+
// suggestions that match the full query, those are returned and no
|
|
105
|
+
// tail suggestions are returned.
|
|
106
|
+
bool include_tail_suggestions = 5;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Response message for
|
|
110
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1alpha.CompletionService.CompleteQuery]
|
|
111
|
+
// method.
|
|
112
|
+
message CompleteQueryResponse {
|
|
113
|
+
// Suggestions as search queries.
|
|
114
|
+
message QuerySuggestion {
|
|
115
|
+
// The suggestion for the query.
|
|
116
|
+
string suggestion = 1;
|
|
117
|
+
|
|
118
|
+
// The unique document field paths that serve as the source of this
|
|
119
|
+
// suggestion if it was generated from completable fields.
|
|
120
|
+
//
|
|
121
|
+
// This field is only populated for the document-completable model.
|
|
122
|
+
repeated string completable_field_paths = 2;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Results of the matched query suggestions. The result list is ordered and
|
|
126
|
+
// the first result is a top suggestion.
|
|
127
|
+
repeated QuerySuggestion query_suggestions = 1;
|
|
128
|
+
|
|
129
|
+
// True if the returned suggestions are all tail suggestions.
|
|
130
|
+
//
|
|
131
|
+
// For tail matching to be triggered, include_tail_suggestions in the request
|
|
132
|
+
// must be true and there must be no suggestions that match the full query.
|
|
133
|
+
bool tail_match_triggered = 2;
|
|
134
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// Copyright 2022 Google LLC
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.cloud.discoveryengine.v1alpha;
|
|
18
|
+
|
|
19
|
+
import "google/api/field_behavior.proto";
|
|
20
|
+
import "google/api/resource.proto";
|
|
21
|
+
import "google/cloud/discoveryengine/v1alpha/search_service.proto";
|
|
22
|
+
import "google/protobuf/timestamp.proto";
|
|
23
|
+
|
|
24
|
+
option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
|
|
25
|
+
option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
|
|
26
|
+
option java_multiple_files = true;
|
|
27
|
+
option java_outer_classname = "ConversationProto";
|
|
28
|
+
option java_package = "com.google.cloud.discoveryengine.v1alpha";
|
|
29
|
+
option objc_class_prefix = "DISCOVERYENGINE";
|
|
30
|
+
option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
|
|
31
|
+
option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
|
|
32
|
+
|
|
33
|
+
// External conversation proto definition.
|
|
34
|
+
message Conversation {
|
|
35
|
+
option (google.api.resource) = {
|
|
36
|
+
type: "discoveryengine.googleapis.com/Conversation"
|
|
37
|
+
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}"
|
|
38
|
+
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}"
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Enumeration of the state of the conversation.
|
|
42
|
+
enum State {
|
|
43
|
+
// Unknown.
|
|
44
|
+
STATE_UNSPECIFIED = 0;
|
|
45
|
+
|
|
46
|
+
// Conversation is currently open.
|
|
47
|
+
IN_PROGRESS = 1;
|
|
48
|
+
|
|
49
|
+
// Conversation has been completed.
|
|
50
|
+
COMPLETED = 2;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Immutable. Fully qualified name
|
|
54
|
+
// `project/*/locations/global/collections/{collection}/dataStore/*/conversations/*`
|
|
55
|
+
string name = 1 [(google.api.field_behavior) = IMMUTABLE];
|
|
56
|
+
|
|
57
|
+
// The state of the Conversation.
|
|
58
|
+
State state = 2;
|
|
59
|
+
|
|
60
|
+
// A unique identifier for tracking users.
|
|
61
|
+
string user_pseudo_id = 3;
|
|
62
|
+
|
|
63
|
+
// Conversation messages.
|
|
64
|
+
repeated ConversationMessage messages = 4;
|
|
65
|
+
|
|
66
|
+
// Output only. The time the conversation started.
|
|
67
|
+
google.protobuf.Timestamp start_time = 5
|
|
68
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
69
|
+
|
|
70
|
+
// Output only. The time the conversation finished.
|
|
71
|
+
google.protobuf.Timestamp end_time = 6
|
|
72
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Defines a reply message to user.
|
|
76
|
+
message Reply {
|
|
77
|
+
// Defines reference in reply.
|
|
78
|
+
message Reference {
|
|
79
|
+
option deprecated = true;
|
|
80
|
+
|
|
81
|
+
// URI link reference.
|
|
82
|
+
string uri = 1;
|
|
83
|
+
|
|
84
|
+
// Anchor text.
|
|
85
|
+
string anchor_text = 2;
|
|
86
|
+
|
|
87
|
+
// Anchor text start index.
|
|
88
|
+
int32 start = 3;
|
|
89
|
+
|
|
90
|
+
// Anchor text end index.
|
|
91
|
+
int32 end = 4;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// DEPRECATED: use `summary` instead.
|
|
95
|
+
// Text reply.
|
|
96
|
+
string reply = 1 [deprecated = true];
|
|
97
|
+
|
|
98
|
+
// References in the reply.
|
|
99
|
+
repeated Reference references = 2 [deprecated = true];
|
|
100
|
+
|
|
101
|
+
// Summary based on search results.
|
|
102
|
+
SearchResponse.Summary summary = 3;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Defines context of the conversation
|
|
106
|
+
message ConversationContext {
|
|
107
|
+
// The current list of documents the user is seeing.
|
|
108
|
+
// It contains the document resource references.
|
|
109
|
+
repeated string context_documents = 1;
|
|
110
|
+
|
|
111
|
+
// The current active document the user opened.
|
|
112
|
+
// It contains the document resource reference.
|
|
113
|
+
string active_document = 2;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Defines text input.
|
|
117
|
+
message TextInput {
|
|
118
|
+
// Text input.
|
|
119
|
+
string input = 1;
|
|
120
|
+
|
|
121
|
+
// Conversation context of the input.
|
|
122
|
+
ConversationContext context = 2;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Defines a conversation message.
|
|
126
|
+
message ConversationMessage {
|
|
127
|
+
oneof message {
|
|
128
|
+
// User text input.
|
|
129
|
+
TextInput user_input = 1;
|
|
130
|
+
|
|
131
|
+
// Search reply.
|
|
132
|
+
Reply reply = 2;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Output only. Message creation timestamp.
|
|
136
|
+
google.protobuf.Timestamp create_time = 3
|
|
137
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
138
|
+
}
|