@maxim_mazurok/gapi.client.documentai-v1 0.0.20220919 → 0.0.20220928
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.
- package/index.d.ts +52 -2
- package/package.json +1 -1
- package/tests.ts +28 -1
package/index.d.ts
CHANGED
|
@@ -4,13 +4,12 @@
|
|
|
4
4
|
// Nick Amoscato <https://github.com/namoscato>
|
|
5
5
|
// Declan Vong <https://github.com/declanvong>
|
|
6
6
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
7
|
-
// TypeScript Version: 2.8
|
|
8
7
|
|
|
9
8
|
// IMPORTANT
|
|
10
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
11
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
12
11
|
// Generated from: https://documentai.googleapis.com/$discovery/rest?version=v1
|
|
13
|
-
// Revision:
|
|
12
|
+
// Revision: 20220928
|
|
14
13
|
|
|
15
14
|
/// <reference types="gapi.client" />
|
|
16
15
|
|
|
@@ -480,6 +479,8 @@ declare namespace gapi.client {
|
|
|
480
479
|
formFields?: GoogleCloudDocumentaiV1beta1DocumentPageFormField[];
|
|
481
480
|
/** Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned. */
|
|
482
481
|
image?: GoogleCloudDocumentaiV1beta1DocumentPageImage;
|
|
482
|
+
/** Image Quality Scores. */
|
|
483
|
+
imageQualityScores?: GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores;
|
|
483
484
|
/** Layout for the page. */
|
|
484
485
|
layout?: GoogleCloudDocumentaiV1beta1DocumentPageLayout;
|
|
485
486
|
/** A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line. */
|
|
@@ -579,6 +580,21 @@ declare namespace gapi.client {
|
|
|
579
580
|
/** Width of the image in pixels. */
|
|
580
581
|
width?: number;
|
|
581
582
|
}
|
|
583
|
+
interface GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScores {
|
|
584
|
+
/** A list of detected defects. */
|
|
585
|
+
detectedDefects?: GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect[];
|
|
586
|
+
/** The overall quality score. Range [0, 1] where 1 is perfect quality. */
|
|
587
|
+
qualityScore?: number;
|
|
588
|
+
}
|
|
589
|
+
interface GoogleCloudDocumentaiV1beta1DocumentPageImageQualityScoresDetectedDefect {
|
|
590
|
+
/** Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists. */
|
|
591
|
+
confidence?: number;
|
|
592
|
+
/**
|
|
593
|
+
* 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",
|
|
594
|
+
* "quality/defect_document_cutoff", "quality/defect_text_cutoff", "quality/defect_glare"
|
|
595
|
+
*/
|
|
596
|
+
type?: string;
|
|
597
|
+
}
|
|
582
598
|
interface GoogleCloudDocumentaiV1beta1DocumentPageLayout {
|
|
583
599
|
/** The bounding polygon for the Layout. */
|
|
584
600
|
boundingPoly?: GoogleCloudDocumentaiV1beta1BoundingPoly;
|
|
@@ -967,6 +983,8 @@ declare namespace gapi.client {
|
|
|
967
983
|
formFields?: GoogleCloudDocumentaiV1beta2DocumentPageFormField[];
|
|
968
984
|
/** Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned. */
|
|
969
985
|
image?: GoogleCloudDocumentaiV1beta2DocumentPageImage;
|
|
986
|
+
/** Image Quality Scores. */
|
|
987
|
+
imageQualityScores?: GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores;
|
|
970
988
|
/** Layout for the page. */
|
|
971
989
|
layout?: GoogleCloudDocumentaiV1beta2DocumentPageLayout;
|
|
972
990
|
/** A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line. */
|
|
@@ -1066,6 +1084,21 @@ declare namespace gapi.client {
|
|
|
1066
1084
|
/** Width of the image in pixels. */
|
|
1067
1085
|
width?: number;
|
|
1068
1086
|
}
|
|
1087
|
+
interface GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScores {
|
|
1088
|
+
/** A list of detected defects. */
|
|
1089
|
+
detectedDefects?: GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect[];
|
|
1090
|
+
/** The overall quality score. Range [0, 1] where 1 is perfect quality. */
|
|
1091
|
+
qualityScore?: number;
|
|
1092
|
+
}
|
|
1093
|
+
interface GoogleCloudDocumentaiV1beta2DocumentPageImageQualityScoresDetectedDefect {
|
|
1094
|
+
/** Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists. */
|
|
1095
|
+
confidence?: number;
|
|
1096
|
+
/**
|
|
1097
|
+
* 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",
|
|
1098
|
+
* "quality/defect_document_cutoff", "quality/defect_text_cutoff", "quality/defect_glare"
|
|
1099
|
+
*/
|
|
1100
|
+
type?: string;
|
|
1101
|
+
}
|
|
1069
1102
|
interface GoogleCloudDocumentaiV1beta2DocumentPageLayout {
|
|
1070
1103
|
/** The bounding polygon for the Layout. */
|
|
1071
1104
|
boundingPoly?: GoogleCloudDocumentaiV1beta2BoundingPoly;
|
|
@@ -1600,6 +1633,8 @@ declare namespace gapi.client {
|
|
|
1600
1633
|
formFields?: GoogleCloudDocumentaiV1DocumentPageFormField[];
|
|
1601
1634
|
/** Rendered image for this page. This image is preprocessed to remove any skew, rotation, and distortions such that the annotation bounding boxes can be upright and axis-aligned. */
|
|
1602
1635
|
image?: GoogleCloudDocumentaiV1DocumentPageImage;
|
|
1636
|
+
/** Image Quality Scores. */
|
|
1637
|
+
imageQualityScores?: GoogleCloudDocumentaiV1DocumentPageImageQualityScores;
|
|
1603
1638
|
/** Layout for the page. */
|
|
1604
1639
|
layout?: GoogleCloudDocumentaiV1DocumentPageLayout;
|
|
1605
1640
|
/** A list of visually detected text lines on the page. A collection of tokens that a human would perceive as a line. */
|
|
@@ -1699,6 +1734,21 @@ declare namespace gapi.client {
|
|
|
1699
1734
|
/** Width of the image in pixels. */
|
|
1700
1735
|
width?: number;
|
|
1701
1736
|
}
|
|
1737
|
+
interface GoogleCloudDocumentaiV1DocumentPageImageQualityScores {
|
|
1738
|
+
/** A list of detected defects. */
|
|
1739
|
+
detectedDefects?: GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect[];
|
|
1740
|
+
/** The overall quality score. Range [0, 1] where 1 is perfect quality. */
|
|
1741
|
+
qualityScore?: number;
|
|
1742
|
+
}
|
|
1743
|
+
interface GoogleCloudDocumentaiV1DocumentPageImageQualityScoresDetectedDefect {
|
|
1744
|
+
/** Confidence of detected defect. Range [0, 1] where 1 indicates strong confidence of that the defect exists. */
|
|
1745
|
+
confidence?: number;
|
|
1746
|
+
/**
|
|
1747
|
+
* 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",
|
|
1748
|
+
* "quality/defect_document_cutoff", "quality/defect_text_cutoff", "quality/defect_glare"
|
|
1749
|
+
*/
|
|
1750
|
+
type?: string;
|
|
1751
|
+
}
|
|
1702
1752
|
interface GoogleCloudDocumentaiV1DocumentPageLayout {
|
|
1703
1753
|
/** The bounding polygon for the Layout. */
|
|
1704
1754
|
boundingPoly?: GoogleCloudDocumentaiV1BoundingPoly;
|
package/package.json
CHANGED
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:
|
|
6
|
+
// Revision: 20220928
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -454,6 +454,15 @@ gapi.load('client', async () => {
|
|
|
454
454
|
mimeType: "Test string",
|
|
455
455
|
width: 42,
|
|
456
456
|
},
|
|
457
|
+
imageQualityScores: {
|
|
458
|
+
detectedDefects: [
|
|
459
|
+
{
|
|
460
|
+
confidence: 42,
|
|
461
|
+
type: "Test string",
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
qualityScore: 42,
|
|
465
|
+
},
|
|
457
466
|
layout: {
|
|
458
467
|
boundingPoly: {
|
|
459
468
|
normalizedVertices: [
|
|
@@ -1318,6 +1327,15 @@ gapi.load('client', async () => {
|
|
|
1318
1327
|
mimeType: "Test string",
|
|
1319
1328
|
width: 42,
|
|
1320
1329
|
},
|
|
1330
|
+
imageQualityScores: {
|
|
1331
|
+
detectedDefects: [
|
|
1332
|
+
{
|
|
1333
|
+
confidence: 42,
|
|
1334
|
+
type: "Test string",
|
|
1335
|
+
}
|
|
1336
|
+
],
|
|
1337
|
+
qualityScore: 42,
|
|
1338
|
+
},
|
|
1321
1339
|
layout: {
|
|
1322
1340
|
boundingPoly: {
|
|
1323
1341
|
normalizedVertices: [
|
|
@@ -2165,6 +2183,15 @@ gapi.load('client', async () => {
|
|
|
2165
2183
|
mimeType: "Test string",
|
|
2166
2184
|
width: 42,
|
|
2167
2185
|
},
|
|
2186
|
+
imageQualityScores: {
|
|
2187
|
+
detectedDefects: [
|
|
2188
|
+
{
|
|
2189
|
+
confidence: 42,
|
|
2190
|
+
type: "Test string",
|
|
2191
|
+
}
|
|
2192
|
+
],
|
|
2193
|
+
qualityScore: 42,
|
|
2194
|
+
},
|
|
2168
2195
|
layout: {
|
|
2169
2196
|
boundingPoly: {
|
|
2170
2197
|
normalizedVertices: [
|