@maxim_mazurok/gapi.client.discoveryengine-v1alpha 0.0.20230907 → 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.
- package/index.d.ts +226 -8
- package/package.json +1 -1
- package/tests.ts +17 -4
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:
|
|
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
|
|
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?:
|
|
@@ -1080,9 +1135,6 @@ declare namespace gapi.client {
|
|
|
1080
1135
|
/** Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments. */
|
|
1081
1136
|
numPreviousSegments?:
|
|
1082
1137
|
number;
|
|
1083
|
-
/** Specifies whether to return the confidence score from the extractive segments in each search result. The default value is `false`. */
|
|
1084
|
-
returnExtractiveSegmentScore?:
|
|
1085
|
-
boolean;
|
|
1086
1138
|
}
|
|
1087
1139
|
interface GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSnippetSpec {
|
|
1088
1140
|
/** [DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count > 0. */
|
|
@@ -1122,7 +1174,7 @@ declare namespace gapi.client {
|
|
|
1122
1174
|
*/
|
|
1123
1175
|
includeCitations?:
|
|
1124
1176
|
boolean;
|
|
1125
|
-
/** Language code for Summary. Use language tags defined by BCP47. */
|
|
1177
|
+
/** Language code for Summary. Use language tags defined by [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). Note: This is an experimental feature. */
|
|
1126
1178
|
languageCode?:
|
|
1127
1179
|
string;
|
|
1128
1180
|
/**
|
|
@@ -4307,6 +4359,87 @@ declare namespace gapi.client {
|
|
|
4307
4359
|
OperationsResource;
|
|
4308
4360
|
}
|
|
4309
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>;
|
|
4310
4443
|
operations:
|
|
4311
4444
|
OperationsResource;
|
|
4312
4445
|
targetSites:
|
|
@@ -4669,7 +4802,7 @@ declare namespace gapi.client {
|
|
|
4669
4802
|
* Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` -
|
|
4670
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
|
|
4671
4804
|
* generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values:
|
|
4672
|
-
* * `document` is the default model for regular dataStores. * `search-history` is the default model for
|
|
4805
|
+
* * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
|
|
4673
4806
|
*/
|
|
4674
4807
|
queryModel?:
|
|
4675
4808
|
string;
|
|
@@ -6579,6 +6712,89 @@ declare namespace gapi.client {
|
|
|
6579
6712
|
},
|
|
6580
6713
|
body: GoogleCloudDiscoveryengineV1alphaSearchRequest): Request<GoogleCloudDiscoveryengineV1alphaSearchResponse>;
|
|
6581
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
|
+
}
|
|
6582
6798
|
interface UserEventsResource {
|
|
6583
6799
|
/**
|
|
6584
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
|
|
@@ -6936,7 +7152,7 @@ declare namespace gapi.client {
|
|
|
6936
7152
|
* Selects data model of query suggestions for serving. Currently supported values: * `document` - Using suggestions generated from user-imported documents. * `search-history` -
|
|
6937
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
|
|
6938
7154
|
* generated from user-imported search events. * `document-completable` - Using suggestions taken directly from user-imported document fields marked as completable. Default values:
|
|
6939
|
-
* * `document` is the default model for regular dataStores. * `search-history` is the default model for
|
|
7155
|
+
* * `document` is the default model for regular dataStores. * `search-history` is the default model for site search dataStores.
|
|
6940
7156
|
*/
|
|
6941
7157
|
queryModel?:
|
|
6942
7158
|
string;
|
|
@@ -6970,6 +7186,8 @@ declare namespace gapi.client {
|
|
|
6970
7186
|
SchemasResource;
|
|
6971
7187
|
servingConfigs:
|
|
6972
7188
|
ServingConfigsResource;
|
|
7189
|
+
siteSearchEngine:
|
|
7190
|
+
SiteSearchEngineResource;
|
|
6973
7191
|
userEvents:
|
|
6974
7192
|
UserEventsResource;
|
|
6975
7193
|
}
|
package/package.json
CHANGED
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:
|
|
6
|
+
// Revision: 20230925
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -158,7 +158,6 @@ gapi.load('client', async () => {
|
|
|
158
158
|
maxExtractiveSegmentCount: 42,
|
|
159
159
|
numNextSegments: 42,
|
|
160
160
|
numPreviousSegments: 42,
|
|
161
|
-
returnExtractiveSegmentScore: true,
|
|
162
161
|
},
|
|
163
162
|
snippetSpec: {
|
|
164
163
|
maxSnippetCount: 42,
|
|
@@ -777,7 +776,6 @@ gapi.load('client', async () => {
|
|
|
777
776
|
maxExtractiveSegmentCount: 42,
|
|
778
777
|
numNextSegments: 42,
|
|
779
778
|
numPreviousSegments: 42,
|
|
780
|
-
returnExtractiveSegmentScore: true,
|
|
781
779
|
},
|
|
782
780
|
snippetSpec: {
|
|
783
781
|
maxSnippetCount: 42,
|
|
@@ -864,6 +862,14 @@ gapi.load('client', async () => {
|
|
|
864
862
|
},
|
|
865
863
|
userPseudoId: "Test string",
|
|
866
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
|
+
});
|
|
867
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. */
|
|
868
874
|
await gapi.client.discoveryengine.projects.locations.collections.dataStores.siteSearchEngine.operations.get({
|
|
869
875
|
name: "Test string",
|
|
@@ -1630,7 +1636,6 @@ gapi.load('client', async () => {
|
|
|
1630
1636
|
maxExtractiveSegmentCount: 42,
|
|
1631
1637
|
numNextSegments: 42,
|
|
1632
1638
|
numPreviousSegments: 42,
|
|
1633
|
-
returnExtractiveSegmentScore: true,
|
|
1634
1639
|
},
|
|
1635
1640
|
snippetSpec: {
|
|
1636
1641
|
maxSnippetCount: 42,
|
|
@@ -1717,6 +1722,14 @@ gapi.load('client', async () => {
|
|
|
1717
1722
|
},
|
|
1718
1723
|
userPseudoId: "Test string",
|
|
1719
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
|
+
});
|
|
1720
1733
|
/**
|
|
1721
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
|
|
1722
1735
|
* API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
|