@google-cloud/discoveryengine 0.7.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +24 -0
- package/README.md +6 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +1 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +131 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +281 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +6 -5
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -22
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +193 -47
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +41 -36
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
- package/build/protos/protos.d.ts +6529 -4472
- package/build/protos/protos.js +16561 -11622
- package/build/protos/protos.json +1842 -1317
- package/build/src/v1/completion_service_client.d.ts +6 -7
- package/build/src/v1/document_service_client.d.ts +83 -94
- package/build/src/v1/document_service_client.js +18 -22
- package/build/src/v1/schema_service_client.d.ts +39 -49
- package/build/src/v1/schema_service_client.js +17 -22
- package/build/src/v1/search_service_client.d.ts +31 -34
- package/build/src/v1/search_service_client.js +21 -23
- package/build/src/v1/user_event_service_client.d.ts +6 -10
- package/build/src/v1/user_event_service_client.js +1 -2
- package/build/src/v1beta/completion_service_client.d.ts +106 -8
- package/build/src/v1beta/completion_service_client.js +128 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +876 -0
- package/build/src/v1beta/conversational_search_service_client.js +1149 -0
- package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
- package/build/src/v1beta/document_service_client.d.ts +183 -98
- package/build/src/v1beta/document_service_client.js +166 -22
- 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 +103 -11
- package/build/src/v1beta/recommendation_service_client.js +128 -0
- package/build/src/v1beta/schema_service_client.d.ts +132 -49
- package/build/src/v1beta/schema_service_client.js +163 -22
- package/build/src/v1beta/search_service_client.d.ts +163 -67
- package/build/src/v1beta/search_service_client.js +175 -45
- package/build/src/v1beta/user_event_service_client.d.ts +104 -15
- package/build/src/v1beta/user_event_service_client.js +147 -2
- package/package.json +8 -11
@@ -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
|
@@ -120,20 +120,20 @@ message UserEvent {
|
|
120
120
|
//
|
121
121
|
// The value must be one of:
|
122
122
|
//
|
123
|
-
// * [
|
123
|
+
// * [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token] for events that are the result of
|
124
124
|
// [RecommendationService.Recommend][google.cloud.discoveryengine.v1beta.RecommendationService.Recommend].
|
125
125
|
// * [SearchResponse.attribution_token][google.cloud.discoveryengine.v1beta.SearchResponse.attribution_token] for events that are the result of
|
126
126
|
// [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search].
|
127
|
-
// * [CompleteQueryResponse.attribution_token][] for events that are the
|
128
|
-
// result of
|
129
|
-
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery].
|
130
127
|
//
|
131
128
|
// This token enables us to accurately attribute page view or conversion
|
132
129
|
// completion back to the event and the particular predict response containing
|
133
130
|
// this clicked/purchased product. If user clicks on product K in the
|
134
|
-
// recommendation results, pass
|
135
|
-
//
|
136
|
-
//
|
131
|
+
// recommendation results, pass
|
132
|
+
// [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token]
|
133
|
+
// as a URL parameter to product K's page. When recording events on product
|
134
|
+
// K's page, log the
|
135
|
+
// [RecommendResponse.attribution_token][google.cloud.discoveryengine.v1beta.RecommendResponse.attribution_token]
|
136
|
+
// to this field.
|
137
137
|
string attribution_token = 8;
|
138
138
|
|
139
139
|
// The filter syntax consists of an expression language for constructing a
|
@@ -151,10 +151,11 @@ message UserEvent {
|
|
151
151
|
// to https://google.aip.dev/160#filtering.
|
152
152
|
//
|
153
153
|
// The value must be a UTF-8 encoded string with a length limit of 1,000
|
154
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
154
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
155
155
|
string filter = 9;
|
156
156
|
|
157
|
-
// List of
|
157
|
+
// List of [Document][google.cloud.discoveryengine.v1beta.Document]s
|
158
|
+
// associated with this user event.
|
158
159
|
//
|
159
160
|
// This field is optional except for the following event types:
|
160
161
|
//
|
@@ -176,12 +177,14 @@ message UserEvent {
|
|
176
177
|
// Panel metadata associated with this user event.
|
177
178
|
PanelInfo panel = 11;
|
178
179
|
|
179
|
-
// Search
|
180
|
+
// [SearchService.Search][google.cloud.discoveryengine.v1beta.SearchService.Search]
|
181
|
+
// details related to the event.
|
180
182
|
//
|
181
183
|
// This field should be set for `search` event.
|
182
184
|
SearchInfo search_info = 12;
|
183
185
|
|
184
|
-
// CompleteQuery
|
186
|
+
// [CompletionService.CompleteQuery][google.cloud.discoveryengine.v1beta.CompletionService.CompleteQuery]
|
187
|
+
// details related to the event.
|
185
188
|
//
|
186
189
|
// This field should be set for `search` event when autocomplete function is
|
187
190
|
// enabled and the user clicks a suggestion for search.
|
@@ -221,7 +224,7 @@ message UserEvent {
|
|
221
224
|
// * For number attributes, at most 400 values are allowed.
|
222
225
|
//
|
223
226
|
// For product recommendations, an example of extra user information is
|
224
|
-
// `
|
227
|
+
// `traffic_channel`, which is how a user arrives at the site. Users can
|
225
228
|
// arrive
|
226
229
|
// at the site by coming to the site directly, coming through Google
|
227
230
|
// search, or in other ways.
|
@@ -237,7 +240,7 @@ message PageInfo {
|
|
237
240
|
//
|
238
241
|
// This should be kept the same for all user events triggered from the same
|
239
242
|
// pageview. For example, an item detail page view could trigger multiple
|
240
|
-
// events as the user is browsing the page. The `
|
243
|
+
// events as the user is browsing the page. The `pageview_id` property should
|
241
244
|
// be kept the same for all these events so that they can be grouped together
|
242
245
|
// properly.
|
243
246
|
//
|
@@ -253,10 +256,10 @@ message PageInfo {
|
|
253
256
|
//
|
254
257
|
// Category pages include special pages such as sales or promotions. For
|
255
258
|
// instance, a special sale page may have the category hierarchy:
|
256
|
-
// "pageCategory" : "Sales > 2017 Black Friday Deals"
|
259
|
+
// `"pageCategory" : "Sales > 2017 Black Friday Deals"`.
|
257
260
|
//
|
258
261
|
// Required for `view-category-page` events. Other event types should not set
|
259
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
262
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
260
263
|
string page_category = 2;
|
261
264
|
|
262
265
|
// Complete URL (window.location.href) of the user's current page.
|
@@ -283,14 +286,14 @@ message SearchInfo {
|
|
283
286
|
// for definition.
|
284
287
|
//
|
285
288
|
// The value must be a UTF-8 encoded string with a length limit of 5,000
|
286
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
289
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
287
290
|
//
|
288
291
|
// At least one of
|
289
292
|
// [search_query][google.cloud.discoveryengine.v1beta.SearchInfo.search_query]
|
290
293
|
// or
|
291
294
|
// [PageInfo.page_category][google.cloud.discoveryengine.v1beta.PageInfo.page_category]
|
292
295
|
// is required for `search` events. Other event types should not set this
|
293
|
-
// field. Otherwise, an INVALID_ARGUMENT error is returned.
|
296
|
+
// field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
294
297
|
string search_query = 1;
|
295
298
|
|
296
299
|
// The order in which products are returned, if applicable.
|
@@ -300,10 +303,10 @@ message SearchInfo {
|
|
300
303
|
// for definition and syntax.
|
301
304
|
//
|
302
305
|
// The value must be a UTF-8 encoded string with a length limit of 1,000
|
303
|
-
// characters. Otherwise, an INVALID_ARGUMENT error is returned.
|
306
|
+
// characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
304
307
|
//
|
305
308
|
// This can only be set for `search` events. Other event types should not set
|
306
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
309
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
307
310
|
string order_by = 2;
|
308
311
|
|
309
312
|
// An integer that specifies the current offset for pagination (the 0-indexed
|
@@ -313,20 +316,22 @@ message SearchInfo {
|
|
313
316
|
// [SearchRequest.offset][google.cloud.discoveryengine.v1beta.SearchRequest.offset]
|
314
317
|
// for definition.
|
315
318
|
//
|
316
|
-
// If this field is negative, an INVALID_ARGUMENT is returned.
|
319
|
+
// If this field is negative, an `INVALID_ARGUMENT` is returned.
|
317
320
|
//
|
318
321
|
// This can only be set for `search` events. Other event types should not set
|
319
|
-
// this field. Otherwise, an INVALID_ARGUMENT error is returned.
|
322
|
+
// this field. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
320
323
|
optional int32 offset = 3;
|
321
324
|
}
|
322
325
|
|
323
326
|
// Detailed completion information including completion attribution token and
|
324
327
|
// clicked completion info.
|
325
328
|
message CompletionInfo {
|
326
|
-
// End user selected
|
329
|
+
// End user selected
|
330
|
+
// [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion].
|
327
331
|
string selected_suggestion = 1;
|
328
332
|
|
329
|
-
// End user selected
|
333
|
+
// End user selected
|
334
|
+
// [CompleteQueryResponse.QuerySuggestion.suggestion][google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.suggestion]
|
330
335
|
// position, starting from 0.
|
331
336
|
int32 selected_position = 2;
|
332
337
|
}
|
@@ -396,17 +401,15 @@ message DocumentInfo {
|
|
396
401
|
// `{location}`, `{collection_id}`, `{data_store_id}`, and
|
397
402
|
// `{branch_id}` are used when annotating with the stored Document.
|
398
403
|
oneof document_descriptor {
|
399
|
-
//
|
400
|
-
string id = 1
|
404
|
+
// The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
|
405
|
+
string id = 1;
|
401
406
|
|
402
|
-
//
|
407
|
+
// The [Document][google.cloud.discoveryengine.v1beta.Document] resource
|
408
|
+
// full name, of the form:
|
403
409
|
// `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
|
404
|
-
string name = 2 [
|
405
|
-
|
406
|
-
|
407
|
-
type: "discoveryengine.googleapis.com/Document"
|
408
|
-
}
|
409
|
-
];
|
410
|
+
string name = 2 [(google.api.resource_reference) = {
|
411
|
+
type: "discoveryengine.googleapis.com/Document"
|
412
|
+
}];
|
410
413
|
}
|
411
414
|
|
412
415
|
// Quantity of the Document associated with the user event. Defaults to 1.
|
@@ -450,11 +453,13 @@ message PanelInfo {
|
|
450
453
|
message MediaInfo {
|
451
454
|
// The media progress time in seconds, if applicable.
|
452
455
|
// For example, if the end user has finished 90 seconds of a playback video,
|
453
|
-
// then
|
454
|
-
//
|
456
|
+
// then
|
457
|
+
// [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
|
458
|
+
// should be set to 90.
|
455
459
|
google.protobuf.Duration media_progress_duration = 1;
|
456
460
|
|
457
|
-
// Media progress should be computed using only the
|
461
|
+
// Media progress should be computed using only the
|
462
|
+
// [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration]
|
458
463
|
// relative to the media total length.
|
459
464
|
//
|
460
465
|
// 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
|
|