@google-cloud/discoveryengine 1.11.0 → 1.13.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 +15 -0
- package/README.md +7 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +55 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +28 -9
- package/build/protos/google/cloud/discoveryengine/v1alpha/custom_tuning_model.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store.proto +23 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/data_store_service.proto +11 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +4 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +6 -2
- package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/purge_config.proto +57 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +5 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +407 -11
- package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config.proto +14 -5
- package/build/protos/google/cloud/discoveryengine/v1alpha/site_search_engine_service.proto +126 -0
- package/build/protos/google/cloud/discoveryengine/v1alpha/user_event_service.proto +3 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +14 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion.proto +31 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +38 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/custom_tuning_model.proto +7 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store.proto +23 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/data_store_service.proto +10 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +108 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/purge_config.proto +111 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +24 -0
- package/build/protos/protos.d.ts +22409 -16038
- package/build/protos/protos.js +38744 -22699
- package/build/protos/protos.json +1506 -49
- package/build/src/v1alpha/completion_service_client.d.ts +91 -0
- package/build/src/v1alpha/completion_service_client.js +90 -0
- package/build/src/v1alpha/completion_service_client_config.json +10 -0
- package/build/src/v1alpha/conversational_search_service_client.d.ts +18 -0
- package/build/src/v1alpha/data_store_service_client.d.ts +12 -3
- package/build/src/v1alpha/data_store_service_client.js +8 -2
- package/build/src/v1alpha/document_service_client.d.ts +4 -0
- package/build/src/v1alpha/document_service_client.js +6 -0
- package/build/src/v1alpha/engine_service_client.js +6 -0
- package/build/src/v1alpha/estimate_billing_service_client.js +6 -0
- package/build/src/v1alpha/evaluation_service_client.js +6 -0
- package/build/src/v1alpha/project_service_client.js +6 -0
- package/build/src/v1alpha/sample_query_service_client.js +6 -0
- package/build/src/v1alpha/schema_service_client.js +6 -0
- package/build/src/v1alpha/search_service_client.d.ts +219 -21
- package/build/src/v1alpha/search_service_client.js +146 -14
- package/build/src/v1alpha/search_tuning_service_client.js +6 -0
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +101 -0
- package/build/src/v1alpha/site_search_engine_service_client.js +70 -0
- package/build/src/v1alpha/site_search_engine_service_client_config.json +8 -0
- package/build/src/v1alpha/user_event_service_client.js +6 -0
- package/build/src/v1beta/completion_service_client.d.ts +91 -0
- package/build/src/v1beta/completion_service_client.js +84 -0
- package/build/src/v1beta/completion_service_client_config.json +10 -0
- package/build/src/v1beta/conversational_search_service_client.d.ts +18 -0
- package/build/src/v1beta/data_store_service_client.d.ts +9 -0
- package/build/src/v1beta/document_service_client.d.ts +2 -0
- package/build/src/v1beta/search_service_client.d.ts +147 -0
- package/build/src/v1beta/search_service_client.js +98 -0
- package/build/src/v1beta/user_event_service_client.d.ts +75 -0
- package/build/src/v1beta/user_event_service_client.js +42 -0
- package/build/src/v1beta/user_event_service_client_config.json +5 -0
- package/package.json +2 -2
@@ -214,6 +214,17 @@ export declare class SearchServiceClient {
|
|
214
214
|
* Highly recommended for analytics.
|
215
215
|
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
216
216
|
* is used to deduce `device_type` for analytics.
|
217
|
+
* @param {string} request.languageCode
|
218
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
219
|
+
* information, see [Standard
|
220
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
221
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
222
|
+
* language code is automatically detected, which may not be accurate.
|
223
|
+
* @param {string} request.regionCode
|
224
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
225
|
+
* "419". For more information, see [Standard
|
226
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
227
|
+
* then results will be boosted based on the region_code provided.
|
217
228
|
* @param {number[]} request.facetSpecs
|
218
229
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
219
230
|
*
|
@@ -321,6 +332,44 @@ export declare class SearchServiceClient {
|
|
321
332
|
* See [Google Cloud
|
322
333
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
323
334
|
* for more details.
|
335
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
336
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
337
|
+
* natural language query understanding will be done.
|
338
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
339
|
+
* Search as you type configuration. Only supported for the
|
340
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
341
|
+
* vertical.
|
342
|
+
* @param {string} request.session
|
343
|
+
* The session resource name. Optional.
|
344
|
+
*
|
345
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
346
|
+
* between /search API calls and /answer API calls.
|
347
|
+
*
|
348
|
+
* Example #1 (multi-turn /search API calls):
|
349
|
+
* 1. Call /search API with the auto-session mode (see below).
|
350
|
+
* 2. Call /search API with the session ID generated in the first call.
|
351
|
+
* Here, the previous search query gets considered in query
|
352
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
353
|
+
* and the current query is "How about 2023?", the current query will
|
354
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
355
|
+
*
|
356
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
357
|
+
* 1. Call /search API with the auto-session mode (see below).
|
358
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
359
|
+
* Here, the answer generation happens in the context of the search
|
360
|
+
* results from the first search call.
|
361
|
+
*
|
362
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
363
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
364
|
+
* to create a session manually.
|
365
|
+
*
|
366
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
367
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
368
|
+
* GA. Or ask for allowlisting through Google Support team.
|
369
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
|
370
|
+
* Session specification.
|
371
|
+
*
|
372
|
+
* Can be used only when `session` is set.
|
324
373
|
* @param {object} [options]
|
325
374
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
326
375
|
* @returns {Promise} - The promise which resolves to an array.
|
@@ -438,6 +487,17 @@ export declare class SearchServiceClient {
|
|
438
487
|
* Highly recommended for analytics.
|
439
488
|
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
440
489
|
* is used to deduce `device_type` for analytics.
|
490
|
+
* @param {string} request.languageCode
|
491
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
492
|
+
* information, see [Standard
|
493
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
494
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
495
|
+
* language code is automatically detected, which may not be accurate.
|
496
|
+
* @param {string} request.regionCode
|
497
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
498
|
+
* "419". For more information, see [Standard
|
499
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
500
|
+
* then results will be boosted based on the region_code provided.
|
441
501
|
* @param {number[]} request.facetSpecs
|
442
502
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
443
503
|
*
|
@@ -545,6 +605,44 @@ export declare class SearchServiceClient {
|
|
545
605
|
* See [Google Cloud
|
546
606
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
547
607
|
* for more details.
|
608
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
609
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
610
|
+
* natural language query understanding will be done.
|
611
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
612
|
+
* Search as you type configuration. Only supported for the
|
613
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
614
|
+
* vertical.
|
615
|
+
* @param {string} request.session
|
616
|
+
* The session resource name. Optional.
|
617
|
+
*
|
618
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
619
|
+
* between /search API calls and /answer API calls.
|
620
|
+
*
|
621
|
+
* Example #1 (multi-turn /search API calls):
|
622
|
+
* 1. Call /search API with the auto-session mode (see below).
|
623
|
+
* 2. Call /search API with the session ID generated in the first call.
|
624
|
+
* Here, the previous search query gets considered in query
|
625
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
626
|
+
* and the current query is "How about 2023?", the current query will
|
627
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
628
|
+
*
|
629
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
630
|
+
* 1. Call /search API with the auto-session mode (see below).
|
631
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
632
|
+
* Here, the answer generation happens in the context of the search
|
633
|
+
* results from the first search call.
|
634
|
+
*
|
635
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
636
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
637
|
+
* to create a session manually.
|
638
|
+
*
|
639
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
640
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
641
|
+
* GA. Or ask for allowlisting through Google Support team.
|
642
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
|
643
|
+
* Session specification.
|
644
|
+
*
|
645
|
+
* Can be used only when `session` is set.
|
548
646
|
* @param {object} [options]
|
549
647
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
550
648
|
* @returns {Stream}
|
@@ -657,6 +755,17 @@ export declare class SearchServiceClient {
|
|
657
755
|
* Highly recommended for analytics.
|
658
756
|
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
659
757
|
* is used to deduce `device_type` for analytics.
|
758
|
+
* @param {string} request.languageCode
|
759
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
760
|
+
* information, see [Standard
|
761
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
762
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
763
|
+
* language code is automatically detected, which may not be accurate.
|
764
|
+
* @param {string} request.regionCode
|
765
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
766
|
+
* "419". For more information, see [Standard
|
767
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
768
|
+
* then results will be boosted based on the region_code provided.
|
660
769
|
* @param {number[]} request.facetSpecs
|
661
770
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
662
771
|
*
|
@@ -764,6 +873,44 @@ export declare class SearchServiceClient {
|
|
764
873
|
* See [Google Cloud
|
765
874
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
766
875
|
* for more details.
|
876
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
877
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
878
|
+
* natural language query understanding will be done.
|
879
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
880
|
+
* Search as you type configuration. Only supported for the
|
881
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
882
|
+
* vertical.
|
883
|
+
* @param {string} request.session
|
884
|
+
* The session resource name. Optional.
|
885
|
+
*
|
886
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
887
|
+
* between /search API calls and /answer API calls.
|
888
|
+
*
|
889
|
+
* Example #1 (multi-turn /search API calls):
|
890
|
+
* 1. Call /search API with the auto-session mode (see below).
|
891
|
+
* 2. Call /search API with the session ID generated in the first call.
|
892
|
+
* Here, the previous search query gets considered in query
|
893
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
894
|
+
* and the current query is "How about 2023?", the current query will
|
895
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
896
|
+
*
|
897
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
898
|
+
* 1. Call /search API with the auto-session mode (see below).
|
899
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
900
|
+
* Here, the answer generation happens in the context of the search
|
901
|
+
* results from the first search call.
|
902
|
+
*
|
903
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
904
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
905
|
+
* to create a session manually.
|
906
|
+
*
|
907
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
908
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
909
|
+
* GA. Or ask for allowlisting through Google Support team.
|
910
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
|
911
|
+
* Session specification.
|
912
|
+
*
|
913
|
+
* Can be used only when `session` is set.
|
767
914
|
* @param {object} [options]
|
768
915
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
769
916
|
* @returns {Object}
|
@@ -424,6 +424,17 @@ class SearchServiceClient {
|
|
424
424
|
* Highly recommended for analytics.
|
425
425
|
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
426
426
|
* is used to deduce `device_type` for analytics.
|
427
|
+
* @param {string} request.languageCode
|
428
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
429
|
+
* information, see [Standard
|
430
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
431
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
432
|
+
* language code is automatically detected, which may not be accurate.
|
433
|
+
* @param {string} request.regionCode
|
434
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
435
|
+
* "419". For more information, see [Standard
|
436
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
437
|
+
* then results will be boosted based on the region_code provided.
|
427
438
|
* @param {number[]} request.facetSpecs
|
428
439
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
429
440
|
*
|
@@ -531,6 +542,44 @@ class SearchServiceClient {
|
|
531
542
|
* See [Google Cloud
|
532
543
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
533
544
|
* for more details.
|
545
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
546
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
547
|
+
* natural language query understanding will be done.
|
548
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
549
|
+
* Search as you type configuration. Only supported for the
|
550
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
551
|
+
* vertical.
|
552
|
+
* @param {string} request.session
|
553
|
+
* The session resource name. Optional.
|
554
|
+
*
|
555
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
556
|
+
* between /search API calls and /answer API calls.
|
557
|
+
*
|
558
|
+
* Example #1 (multi-turn /search API calls):
|
559
|
+
* 1. Call /search API with the auto-session mode (see below).
|
560
|
+
* 2. Call /search API with the session ID generated in the first call.
|
561
|
+
* Here, the previous search query gets considered in query
|
562
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
563
|
+
* and the current query is "How about 2023?", the current query will
|
564
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
565
|
+
*
|
566
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
567
|
+
* 1. Call /search API with the auto-session mode (see below).
|
568
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
569
|
+
* Here, the answer generation happens in the context of the search
|
570
|
+
* results from the first search call.
|
571
|
+
*
|
572
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
573
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
574
|
+
* to create a session manually.
|
575
|
+
*
|
576
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
577
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
578
|
+
* GA. Or ask for allowlisting through Google Support team.
|
579
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
|
580
|
+
* Session specification.
|
581
|
+
*
|
582
|
+
* Can be used only when `session` is set.
|
534
583
|
* @param {object} [options]
|
535
584
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
536
585
|
* @returns {Stream}
|
@@ -657,6 +706,17 @@ class SearchServiceClient {
|
|
657
706
|
* Highly recommended for analytics.
|
658
707
|
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
659
708
|
* is used to deduce `device_type` for analytics.
|
709
|
+
* @param {string} request.languageCode
|
710
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
711
|
+
* information, see [Standard
|
712
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
713
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
714
|
+
* language code is automatically detected, which may not be accurate.
|
715
|
+
* @param {string} request.regionCode
|
716
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
717
|
+
* "419". For more information, see [Standard
|
718
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
719
|
+
* then results will be boosted based on the region_code provided.
|
660
720
|
* @param {number[]} request.facetSpecs
|
661
721
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
662
722
|
*
|
@@ -764,6 +824,44 @@ class SearchServiceClient {
|
|
764
824
|
* See [Google Cloud
|
765
825
|
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
766
826
|
* for more details.
|
827
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
828
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
829
|
+
* natural language query understanding will be done.
|
830
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
831
|
+
* Search as you type configuration. Only supported for the
|
832
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
833
|
+
* vertical.
|
834
|
+
* @param {string} request.session
|
835
|
+
* The session resource name. Optional.
|
836
|
+
*
|
837
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
838
|
+
* between /search API calls and /answer API calls.
|
839
|
+
*
|
840
|
+
* Example #1 (multi-turn /search API calls):
|
841
|
+
* 1. Call /search API with the auto-session mode (see below).
|
842
|
+
* 2. Call /search API with the session ID generated in the first call.
|
843
|
+
* Here, the previous search query gets considered in query
|
844
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
845
|
+
* and the current query is "How about 2023?", the current query will
|
846
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
847
|
+
*
|
848
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
849
|
+
* 1. Call /search API with the auto-session mode (see below).
|
850
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
851
|
+
* Here, the answer generation happens in the context of the search
|
852
|
+
* results from the first search call.
|
853
|
+
*
|
854
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
855
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
856
|
+
* to create a session manually.
|
857
|
+
*
|
858
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
859
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
860
|
+
* GA. Or ask for allowlisting through Google Support team.
|
861
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SessionSpec} request.sessionSpec
|
862
|
+
* Session specification.
|
863
|
+
*
|
864
|
+
* Can be used only when `session` is set.
|
767
865
|
* @param {object} [options]
|
768
866
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
769
867
|
* @returns {Object}
|
@@ -192,6 +192,81 @@ export declare class UserEventServiceClient {
|
|
192
192
|
]>;
|
193
193
|
collectUserEvent(request: protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, options: CallOptions, callback: Callback<protos.google.api.IHttpBody, protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest | null | undefined, {} | null | undefined>): void;
|
194
194
|
collectUserEvent(request: protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest, callback: Callback<protos.google.api.IHttpBody, protos.google.cloud.discoveryengine.v1beta.ICollectUserEventRequest | null | undefined, {} | null | undefined>): void;
|
195
|
+
/**
|
196
|
+
* Deletes permanently all user events specified by the filter provided.
|
197
|
+
* Depending on the number of events specified by the filter, this operation
|
198
|
+
* could take hours or days to complete. To test a filter, use the list
|
199
|
+
* command first.
|
200
|
+
*
|
201
|
+
* @param {Object} request
|
202
|
+
* The request object that will be sent.
|
203
|
+
* @param {string} request.parent
|
204
|
+
* Required. The resource name of the catalog under which the events are
|
205
|
+
* created. The format is
|
206
|
+
* `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
|
207
|
+
* @param {string} request.filter
|
208
|
+
* Required. The filter string to specify the events to be deleted with a
|
209
|
+
* length limit of 5,000 characters. The eligible fields for filtering are:
|
210
|
+
*
|
211
|
+
* * `eventType`: Double quoted
|
212
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.event_type|UserEvent.event_type}
|
213
|
+
* string.
|
214
|
+
* * `eventTime`: in ISO 8601 "zulu" format.
|
215
|
+
* * `userPseudoId`: Double quoted string. Specifying this will delete all
|
216
|
+
* events associated with a visitor.
|
217
|
+
* * `userId`: Double quoted string. Specifying this will delete all events
|
218
|
+
* associated with a user.
|
219
|
+
*
|
220
|
+
* Examples:
|
221
|
+
*
|
222
|
+
* * Deleting all events in a time range:
|
223
|
+
* `eventTime > "2012-04-23T18:25:43.511Z"
|
224
|
+
* eventTime < "2012-04-23T18:30:43.511Z"`
|
225
|
+
* * Deleting specific eventType:
|
226
|
+
* `eventType = "search"`
|
227
|
+
* * Deleting all events for a specific visitor:
|
228
|
+
* `userPseudoId = "visitor1024"`
|
229
|
+
* * Deleting all events inside a DataStore:
|
230
|
+
* `*`
|
231
|
+
*
|
232
|
+
* The filtering fields are assumed to have an implicit AND.
|
233
|
+
* @param {boolean} request.force
|
234
|
+
* The `force` field is currently not supported. Purge user event requests
|
235
|
+
* will permanently delete all purgeable events. Once the development is
|
236
|
+
* complete:
|
237
|
+
* If `force` is set to false, the method will return the expected
|
238
|
+
* purge count without deleting any user events. This field will default to
|
239
|
+
* false if not included in the request.
|
240
|
+
* @param {object} [options]
|
241
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
242
|
+
* @returns {Promise} - The promise which resolves to an array.
|
243
|
+
* The first element of the array is an object representing
|
244
|
+
* a long running operation. Its `promise()` method returns a promise
|
245
|
+
* you can `await` for.
|
246
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
247
|
+
* for more details and examples.
|
248
|
+
* @example <caption>include:samples/generated/v1beta/user_event_service.purge_user_events.js</caption>
|
249
|
+
* region_tag:discoveryengine_v1beta_generated_UserEventService_PurgeUserEvents_async
|
250
|
+
*/
|
251
|
+
purgeUserEvents(request?: protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsRequest, options?: CallOptions): Promise<[
|
252
|
+
LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsMetadata>,
|
253
|
+
protos.google.longrunning.IOperation | undefined,
|
254
|
+
{} | undefined
|
255
|
+
]>;
|
256
|
+
purgeUserEvents(request: protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
257
|
+
purgeUserEvents(request: protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsRequest, callback: Callback<LROperation<protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.IPurgeUserEventsMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
|
258
|
+
/**
|
259
|
+
* Check the status of the long running operation returned by `purgeUserEvents()`.
|
260
|
+
* @param {String} name
|
261
|
+
* The operation name that will be passed.
|
262
|
+
* @returns {Promise} - The promise which resolves to an object.
|
263
|
+
* The decoded operation object has result and metadata field to get information from.
|
264
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
265
|
+
* for more details and examples.
|
266
|
+
* @example <caption>include:samples/generated/v1beta/user_event_service.purge_user_events.js</caption>
|
267
|
+
* region_tag:discoveryengine_v1beta_generated_UserEventService_PurgeUserEvents_async
|
268
|
+
*/
|
269
|
+
checkPurgeUserEventsProgress(name: string): Promise<LROperation<protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse, protos.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata>>;
|
195
270
|
/**
|
196
271
|
* Bulk import of user events. Request processing might be
|
197
272
|
* synchronous. Events that already exist are skipped.
|
@@ -301,9 +301,12 @@ class UserEventServiceClient {
|
|
301
301
|
this.operationsClient = this._gaxModule
|
302
302
|
.lro(lroOptions)
|
303
303
|
.operationsClient(opts);
|
304
|
+
const purgeUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeUserEventsResponse');
|
305
|
+
const purgeUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.PurgeUserEventsMetadata');
|
304
306
|
const importUserEventsResponse = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse');
|
305
307
|
const importUserEventsMetadata = protoFilesRoot.lookup('.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata');
|
306
308
|
this.descriptors.longrunning = {
|
309
|
+
purgeUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, purgeUserEventsResponse.decode.bind(purgeUserEventsResponse), purgeUserEventsMetadata.decode.bind(purgeUserEventsMetadata)),
|
307
310
|
importUserEvents: new this._gaxModule.LongrunningDescriptor(this.operationsClient, importUserEventsResponse.decode.bind(importUserEventsResponse), importUserEventsMetadata.decode.bind(importUserEventsMetadata)),
|
308
311
|
};
|
309
312
|
// Put together the default options sent with requests.
|
@@ -343,6 +346,7 @@ class UserEventServiceClient {
|
|
343
346
|
const userEventServiceStubMethods = [
|
344
347
|
'writeUserEvent',
|
345
348
|
'collectUserEvent',
|
349
|
+
'purgeUserEvents',
|
346
350
|
'importUserEvents',
|
347
351
|
];
|
348
352
|
for (const methodName of userEventServiceStubMethods) {
|
@@ -463,6 +467,44 @@ class UserEventServiceClient {
|
|
463
467
|
this.initialize();
|
464
468
|
return this.innerApiCalls.collectUserEvent(request, options, callback);
|
465
469
|
}
|
470
|
+
purgeUserEvents(request, optionsOrCallback, callback) {
|
471
|
+
var _a;
|
472
|
+
request = request || {};
|
473
|
+
let options;
|
474
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
475
|
+
callback = optionsOrCallback;
|
476
|
+
options = {};
|
477
|
+
}
|
478
|
+
else {
|
479
|
+
options = optionsOrCallback;
|
480
|
+
}
|
481
|
+
options = options || {};
|
482
|
+
options.otherArgs = options.otherArgs || {};
|
483
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
484
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
485
|
+
this._gaxModule.routingHeader.fromParams({
|
486
|
+
parent: (_a = request.parent) !== null && _a !== void 0 ? _a : '',
|
487
|
+
});
|
488
|
+
this.initialize();
|
489
|
+
return this.innerApiCalls.purgeUserEvents(request, options, callback);
|
490
|
+
}
|
491
|
+
/**
|
492
|
+
* Check the status of the long running operation returned by `purgeUserEvents()`.
|
493
|
+
* @param {String} name
|
494
|
+
* The operation name that will be passed.
|
495
|
+
* @returns {Promise} - The promise which resolves to an object.
|
496
|
+
* The decoded operation object has result and metadata field to get information from.
|
497
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation }
|
498
|
+
* for more details and examples.
|
499
|
+
* @example <caption>include:samples/generated/v1beta/user_event_service.purge_user_events.js</caption>
|
500
|
+
* region_tag:discoveryengine_v1beta_generated_UserEventService_PurgeUserEvents_async
|
501
|
+
*/
|
502
|
+
async checkPurgeUserEventsProgress(name) {
|
503
|
+
const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({ name });
|
504
|
+
const [operation] = await this.operationsClient.getOperation(request);
|
505
|
+
const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.purgeUserEvents, this._gaxModule.createDefaultBackoffSettings());
|
506
|
+
return decodeOperation;
|
507
|
+
}
|
466
508
|
importUserEvents(request, optionsOrCallback, callback) {
|
467
509
|
var _a;
|
468
510
|
request = request || {};
|
@@ -51,6 +51,11 @@
|
|
51
51
|
"retry_codes_name": "unavailable",
|
52
52
|
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
53
53
|
},
|
54
|
+
"PurgeUserEvents": {
|
55
|
+
"timeout_millis": 30000,
|
56
|
+
"retry_codes_name": "unavailable",
|
57
|
+
"retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f"
|
58
|
+
},
|
54
59
|
"ImportUserEvents": {
|
55
60
|
"timeout_millis": 300000,
|
56
61
|
"retry_codes_name": "unavailable",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@google-cloud/discoveryengine",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.13.0",
|
4
4
|
"description": "Discovery Engine API client for Node.js",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"postpack": "minifyProtoJson",
|
44
44
|
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
|
45
45
|
"system-test": "c8 mocha build/system-test",
|
46
|
-
"test": "c8 mocha build/test"
|
46
|
+
"test": "NODE_OPTIONS=--max-old-space-size=8192 c8 mocha build/test"
|
47
47
|
},
|
48
48
|
"dependencies": {
|
49
49
|
"google-gax": "^4.0.3"
|