@maxim_mazurok/gapi.client.discoveryengine-v1beta 0.0.20230513 → 0.0.20230525
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 +240 -1
- package/package.json +1 -1
- package/tests.ts +16 -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=v1beta
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230525
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -104,6 +104,11 @@ declare namespace gapi.client {
|
|
|
104
104
|
functionName?:
|
|
105
105
|
string;
|
|
106
106
|
}
|
|
107
|
+
interface GoogleCloudDiscoveryengineV1alphaBatchCreateTargetSitesResponse {
|
|
108
|
+
/** TargetSites created. */
|
|
109
|
+
targetSites?:
|
|
110
|
+
GoogleCloudDiscoveryengineV1alphaTargetSite[];
|
|
111
|
+
}
|
|
107
112
|
interface GoogleCloudDiscoveryengineV1alphaImportDocumentsMetadata {
|
|
108
113
|
/** Operation create time. */
|
|
109
114
|
createTime?:
|
|
@@ -198,6 +203,33 @@ declare namespace gapi.client {
|
|
|
198
203
|
structSchema?:
|
|
199
204
|
{ [P in string]: any };
|
|
200
205
|
}
|
|
206
|
+
interface GoogleCloudDiscoveryengineV1alphaTargetSite {
|
|
207
|
+
/**
|
|
208
|
+
* Input only. If set to false, an uri_pattern will be generated to include all pages whose address contains the provided_uri_pattern. If set to true, an uri_pattern will be generated
|
|
209
|
+
* to try to be an exact match of the provided_uri_pattern or just the specific page if the provided_uri_pattern is a specific one. provided_uri_pattern will always be normalized to
|
|
210
|
+
* generate the uri pattern to be used by the search engine.
|
|
211
|
+
*/
|
|
212
|
+
exactMatch?:
|
|
213
|
+
boolean;
|
|
214
|
+
/** Output only. This is system-generated based on the provided_uri_pattern. */
|
|
215
|
+
generatedUriPattern?:
|
|
216
|
+
string;
|
|
217
|
+
/**
|
|
218
|
+
* Output only. The fully qualified resource name of the target site.
|
|
219
|
+
* `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.
|
|
220
|
+
*/
|
|
221
|
+
name?:
|
|
222
|
+
string;
|
|
223
|
+
/** Required. Input only. The user provided uri pattern from which the `generated_uri_pattern` is generated. */
|
|
224
|
+
providedUriPattern?:
|
|
225
|
+
string;
|
|
226
|
+
/** The type of the target site, e.g. whether the site is to be included or excluded. */
|
|
227
|
+
type?:
|
|
228
|
+
string;
|
|
229
|
+
/** Output only. The target site's last updated time. */
|
|
230
|
+
updateTime?:
|
|
231
|
+
string;
|
|
232
|
+
}
|
|
201
233
|
interface GoogleCloudDiscoveryengineV1betaBigQuerySource {
|
|
202
234
|
/**
|
|
203
235
|
* The schema to use when parsing the data from the source. Supported values for user event imports: * `user_event` (default): One UserEvent per row. Supported values for document
|
|
@@ -329,6 +361,14 @@ declare namespace gapi.client {
|
|
|
329
361
|
string;
|
|
330
362
|
}
|
|
331
363
|
interface GoogleCloudDiscoveryengineV1betaImportDocumentsRequest {
|
|
364
|
+
/**
|
|
365
|
+
* Whether to automatically generate IDs for the documents if absent. If set to `true`, Document.ids are automatically generated based on the hash of the payload, where IDs may not be
|
|
366
|
+
* consistent during multiple imports. In which case ReconciliationMode.FULL is highly recommended to avoid duplicate contents. If unset or set to `false`, Document.ids have to be
|
|
367
|
+
* specified using id_field, otherwises, documents without IDs will fail to be imported. Only set this field when using GcsSource or BigQuerySource, and when GcsSource.data_schema or
|
|
368
|
+
* BigQuerySource.data_schema is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
|
369
|
+
*/
|
|
370
|
+
autoGenerateIds?:
|
|
371
|
+
boolean;
|
|
332
372
|
/** BigQuery input source. */
|
|
333
373
|
bigquerySource?:
|
|
334
374
|
GoogleCloudDiscoveryengineV1betaBigQuerySource;
|
|
@@ -338,6 +378,16 @@ declare namespace gapi.client {
|
|
|
338
378
|
/** Cloud Storage location for the input content. */
|
|
339
379
|
gcsSource?:
|
|
340
380
|
GoogleCloudDiscoveryengineV1betaGcsSource;
|
|
381
|
+
/**
|
|
382
|
+
* The field in the Cloud Storage and BigQuery sources that indicates the unique IDs of the documents. For GcsSource it is the key of the JSON field. For instance, `my_id` for JSON
|
|
383
|
+
* `{"my_id": "some_uuid"}`. For BigQuerySource it is the column name of the BigQuery table where the unique ids are stored. The values of the JSON field or the BigQuery column will be
|
|
384
|
+
* used as the Document.ids. The JSON field or the BigQuery column must be of string type, and the values must be set as valid strings conform to
|
|
385
|
+
* [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters. Otherwise, documents without valid IDs will fail to be imported. Only set this field when using GcsSource or
|
|
386
|
+
* BigQuerySource, and when GcsSource.data_schema or BigQuerySource.data_schema is `custom`. And only set this field when auto_generate_ids is unset or set as `false`. Otherwise, an
|
|
387
|
+
* INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources.
|
|
388
|
+
*/
|
|
389
|
+
idField?:
|
|
390
|
+
string;
|
|
341
391
|
/** The Inline source for the input content for documents. */
|
|
342
392
|
inlineSource?:
|
|
343
393
|
GoogleCloudDiscoveryengineV1betaImportDocumentsRequestInlineSource;
|
|
@@ -764,6 +814,100 @@ declare namespace gapi.client {
|
|
|
764
814
|
userId?:
|
|
765
815
|
string;
|
|
766
816
|
}
|
|
817
|
+
interface GoogleCloudDiscoveryengineV1ImportDocumentsMetadata {
|
|
818
|
+
/** Operation create time. */
|
|
819
|
+
createTime?:
|
|
820
|
+
string;
|
|
821
|
+
/** Count of entries that encountered errors while processing. */
|
|
822
|
+
failureCount?:
|
|
823
|
+
string;
|
|
824
|
+
/** Count of entries that were processed successfully. */
|
|
825
|
+
successCount?:
|
|
826
|
+
string;
|
|
827
|
+
/** Operation last update time. If the operation is done, this is also the finish time. */
|
|
828
|
+
updateTime?:
|
|
829
|
+
string;
|
|
830
|
+
}
|
|
831
|
+
interface GoogleCloudDiscoveryengineV1ImportDocumentsResponse {
|
|
832
|
+
/** Echoes the destination for the complete errors in the request if set. */
|
|
833
|
+
errorConfig?:
|
|
834
|
+
GoogleCloudDiscoveryengineV1ImportErrorConfig;
|
|
835
|
+
/** A sample of errors encountered while processing the request. */
|
|
836
|
+
errorSamples?:
|
|
837
|
+
GoogleRpcStatus[];
|
|
838
|
+
}
|
|
839
|
+
interface GoogleCloudDiscoveryengineV1ImportErrorConfig {
|
|
840
|
+
/**
|
|
841
|
+
* Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors will be written to sharded files in this directory, one per line, as a
|
|
842
|
+
* JSON-encoded `google.rpc.Status` message.
|
|
843
|
+
*/
|
|
844
|
+
gcsPrefix?:
|
|
845
|
+
string;
|
|
846
|
+
}
|
|
847
|
+
interface GoogleCloudDiscoveryengineV1ImportUserEventsMetadata {
|
|
848
|
+
/** Operation create time. */
|
|
849
|
+
createTime?:
|
|
850
|
+
string;
|
|
851
|
+
/** Count of entries that encountered errors while processing. */
|
|
852
|
+
failureCount?:
|
|
853
|
+
string;
|
|
854
|
+
/** Count of entries that were processed successfully. */
|
|
855
|
+
successCount?:
|
|
856
|
+
string;
|
|
857
|
+
/** Operation last update time. If the operation is done, this is also the finish time. */
|
|
858
|
+
updateTime?:
|
|
859
|
+
string;
|
|
860
|
+
}
|
|
861
|
+
interface GoogleCloudDiscoveryengineV1ImportUserEventsResponse {
|
|
862
|
+
/** Echoes the destination for the complete errors if this field was set in the request. */
|
|
863
|
+
errorConfig?:
|
|
864
|
+
GoogleCloudDiscoveryengineV1ImportErrorConfig;
|
|
865
|
+
/** A sample of errors encountered while processing the request. */
|
|
866
|
+
errorSamples?:
|
|
867
|
+
GoogleRpcStatus[];
|
|
868
|
+
/** Count of user events imported with complete existing Documents. */
|
|
869
|
+
joinedEventsCount?:
|
|
870
|
+
string;
|
|
871
|
+
/** Count of user events imported, but with Document information not found in the existing Branch. */
|
|
872
|
+
unjoinedEventsCount?:
|
|
873
|
+
string;
|
|
874
|
+
}
|
|
875
|
+
interface GoogleCloudDiscoveryengineV1PurgeDocumentsMetadata {
|
|
876
|
+
/** Operation create time. */
|
|
877
|
+
createTime?:
|
|
878
|
+
string;
|
|
879
|
+
/** Count of entries that encountered errors while processing. */
|
|
880
|
+
failureCount?:
|
|
881
|
+
string;
|
|
882
|
+
/** Count of entries that were deleted successfully. */
|
|
883
|
+
successCount?:
|
|
884
|
+
string;
|
|
885
|
+
/** Operation last update time. If the operation is done, this is also the finish time. */
|
|
886
|
+
updateTime?:
|
|
887
|
+
string;
|
|
888
|
+
}
|
|
889
|
+
interface GoogleCloudDiscoveryengineV1PurgeDocumentsResponse {
|
|
890
|
+
/** The total count of documents purged as a result of the operation. */
|
|
891
|
+
purgeCount?:
|
|
892
|
+
string;
|
|
893
|
+
/** A sample of document names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random. */
|
|
894
|
+
purgeSample?:
|
|
895
|
+
string[];
|
|
896
|
+
}
|
|
897
|
+
interface GoogleCloudDiscoveryengineV1Schema {
|
|
898
|
+
/** The JSON representation of the schema. */
|
|
899
|
+
jsonSchema?:
|
|
900
|
+
string;
|
|
901
|
+
/**
|
|
902
|
+
* Immutable. The full resource name of the schema, in the format of `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/schemas/{schema}`. This
|
|
903
|
+
* field must be a UTF-8 encoded string with a length limit of 1024 characters.
|
|
904
|
+
*/
|
|
905
|
+
name?:
|
|
906
|
+
string;
|
|
907
|
+
/** The structured representation of the schema. */
|
|
908
|
+
structSchema?:
|
|
909
|
+
{ [P in string]: any };
|
|
910
|
+
}
|
|
767
911
|
interface GoogleLongrunningListOperationsResponse {
|
|
768
912
|
/** The standard List next-page token. */
|
|
769
913
|
nextPageToken?:
|
|
@@ -1614,6 +1758,99 @@ declare namespace gapi.client {
|
|
|
1614
1758
|
string;
|
|
1615
1759
|
}): Request<GoogleLongrunningListOperationsResponse>;
|
|
1616
1760
|
}
|
|
1761
|
+
interface OperationsResource {
|
|
1762
|
+
/** 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. */
|
|
1763
|
+
get(request?: {
|
|
1764
|
+
/** V1 error format. */
|
|
1765
|
+
"$.xgafv"?:
|
|
1766
|
+
string;
|
|
1767
|
+
/** OAuth access token. */
|
|
1768
|
+
access_token?:
|
|
1769
|
+
string;
|
|
1770
|
+
/** Data format for response. */
|
|
1771
|
+
alt?:
|
|
1772
|
+
string;
|
|
1773
|
+
/** JSONP */
|
|
1774
|
+
callback?:
|
|
1775
|
+
string;
|
|
1776
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1777
|
+
fields?:
|
|
1778
|
+
string;
|
|
1779
|
+
/** 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. */
|
|
1780
|
+
key?:
|
|
1781
|
+
string;
|
|
1782
|
+
/** The name of the operation resource. */
|
|
1783
|
+
name:
|
|
1784
|
+
string;
|
|
1785
|
+
/** OAuth 2.0 token for the current user. */
|
|
1786
|
+
oauth_token?:
|
|
1787
|
+
string;
|
|
1788
|
+
/** Returns response with indentations and line breaks. */
|
|
1789
|
+
prettyPrint?:
|
|
1790
|
+
boolean;
|
|
1791
|
+
/** 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. */
|
|
1792
|
+
quotaUser?:
|
|
1793
|
+
string;
|
|
1794
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1795
|
+
upload_protocol?:
|
|
1796
|
+
string;
|
|
1797
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1798
|
+
uploadType?:
|
|
1799
|
+
string;
|
|
1800
|
+
}): Request<GoogleLongrunningOperation>;
|
|
1801
|
+
/** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
|
|
1802
|
+
list(request?: {
|
|
1803
|
+
/** V1 error format. */
|
|
1804
|
+
"$.xgafv"?:
|
|
1805
|
+
string;
|
|
1806
|
+
/** OAuth access token. */
|
|
1807
|
+
access_token?:
|
|
1808
|
+
string;
|
|
1809
|
+
/** Data format for response. */
|
|
1810
|
+
alt?:
|
|
1811
|
+
string;
|
|
1812
|
+
/** JSONP */
|
|
1813
|
+
callback?:
|
|
1814
|
+
string;
|
|
1815
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
1816
|
+
fields?:
|
|
1817
|
+
string;
|
|
1818
|
+
/** The standard list filter. */
|
|
1819
|
+
filter?:
|
|
1820
|
+
string;
|
|
1821
|
+
/** 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. */
|
|
1822
|
+
key?:
|
|
1823
|
+
string;
|
|
1824
|
+
/** The name of the operation's parent resource. */
|
|
1825
|
+
name:
|
|
1826
|
+
string;
|
|
1827
|
+
/** OAuth 2.0 token for the current user. */
|
|
1828
|
+
oauth_token?:
|
|
1829
|
+
string;
|
|
1830
|
+
/** The standard list page size. */
|
|
1831
|
+
pageSize?:
|
|
1832
|
+
number;
|
|
1833
|
+
/** The standard list page token. */
|
|
1834
|
+
pageToken?:
|
|
1835
|
+
string;
|
|
1836
|
+
/** Returns response with indentations and line breaks. */
|
|
1837
|
+
prettyPrint?:
|
|
1838
|
+
boolean;
|
|
1839
|
+
/** 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. */
|
|
1840
|
+
quotaUser?:
|
|
1841
|
+
string;
|
|
1842
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
1843
|
+
upload_protocol?:
|
|
1844
|
+
string;
|
|
1845
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
1846
|
+
uploadType?:
|
|
1847
|
+
string;
|
|
1848
|
+
}): Request<GoogleLongrunningListOperationsResponse>;
|
|
1849
|
+
}
|
|
1850
|
+
interface SchemasResource {
|
|
1851
|
+
operations:
|
|
1852
|
+
OperationsResource;
|
|
1853
|
+
}
|
|
1617
1854
|
interface ServingConfigsResource {
|
|
1618
1855
|
/** Makes a recommendation, which requires a contextual user event. */
|
|
1619
1856
|
recommend(request: {
|
|
@@ -1931,6 +2168,8 @@ declare namespace gapi.client {
|
|
|
1931
2168
|
ModelsResource;
|
|
1932
2169
|
operations:
|
|
1933
2170
|
OperationsResource;
|
|
2171
|
+
schemas:
|
|
2172
|
+
SchemasResource;
|
|
1934
2173
|
servingConfigs:
|
|
1935
2174
|
ServingConfigsResource;
|
|
1936
2175
|
userEvents:
|
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: 20230525
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -58,6 +58,7 @@ gapi.load('client', async () => {
|
|
|
58
58
|
await gapi.client.discoveryengine.projects.locations.collections.dataStores.branches.documents.import({
|
|
59
59
|
parent: "Test string",
|
|
60
60
|
}, {
|
|
61
|
+
autoGenerateIds: true,
|
|
61
62
|
bigquerySource: {
|
|
62
63
|
dataSchema: "Test string",
|
|
63
64
|
datasetId: "Test string",
|
|
@@ -79,6 +80,7 @@ gapi.load('client', async () => {
|
|
|
79
80
|
"Test string"
|
|
80
81
|
],
|
|
81
82
|
},
|
|
83
|
+
idField: "Test string",
|
|
82
84
|
inlineSource: {
|
|
83
85
|
documents: [
|
|
84
86
|
{
|
|
@@ -159,6 +161,17 @@ gapi.load('client', async () => {
|
|
|
159
161
|
pageSize: 42,
|
|
160
162
|
pageToken: "Test string",
|
|
161
163
|
});
|
|
164
|
+
/** 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. */
|
|
165
|
+
await gapi.client.discoveryengine.projects.locations.collections.dataStores.schemas.operations.get({
|
|
166
|
+
name: "Test string",
|
|
167
|
+
});
|
|
168
|
+
/** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
|
|
169
|
+
await gapi.client.discoveryengine.projects.locations.collections.dataStores.schemas.operations.list({
|
|
170
|
+
filter: "Test string",
|
|
171
|
+
name: "Test string",
|
|
172
|
+
pageSize: 42,
|
|
173
|
+
pageToken: "Test string",
|
|
174
|
+
});
|
|
162
175
|
/** Makes a recommendation, which requires a contextual user event. */
|
|
163
176
|
await gapi.client.discoveryengine.projects.locations.collections.dataStores.servingConfigs.recommend({
|
|
164
177
|
servingConfig: "Test string",
|
|
@@ -489,6 +502,7 @@ gapi.load('client', async () => {
|
|
|
489
502
|
await gapi.client.discoveryengine.projects.locations.dataStores.branches.documents.import({
|
|
490
503
|
parent: "Test string",
|
|
491
504
|
}, {
|
|
505
|
+
autoGenerateIds: true,
|
|
492
506
|
bigquerySource: {
|
|
493
507
|
dataSchema: "Test string",
|
|
494
508
|
datasetId: "Test string",
|
|
@@ -510,6 +524,7 @@ gapi.load('client', async () => {
|
|
|
510
524
|
"Test string"
|
|
511
525
|
],
|
|
512
526
|
},
|
|
527
|
+
idField: "Test string",
|
|
513
528
|
inlineSource: {
|
|
514
529
|
documents: [
|
|
515
530
|
{
|