@maxim_mazurok/gapi.client.documentai-v1 0.0.20230911 → 0.0.20230914

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 +36 -2
  2. package/package.json +1 -1
  3. package/tests.ts +53 -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=v1
12
- // Revision: 20230911
12
+ // Revision: 20230914
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -34,6 +34,9 @@ declare namespace gapi.client {
34
34
  number;
35
35
  }
36
36
  interface GoogleCloudDocumentaiUiv1beta3AutoLabelDocumentsMetadataIndividualAutoLabelStatus {
37
+ /** The document id of the auto-labeled document. This will replace the gcs_uri. */
38
+ documentId?:
39
+ GoogleCloudDocumentaiUiv1beta3DocumentId;
37
40
  /** The gcs_uri of the auto-labeling document, which uniquely identifies a dataset document. */
38
41
  gcsUri?:
39
42
  string;
@@ -3318,9 +3321,12 @@ declare namespace gapi.client {
3318
3321
  */
3319
3322
  advancedOcrOptions?:
3320
3323
  string[];
3321
- /** Turn on font identification model and return font style information. */
3324
+ /** Turn on font identification model and return font style information. Deprecated, use PremiumFeatures.compute_style_info instead. */
3322
3325
  computeStyleInfo?:
3323
3326
  boolean;
3327
+ /** Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0+ processors. */
3328
+ disableCharacterBoxesDetection?:
3329
+ boolean;
3324
3330
  /**
3325
3331
  * Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to
3326
3332
  * regular OCR to the process call.
@@ -3336,6 +3342,9 @@ declare namespace gapi.client {
3336
3342
  /** Hints for the OCR model. */
3337
3343
  hints?:
3338
3344
  GoogleCloudDocumentaiV1OcrConfigHints;
3345
+ /** Configurations for premium OCR features. */
3346
+ premiumFeatures?:
3347
+ GoogleCloudDocumentaiV1OcrConfigPremiumFeatures;
3339
3348
  }
3340
3349
  interface GoogleCloudDocumentaiV1OcrConfigHints {
3341
3350
  /**
@@ -3346,11 +3355,36 @@ declare namespace gapi.client {
3346
3355
  languageHints?:
3347
3356
  string[];
3348
3357
  }
3358
+ interface GoogleCloudDocumentaiV1OcrConfigPremiumFeatures {
3359
+ /** Turn on font identification model and return font style information. */
3360
+ computeStyleInfo?:
3361
+ boolean;
3362
+ /** Turn on the model that can extract LaTeX math formulas. */
3363
+ enableMathOcr?:
3364
+ boolean;
3365
+ /** Turn on selection mark detector in OCR engine. Only available in OCR 2.0+ processors. */
3366
+ enableSelectionMarkDetection?:
3367
+ boolean;
3368
+ }
3349
3369
  interface GoogleCloudDocumentaiV1ProcessOptions {
3370
+ /** Only process certain pages from the end, same as above. */
3371
+ fromEnd?:
3372
+ number;
3373
+ /** Only process certain pages from the start, process all if the document has less pages. */
3374
+ fromStart?:
3375
+ number;
3376
+ /** Which pages to process (1-indexed). */
3377
+ individualPageSelector?:
3378
+ GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector;
3350
3379
  /** Only applicable to `OCR_PROCESSOR`. Returns error if set on other processor types. */
3351
3380
  ocrConfig?:
3352
3381
  GoogleCloudDocumentaiV1OcrConfig;
3353
3382
  }
3383
+ interface GoogleCloudDocumentaiV1ProcessOptionsIndividualPageSelector {
3384
+ /** Optional. Indices of the pages (starting from 1). */
3385
+ pages?:
3386
+ number[];
3387
+ }
3354
3388
  interface GoogleCloudDocumentaiV1Processor {
3355
3389
  /** The time the processor was created. */
3356
3390
  createTime?:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.documentai-v1",
3
- "version": "0.0.20230911",
3
+ "version": "0.0.20230914",
4
4
  "description": "TypeScript typings for Cloud Document AI API v1",
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: 20230911
6
+ // Revision: 20230914
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -99,11 +99,19 @@ gapi.load('client', async () => {
99
99
  },
100
100
  },
101
101
  processOptions: {
102
+ fromEnd: 42,
103
+ fromStart: 42,
104
+ individualPageSelector: {
105
+ pages: [
106
+ 42
107
+ ],
108
+ },
102
109
  ocrConfig: {
103
110
  advancedOcrOptions: [
104
111
  "Test string"
105
112
  ],
106
113
  computeStyleInfo: true,
114
+ disableCharacterBoxesDetection: true,
107
115
  enableImageQualityScores: true,
108
116
  enableNativePdfParsing: true,
109
117
  enableSymbol: true,
@@ -112,6 +120,11 @@ gapi.load('client', async () => {
112
120
  "Test string"
113
121
  ],
114
122
  },
123
+ premiumFeatures: {
124
+ computeStyleInfo: true,
125
+ enableMathOcr: true,
126
+ enableSelectionMarkDetection: true,
127
+ },
115
128
  },
116
129
  },
117
130
  skipHumanReview: true,
@@ -1013,11 +1026,19 @@ gapi.load('client', async () => {
1013
1026
  uri: "Test string",
1014
1027
  },
1015
1028
  processOptions: {
1029
+ fromEnd: 42,
1030
+ fromStart: 42,
1031
+ individualPageSelector: {
1032
+ pages: [
1033
+ 42
1034
+ ],
1035
+ },
1016
1036
  ocrConfig: {
1017
1037
  advancedOcrOptions: [
1018
1038
  "Test string"
1019
1039
  ],
1020
1040
  computeStyleInfo: true,
1041
+ disableCharacterBoxesDetection: true,
1021
1042
  enableImageQualityScores: true,
1022
1043
  enableNativePdfParsing: true,
1023
1044
  enableSymbol: true,
@@ -1026,6 +1047,11 @@ gapi.load('client', async () => {
1026
1047
  "Test string"
1027
1048
  ],
1028
1049
  },
1050
+ premiumFeatures: {
1051
+ computeStyleInfo: true,
1052
+ enableMathOcr: true,
1053
+ enableSelectionMarkDetection: true,
1054
+ },
1029
1055
  },
1030
1056
  },
1031
1057
  rawDocument: {
@@ -1951,11 +1977,19 @@ gapi.load('client', async () => {
1951
1977
  },
1952
1978
  },
1953
1979
  processOptions: {
1980
+ fromEnd: 42,
1981
+ fromStart: 42,
1982
+ individualPageSelector: {
1983
+ pages: [
1984
+ 42
1985
+ ],
1986
+ },
1954
1987
  ocrConfig: {
1955
1988
  advancedOcrOptions: [
1956
1989
  "Test string"
1957
1990
  ],
1958
1991
  computeStyleInfo: true,
1992
+ disableCharacterBoxesDetection: true,
1959
1993
  enableImageQualityScores: true,
1960
1994
  enableNativePdfParsing: true,
1961
1995
  enableSymbol: true,
@@ -1964,6 +1998,11 @@ gapi.load('client', async () => {
1964
1998
  "Test string"
1965
1999
  ],
1966
2000
  },
2001
+ premiumFeatures: {
2002
+ computeStyleInfo: true,
2003
+ enableMathOcr: true,
2004
+ enableSelectionMarkDetection: true,
2005
+ },
1967
2006
  },
1968
2007
  },
1969
2008
  skipHumanReview: true,
@@ -2859,11 +2898,19 @@ gapi.load('client', async () => {
2859
2898
  uri: "Test string",
2860
2899
  },
2861
2900
  processOptions: {
2901
+ fromEnd: 42,
2902
+ fromStart: 42,
2903
+ individualPageSelector: {
2904
+ pages: [
2905
+ 42
2906
+ ],
2907
+ },
2862
2908
  ocrConfig: {
2863
2909
  advancedOcrOptions: [
2864
2910
  "Test string"
2865
2911
  ],
2866
2912
  computeStyleInfo: true,
2913
+ disableCharacterBoxesDetection: true,
2867
2914
  enableImageQualityScores: true,
2868
2915
  enableNativePdfParsing: true,
2869
2916
  enableSymbol: true,
@@ -2872,6 +2919,11 @@ gapi.load('client', async () => {
2872
2919
  "Test string"
2873
2920
  ],
2874
2921
  },
2922
+ premiumFeatures: {
2923
+ computeStyleInfo: true,
2924
+ enableMathOcr: true,
2925
+ enableSelectionMarkDetection: true,
2926
+ },
2875
2927
  },
2876
2928
  },
2877
2929
  rawDocument: {