@maxim_mazurok/gapi.client.discoveryengine-v1beta 0.0.20230518 → 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 +145 -1
  2. package/package.json +1 -1
  3. package/tests.ts +5 -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: 20230518
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?:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1beta",
3
- "version": "0.0.20230518",
3
+ "version": "0.0.20230525",
4
4
  "description": "TypeScript typings for Discovery Engine API v1beta",
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: 20230518
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
  {
@@ -500,6 +502,7 @@ gapi.load('client', async () => {
500
502
  await gapi.client.discoveryengine.projects.locations.dataStores.branches.documents.import({
501
503
  parent: "Test string",
502
504
  }, {
505
+ autoGenerateIds: true,
503
506
  bigquerySource: {
504
507
  dataSchema: "Test string",
505
508
  datasetId: "Test string",
@@ -521,6 +524,7 @@ gapi.load('client', async () => {
521
524
  "Test string"
522
525
  ],
523
526
  },
527
+ idField: "Test string",
524
528
  inlineSource: {
525
529
  documents: [
526
530
  {