@maxim_mazurok/gapi.client.discoveryengine-v1alpha 0.0.20230608 → 0.0.20230620

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 +226 -9
  2. package/package.json +1 -1
  3. package/tests.ts +21 -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: 20230608
12
+ // Revision: 20230620
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -186,11 +186,11 @@ declare namespace gapi.client {
186
186
  { [P in string]: any };
187
187
  }
188
188
  interface GoogleCloudDiscoveryengineV1alphaDocumentInfo {
189
- /** Required. The Document resource ID. */
189
+ /** The Document resource ID. */
190
190
  id?:
191
191
  string;
192
192
  /**
193
- * Required. The Document resource full name, of the form:
193
+ * The Document resource full name, of the form:
194
194
  * `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
195
195
  */
196
196
  name?:
@@ -204,7 +204,7 @@ declare namespace gapi.client {
204
204
  */
205
205
  quantity?:
206
206
  number;
207
- /** Required. The Document url - only allowed for DataStores with content_config PUBLIC_WEBSITE. */
207
+ /** The Document url - only allowed for DataStores with content_config PUBLIC_WEBSITE. */
208
208
  uri?:
209
209
  string;
210
210
  }
@@ -213,7 +213,8 @@ declare namespace gapi.client {
213
213
  * The schema to use when parsing the data from the source. Supported values for document imports: * `document` (default): One JSON Document per line. Each document must have a valid
214
214
  * Document.id. * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by `input_uris` will become a document, with the ID set to the first 128 bits of SHA256(URI) encoded
215
215
  * as a hex string. * `custom`: One custom data JSON per row in arbitrary format that conforms the defined Schema of the data store. This can only be used by the GENERIC Data Store
216
- * vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.
216
+ * vertical. * `csv`: A CSV file with header conforming the defined Schema of the data store. Each entry after the header will be imported as a Document. This can only be used by the
217
+ * GENERIC Data Store vertical. Supported values for user even imports: * `user_event` (default): One JSON UserEvent per line.
217
218
  */
218
219
  dataSchema?:
219
220
  string;
@@ -244,7 +245,7 @@ declare namespace gapi.client {
244
245
  * 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
246
  * 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
247
  * 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
+ * BigQuerySource.data_schema is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
248
249
  */
249
250
  autoGenerateIds?:
250
251
  boolean;
@@ -310,16 +311,16 @@ declare namespace gapi.client {
310
311
  string;
311
312
  }
312
313
  interface GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest {
313
- /** Required. BigQuery input source. */
314
+ /** BigQuery input source. */
314
315
  bigquerySource?:
315
316
  GoogleCloudDiscoveryengineV1alphaBigQuerySource;
316
317
  /** The desired location of errors incurred during the Import. Cannot be set for inline user event imports. */
317
318
  errorConfig?:
318
319
  GoogleCloudDiscoveryengineV1alphaImportErrorConfig;
319
- /** Required. Cloud Storage location for the input content. */
320
+ /** Cloud Storage location for the input content. */
320
321
  gcsSource?:
321
322
  GoogleCloudDiscoveryengineV1alphaGcsSource;
322
- /** Required. The Inline source for the input content for UserEvents. */
323
+ /** The Inline source for the input content for UserEvents. */
323
324
  inlineSource?:
324
325
  GoogleCloudDiscoveryengineV1alphaImportUserEventsRequestInlineSource;
325
326
  }
@@ -437,6 +438,42 @@ declare namespace gapi.client {
437
438
  purgeSample?:
438
439
  string[];
439
440
  }
441
+ interface GoogleCloudDiscoveryengineV1alphaPurgeUserEventsMetadata {
442
+ /** Operation create time. */
443
+ createTime?:
444
+ string;
445
+ /** Count of entries that encountered errors while processing. */
446
+ failureCount?:
447
+ string;
448
+ /** Count of entries that were deleted successfully. */
449
+ successCount?:
450
+ string;
451
+ /** Operation last update time. If the operation is done, this is also the finish time. */
452
+ updateTime?:
453
+ string;
454
+ }
455
+ interface GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest {
456
+ /**
457
+ * Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. The eligible fields for filtering are: * `eventType`: Double quoted
458
+ * UserEvent.event_type string. * `eventTime`: in ISO 8601 "zulu" format. * `userPseudoId`: Double quoted string. Specifying this will delete all events associated with a visitor. *
459
+ * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime >
460
+ * "2012-04-23T18:25:43.511Z" eventTime < "2012-04-23T18:30:43.511Z"` * Deleting specific eventType: `eventType = "search"` * Deleting all events for a specific visitor: `userPseudoId
461
+ * = "visitor1024"` * Deleting all events inside a DataStore: `*` The filtering fields are assumed to have an implicit AND.
462
+ */
463
+ filter?:
464
+ string;
465
+ /**
466
+ * The `force` field is currently not supported. Purge user event requests will permanently delete all purgeable events. Once the development is complete: If `force` is set to false,
467
+ * the method will return the expected purge count without deleting any user events. This field will default to false if not included in the request.
468
+ */
469
+ force?:
470
+ boolean;
471
+ }
472
+ interface GoogleCloudDiscoveryengineV1alphaPurgeUserEventsResponse {
473
+ /** The total count of events purged as a result of the operation. */
474
+ purgeCount?:
475
+ string;
476
+ }
440
477
  interface GoogleCloudDiscoveryengineV1alphaRecommendRequest {
441
478
  /**
442
479
  * Filter for restricting recommendation results with a length limit of 5,000 characters. Currently, only filter expressions on the `filter_tags` attribute is supported. Examples: *
@@ -2079,6 +2116,96 @@ declare namespace gapi.client {
2079
2116
  string;
2080
2117
  },
2081
2118
  body: GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest): Request<GoogleLongrunningOperation>;
2119
+ /**
2120
+ * Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete.
2121
+ * To test a filter, use the list command first.
2122
+ */
2123
+ purge(request: {
2124
+ /** V1 error format. */
2125
+ "$.xgafv"?:
2126
+ string;
2127
+ /** OAuth access token. */
2128
+ access_token?:
2129
+ string;
2130
+ /** Data format for response. */
2131
+ alt?:
2132
+ string;
2133
+ /** JSONP */
2134
+ callback?:
2135
+ string;
2136
+ /** Selector specifying which fields to include in a partial response. */
2137
+ fields?:
2138
+ string;
2139
+ /** 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. */
2140
+ key?:
2141
+ string;
2142
+ /** OAuth 2.0 token for the current user. */
2143
+ oauth_token?:
2144
+ string;
2145
+ /**
2146
+ * Required. The resource name of the catalog under which the events are created. The format is
2147
+ * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
2148
+ */
2149
+ parent:
2150
+ string;
2151
+ /** Returns response with indentations and line breaks. */
2152
+ prettyPrint?:
2153
+ boolean;
2154
+ /** 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. */
2155
+ quotaUser?:
2156
+ string;
2157
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2158
+ upload_protocol?:
2159
+ string;
2160
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2161
+ uploadType?:
2162
+ string;
2163
+ /** Request body */
2164
+ resource:
2165
+ GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest;
2166
+ }): Request<GoogleLongrunningOperation>;
2167
+ purge(request: {
2168
+ /** V1 error format. */
2169
+ "$.xgafv"?:
2170
+ string;
2171
+ /** OAuth access token. */
2172
+ access_token?:
2173
+ string;
2174
+ /** Data format for response. */
2175
+ alt?:
2176
+ string;
2177
+ /** JSONP */
2178
+ callback?:
2179
+ string;
2180
+ /** Selector specifying which fields to include in a partial response. */
2181
+ fields?:
2182
+ string;
2183
+ /** 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. */
2184
+ key?:
2185
+ string;
2186
+ /** OAuth 2.0 token for the current user. */
2187
+ oauth_token?:
2188
+ string;
2189
+ /**
2190
+ * Required. The resource name of the catalog under which the events are created. The format is
2191
+ * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
2192
+ */
2193
+ parent:
2194
+ string;
2195
+ /** Returns response with indentations and line breaks. */
2196
+ prettyPrint?:
2197
+ boolean;
2198
+ /** 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. */
2199
+ quotaUser?:
2200
+ string;
2201
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2202
+ upload_protocol?:
2203
+ string;
2204
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2205
+ uploadType?:
2206
+ string;
2207
+ },
2208
+ body: GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest): Request<GoogleLongrunningOperation>;
2082
2209
  /** Writes a single user event. */
2083
2210
  write(request: {
2084
2211
  /** V1 error format. */
@@ -3380,6 +3507,96 @@ declare namespace gapi.client {
3380
3507
  string;
3381
3508
  },
3382
3509
  body: GoogleCloudDiscoveryengineV1alphaImportUserEventsRequest): Request<GoogleLongrunningOperation>;
3510
+ /**
3511
+ * Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete.
3512
+ * To test a filter, use the list command first.
3513
+ */
3514
+ purge(request: {
3515
+ /** V1 error format. */
3516
+ "$.xgafv"?:
3517
+ string;
3518
+ /** OAuth access token. */
3519
+ access_token?:
3520
+ string;
3521
+ /** Data format for response. */
3522
+ alt?:
3523
+ string;
3524
+ /** JSONP */
3525
+ callback?:
3526
+ string;
3527
+ /** Selector specifying which fields to include in a partial response. */
3528
+ fields?:
3529
+ string;
3530
+ /** 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. */
3531
+ key?:
3532
+ string;
3533
+ /** OAuth 2.0 token for the current user. */
3534
+ oauth_token?:
3535
+ string;
3536
+ /**
3537
+ * Required. The resource name of the catalog under which the events are created. The format is
3538
+ * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
3539
+ */
3540
+ parent:
3541
+ string;
3542
+ /** Returns response with indentations and line breaks. */
3543
+ prettyPrint?:
3544
+ boolean;
3545
+ /** 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. */
3546
+ quotaUser?:
3547
+ string;
3548
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3549
+ upload_protocol?:
3550
+ string;
3551
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3552
+ uploadType?:
3553
+ string;
3554
+ /** Request body */
3555
+ resource:
3556
+ GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest;
3557
+ }): Request<GoogleLongrunningOperation>;
3558
+ purge(request: {
3559
+ /** V1 error format. */
3560
+ "$.xgafv"?:
3561
+ string;
3562
+ /** OAuth access token. */
3563
+ access_token?:
3564
+ string;
3565
+ /** Data format for response. */
3566
+ alt?:
3567
+ string;
3568
+ /** JSONP */
3569
+ callback?:
3570
+ string;
3571
+ /** Selector specifying which fields to include in a partial response. */
3572
+ fields?:
3573
+ string;
3574
+ /** 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. */
3575
+ key?:
3576
+ string;
3577
+ /** OAuth 2.0 token for the current user. */
3578
+ oauth_token?:
3579
+ string;
3580
+ /**
3581
+ * Required. The resource name of the catalog under which the events are created. The format is
3582
+ * `projects/${projectId}/locations/global/collections/{$collectionId}/dataStores/${dataStoreId}`
3583
+ */
3584
+ parent:
3585
+ string;
3586
+ /** Returns response with indentations and line breaks. */
3587
+ prettyPrint?:
3588
+ boolean;
3589
+ /** 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. */
3590
+ quotaUser?:
3591
+ string;
3592
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3593
+ upload_protocol?:
3594
+ string;
3595
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3596
+ uploadType?:
3597
+ string;
3598
+ },
3599
+ body: GoogleCloudDiscoveryengineV1alphaPurgeUserEventsRequest): Request<GoogleLongrunningOperation>;
3383
3600
  /** Writes a single user event. */
3384
3601
  write(request: {
3385
3602
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.discoveryengine-v1alpha",
3
- "version": "0.0.20230608",
3
+ "version": "0.0.20230620",
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: 20230608
6
+ // Revision: 20230620
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -375,6 +375,16 @@ gapi.load('client', async () => {
375
375
  ],
376
376
  },
377
377
  });
378
+ /**
379
+ * Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To
380
+ * test a filter, use the list command first.
381
+ */
382
+ await gapi.client.discoveryengine.projects.locations.collections.dataStores.userEvents.purge({
383
+ parent: "Test string",
384
+ }, {
385
+ filter: "Test string",
386
+ force: true,
387
+ });
378
388
  /** Writes a single user event. */
379
389
  await gapi.client.discoveryengine.projects.locations.collections.dataStores.userEvents.write({
380
390
  parent: "Test string",
@@ -808,6 +818,16 @@ gapi.load('client', async () => {
808
818
  ],
809
819
  },
810
820
  });
821
+ /**
822
+ * Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To
823
+ * test a filter, use the list command first.
824
+ */
825
+ await gapi.client.discoveryengine.projects.locations.dataStores.userEvents.purge({
826
+ parent: "Test string",
827
+ }, {
828
+ filter: "Test string",
829
+ force: true,
830
+ });
811
831
  /** Writes a single user event. */
812
832
  await gapi.client.discoveryengine.projects.locations.dataStores.userEvents.write({
813
833
  parent: "Test string",