@maxim_mazurok/gapi.client.documentai-v1beta3 0.0.20230914 → 0.0.20230923

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 +149 -4
  2. package/package.json +1 -1
  3. package/tests.ts +11 -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://documentai.googleapis.com/$discovery/rest?version=v1beta3
12
- // Revision: 20230914
12
+ // Revision: 20230923
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -2332,6 +2332,23 @@ declare namespace gapi.client {
2332
2332
  docId?:
2333
2333
  string;
2334
2334
  }
2335
+ interface GoogleCloudDocumentaiV1beta3DocumentMetadata {
2336
+ /** Type of the dataset split to which the document belongs. */
2337
+ datasetType?:
2338
+ string;
2339
+ /** The display name of the document. */
2340
+ displayName?:
2341
+ string;
2342
+ /** Document identifier. */
2343
+ documentId?:
2344
+ GoogleCloudDocumentaiV1beta3DocumentId;
2345
+ /** Labelling state of the document. */
2346
+ labelingState?:
2347
+ string;
2348
+ /** Number of pages in the document. */
2349
+ pageCount?:
2350
+ number;
2351
+ }
2335
2352
  interface GoogleCloudDocumentaiV1beta3DocumentOutputConfig {
2336
2353
  /** Output config to write the results to Cloud Storage. */
2337
2354
  gcsOutputConfig?:
@@ -3206,6 +3223,53 @@ declare namespace gapi.client {
3206
3223
  processorVersion?:
3207
3224
  string;
3208
3225
  }
3226
+ interface GoogleCloudDocumentaiV1beta3ListDocumentsRequest {
3227
+ /**
3228
+ * Optional. Query to filter the documents based on https://google.aip.dev/160. ## Currently support query strings are:
3229
+ * `SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED` - `LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED` -
3230
+ * `DisplayName=\"file_name.pdf\"` - `EntityType=abc/def` - `TagName=\"auto-labeling-running\"|\"sampled\"` Note: - Only `AND`, `=` and `!=` are supported. e.g. `DisplayName=file_name
3231
+ * AND EntityType!=abc` IS supported. - Wildcard `*` is supported only in `DisplayName` filter - No duplicate filter keys are allowed, e.g. `EntityType=a AND EntityType=b` is NOT
3232
+ * supported. - String match is case sensitive (for filter `DisplayName` & `EntityType`).
3233
+ */
3234
+ filter?:
3235
+ string;
3236
+ /**
3237
+ * The maximum number of documents to return. The service may return fewer than this value. If unspecified, at most 20 documents will be returned. The maximum value is 100; values
3238
+ * above 100 will be coerced to 100.
3239
+ */
3240
+ pageSize?:
3241
+ number;
3242
+ /**
3243
+ * A page token, received from a previous `ListDocuments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDocuments` must
3244
+ * match the call that provided the page token.
3245
+ */
3246
+ pageToken?:
3247
+ string;
3248
+ /**
3249
+ * Optional. Controls if the ListDocuments request requires a total size of matched documents. See ListDocumentsResponse.total_size. Enabling this flag may adversely impact
3250
+ * performance. Defaults to false.
3251
+ */
3252
+ returnTotalSize?:
3253
+ boolean;
3254
+ /**
3255
+ * Optional. Number of results to skip beginning from the `page_token` if provided. https://google.aip.dev/158#skipping-results. It must be a non-negative integer. Negative values wil
3256
+ * be rejected. Note that this is not the number of pages to skip. If this value causes the cursor to move past the end of results, `ListDocumentsResponse.document_metadata` and
3257
+ * `ListDocumentsResponse.next_page_token` will be empty.
3258
+ */
3259
+ skip?:
3260
+ number;
3261
+ }
3262
+ interface GoogleCloudDocumentaiV1beta3ListDocumentsResponse {
3263
+ /** Document metadata corresponding to the listed documents. */
3264
+ documentMetadata?:
3265
+ GoogleCloudDocumentaiV1beta3DocumentMetadata[];
3266
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
3267
+ nextPageToken?:
3268
+ string;
3269
+ /** Total count of documents queried. */
3270
+ totalSize?:
3271
+ number;
3272
+ }
3209
3273
  interface GoogleCloudDocumentaiV1beta3ListEvaluationsResponse {
3210
3274
  /** The evaluations requested. */
3211
3275
  evaluations?:
@@ -3256,7 +3320,7 @@ declare namespace gapi.client {
3256
3320
  /** Turn on font identification model and return font style information. Deprecated, use PremiumFeatures.compute_style_info instead. */
3257
3321
  computeStyleInfo?:
3258
3322
  boolean;
3259
- /** Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0+ processors. */
3323
+ /** Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors. */
3260
3324
  disableCharacterBoxesDetection?:
3261
3325
  boolean;
3262
3326
  /**
@@ -3294,7 +3358,7 @@ declare namespace gapi.client {
3294
3358
  /** Turn on the model that can extract LaTeX math formulas. */
3295
3359
  enableMathOcr?:
3296
3360
  boolean;
3297
- /** Turn on selection mark detector in OCR engine. Only available in OCR 2.0+ processors. */
3361
+ /** Turn on selection mark detector in OCR engine. Only available in OCR 2.0 (and later) processors. */
3298
3362
  enableSelectionMarkDetection?:
3299
3363
  boolean;
3300
3364
  }
@@ -3302,7 +3366,7 @@ declare namespace gapi.client {
3302
3366
  /** Only process certain pages from the end, same as above. */
3303
3367
  fromEnd?:
3304
3368
  number;
3305
- /** Only process certain pages from the start, process all if the document has less pages. */
3369
+ /** Only process certain pages from the start. Process all if the document has fewer pages. */
3306
3370
  fromStart?:
3307
3371
  number;
3308
3372
  /** Which pages to process (1-indexed). */
@@ -4430,6 +4494,87 @@ declare namespace gapi.client {
4430
4494
  string;
4431
4495
  },
4432
4496
  body: GoogleCloudDocumentaiV1beta3ImportDocumentsRequest): Request<GoogleLongrunningOperation>;
4497
+ /** Returns a list of documents present in the dataset. */
4498
+ listDocuments(request: {
4499
+ /** V1 error format. */
4500
+ "$.xgafv"?:
4501
+ string;
4502
+ /** OAuth access token. */
4503
+ access_token?:
4504
+ string;
4505
+ /** Data format for response. */
4506
+ alt?:
4507
+ string;
4508
+ /** JSONP */
4509
+ callback?:
4510
+ string;
4511
+ /** Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset */
4512
+ dataset:
4513
+ string;
4514
+ /** Selector specifying which fields to include in a partial response. */
4515
+ fields?:
4516
+ string;
4517
+ /** 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. */
4518
+ key?:
4519
+ string;
4520
+ /** OAuth 2.0 token for the current user. */
4521
+ oauth_token?:
4522
+ string;
4523
+ /** Returns response with indentations and line breaks. */
4524
+ prettyPrint?:
4525
+ boolean;
4526
+ /** 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. */
4527
+ quotaUser?:
4528
+ string;
4529
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4530
+ upload_protocol?:
4531
+ string;
4532
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4533
+ uploadType?:
4534
+ string;
4535
+ /** Request body */
4536
+ resource:
4537
+ GoogleCloudDocumentaiV1beta3ListDocumentsRequest;
4538
+ }): Request<GoogleCloudDocumentaiV1beta3ListDocumentsResponse>;
4539
+ listDocuments(request: {
4540
+ /** V1 error format. */
4541
+ "$.xgafv"?:
4542
+ string;
4543
+ /** OAuth access token. */
4544
+ access_token?:
4545
+ string;
4546
+ /** Data format for response. */
4547
+ alt?:
4548
+ string;
4549
+ /** JSONP */
4550
+ callback?:
4551
+ string;
4552
+ /** Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset */
4553
+ dataset:
4554
+ string;
4555
+ /** Selector specifying which fields to include in a partial response. */
4556
+ fields?:
4557
+ string;
4558
+ /** 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. */
4559
+ key?:
4560
+ string;
4561
+ /** OAuth 2.0 token for the current user. */
4562
+ oauth_token?:
4563
+ string;
4564
+ /** Returns response with indentations and line breaks. */
4565
+ prettyPrint?:
4566
+ boolean;
4567
+ /** 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. */
4568
+ quotaUser?:
4569
+ string;
4570
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
4571
+ upload_protocol?:
4572
+ string;
4573
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
4574
+ uploadType?:
4575
+ string;
4576
+ },
4577
+ body: GoogleCloudDocumentaiV1beta3ListDocumentsRequest): Request<GoogleCloudDocumentaiV1beta3ListDocumentsResponse>;
4433
4578
  /** Updates a `DatasetSchema`. */
4434
4579
  updateDatasetSchema(request: {
4435
4580
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.documentai-v1beta3",
3
- "version": "0.0.20230914",
3
+ "version": "0.0.20230923",
4
4
  "description": "TypeScript typings for Cloud Document AI API v1beta3",
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: 20230914
6
+ // Revision: 20230923
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -2090,6 +2090,16 @@ gapi.load('client', async () => {
2090
2090
  }
2091
2091
  ],
2092
2092
  });
2093
+ /** Returns a list of documents present in the dataset. */
2094
+ await gapi.client.documentai.projects.locations.processors.dataset.listDocuments({
2095
+ dataset: "Test string",
2096
+ }, {
2097
+ filter: "Test string",
2098
+ pageSize: 42,
2099
+ pageToken: "Test string",
2100
+ returnTotalSize: true,
2101
+ skip: 42,
2102
+ });
2093
2103
  /** Updates a `DatasetSchema`. */
2094
2104
  await gapi.client.documentai.projects.locations.processors.dataset.updateDatasetSchema({
2095
2105
  name: "Test string",