@maxim_mazurok/gapi.client.documentai-v1beta3 0.0.20221114 → 0.0.20221201

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 +47 -25
  2. package/package.json +1 -1
  3. package/tests.ts +29 -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: 20221114
12
+ // Revision: 20221201
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -370,7 +370,7 @@ declare namespace gapi.client {
370
370
  * with each other.
371
371
  */
372
372
  textChanges?: GoogleCloudDocumentaiV1beta1DocumentTextChange[];
373
- /** Placeholder. Styles for the Document.text. */
373
+ /** Styles for the Document.text. */
374
374
  textStyles?: GoogleCloudDocumentaiV1beta1DocumentStyle[];
375
375
  /**
376
376
  * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request
@@ -422,9 +422,9 @@ declare namespace gapi.client {
422
422
  moneyValue?: GoogleTypeMoney;
423
423
  /**
424
424
  * Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of
425
- * `structured_value` will be normalized. For example, some processors may not generate float or int normalized text by default. Below are sample formats mapped to structured values. -
426
- * Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601
427
- * text format.
425
+ * `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured
426
+ * values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the
427
+ * ISO 8601 text format.
428
428
  */
429
429
  text?: string;
430
430
  }
@@ -486,7 +486,7 @@ declare namespace gapi.client {
486
486
  /** Optional. The type of the layout element that is being referenced if any. */
487
487
  layoutType?: string;
488
488
  /**
489
- * Required. Index into the Document.pages element, for example using Document.pages to locate the related page element. This field is skipped when its value is the default 0. See
489
+ * Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See
490
490
  * https://developers.google.com/protocol-buffers/docs/proto3#json.
491
491
  */
492
492
  page?: string;
@@ -535,8 +535,8 @@ declare namespace gapi.client {
535
535
  /** A list of detected languages for value together with confidence. */
536
536
  valueDetectedLanguages?: GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage[];
537
537
  /**
538
- * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the field_value is normal text) - "unfilled_checkbox" -
539
- * "filled_checkbox"
538
+ * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` -
539
+ * `filled_checkbox`
540
540
  */
541
541
  valueType?: string;
542
542
  }
@@ -868,7 +868,7 @@ declare namespace gapi.client {
868
868
  * with each other.
869
869
  */
870
870
  textChanges?: GoogleCloudDocumentaiV1beta2DocumentTextChange[];
871
- /** Placeholder. Styles for the Document.text. */
871
+ /** Styles for the Document.text. */
872
872
  textStyles?: GoogleCloudDocumentaiV1beta2DocumentStyle[];
873
873
  /**
874
874
  * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request
@@ -920,9 +920,9 @@ declare namespace gapi.client {
920
920
  moneyValue?: GoogleTypeMoney;
921
921
  /**
922
922
  * Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of
923
- * `structured_value` will be normalized. For example, some processors may not generate float or int normalized text by default. Below are sample formats mapped to structured values. -
924
- * Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601
925
- * text format.
923
+ * `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured
924
+ * values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the
925
+ * ISO 8601 text format.
926
926
  */
927
927
  text?: string;
928
928
  }
@@ -992,7 +992,7 @@ declare namespace gapi.client {
992
992
  /** Optional. The type of the layout element that is being referenced if any. */
993
993
  layoutType?: string;
994
994
  /**
995
- * Required. Index into the Document.pages element, for example using Document.pages to locate the related page element. This field is skipped when its value is the default 0. See
995
+ * Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See
996
996
  * https://developers.google.com/protocol-buffers/docs/proto3#json.
997
997
  */
998
998
  page?: string;
@@ -1041,8 +1041,8 @@ declare namespace gapi.client {
1041
1041
  /** A list of detected languages for value together with confidence. */
1042
1042
  valueDetectedLanguages?: GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage[];
1043
1043
  /**
1044
- * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the field_value is normal text) - "unfilled_checkbox" -
1045
- * "filled_checkbox"
1044
+ * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` -
1045
+ * `filled_checkbox`
1046
1046
  */
1047
1047
  valueType?: string;
1048
1048
  }
@@ -1385,6 +1385,8 @@ declare namespace gapi.client {
1385
1385
  inputDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
1386
1386
  /** The overall output config for batch process. */
1387
1387
  outputConfig?: GoogleCloudDocumentaiV1beta3BatchProcessRequestBatchOutputConfig;
1388
+ /** Inference-time options for the process API */
1389
+ processOptions?: GoogleCloudDocumentaiV1beta3ProcessOptions;
1388
1390
  /** Whether Human Review feature should be skipped for this request. Default to false. */
1389
1391
  skipHumanReview?: boolean;
1390
1392
  }
@@ -1477,7 +1479,7 @@ declare namespace gapi.client {
1477
1479
  * with each other.
1478
1480
  */
1479
1481
  textChanges?: GoogleCloudDocumentaiV1beta3DocumentTextChange[];
1480
- /** Placeholder. Styles for the Document.text. */
1482
+ /** Styles for the Document.text. */
1481
1483
  textStyles?: GoogleCloudDocumentaiV1beta3DocumentStyle[];
1482
1484
  /**
1483
1485
  * Optional. Currently supports Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request
@@ -1529,9 +1531,9 @@ declare namespace gapi.client {
1529
1531
  moneyValue?: GoogleTypeMoney;
1530
1532
  /**
1531
1533
  * Optional. An optional field to store a normalized string. For some entity types, one of respective `structured_value` fields may also be populated. Also not all the types of
1532
- * `structured_value` will be normalized. For example, some processors may not generate float or int normalized text by default. Below are sample formats mapped to structured values. -
1533
- * Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the ISO 8601
1534
- * text format.
1534
+ * `structured_value` will be normalized. For example, some processors may not generate `float` or `integer` normalized text by default. Below are sample formats mapped to structured
1535
+ * values. - Money/Currency type (`money_value`) is in the ISO 4217 text format. - Date type (`date_value`) is in the ISO 8601 text format. - Datetime type (`datetime_value`) is in the
1536
+ * ISO 8601 text format.
1535
1537
  */
1536
1538
  text?: string;
1537
1539
  }
@@ -1555,6 +1557,14 @@ declare namespace gapi.client {
1555
1557
  fieldMask?: string;
1556
1558
  /** The Cloud Storage uri (a directory) of the output. */
1557
1559
  gcsUri?: string;
1560
+ /** Specifies the sharding config for the output document. */
1561
+ shardingConfig?: GoogleCloudDocumentaiV1beta3DocumentOutputConfigGcsOutputConfigShardingConfig;
1562
+ }
1563
+ interface GoogleCloudDocumentaiV1beta3DocumentOutputConfigGcsOutputConfigShardingConfig {
1564
+ /** The number of overlapping pages between consecutive shards. */
1565
+ pagesOverlap?: number;
1566
+ /** The number of pages per shard. */
1567
+ pagesPerShard?: number;
1558
1568
  }
1559
1569
  interface GoogleCloudDocumentaiV1beta3DocumentPage {
1560
1570
  /** A list of visually detected text blocks on the page. A block has a set of lines (collected into paragraphs) that have a common line-spacing and orientation. */
@@ -1606,7 +1616,7 @@ declare namespace gapi.client {
1606
1616
  /** Optional. The type of the layout element that is being referenced if any. */
1607
1617
  layoutType?: string;
1608
1618
  /**
1609
- * Required. Index into the Document.pages element, for example using Document.pages to locate the related page element. This field is skipped when its value is the default 0. See
1619
+ * Required. Index into the Document.pages element, for example using `Document.pages` to locate the related page element. This field is skipped when its value is the default `0`. See
1610
1620
  * https://developers.google.com/protocol-buffers/docs/proto3#json.
1611
1621
  */
1612
1622
  page?: string;
@@ -1655,8 +1665,8 @@ declare namespace gapi.client {
1655
1665
  /** A list of detected languages for value together with confidence. */
1656
1666
  valueDetectedLanguages?: GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage[];
1657
1667
  /**
1658
- * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the field_value is normal text) - "unfilled_checkbox" -
1659
- * "filled_checkbox"
1668
+ * If the value is non-textual, this field represents the type. Current valid values are: - blank (this indicates the `field_value` is normal text) - `unfilled_checkbox` -
1669
+ * `filled_checkbox`
1660
1670
  */
1661
1671
  valueType?: string;
1662
1672
  }
@@ -1846,9 +1856,9 @@ declare namespace gapi.client {
1846
1856
  enumValues?: GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues;
1847
1857
  /**
1848
1858
  * Name of the type. It must be unique within the schema file and cannot be a 'Common Type'. Besides that we use the following naming conventions: - *use `snake_casing`* - name
1849
- * matching is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal
1850
- * infrastructure and tooling can handle any ascii character) - The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated,
1851
- * but will still be honored for backward compatibility.
1859
+ * matching is case-sensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure
1860
+ * and tooling can handle any ascii character) - The `/` is sometimes used to denote a property of a type. For example `line_item/amount`. This convention is deprecated, but will still
1861
+ * be honored for backward compatibility.
1852
1862
  */
1853
1863
  name?: string;
1854
1864
  /** Describing the nested structure, or composition of an entity. */
@@ -2087,6 +2097,14 @@ declare namespace gapi.client {
2087
2097
  /** Y coordinate (starts from the top of the image). */
2088
2098
  y?: number;
2089
2099
  }
2100
+ interface GoogleCloudDocumentaiV1beta3OcrConfig {
2101
+ /** Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs. */
2102
+ enableNativePdfParsing?: boolean;
2103
+ }
2104
+ interface GoogleCloudDocumentaiV1beta3ProcessOptions {
2105
+ /** Only applicable to "Document OCR Processor". Returns error if set on other processor types. */
2106
+ ocrConfig?: GoogleCloudDocumentaiV1beta3OcrConfig;
2107
+ }
2090
2108
  interface GoogleCloudDocumentaiV1beta3Processor {
2091
2109
  /** The time the processor was created. */
2092
2110
  createTime?: string;
@@ -2116,6 +2134,8 @@ declare namespace gapi.client {
2116
2134
  launchStage?: string;
2117
2135
  /** The resource name of the processor type. Format: `projects/{project}/processorTypes/{processor_type}` */
2118
2136
  name?: string;
2137
+ /** A set of Cloud Storage URIs of sample documents for this processor. */
2138
+ sampleDocumentUris?: string[];
2119
2139
  /** The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. */
2120
2140
  type?: string;
2121
2141
  }
@@ -2159,6 +2179,8 @@ declare namespace gapi.client {
2159
2179
  fieldMask?: string;
2160
2180
  /** An inline document proto. */
2161
2181
  inlineDocument?: GoogleCloudDocumentaiV1beta3Document;
2182
+ /** Inference-time options for the process API */
2183
+ processOptions?: GoogleCloudDocumentaiV1beta3ProcessOptions;
2162
2184
  /** A raw document content (bytes). */
2163
2185
  rawDocument?: GoogleCloudDocumentaiV1beta3RawDocument;
2164
2186
  /** Whether Human Review feature should be skipped for this request. Default to false. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.documentai-v1beta3",
3
- "version": "0.0.20221114",
3
+ "version": "0.0.20221201",
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: 20221114
6
+ // Revision: 20221201
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -77,6 +77,10 @@ gapi.load('client', async () => {
77
77
  gcsOutputConfig: {
78
78
  fieldMask: "Test string",
79
79
  gcsUri: "Test string",
80
+ shardingConfig: {
81
+ pagesOverlap: 42,
82
+ pagesPerShard: 42,
83
+ },
80
84
  },
81
85
  },
82
86
  inputConfigs: [
@@ -101,6 +105,11 @@ gapi.load('client', async () => {
101
105
  outputConfig: {
102
106
  gcsDestination: "Test string",
103
107
  },
108
+ processOptions: {
109
+ ocrConfig: {
110
+ enableNativePdfParsing: true,
111
+ },
112
+ },
104
113
  skipHumanReview: true,
105
114
  });
106
115
  /** Creates a processor from the type processor that the user chose. The processor will be at "ENABLED" state by default after its creation. */
@@ -1779,6 +1788,11 @@ gapi.load('client', async () => {
1779
1788
  ],
1780
1789
  uri: "Test string",
1781
1790
  },
1791
+ processOptions: {
1792
+ ocrConfig: {
1793
+ enableNativePdfParsing: true,
1794
+ },
1795
+ },
1782
1796
  rawDocument: {
1783
1797
  content: "Test string",
1784
1798
  mimeType: "Test string",
@@ -3471,6 +3485,10 @@ gapi.load('client', async () => {
3471
3485
  gcsOutputConfig: {
3472
3486
  fieldMask: "Test string",
3473
3487
  gcsUri: "Test string",
3488
+ shardingConfig: {
3489
+ pagesOverlap: 42,
3490
+ pagesPerShard: 42,
3491
+ },
3474
3492
  },
3475
3493
  },
3476
3494
  inputConfigs: [
@@ -3495,6 +3513,11 @@ gapi.load('client', async () => {
3495
3513
  outputConfig: {
3496
3514
  gcsDestination: "Test string",
3497
3515
  },
3516
+ processOptions: {
3517
+ ocrConfig: {
3518
+ enableNativePdfParsing: true,
3519
+ },
3520
+ },
3498
3521
  skipHumanReview: true,
3499
3522
  });
3500
3523
  /** Deletes the processor version, all artifacts under the processor version will be deleted. */
@@ -5173,6 +5196,11 @@ gapi.load('client', async () => {
5173
5196
  ],
5174
5197
  uri: "Test string",
5175
5198
  },
5199
+ processOptions: {
5200
+ ocrConfig: {
5201
+ enableNativePdfParsing: true,
5202
+ },
5203
+ },
5176
5204
  rawDocument: {
5177
5205
  content: "Test string",
5178
5206
  mimeType: "Test string",