@maxim_mazurok/gapi.client.discoveryengine-v1alpha 0.0.20230914 → 0.0.20230928

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.
Files changed (3) hide show
  1. package/index.d.ts +241 -4
  2. package/package.json +1 -1
  3. package/tests.ts +17 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://discoveryengine.googleapis.com/$discovery/rest?version=v1alpha
12
- // Revision: 20230914
12
+ // Revision: 20230928
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -161,7 +161,7 @@ declare namespace gapi.client {
161
161
  * Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` - Using
162
162
  * suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions generated
163
163
  * from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values: * `document`
164
- * is the default model for regular dataStores. * `search-history` is the default model for IndustryVertical.SITE_SEARCH dataStores.
164
+ * is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
165
165
  */
166
166
  queryModel?:
167
167
  string;
@@ -845,6 +845,61 @@ declare namespace gapi.client {
845
845
  metadata?:
846
846
  { [P in string]: any };
847
847
  }
848
+ interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisMetadata {
849
+ /** Operation create time. */
850
+ createTime?:
851
+ string;
852
+ /** Unique URIs in the request that don't match any TargetSite in the DataStore, only match TargetSites that haven't been fully indexed, or match a TargetSite with type EXCLUDE. */
853
+ invalidUris?:
854
+ string[];
855
+ /** Total number of URIs that have yet to be crawled. */
856
+ pendingCount?:
857
+ number;
858
+ /** Total number of URIs that were rejected due to insufficient indexing resources. */
859
+ quotaExceededCount?:
860
+ number;
861
+ /** Total number of URIs that have been crawled so far. */
862
+ successCount?:
863
+ number;
864
+ /** Operation last update time. If the operation is done, this is also the finish time. */
865
+ updateTime?:
866
+ string;
867
+ /** Total number of unique URIs in the request that are not in invalid_uris. */
868
+ validUrisCount?:
869
+ number;
870
+ }
871
+ interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest {
872
+ /**
873
+ * Required. List of URIs to crawl. At most 10K URIs are supported, otherwise an INVALID_ARGUMENT error is thrown. Each URI should match at least one TargetSite in
874
+ * `site_search_engine`.
875
+ */
876
+ uris?:
877
+ string[];
878
+ }
879
+ interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponse {
880
+ /** URIs that were not crawled before the LRO terminated. */
881
+ failedUris?:
882
+ string[];
883
+ /** Details for a sample of up to 10 `failed_uris`. */
884
+ failureSamples?:
885
+ GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo[];
886
+ }
887
+ interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfo {
888
+ /** List of failure reasons by corpus type (e.g. desktop, mobile). */
889
+ failureReasons?:
890
+ GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason[];
891
+ /** URI that failed to be crawled. */
892
+ uri?:
893
+ string;
894
+ }
895
+ interface GoogleCloudDiscoveryengineV1alphaRecrawlUrisResponseFailureInfoFailureReason {
896
+ /** DESKTOP, MOBILE, or CORPUS_TYPE_UNSPECIFIED. */
897
+ corpusType?:
898
+ string;
899
+ /** Reason why the URI was not crawled. */
900
+ errorMessage?:
901
+ string;
902
+ }
848
903
  interface GoogleCloudDiscoveryengineV1alphaReply {
849
904
  /** References in the reply. */
850
905
  references?:
@@ -1246,6 +1301,8 @@ declare namespace gapi.client {
1246
1301
  /** Results of facets requested by user. */
1247
1302
  facets?:
1248
1303
  GoogleCloudDiscoveryengineV1alphaSearchResponseFacet[];
1304
+ geoSearchDebugInfo?:
1305
+ GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo[];
1249
1306
  /** Guided search result. */
1250
1307
  guidedSearchResult?:
1251
1308
  GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult;
@@ -1290,6 +1347,14 @@ declare namespace gapi.client {
1290
1347
  value?:
1291
1348
  string;
1292
1349
  }
1350
+ interface GoogleCloudDiscoveryengineV1alphaSearchResponseGeoSearchDebugInfo {
1351
+ /** The error produced. */
1352
+ errorMessage?:
1353
+ string;
1354
+ /** The address from which forward geocoding ingestion produced issues. */
1355
+ originalAddressQuery?:
1356
+ string;
1357
+ }
1293
1358
  interface GoogleCloudDiscoveryengineV1alphaSearchResponseGuidedSearchResult {
1294
1359
  /** Suggested follow-up questions. */
1295
1360
  followUpQuestions?:
@@ -1651,6 +1716,12 @@ declare namespace gapi.client {
1651
1716
  */
1652
1717
  name?:
1653
1718
  string;
1719
+ /**
1720
+ * The type of snippet to display in UCS widget. - RESULT_DISPLAY_TYPE_UNSPECIFIED for existing users. - SNIPPET for new non-enterprise search users. - EXTRACTIVE_ANSWER for new
1721
+ * enterprise search users.
1722
+ */
1723
+ resultDisplayType?:
1724
+ string;
1654
1725
  /** Required. Immutable. Specifies the solution type that this WidgetConfig can be used for. */
1655
1726
  solutionType?:
1656
1727
  string;
@@ -4304,6 +4375,87 @@ declare namespace gapi.client {
4304
4375
  OperationsResource;
4305
4376
  }
4306
4377
  interface SiteSearchEngineResource {
4378
+ /** Request on-demand recrawl for a list of URIs. */
4379
+ recrawlUris(request: {
4380
+ /** V1 error format. */
4381
+ "$.xgafv"?:
4382
+ string;
4383
+ /** OAuth access token. */
4384
+ access_token?:
4385
+ string;
4386
+ /** Data format for response. */
4387
+ alt?:
4388
+ string;
4389
+ /** JSONP */
4390
+ callback?:
4391
+ string;
4392
+ /** Selector specifying which fields to include in a partial response. */
4393
+ fields?:
4394
+ string;
4395
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4396
+ key?:
4397
+ string;
4398
+ /** OAuth 2.0 token for the current user. */
4399
+ oauth_token?:
4400
+ string;
4401
+ /** Returns response with indentations and line breaks. */
4402
+ prettyPrint?:
4403
+ boolean;
4404
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4405
+ quotaUser?:
4406
+ string;
4407
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
4408
+ siteSearchEngine:
4409
+ string;
4410
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4411
+ upload_protocol?:
4412
+ string;
4413
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4414
+ uploadType?:
4415
+ string;
4416
+ /** Request body */
4417
+ resource:
4418
+ GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest;
4419
+ }): Request<GoogleLongrunningOperation>;
4420
+ recrawlUris(request: {
4421
+ /** V1 error format. */
4422
+ "$.xgafv"?:
4423
+ string;
4424
+ /** OAuth access token. */
4425
+ access_token?:
4426
+ string;
4427
+ /** Data format for response. */
4428
+ alt?:
4429
+ string;
4430
+ /** JSONP */
4431
+ callback?:
4432
+ string;
4433
+ /** Selector specifying which fields to include in a partial response. */
4434
+ fields?:
4435
+ string;
4436
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
4437
+ key?:
4438
+ string;
4439
+ /** OAuth 2.0 token for the current user. */
4440
+ oauth_token?:
4441
+ string;
4442
+ /** Returns response with indentations and line breaks. */
4443
+ prettyPrint?:
4444
+ boolean;
4445
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
4446
+ quotaUser?:
4447
+ string;
4448
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
4449
+ siteSearchEngine:
4450
+ string;
4451
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4452
+ upload_protocol?:
4453
+ string;
4454
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4455
+ uploadType?:
4456
+ string;
4457
+ },
4458
+ body: GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest): Request<GoogleLongrunningOperation>;
4307
4459
  operations:
4308
4460
  OperationsResource;
4309
4461
  targetSites:
@@ -4666,7 +4818,7 @@ declare namespace gapi.client {
4666
4818
  * Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` -
4667
4819
  * Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions
4668
4820
  * generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values:
4669
- * * `document` is the default model for regular dataStores. * `search-history` is the default model for IndustryVertical.SITE_SEARCH dataStores.
4821
+ * * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
4670
4822
  */
4671
4823
  queryModel?:
4672
4824
  string;
@@ -6576,6 +6728,89 @@ declare namespace gapi.client {
6576
6728
  },
6577
6729
  body: GoogleCloudDiscoveryengineV1alphaSearchRequest): Request<GoogleCloudDiscoveryengineV1alphaSearchResponse>;
