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

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 +225 -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: 20230925
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?:
@@ -4304,6 +4359,87 @@ declare namespace gapi.client {
4304
4359
  OperationsResource;
4305
4360
  }
4306
4361
  interface SiteSearchEngineResource {
4362
+ /** Request on-demand recrawl for a list of URIs. */
4363
+ recrawlUris(request: {
4364
+ /** V1 error format. */
4365
+ "$.xgafv"?:
4366
+ string;
4367
+ /** OAuth access token. */
4368
+ access_token?:
4369
+ string;
4370
+ /** Data format for response. */
4371
+ alt?:
4372
+ string;
4373
+ /** JSONP */
4374
+ callback?:
4375
+ string;
4376
+ /** Selector specifying which fields to include in a partial response. */
4377
+ fields?:
4378
+ string;
4379
+ /** 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. */
4380
+ key?:
4381
+ string;
4382
+ /** OAuth 2.0 token for the current user. */
4383
+ oauth_token?:
4384
+ string;
4385
+ /** Returns response with indentations and line breaks. */
4386
+ prettyPrint?:
4387
+ boolean;
4388
+ /** 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. */
4389
+ quotaUser?:
4390
+ string;
4391
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
4392
+ siteSearchEngine:
4393
+ string;
4394
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4395
+ upload_protocol?:
4396
+ string;
4397
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4398
+ uploadType?:
4399
+ string;
4400
+ /** Request body */
4401
+ resource:
4402
+ GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest;
4403
+ }): Request<GoogleLongrunningOperation>;
4404
+ recrawlUris(request: {
4405
+ /** V1 error format. */
4406
+ "$.xgafv"?:
4407
+ string;
4408
+ /** OAuth access token. */
4409
+ access_token?:
4410
+ string;
4411
+ /** Data format for response. */
4412
+ alt?:
4413
+ string;
4414
+ /** JSONP */
4415
+ callback?:
4416
+ string;
4417
+ /** Selector specifying which fields to include in a partial response. */
4418
+ fields?:
4419
+ string;
4420
+ /** 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. */
4421
+ key?:
4422
+ string;
4423
+ /** OAuth 2.0 token for the current user. */
4424
+ oauth_token?:
4425
+ string;
4426
+ /** Returns response with indentations and line breaks. */
4427
+ prettyPrint?:
4428
+ boolean;
4429
+ /** 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. */
4430
+ quotaUser?:
4431
+ string;
4432
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
4433
+ siteSearchEngine:
4434
+ string;
4435
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4436
+ upload_protocol?:
4437
+ string;
4438
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4439
+ uploadType?:
4440
+ string;
4441
+ },
4442
+ body: GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest): Request<GoogleLongrunningOperation>;
4307
4443
  operations:
4308
4444
  OperationsResource;
4309
4445
  targetSites:
@@ -4666,7 +4802,7 @@ declare namespace gapi.client {
4666
4802
  * Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` -
4667
4803
  * 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
4804
  * 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.
4805
+ * * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
4670
4806
  */
4671
4807
  queryModel?:
4672
4808
  string;
@@ -6576,6 +6712,89 @@ declare namespace gapi.client {
6576
6712
  },
6577
6713
  body: GoogleCloudDiscoveryengineV1alphaSearchRequest): Request<GoogleCloudDiscoveryengineV1alphaSearchResponse>;
6578
6714
  }
6715
+ interface SiteSearchEngineResource {
6716
+ /** Request on-demand recrawl for a list of URIs. */
6717
+ recrawlUris(request: {
6718
+ /** V1 error format. */
6719
+ "$.xgafv"?:
6720
+ string;
6721
+ /** OAuth access token. */
6722
+ access_token?:
6723
+ string;
6724
+ /** Data format for response. */
6725
+ alt?:
6726
+ string;
6727
+ /** JSONP */
6728
+ callback?:
6729
+ string;
6730
+ /** Selector specifying which fields to include in a partial response. */
6731
+ fields?:
6732
+ string;
6733
+ /** 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. */
6734
+ key?:
6735
+ string;
6736
+ /** OAuth 2.0 token for the current user. */
6737
+ oauth_token?:
6738
+ string;
6739
+ /** Returns response with indentations and line breaks. */
6740
+ prettyPrint?:
6741
+ boolean;
6742
+ /** 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. */
6743
+ quotaUser?:
6744
+ string;
6745
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
6746
+ siteSearchEngine:
6747
+ string;
6748
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
6749
+ upload_protocol?:
6750
+ string;
6751
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
6752
+ uploadType?:
6753
+ string;
6754
+ /** Request body */
6755
+ resource:
6756
+ GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest;
6757
+ }): Request<GoogleLongrunningOperation>;
6758
+ recrawlUris(request: {
6759
+ /** V1 error format. */
6760
+ "$.xgafv"?:
6761
+ string;
6762
+ /** OAuth access token. */
6763
+ access_token?:
6764
+ string;
6765
+ /** Data format for response. */
6766
+ alt?:
6767
+ string;
6768
+ /** JSONP */
6769
+ callback?:
6770
+ string;
6771
+ /** Selector specifying which fields to include in a partial response. */
6772
+ fields?:
6773
+ string;
6774
+ /** 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. */
6775
+ key?:
6776
+ string;
6777
+ /** OAuth 2.0 token for the current user. */
6778
+ oauth_token?:
6779
+ string;
6780
+ /** Returns response with indentations and line breaks. */
6781
+ prettyPrint?:
6782
+ boolean;
6783
+ /** 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. */
6784
+ quotaUser?:
6785
+ string;
6786
+ /** Required. Full resource name of the SiteSearchEngine, such as `projects/*‍/locations/*‍/collections/*‍/dataStores/*‍/siteSearchEngine`. */
6787
+ siteSearchEngine:
6788
+ string;
6789
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
6790
+ upload_protocol?:
6791
+ string;
6792
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
6793
+ uploadType?:
6794
+ string;
6795
+ },
6796
+ body: GoogleCloudDiscoveryengineV1alphaRecrawlUrisRequest): Request<GoogleLongrunningOperation>;
6797
+ }
6579
6798
  interface UserEventsResource {
6580
6799
  /**
6581
6800
  * 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 +7152,7 @@ declare namespace gapi.client {
6933
7152
  * Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` -
6934
7153
  * 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
7154
  * 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.
7155
+ * * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
6937
7156
  */
6938
7157
  queryModel?:
6939
7158
  string;
@@ -6967,6 +7186,8 @@ declare namespace gapi.client {
6967
7186
  SchemasResource;
6968
7187
  servingConfigs:
6969
7188
  ServingConfigsResource;
7189
+ siteSearchEngine:
7190
+ SiteSearchEngineResource;
6970
7191
  userEvents:
6971
7192
  UserEventsResource;
6972
7193
  }
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.20230925",
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: 20230925
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.