@google-cloud/discoveryengine 0.8.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +13 -1
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
  4. package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
  5. package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
  8. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
  10. package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
  11. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
  12. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
  14. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +7 -2
  15. package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +13 -2
  16. package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +138 -0
  17. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +306 -0
  18. package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +2 -4
  19. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
  20. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +17 -17
  21. package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
  22. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +276 -64
  23. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +45 -36
  24. package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
  25. package/build/protos/protos.d.ts +13913 -8367
  26. package/build/protos/protos.js +36766 -22883
  27. package/build/protos/protos.json +3956 -2571
  28. package/build/src/index.d.ts +4 -1
  29. package/build/src/index.js +4 -1
  30. package/build/src/v1/completion_service_client.d.ts +161 -12
  31. package/build/src/v1/completion_service_client.js +188 -4
  32. package/build/src/v1/conversational_search_service_client.d.ts +947 -0
  33. package/build/src/v1/conversational_search_service_client.js +1205 -0
  34. package/build/src/v1/conversational_search_service_client_config.json +68 -0
  35. package/build/src/v1/document_service_client.d.ts +245 -109
  36. package/build/src/v1/document_service_client.js +231 -31
  37. package/build/src/v1/index.d.ts +1 -0
  38. package/build/src/v1/index.js +3 -1
  39. package/build/src/v1/schema_service_client.d.ts +187 -53
  40. package/build/src/v1/schema_service_client.js +224 -27
  41. package/build/src/v1/search_service_client.d.ts +266 -59
  42. package/build/src/v1/search_service_client.js +267 -41
  43. package/build/src/v1/user_event_service_client.d.ts +159 -19
  44. package/build/src/v1/user_event_service_client.js +208 -7
  45. package/build/src/v1beta/completion_service_client.d.ts +159 -12
  46. package/build/src/v1beta/completion_service_client.js +188 -4
  47. package/build/src/v1beta/conversational_search_service_client.d.ts +947 -0
  48. package/build/src/v1beta/conversational_search_service_client.js +1205 -0
  49. package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
  50. package/build/src/v1beta/document_service_client.d.ts +237 -101
  51. package/build/src/v1beta/document_service_client.js +227 -27
  52. package/build/src/v1beta/index.d.ts +1 -0
  53. package/build/src/v1beta/index.js +3 -1
  54. package/build/src/v1beta/recommendation_service_client.d.ts +158 -15
  55. package/build/src/v1beta/recommendation_service_client.js +188 -4
  56. package/build/src/v1beta/schema_service_client.d.ts +187 -53
  57. package/build/src/v1beta/schema_service_client.js +224 -27
  58. package/build/src/v1beta/search_service_client.d.ts +305 -71
  59. package/build/src/v1beta/search_service_client.js +293 -49
  60. package/build/src/v1beta/user_event_service_client.d.ts +156 -16
  61. package/build/src/v1beta/user_event_service_client.js +208 -7
  62. package/package.json +10 -13
@@ -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
- // * [PredictResponse.attribution_token][] for events that are the result of
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 [PredictResponse.attribution_token][] as a URL
135
- // parameter to product K's page. When recording events on product K's page,
136
- // log the [PredictResponse.attribution_token][] to this field.
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 Documents associated with this user event.
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 API details related to the event.
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 API details related to the event.
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
- // ` traffic_channel`, which is how a user arrives at the site. Users can
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 `pageViewId` property should
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 [CompleteQueryResponse.CompletionResult.suggestion][].
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 [CompleteQueryResponse.CompletionResult.suggestion][]
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,19 @@ 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
- // Required. The Document resource ID.
400
- string id = 1 [(google.api.field_behavior) = REQUIRED];
404
+ // The [Document][google.cloud.discoveryengine.v1beta.Document] resource ID.
405
+ string id = 1;
401
406
 
402
- // Required. The Document resource full name, of the form:
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
- (google.api.field_behavior) = REQUIRED,
406
- (google.api.resource_reference) = {
407
- type: "discoveryengine.googleapis.com/Document"
408
- }
409
- ];
410
+ string name = 2 [(google.api.resource_reference) = {
411
+ type: "discoveryengine.googleapis.com/Document"
412
+ }];
413
+
414
+ // The [Document][google.cloud.discoveryengine.v1beta.Document] URI - only
415
+ // allowed for website data stores.
416
+ string uri = 6;
410
417
  }
411
418
 
412
419
  // Quantity of the Document associated with the user event. Defaults to 1.
@@ -450,11 +457,13 @@ message PanelInfo {
450
457
  message MediaInfo {
451
458
  // The media progress time in seconds, if applicable.
452
459
  // For example, if the end user has finished 90 seconds of a playback video,
453
- // then [MediaInfo.media_progress_duration.seconds][Duration.seconds] should
454
- // be set to 90.
460
+ // then
461
+ // [MediaInfo.media_progress_duration.seconds][google.protobuf.Duration.seconds]
462
+ // should be set to 90.
455
463
  google.protobuf.Duration media_progress_duration = 1;
456
464
 
457
- // Media progress should be computed using only the media_progress_duration
465
+ // Media progress should be computed using only the
466
+ // [media_progress_duration][google.cloud.discoveryengine.v1beta.MediaInfo.media_progress_duration]
458
467
  // relative to the media total length.
459
468
  //
460
469
  // 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 3rd party domain.
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 3rd party
125
+ // referer URL, because many browsers only send the domain for third-party
126
126
  // requests.
127
127
  optional string uri = 3;
128
128