6578
6730
  }
6731
+ interface SiteSearchEngineResource {
6732
+ /** Request on-demand recrawl for a list of URIs. */
6733
+ recrawlUris(request: {
6734
+ /** V1 error format. */
6735
+ "$.xgafv"?:
6736
+ string;
6737
+ /** OAuth access token. */
6738
+ access_token?:
6739
+ string;
6740
+ /** Data format for response. */
6741
+ alt?:
6742
+ string;
6743
+ /** JSONP */
6744
+ callback?:
6745
+ string;
6746
+ /** Selector specifying which fields to include in a partial response. */
6747
+ fields?:
6748
+ string;
6749
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
6750
+ key?:
6751
+ string;
6752
+ /** OAuth 2.0 token for the current user. */
6753
+ oauth_token?:
6754
+ string;
6755
+ /** Returns response with indentations and line breaks. */
6756
+ prettyPrint?:
6757
+ boolean;
6758
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
6759
+ quotaUser?:
6760
+ string;
6761
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
6762
+ siteSearchEngine:
6763
+ string;
6764
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
6765
+ upload_protocol?:
6766
+ string;
6767
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
6768
+ uploadType?:
6769
+ string;
6770
+ /** Request body */
6771
+ resource:
6772
+ GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest;
6773
+ }): Request<GoogleLongrunningOperation>;
6774
+ recrawlUris(request: {
6775
+ /** V1 error format. */
6776
+ "$.xgafv"?:
6777
+ string;
6778
+ /** OAuth access token. */
6779
+ access_token?:
6780
+ string;
6781
+ /** Data format for response. */
6782
+ alt?:
6783
+ string;
6784
+ /** JSONP */
6785
+ callback?:
6786
+ string;
6787
+ /** Selector specifying which fields to include in a partial response. */
6788
+ fields?:
6789
+ string;
6790
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
6791
+ key?:
6792
+ string;
6793
+ /** OAuth 2.0 token for the current user. */
6794
+ oauth_token?:
6795
+ string;
6796
+ /** Returns response with indentations and line breaks. */
6797
+ prettyPrint?:
6798
+ boolean;
6799
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
6800
+ quotaUser?:
6801
+ string;
6802
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
6803
+ siteSearchEngine:
6804
+ string;
6805
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
6806
+ upload_protocol?:
6807
+ string;
6808
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
6809
+ uploadType?:
6810
+ string;
6811
+ },
6812
+ body: GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest): Request<GoogleLongrunningOperation>;
6813
+ }
6579
6814
  interface UserEventsResource {
6580
6815
  /**
6581
6816
  * Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery
@@ -6933,7 +7168,7 @@ declare namespace gapi.client {
6933
7168
  * Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` -
6934
7169
  * Using suggestions generated from the past history of SearchService.Search API calls. Do not use it when there is no traffic for Search API. * `user-event` - Using suggestions
6935
7170
  * generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values:
6936
- * * `document` is the default model for regular dataStores. * `search-history` is the default model for IndustryVertical.SITE_SEARCH dataStores.
7171
+ * * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
6937
7172
  */
6938
7173
  queryModel?:
6939
7174
  string;
@@ -6967,6 +7202,8 @@ declare namespace gapi.client {
6967
7202
  SchemasResource;
6968
7203
  servingConfigs:
6969
7204
  ServingConfigsResource;
7205
+ siteSearchEngine:
7206
+ SiteSearchEngineResource;
6970
7207
  userEvents:
6971
7208
  UserEventsResource;
6972
7209
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1alpha",
3
- "version": "0.0.20230914",
3
+ "version": "0.0.20230928",
4
4
  "description": "TypeScript typings for Discovery Engine API v1alpha",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230914
6
+ // Revision: 20230928
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -862,6 +862,14 @@ gapi.load('client', async () => {
862
862
  },
863
863
  userPseudoId: "Test string",
864
864
  });
865
+ /** Request on-demand recrawl for a list of URIs. */
866
+ await gapi.client.discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.recrawlUris({
867
+ siteSearchEngine: "Test string",
868
+ }, {
869
+ uris: [
870
+ "Test string"
871
+ ],
872
+ });
865
873
  /** Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. */
866
874
  await gapi.client.discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get({
867
875
  name: "Test string",
@@ -1714,6 +1722,14 @@ gapi.load('client', async () => {
1714
1722
  },
1715
1723
  userPseudoId: "Test string",
1716
1724
  });
1725
+ /** Request on-demand recrawl for a list of URIs. */
1726
+ await gapi.client.discoveryengine.projects.locations.dataStores.siteSearchEngine.recrawlUris({
1727
+ siteSearchEngine: "Test string",
1728
+ }, {
1729
+ uris: [
1730
+ "Test string"
1731
+ ],
1732
+ });
1717
1733
  /**
1718
1734
  * Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine
1719
1735
  * API JavaScript pixel and Google Tag Manager. Users should not call this method directly.