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

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 +374 -92
  2. package/package.json +1 -1
  3. package/tests.ts +138 -21
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: 20221106
12
+ // Revision: 20221114
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -319,17 +319,17 @@ declare namespace gapi.client {
319
319
  }
320
320
  interface GoogleCloudDocumentaiV1beta1Barcode {
321
321
  /**
322
- * Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF:
323
- * ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1
324
- * DataBar code type.
322
+ * Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D
323
+ * Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417
324
+ * type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
325
325
  */
326
326
  format?: string;
327
- /** Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. */
327
+ /** Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. */
328
328
  rawValue?: string;
329
329
  /**
330
- * Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier.
331
- * PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event.
332
- * DRIVER_LICENSE: Driver's license.
330
+ * Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN
331
+ * identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization.
332
+ * - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.
333
333
  */
334
334
  valueFormat?: string;
335
335
  }
@@ -366,7 +366,7 @@ declare namespace gapi.client {
366
366
  /** Optional. UTF-8 encoded text in reading order from the document. */
367
367
  text?: string;
368
368
  /**
369
- * Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap
369
+ * Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap
370
370
  * with each other.
371
371
  */
372
372
  textChanges?: GoogleCloudDocumentaiV1beta1DocumentTextChange[];
@@ -379,7 +379,7 @@ declare namespace gapi.client {
379
379
  uri?: string;
380
380
  }
381
381
  interface GoogleCloudDocumentaiV1beta1DocumentEntity {
382
- /** Optional. Confidence of detected Schema entity. Range [0, 1]. */
382
+ /** Optional. Confidence of detected Schema entity. Range `[0, 1]`. */
383
383
  confidence?: number;
384
384
  /** Optional. Canonical id. This will be a unique value in the entity list for this document. */
385
385
  id?: string;
@@ -479,7 +479,7 @@ declare namespace gapi.client {
479
479
  interface GoogleCloudDocumentaiV1beta1DocumentPageAnchorPageRef {
480
480
  /** Optional. Identifies the bounding polygon of a layout element on the page. */
481
481
  boundingPoly?: GoogleCloudDocumentaiV1beta1BoundingPoly;
482
- /** Optional. Confidence of detected page element, if applicable. Range [0, 1]. */
482
+ /** Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. */
483
483
  confidence?: number;
484
484
  /** Optional. Deprecated. Use PageRef.bounding_poly instead. */
485
485
  layoutId?: string;
@@ -506,9 +506,9 @@ declare namespace gapi.client {
506
506
  layout?: GoogleCloudDocumentaiV1beta1DocumentPageLayout;
507
507
  }
508
508
  interface GoogleCloudDocumentaiV1beta1DocumentPageDetectedLanguage {
509
- /** Confidence of detected language. Range [0, 1]. */
509
+ /** Confidence of detected language. Range `[0, 1]`. */
510
510
  confidence?: number;
511
- /** The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
511
+ /** The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
512
512
  languageCode?: string;
513
513
  }
514
514
  interface GoogleCloudDocumentaiV1beta1DocumentPageDimension {
@@ -553,15 +553,15 @@ declare namespace gapi.client {
553
553
  interface GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores {
554
554
  /** A list of detected defects. */
555
555
  detectedDefects?: GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect[];
556
- /** The overall quality score. Range [0, 1] where 1 is perfect quality. */
556
+ /** The overall quality score. Range `[0, 1]` where 1 is perfect quality. */
557
557
  qualityScore?: number;
558
558
  }
559
559
  interface GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect {
560
- /** Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists. */
560
+ /** Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists. */
561
561
  confidence?: number;
562
562
  /**
563
- * Name of the defect type. Supported values are "quality/defect_blurry", "quality/defect_noisy", "quality/defect_dark", "quality/defect_faint", "quality/defect_text_too_small",
564
- * "quality/defect_document_cutoff", "quality/defect_text_cutoff", "quality/defect_glare"
563
+ * Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small`
564
+ * - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
565
565
  */
566
566
  type?: string;
567
567
  }
@@ -570,7 +570,7 @@ declare namespace gapi.client {
570
570
  boundingPoly?: GoogleCloudDocumentaiV1beta1BoundingPoly;
571
571
  /**
572
572
  * Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context.
573
- * Range [0, 1].
573
+ * Range `[0, 1]`.
574
574
  */
575
575
  confidence?: number;
576
576
  /** Detected orientation for the Layout. */
@@ -717,7 +717,7 @@ declare namespace gapi.client {
717
717
  backgroundColor?: GoogleTypeColor;
718
718
  /** Text color. */
719
719
  color?: GoogleTypeColor;
720
- /** Font family such as "Arial", "Times New Roman". https://www.w3schools.com/cssref/pr_font_font-family.asp */
720
+ /** Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp */
721
721
  fontFamily?: string;
722
722
  /** Font size. */
723
723
  fontSize?: GoogleCloudDocumentaiV1beta1DocumentStyleFontSize;
@@ -815,17 +815,17 @@ declare namespace gapi.client {
815
815
  }
816
816
  interface GoogleCloudDocumentaiV1beta2Barcode {
817
817
  /**
818
- * Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF:
819
- * ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1
820
- * DataBar code type.
818
+ * Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D
819
+ * Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417
820
+ * type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
821
821
  */
822
822
  format?: string;
823
- /** Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. */
823
+ /** Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. */
824
824
  rawValue?: string;
825
825
  /**
826
- * Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier.
827
- * PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event.
828
- * DRIVER_LICENSE: Driver's license.
826
+ * Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN
827
+ * identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization.
828
+ * - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.
829
829
  */
830
830
  valueFormat?: string;
831
831
  }
@@ -864,7 +864,7 @@ declare namespace gapi.client {
864
864
  /** Optional. UTF-8 encoded text in reading order from the document. */
865
865
  text?: string;
866
866
  /**
867
- * Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap
867
+ * Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap
868
868
  * with each other.
869
869
  */
870
870
  textChanges?: GoogleCloudDocumentaiV1beta2DocumentTextChange[];
@@ -877,7 +877,7 @@ declare namespace gapi.client {
877
877
  uri?: string;
878
878
  }
879
879
  interface GoogleCloudDocumentaiV1beta2DocumentEntity {
880
- /** Optional. Confidence of detected Schema entity. Range [0, 1]. */
880
+ /** Optional. Confidence of detected Schema entity. Range `[0, 1]`. */
881
881
  confidence?: number;
882
882
  /** Optional. Canonical id. This will be a unique value in the entity list for this document. */
883
883
  id?: string;
@@ -985,7 +985,7 @@ declare namespace gapi.client {
985
985
  interface GoogleCloudDocumentaiV1beta2DocumentPageAnchorPageRef {
986
986
  /** Optional. Identifies the bounding polygon of a layout element on the page. */
987
987
  boundingPoly?: GoogleCloudDocumentaiV1beta2BoundingPoly;
988
- /** Optional. Confidence of detected page element, if applicable. Range [0, 1]. */
988
+ /** Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. */
989
989
  confidence?: number;
990
990
  /** Optional. Deprecated. Use PageRef.bounding_poly instead. */
991
991
  layoutId?: string;
@@ -1012,9 +1012,9 @@ declare namespace gapi.client {
1012
1012
  layout?: GoogleCloudDocumentaiV1beta2DocumentPageLayout;
1013
1013
  }
1014
1014
  interface GoogleCloudDocumentaiV1beta2DocumentPageDetectedLanguage {
1015
- /** Confidence of detected language. Range [0, 1]. */
1015
+ /** Confidence of detected language. Range `[0, 1]`. */
1016
1016
  confidence?: number;
1017
- /** The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
1017
+ /** The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
1018
1018
  languageCode?: string;
1019
1019
  }
1020
1020
  interface GoogleCloudDocumentaiV1beta2DocumentPageDimension {
@@ -1059,15 +1059,15 @@ declare namespace gapi.client {
1059
1059
  interface GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores {
1060
1060
  /** A list of detected defects. */
1061
1061
  detectedDefects?: GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect[];
1062
- /** The overall quality score. Range [0, 1] where 1 is perfect quality. */
1062
+ /** The overall quality score. Range `[0, 1]` where 1 is perfect quality. */
1063
1063
  qualityScore?: number;
1064
1064
  }
1065
1065
  interface GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect {
1066
- /** Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists. */
1066
+ /** Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists. */
1067
1067
  confidence?: number;
1068
1068
  /**
1069
- * Name of the defect type. Supported values are "quality/defect_blurry", "quality/defect_noisy", "quality/defect_dark", "quality/defect_faint", "quality/defect_text_too_small",
1070
- * "quality/defect_document_cutoff", "quality/defect_text_cutoff", "quality/defect_glare"
1069
+ * Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small`
1070
+ * - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
1071
1071
  */
1072
1072
  type?: string;
1073
1073
  }
@@ -1076,7 +1076,7 @@ declare namespace gapi.client {
1076
1076
  boundingPoly?: GoogleCloudDocumentaiV1beta2BoundingPoly;
1077
1077
  /**
1078
1078
  * Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context.
1079
- * Range [0, 1].
1079
+ * Range `[0, 1]`.
1080
1080
  */
1081
1081
  confidence?: number;
1082
1082
  /** Detected orientation for the Layout. */
@@ -1223,7 +1223,7 @@ declare namespace gapi.client {
1223
1223
  backgroundColor?: GoogleTypeColor;
1224
1224
  /** Text color. */
1225
1225
  color?: GoogleTypeColor;
1226
- /** Font family such as "Arial", "Times New Roman". https://www.w3schools.com/cssref/pr_font_font-family.asp */
1226
+ /** Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp */
1227
1227
  fontFamily?: string;
1228
1228
  /** Font size. */
1229
1229
  fontSize?: GoogleCloudDocumentaiV1beta2DocumentStyleFontSize;
@@ -1326,24 +1326,24 @@ declare namespace gapi.client {
1326
1326
  }
1327
1327
  interface GoogleCloudDocumentaiV1beta3Barcode {
1328
1328
  /**
1329
- * Format of a barcode. The supported formats are: CODE_128: Code 128 type. CODE_39: Code 39 type. CODE_93: Code 93 type. CODABAR: Codabar type. DATA_MATRIX: 2D Data Matrix type. ITF:
1330
- * ITF type. EAN_13: EAN-13 type. EAN_8: EAN-8 type. QR_CODE: 2D QR code type. UPC_A: UPC-A type. UPC_E: UPC-E type. PDF417: PDF417 type. AZTEC: 2D Aztec code type. DATABAR: GS1
1331
- * DataBar code type.
1329
+ * Format of a barcode. The supported formats are: - `CODE_128`: Code 128 type. - `CODE_39`: Code 39 type. - `CODE_93`: Code 93 type. - `CODABAR`: Codabar type. - `DATA_MATRIX`: 2D
1330
+ * Data Matrix type. - `ITF`: ITF type. - `EAN_13`: EAN-13 type. - `EAN_8`: EAN-8 type. - `QR_CODE`: 2D QR code type. - `UPC_A`: UPC-A type. - `UPC_E`: UPC-E type. - `PDF417`: PDF417
1331
+ * type. - `AZTEC`: 2D Aztec code type. - `DATABAR`: GS1 DataBar code type.
1332
1332
  */
1333
1333
  format?: string;
1334
- /** Raw value encoded in the barcode. For example, 'MEBKM:TITLE:Google;URL:https://www.google.com;;'. */
1334
+ /** Raw value encoded in the barcode. For example: `'MEBKM:TITLE:Google;URL:https://www.google.com;;'`. */
1335
1335
  rawValue?: string;
1336
1336
  /**
1337
- * Value format describes the format of the value that a barcode encodes. The supported formats are: CONTACT_INFO: Contact information. EMAIL: Email address. ISBN: ISBN identifier.
1338
- * PHONE: Phone number. PRODUCT: Product. SMS: SMS message. TEXT: Text string. URL: URL address. WIFI: Wifi information. GEO: Geo-localization. CALENDAR_EVENT: Calendar event.
1339
- * DRIVER_LICENSE: Driver's license.
1337
+ * Value format describes the format of the value that a barcode encodes. The supported formats are: - `CONTACT_INFO`: Contact information. - `EMAIL`: Email address. - `ISBN`: ISBN
1338
+ * identifier. - `PHONE`: Phone number. - `PRODUCT`: Product. - `SMS`: SMS message. - `TEXT`: Text string. - `URL`: URL address. - `WIFI`: Wifi information. - `GEO`: Geo-localization.
1339
+ * - `CALENDAR_EVENT`: Calendar event. - `DRIVER_LICENSE`: Driver's license.
1340
1340
  */
1341
1341
  valueFormat?: string;
1342
1342
  }
1343
1343
  interface GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig {
1344
1344
  /** The set of documents individually specified on Cloud Storage. */
1345
1345
  gcsDocuments?: GoogleCloudDocumentaiV1beta3GcsDocuments;
1346
- /** The set of documents that match the specified Cloud Storage [gcs_prefix]. */
1346
+ /** The set of documents that match the specified Cloud Storage `gcs_prefix`. */
1347
1347
  gcsPrefix?: GoogleCloudDocumentaiV1beta3GcsPrefix;
1348
1348
  }
1349
1349
  interface GoogleCloudDocumentaiV1beta3BatchProcessMetadata {
@@ -1473,7 +1473,7 @@ declare namespace gapi.client {
1473
1473
  /** Optional. UTF-8 encoded text in reading order from the document. */
1474
1474
  text?: string;
1475
1475
  /**
1476
- * Placeholder. A list of text corrections made to [Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap
1476
+ * Placeholder. A list of text corrections made to Document.text. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap
1477
1477
  * with each other.
1478
1478
  */
1479
1479
  textChanges?: GoogleCloudDocumentaiV1beta3DocumentTextChange[];
@@ -1486,7 +1486,7 @@ declare namespace gapi.client {
1486
1486
  uri?: string;
1487
1487
  }
1488
1488
  interface GoogleCloudDocumentaiV1beta3DocumentEntity {
1489
- /** Optional. Confidence of detected Schema entity. Range [0, 1]. */
1489
+ /** Optional. Confidence of detected Schema entity. Range `[0, 1]`. */
1490
1490
  confidence?: number;
1491
1491
  /** Optional. Canonical id. This will be a unique value in the entity list for this document. */
1492
1492
  id?: string;
@@ -1599,7 +1599,7 @@ declare namespace gapi.client {
1599
1599
  interface GoogleCloudDocumentaiV1beta3DocumentPageAnchorPageRef {
1600
1600
  /** Optional. Identifies the bounding polygon of a layout element on the page. */
1601
1601
  boundingPoly?: GoogleCloudDocumentaiV1beta3BoundingPoly;
1602
- /** Optional. Confidence of detected page element, if applicable. Range [0, 1]. */
1602
+ /** Optional. Confidence of detected page element, if applicable. Range `[0, 1]`. */
1603
1603
  confidence?: number;
1604
1604
  /** Optional. Deprecated. Use PageRef.bounding_poly instead. */
1605
1605
  layoutId?: string;
@@ -1626,9 +1626,9 @@ declare namespace gapi.client {
1626
1626
  layout?: GoogleCloudDocumentaiV1beta3DocumentPageLayout;
1627
1627
  }
1628
1628
  interface GoogleCloudDocumentaiV1beta3DocumentPageDetectedLanguage {
1629
- /** Confidence of detected language. Range [0, 1]. */
1629
+ /** Confidence of detected language. Range `[0, 1]`. */
1630
1630
  confidence?: number;
1631
- /** The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
1631
+ /** The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. */
1632
1632
  languageCode?: string;
1633
1633
  }
1634
1634
  interface GoogleCloudDocumentaiV1beta3DocumentPageDimension {
@@ -1673,15 +1673,15 @@ declare namespace gapi.client {
1673
1673
  interface GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScores {
1674
1674
  /** A list of detected defects. */
1675
1675
  detectedDefects?: GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect[];
1676
- /** The overall quality score. Range [0, 1] where 1 is perfect quality. */
1676
+ /** The overall quality score. Range `[0, 1]` where 1 is perfect quality. */
1677
1677
  qualityScore?: number;
1678
1678
  }
1679
1679
  interface GoogleCloudDocumentaiV1beta3DocumentPageImageQualityScoresDetectedDefect {
1680
- /** Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists. */
1680
+ /** Confidence of detected defect. Range `[0, 1]` where 1 indicates strong confidence of that the defect exists. */
1681
1681
  confidence?: number;
1682
1682
  /**
1683
- * Name of the defect type. Supported values are "quality/defect_blurry", "quality/defect_noisy", "quality/defect_dark", "quality/defect_faint", "quality/defect_text_too_small",
1684
- * "quality/defect_document_cutoff", "quality/defect_text_cutoff", "quality/defect_glare"
1683
+ * Name of the defect type. Supported values are: - `quality/defect_blurry` - `quality/defect_noisy` - `quality/defect_dark` - `quality/defect_faint` - `quality/defect_text_too_small`
1684
+ * - `quality/defect_document_cutoff` - `quality/defect_text_cutoff` - `quality/defect_glare`
1685
1685
  */
1686
1686
  type?: string;
1687
1687
  }
@@ -1690,7 +1690,7 @@ declare namespace gapi.client {
1690
1690
  boundingPoly?: GoogleCloudDocumentaiV1beta3BoundingPoly;
1691
1691
  /**
1692
1692
  * Confidence of the current Layout within context of the object this layout is for. e.g. confidence can be for a single token, a table, a visual element, etc. depending on context.
1693
- * Range [0, 1].
1693
+ * Range `[0, 1]`.
1694
1694
  */
1695
1695
  confidence?: number;
1696
1696
  /** Detected orientation for the Layout. */
@@ -1839,18 +1839,16 @@ declare namespace gapi.client {
1839
1839
  baseTypes?: string[];
1840
1840
  /** User defined name for the type. */
1841
1841
  displayName?: string;
1842
- /** Metadata for the entity type. */
1843
- entityTypeMetadata?: GoogleCloudDocumentaiV1beta3EntityTypeMetadata;
1844
1842
  /**
1845
1843
  * If specified, lists all the possible values for this entity. This should not be more than a handful of values. If the number of values is >10 or could change frequently use the
1846
1844
  * `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file.
1847
1845
  */
1848
1846
  enumValues?: GoogleCloudDocumentaiV1beta3DocumentSchemaEntityTypeEnumValues;
1849
1847
  /**
1850
- * 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 matching
1851
- * is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and
1852
- * 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 be
1853
- * honored for backward compatibility.
1848
+ * 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.
1854
1852
  */
1855
1853
  name?: string;
1856
1854
  /** Describing the nested structure, or composition of an entity. */
@@ -1865,8 +1863,6 @@ declare namespace gapi.client {
1865
1863
  name?: string;
1866
1864
  /** Occurrence type limits the number of instances an entity type appears in the document. */
1867
1865
  occurrenceType?: string;
1868
- /** Any additional metadata about the property can be added here. */
1869
- propertyMetadata?: GoogleCloudDocumentaiV1beta3PropertyMetadata;
1870
1866
  /** A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field. */
1871
1867
  valueType?: string;
1872
1868
  }
@@ -1896,7 +1892,7 @@ declare namespace gapi.client {
1896
1892
  backgroundColor?: GoogleTypeColor;
1897
1893
  /** Text color. */
1898
1894
  color?: GoogleTypeColor;
1899
- /** Font family such as "Arial", "Times New Roman". https://www.w3schools.com/cssref/pr_font_font-family.asp */
1895
+ /** Font family such as `Arial`, `Times New Roman`. https://www.w3schools.com/cssref/pr_font_font-family.asp */
1900
1896
  fontFamily?: string;
1901
1897
  /** Font size. */
1902
1898
  fontSize?: GoogleCloudDocumentaiV1beta3DocumentStyleFontSize;
@@ -1948,13 +1944,89 @@ declare namespace gapi.client {
1948
1944
  // tslint:disable-next-line:no-empty-interface
1949
1945
  interface GoogleCloudDocumentaiV1beta3EnableProcessorResponse {
1950
1946
  }
1951
- interface GoogleCloudDocumentaiV1beta3EntityTypeMetadata {
1952
- /** Human review labeling config on the property. */
1953
- humanReviewLabelingMetadata?: GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata;
1954
- /** Human review config on the entity type. */
1955
- humanReviewMetadata?: GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata;
1956
- /** Whether the entity type should be considered as "inactive". */
1957
- inactive?: boolean;
1947
+ interface GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionMetadata {
1948
+ /** The basic metadata of the long running operation. */
1949
+ commonMetadata?: GoogleCloudDocumentaiV1beta3CommonOperationMetadata;
1950
+ }
1951
+ interface GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest {
1952
+ /** Optional. The documents used in the evaluation. If unspecified, use the processor's dataset as evaluation input. */
1953
+ evaluationDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
1954
+ }
1955
+ interface GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionResponse {
1956
+ /** The resource name of the created evaluation. */
1957
+ evaluation?: string;
1958
+ }
1959
+ interface GoogleCloudDocumentaiV1beta3Evaluation {
1960
+ /** Metrics for all the entities in aggregate. */
1961
+ allEntitiesMetrics?: GoogleCloudDocumentaiV1beta3EvaluationMultiConfidenceMetrics;
1962
+ /** The time that the evaluation was created. */
1963
+ createTime?: string;
1964
+ /** Counters for the documents used in the evaluation. */
1965
+ documentCounters?: GoogleCloudDocumentaiV1beta3EvaluationCounters;
1966
+ /** Metrics across confidence levels, for different entities. */
1967
+ entityMetrics?: { [P in string]: GoogleCloudDocumentaiV1beta3EvaluationMultiConfidenceMetrics };
1968
+ /** The KMS key name used for encryption. */
1969
+ kmsKeyName?: string;
1970
+ /** The KMS key version with which data is encrypted. */
1971
+ kmsKeyVersionName?: string;
1972
+ /** The resource name of the evaluation. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` */
1973
+ name?: string;
1974
+ }
1975
+ interface GoogleCloudDocumentaiV1beta3EvaluationConfidenceLevelMetrics {
1976
+ /** The confidence level. */
1977
+ confidenceLevel?: number;
1978
+ /** The metrics at the specific confidence level. */
1979
+ metrics?: GoogleCloudDocumentaiV1beta3EvaluationMetrics;
1980
+ }
1981
+ interface GoogleCloudDocumentaiV1beta3EvaluationCounters {
1982
+ /** How many documents were used in the evaluation. */
1983
+ evaluatedDocumentsCount?: number;
1984
+ /** How many documents were not included in the evaluation as Document AI failed to process them. */
1985
+ failedDocumentsCount?: number;
1986
+ /** How many documents were sent for evaluation. */
1987
+ inputDocumentsCount?: number;
1988
+ /** How many documents were not included in the evaluation as they didn't pass validation. */
1989
+ invalidDocumentsCount?: number;
1990
+ }
1991
+ interface GoogleCloudDocumentaiV1beta3EvaluationMetrics {
1992
+ /** The calculated f1 score. */
1993
+ f1Score?: number;
1994
+ /** The amount of false negatives. */
1995
+ falseNegativesCount?: number;
1996
+ /** The amount of false positives. */
1997
+ falsePositivesCount?: number;
1998
+ /** The amount of documents with a ground truth occurrence. */
1999
+ groundTruthDocumentCount?: number;
2000
+ /** The amount of occurrences in ground truth documents. */
2001
+ groundTruthOccurrencesCount?: number;
2002
+ /** The calculated precision. */
2003
+ precision?: number;
2004
+ /** The amount of documents with a predicted occurrence. */
2005
+ predictedDocumentCount?: number;
2006
+ /** The amount of occurrences in predicted documents. */
2007
+ predictedOccurrencesCount?: number;
2008
+ /** The calculated recall. */
2009
+ recall?: number;
2010
+ /** The amount of documents that had an occurrence of this label. */
2011
+ totalDocumentsCount?: number;
2012
+ /** The amount of true positives. */
2013
+ truePositivesCount?: number;
2014
+ }
2015
+ interface GoogleCloudDocumentaiV1beta3EvaluationMultiConfidenceMetrics {
2016
+ /** The calculated area under the precision recall curve (AUPRC), computed by integrating over all confidence thresholds. */
2017
+ auprc?: number;
2018
+ /** The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching only. */
2019
+ auprcExact?: number;
2020
+ /** Metrics across confidence levels with fuzzy matching enabled. */
2021
+ confidenceLevelMetrics?: GoogleCloudDocumentaiV1beta3EvaluationConfidenceLevelMetrics[];
2022
+ /** Metrics across confidence levels with only exact matching. */
2023
+ confidenceLevelMetricsExact?: GoogleCloudDocumentaiV1beta3EvaluationConfidenceLevelMetrics[];
2024
+ /** The Estimated Calibration Error (ECE) of the confidence of the predicted entities. */
2025
+ estimatedCalibrationError?: number;
2026
+ /** The ECE for the predicted entities with fuzzy matching disabled, i.e., exact matching only. */
2027
+ estimatedCalibrationErrorExact?: number;
2028
+ /** The metrics type for the label. */
2029
+ metricsType?: string;
1958
2030
  }
1959
2031
  interface GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse {
1960
2032
  /** The list of processor types. */
@@ -1974,10 +2046,6 @@ declare namespace gapi.client {
1974
2046
  /** The URI prefix. */
1975
2047
  gcsUriPrefix?: string;
1976
2048
  }
1977
- interface GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata {
1978
- /** Whether to enable normalization editing. */
1979
- enableNormalizationEditing?: boolean;
1980
- }
1981
2049
  interface GoogleCloudDocumentaiV1beta3HumanReviewStatus {
1982
2050
  /**
1983
2051
  * The name of the operation triggered by the processed document. This field is populated only when the [state] is [HUMAN_REVIEW_IN_PROGRESS]. It has the same response type and
@@ -1989,11 +2057,11 @@ declare namespace gapi.client {
1989
2057
  /** A message providing more details about the human review state. */
1990
2058
  stateMessage?: string;
1991
2059
  }
1992
- interface GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata {
1993
- /** The confidence threshold if human review validation is enabled. */
1994
- confidenceThreshold?: number;
1995
- /** Whether to enable human review validation. */
1996
- enableValidation?: boolean;
2060
+ interface GoogleCloudDocumentaiV1beta3ListEvaluationsResponse {
2061
+ /** The evaluations requested. */
2062
+ evaluations?: GoogleCloudDocumentaiV1beta3Evaluation[];
2063
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
2064
+ nextPageToken?: string;
1997
2065
  }
1998
2066
  interface GoogleCloudDocumentaiV1beta3ListProcessorsResponse {
1999
2067
  /** Points to the next processor, otherwise empty. */
@@ -2034,7 +2102,7 @@ declare namespace gapi.client {
2034
2102
  processEndpoint?: string;
2035
2103
  /** Output only. The state of the processor. */
2036
2104
  state?: string;
2037
- /** The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors types, see FetchProcessorTypes. */
2105
+ /** The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. To get a list of processors types, see FetchProcessorTypes. */
2038
2106
  type?: string;
2039
2107
  }
2040
2108
  interface GoogleCloudDocumentaiV1beta3ProcessorType {
@@ -2046,9 +2114,9 @@ declare namespace gapi.client {
2046
2114
  category?: string;
2047
2115
  /** Launch stage of the processor type */
2048
2116
  launchStage?: string;
2049
- /** The resource name of the processor type. Format: projects/{project}/processorTypes/{processor_type} */
2117
+ /** The resource name of the processor type. Format: `projects/{project}/processorTypes/{processor_type}` */
2050
2118
  name?: string;
2051
- /** The type of the processor, e.g., "invoice_parsing". */
2119
+ /** The processor type, e.g., `OCR_PROCESSOR`, `INVOICE_PROCESSOR`, etc. */
2052
2120
  type?: string;
2053
2121
  }
2054
2122
  interface GoogleCloudDocumentaiV1beta3ProcessorTypeLocationInfo {
@@ -2062,6 +2130,8 @@ declare namespace gapi.client {
2062
2130
  deprecationInfo?: GoogleCloudDocumentaiV1beta3ProcessorVersionDeprecationInfo;
2063
2131
  /** The display name of the processor version. */
2064
2132
  displayName?: string;
2133
+ /** The schema of the processor version. Describes the output. */
2134
+ documentSchema?: GoogleCloudDocumentaiV1beta3DocumentSchema;
2065
2135
  /** Denotes that this ProcessorVersion is managed by google. */
2066
2136
  googleManaged?: boolean;
2067
2137
  /** The KMS key name used for encryption. */
@@ -2105,18 +2175,10 @@ declare namespace gapi.client {
2105
2175
  /** The status of human review on the processed document. */
2106
2176
  humanReviewStatus?: GoogleCloudDocumentaiV1beta3HumanReviewStatus;
2107
2177
  }
2108
- interface GoogleCloudDocumentaiV1beta3PropertyMetadata {
2109
- /** Human review labeling config on the property. */
2110
- humanReviewLabelingMetadata?: GoogleCloudDocumentaiV1beta3HumanReviewLabelingMetadata;
2111
- /** Human review validation config on the property. */
2112
- humanReviewMetadata?: GoogleCloudDocumentaiV1beta3HumanReviewValidationMetadata;
2113
- /** Whether the property should be considered as "inactive". */
2114
- inactive?: boolean;
2115
- }
2116
2178
  interface GoogleCloudDocumentaiV1beta3RawDocument {
2117
2179
  /** Inline document content. */
2118
2180
  content?: string;
2119
- /** An IANA MIME type (RFC6838) indicating the nature and format of the [content]. */
2181
+ /** An IANA MIME type (RFC6838) indicating the nature and format of the content. */
2120
2182
  mimeType?: string;
2121
2183
  }
2122
2184
  interface GoogleCloudDocumentaiV1beta3ReviewDocumentOperationMetadata {
@@ -2164,6 +2226,47 @@ declare namespace gapi.client {
2164
2226
  // tslint:disable-next-line:no-empty-interface
2165
2227
  interface GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse {
2166
2228
  }
2229
+ interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadata {
2230
+ /** The basic metadata of the long running operation. */
2231
+ commonMetadata?: GoogleCloudDocumentaiV1beta3CommonOperationMetadata;
2232
+ /** The test dataset validation information. */
2233
+ testDatasetValidation?: GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation;
2234
+ /** The training dataset validation information. */
2235
+ trainingDatasetValidation?: GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation;
2236
+ }
2237
+ interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionMetadataDatasetValidation {
2238
+ /** The total number of dataset errors. */
2239
+ datasetErrorCount?: number;
2240
+ /** Error information for the dataset as a whole. A maximum of 10 dataset errors will be returned. A single dataset error is terminal for training. */
2241
+ datasetErrors?: GoogleRpcStatus[];
2242
+ /** The total number of document errors. */
2243
+ documentErrorCount?: number;
2244
+ /** Error information pertaining to specific documents. A maximum of 10 document errors will be returned. Any document with errors will not be used throughout training. */
2245
+ documentErrors?: GoogleRpcStatus[];
2246
+ }
2247
+ interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest {
2248
+ /**
2249
+ * Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format:
2250
+ * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
2251
+ */
2252
+ baseProcessorVersion?: string;
2253
+ /** Optional. The schema the processor version will be trained with. */
2254
+ documentSchema?: GoogleCloudDocumentaiV1beta3DocumentSchema;
2255
+ /** Optional. The input data used to train the `ProcessorVersion`. */
2256
+ inputData?: GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData;
2257
+ /** Required. The processor version to be created. */
2258
+ processorVersion?: GoogleCloudDocumentaiV1beta3ProcessorVersion;
2259
+ }
2260
+ interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData {
2261
+ /** The documents used for testing the trained version. */
2262
+ testDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
2263
+ /** The documents used for training the new version. */
2264
+ trainingDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
2265
+ }
2266
+ interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionResponse {
2267
+ /** The resource name of the processor version produced by training. */
2268
+ processorVersion?: string;
2269
+ }
2167
2270
  interface GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata {
2168
2271
  /** The basic metadata of the long running operation. */
2169
2272
  commonMetadata?: GoogleCloudDocumentaiV1beta3CommonOperationMetadata;
@@ -2591,6 +2694,72 @@ declare namespace gapi.client {
2591
2694
  },
2592
2695
  body: GoogleCloudDocumentaiV1beta3ReviewDocumentRequest): Request<GoogleLongrunningOperation>;
2593
2696
  }
2697
+ interface EvaluationsResource {
2698
+ /** Retrieves a specific evaluation. */
2699
+ get(request?: {
2700
+ /** V1 error format. */
2701
+ "$.xgafv"?: string;
2702
+ /** OAuth access token. */
2703
+ access_token?: string;
2704
+ /** Data format for response. */
2705
+ alt?: string;
2706
+ /** JSONP */
2707
+ callback?: string;
2708
+ /** Selector specifying which fields to include in a partial response. */
2709
+ fields?: string;
2710
+ /** 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. */
2711
+ key?: string;
2712
+ /**
2713
+ * Required. The resource name of the Evaluation to get.
2714
+ * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
2715
+ */
2716
+ name: string;
2717
+ /** OAuth 2.0 token for the current user. */
2718
+ oauth_token?: string;
2719
+ /** Returns response with indentations and line breaks. */
2720
+ prettyPrint?: boolean;
2721
+ /** 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. */
2722
+ quotaUser?: string;
2723
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2724
+ upload_protocol?: string;
2725
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2726
+ uploadType?: string;
2727
+ }): Request<GoogleCloudDocumentaiV1beta3Evaluation>;
2728
+ /** Retrieves a set of evaluations for a given processor version. */
2729
+ list(request?: {
2730
+ /** V1 error format. */
2731
+ "$.xgafv"?: string;
2732
+ /** OAuth access token. */
2733
+ access_token?: string;
2734
+ /** Data format for response. */
2735
+ alt?: string;
2736
+ /** JSONP */
2737
+ callback?: string;
2738
+ /** Selector specifying which fields to include in a partial response. */
2739
+ fields?: string;
2740
+ /** 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. */
2741
+ key?: string;
2742
+ /** OAuth 2.0 token for the current user. */
2743
+ oauth_token?: string;
2744
+ /** The standard list page size. If unspecified, at most 5 evaluations will be returned. The maximum value is 100; values above 100 will be coerced to 100. */
2745
+ pageSize?: number;
2746
+ /** A page token, received from a previous `ListEvaluations` call. Provide this to retrieve the subsequent page. */
2747
+ pageToken?: string;
2748
+ /**
2749
+ * Required. The resource name of the ProcessorVersion to list evaluations for.
2750
+ * `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
2751
+ */
2752
+ parent: string;
2753
+ /** Returns response with indentations and line breaks. */
2754
+ prettyPrint?: boolean;
2755
+ /** 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. */
2756
+ quotaUser?: string;
2757
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2758
+ upload_protocol?: string;
2759
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2760
+ uploadType?: string;
2761
+ }): Request<GoogleCloudDocumentaiV1beta3ListEvaluationsResponse>;
2762
+ }
2594
2763
  interface ProcessorVersionsResource {
2595
2764
  /** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. */
2596
2765
  batchProcess(request: {
@@ -2737,6 +2906,62 @@ declare namespace gapi.client {
2737
2906
  uploadType?: string;
2738
2907
  },
2739
2908
  body: GoogleCloudDocumentaiV1beta3DeployProcessorVersionRequest): Request<GoogleLongrunningOperation>;
2909
+ /** Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. */
2910
+ evaluateProcessorVersion(request: {
2911
+ /** V1 error format. */
2912
+ "$.xgafv"?: string;
2913
+ /** OAuth access token. */
2914
+ access_token?: string;
2915
+ /** Data format for response. */
2916
+ alt?: string;
2917
+ /** JSONP */
2918
+ callback?: string;
2919
+ /** Selector specifying which fields to include in a partial response. */
2920
+ fields?: string;
2921
+ /** 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. */
2922
+ key?: string;
2923
+ /** OAuth 2.0 token for the current user. */
2924
+ oauth_token?: string;
2925
+ /** Returns response with indentations and line breaks. */
2926
+ prettyPrint?: boolean;
2927
+ /** Required. The resource name of the ProcessorVersion to evaluate. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */
2928
+ processorVersion: string;
2929
+ /** 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. */
2930
+ quotaUser?: string;
2931
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2932
+ upload_protocol?: string;
2933
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2934
+ uploadType?: string;
2935
+ /** Request body */
2936
+ resource: GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest;
2937
+ }): Request<GoogleLongrunningOperation>;
2938
+ evaluateProcessorVersion(request: {
2939
+ /** V1 error format. */
2940
+ "$.xgafv"?: string;
2941
+ /** OAuth access token. */
2942
+ access_token?: string;
2943
+ /** Data format for response. */
2944
+ alt?: string;
2945
+ /** JSONP */
2946
+ callback?: string;
2947
+ /** Selector specifying which fields to include in a partial response. */
2948
+ fields?: string;
2949
+ /** 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. */
2950
+ key?: string;
2951
+ /** OAuth 2.0 token for the current user. */
2952
+ oauth_token?: string;
2953
+ /** Returns response with indentations and line breaks. */
2954
+ prettyPrint?: boolean;
2955
+ /** Required. The resource name of the ProcessorVersion to evaluate. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */
2956
+ processorVersion: string;
2957
+ /** 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. */
2958
+ quotaUser?: string;
2959
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2960
+ upload_protocol?: string;
2961
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2962
+ uploadType?: string;
2963
+ },
2964
+ body: GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest): Request<GoogleLongrunningOperation>;
2740
2965
  /** Gets a processor version detail. */
2741
2966
  get(request?: {
2742
2967
  /** V1 error format. */
@@ -2860,6 +3085,62 @@ declare namespace gapi.client {
2860
3085
  uploadType?: string;
2861
3086
  },
2862
3087
  body: GoogleCloudDocumentaiV1beta3ProcessRequest): Request<GoogleCloudDocumentaiV1beta3ProcessResponse>;
3088
+ /** Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata. */
3089
+ train(request: {
3090
+ /** V1 error format. */
3091
+ "$.xgafv"?: string;
3092
+ /** OAuth access token. */
3093
+ access_token?: string;
3094
+ /** Data format for response. */
3095
+ alt?: string;
3096
+ /** JSONP */
3097
+ callback?: string;
3098
+ /** Selector specifying which fields to include in a partial response. */
3099
+ fields?: string;
3100
+ /** 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. */
3101
+ key?: string;
3102
+ /** OAuth 2.0 token for the current user. */
3103
+ oauth_token?: string;
3104
+ /** Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. */
3105
+ parent: string;
3106
+ /** Returns response with indentations and line breaks. */
3107
+ prettyPrint?: boolean;
3108
+ /** 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. */
3109
+ quotaUser?: string;
3110
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3111
+ upload_protocol?: string;
3112
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3113
+ uploadType?: string;
3114
+ /** Request body */
3115
+ resource: GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest;
3116
+ }): Request<GoogleLongrunningOperation>;
3117
+ train(request: {
3118
+ /** V1 error format. */
3119
+ "$.xgafv"?: string;
3120
+ /** OAuth access token. */
3121
+ access_token?: string;
3122
+ /** Data format for response. */
3123
+ alt?: string;
3124
+ /** JSONP */
3125
+ callback?: string;
3126
+ /** Selector specifying which fields to include in a partial response. */
3127
+ fields?: string;
3128
+ /** 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. */
3129
+ key?: string;
3130
+ /** OAuth 2.0 token for the current user. */
3131
+ oauth_token?: string;
3132
+ /** Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. */
3133
+ parent: string;
3134
+ /** Returns response with indentations and line breaks. */
3135
+ prettyPrint?: boolean;
3136
+ /** 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. */
3137
+ quotaUser?: string;
3138
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3139
+ upload_protocol?: string;
3140
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3141
+ uploadType?: string;
3142
+ },
3143
+ body: GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest): Request<GoogleLongrunningOperation>;
2863
3144
  /** Undeploys the processor version. */
2864
3145
  undeploy(request: {
2865
3146
  /** V1 error format. */
@@ -2916,6 +3197,7 @@ declare namespace gapi.client {
2916
3197
  uploadType?: string;
2917
3198
  },
2918
3199
  body: GoogleCloudDocumentaiV1beta3UndeployProcessorVersionRequest): Request<GoogleLongrunningOperation>;
3200
+ evaluations: EvaluationsResource;
2919
3201
  }
2920
3202
  interface ProcessorsResource {
2921
3203
  /** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.documentai-v1beta3",
3
- "version": "0.0.20221106",
3
+ "version": "0.0.20221114",
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: 20221106
6
+ // Revision: 20221114
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -2621,16 +2621,6 @@ gapi.load('client', async () => {
2621
2621
  "Test string"
2622
2622
  ],
2623
2623
  displayName: "Test string",
2624
- entityTypeMetadata: {
2625
- humanReviewLabelingMetadata: {
2626
- enableNormalizationEditing: true,
2627
- },
2628
- humanReviewMetadata: {
2629
- confidenceThreshold: 42,
2630
- enableValidation: true,
2631
- },
2632
- inactive: true,
2633
- },
2634
2624
  enumValues: {
2635
2625
  values: [
2636
2626
  "Test string"
@@ -2641,16 +2631,6 @@ gapi.load('client', async () => {
2641
2631
  {
2642
2632
  name: "Test string",
2643
2633
  occurrenceType: "Test string",
2644
- propertyMetadata: {
2645
- humanReviewLabelingMetadata: {
2646
- enableNormalizationEditing: true,
2647
- },
2648
- humanReviewMetadata: {
2649
- confidenceThreshold: 42,
2650
- enableValidation: true,
2651
- },
2652
- inactive: true,
2653
- },
2654
2634
  valueType: "Test string",
2655
2635
  }
2656
2636
  ],
@@ -3526,6 +3506,24 @@ gapi.load('client', async () => {
3526
3506
  name: "Test string",
3527
3507
  }, {
3528
3508
  });
3509
+ /** Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. */
3510
+ await gapi.client.documentai.projects.locations.processors.processorVersions.evaluateProcessorVersion({
3511
+ processorVersion: "Test string",
3512
+ }, {
3513
+ evaluationDocuments: {
3514
+ gcsDocuments: {
3515
+ documents: [
3516
+ {
3517
+ gcsUri: "Test string",
3518
+ mimeType: "Test string",
3519
+ }
3520
+ ],
3521
+ },
3522
+ gcsPrefix: {
3523
+ gcsUriPrefix: "Test string",
3524
+ },
3525
+ },
3526
+ });
3529
3527
  /** Gets a processor version detail. */
3530
3528
  await gapi.client.documentai.projects.locations.processors.processorVersions.get({
3531
3529
  name: "Test string",
@@ -5181,11 +5179,130 @@ gapi.load('client', async () => {
5181
5179
  },
5182
5180
  skipHumanReview: true,
5183
5181
  });
5182
+ /** Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata. */
5183
+ await gapi.client.documentai.projects.locations.processors.processorVersions.train({
5184
+ parent: "Test string",
5185
+ }, {
5186
+ baseProcessorVersion: "Test string",
5187
+ documentSchema: {
5188
+ description: "Test string",
5189
+ displayName: "Test string",
5190
+ entityTypes: [
5191
+ {
5192
+ baseTypes: [
5193
+ "Test string"
5194
+ ],
5195
+ displayName: "Test string",
5196
+ enumValues: {
5197
+ values: [
5198
+ "Test string"
5199
+ ],
5200
+ },
5201
+ name: "Test string",
5202
+ properties: [
5203
+ {
5204
+ name: "Test string",
5205
+ occurrenceType: "Test string",
5206
+ valueType: "Test string",
5207
+ }
5208
+ ],
5209
+ }
5210
+ ],
5211
+ metadata: {
5212
+ documentAllowMultipleLabels: true,
5213
+ documentSplitter: true,
5214
+ prefixedNamingOnProperties: true,
5215
+ skipNamingValidation: true,
5216
+ },
5217
+ },
5218
+ inputData: {
5219
+ testDocuments: {
5220
+ gcsDocuments: {
5221
+ documents: [
5222
+ {
5223
+ gcsUri: "Test string",
5224
+ mimeType: "Test string",
5225
+ }
5226
+ ],
5227
+ },
5228
+ gcsPrefix: {
5229
+ gcsUriPrefix: "Test string",
5230
+ },
5231
+ },
5232
+ trainingDocuments: {
5233
+ gcsDocuments: {
5234
+ documents: [
5235
+ {
5236
+ gcsUri: "Test string",
5237
+ mimeType: "Test string",
5238
+ }
5239
+ ],
5240
+ },
5241
+ gcsPrefix: {
5242
+ gcsUriPrefix: "Test string",
5243
+ },
5244
+ },
5245
+ },
5246
+ processorVersion: {
5247
+ createTime: "Test string",
5248
+ deprecationInfo: {
5249
+ deprecationTime: "Test string",
5250
+ replacementProcessorVersion: "Test string",
5251
+ },
5252
+ displayName: "Test string",
5253
+ documentSchema: {
5254
+ description: "Test string",
5255
+ displayName: "Test string",
5256
+ entityTypes: [
5257
+ {
5258
+ baseTypes: [
5259
+ "Test string"
5260
+ ],
5261
+ displayName: "Test string",
5262
+ enumValues: {
5263
+ values: [
5264
+ "Test string"
5265
+ ],
5266
+ },
5267
+ name: "Test string",
5268
+ properties: [
5269
+ {
5270
+ name: "Test string",
5271
+ occurrenceType: "Test string",
5272
+ valueType: "Test string",
5273
+ }
5274
+ ],
5275
+ }
5276
+ ],
5277
+ metadata: {
5278
+ documentAllowMultipleLabels: true,
5279
+ documentSplitter: true,
5280
+ prefixedNamingOnProperties: true,
5281
+ skipNamingValidation: true,
5282
+ },
5283
+ },
5284
+ googleManaged: true,
5285
+ kmsKeyName: "Test string",
5286
+ kmsKeyVersionName: "Test string",
5287
+ name: "Test string",
5288
+ state: "Test string",
5289
+ },
5290
+ });
5184
5291
  /** Undeploys the processor version. */
5185
5292
  await gapi.client.documentai.projects.locations.processors.processorVersions.undeploy({
5186
5293
  name: "Test string",
5187
5294
  }, {
5188
5295
  });
5296
+ /** Retrieves a specific evaluation. */
5297
+ await gapi.client.documentai.projects.locations.processors.processorVersions.evaluations.get({
5298
+ name: "Test string",
5299
+ });
5300
+ /** Retrieves a set of evaluations for a given processor version. */
5301
+ await gapi.client.documentai.projects.locations.processors.processorVersions.evaluations.list({
5302
+ pageSize: 42,
5303
+ pageToken: "Test string",
5304
+ parent: "Test string",
5305
+ });
5189
5306
  /** Lists the processor types that exist. */
5190
5307
  await gapi.client.documentai.projects.locations.processorTypes.list({
5191
5308
  pageSize: 42,