@maxim_mazurok/gapi.client.discoveryengine-v1alpha 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.
Files changed (3) hide show
  1. package/index.d.ts +240 -1
  2. package/package.json +1 -1
  3. 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=v1alpha
12
- // Revision: 20230513
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 GoogleCloudDiscoveryengineV1alphaBigQuerySource {
108
113
  /**
109
114
  * 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
@@ -235,6 +240,14 @@ declare namespace gapi.client {
235
240
  string;
236
241
  }
237
242
  interface GoogleCloudDiscoveryengineV1alphaImportDocumentsRequest {
243
+ /**
244
+ * 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
245
+ * 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
246
+ * 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
247
+ * BigQuerySource.data_schema is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
248
+ */
249
+ autoGenerateIds?:
250
+ boolean;
238
251
  /** BigQuery input source. */
239
252
  bigquerySource?:
240
253
  GoogleCloudDiscoveryengineV1alphaBigQuerySource;
@@ -244,6 +257,16 @@ declare namespace gapi.client {
244
257
  /** Cloud Storage location for the input content. */
245
258
  gcsSource?:
246
259
  GoogleCloudDiscoveryengineV1alphaGcsSource;
260
+ /**
261
+ * 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
262
+ * `{"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
263
+ * 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
264
+ * [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
265
+ * 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
266
+ * INVALID_ARGUMENT error is thrown. If it is unset, a default value `_id` is used when importing from the allowed data sources.
267
+ */
268
+ idField?:
269
+ string;
247
270
  /** The Inline source for the input content for documents. */
248
271
  inlineSource?:
249
272
  GoogleCloudDiscoveryengineV1alphaImportDocumentsRequestInlineSource;
@@ -525,6 +548,33 @@ declare namespace gapi.client {
525
548
  searchQuery?:
526
549
  string;
527
550
  }
551
+ interface GoogleCloudDiscoveryengineV1alphaTargetSite {
552
+ /**
553
+ * 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
554
+ * 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
555
+ * generate the uri pattern to be used by the search engine.
556
+ */
557
+ exactMatch?:
558
+ boolean;
559
+ /** Output only. This is system-generated based on the provided_uri_pattern. */
560
+ generatedUriPattern?:
561
+ string;
562
+ /**
563
+ * Output only. The fully qualified resource name of the target site.
564
+ * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}` The `target_site_id` is system-generated.
565
+ */
566
+ name?:
567
+ string;
568
+ /** Required. Input only. The user provided uri pattern from which the `generated_uri_pattern` is generated. */
569
+ providedUriPattern?:
570
+ string;
571
+ /** The type of the target site, e.g. whether the site is to be included or excluded. */
572
+ type?:
573
+ string;
574
+ /** Output only. The target site's last updated time. */
575
+ updateTime?:
576
+ string;
577
+ }
528
578
  interface GoogleCloudDiscoveryengineV1alphaTransactionInfo {
529
579
  /**
530
580
  * All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = value - tax -
@@ -764,6 +814,100 @@ declare namespace gapi.client {
764
814
  structSchema?:
765
815
  { [P in string]: any };
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1alpha",
3
- "version": "0.0.20230513",
3
+ "version": "0.0.20230525",
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: 20230513
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
  {