@maxim_mazurok/gapi.client.documentai-v1 0.0.20220808 → 0.0.20220824
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 +89 -27
- package/package.json +1 -1
- package/tests.ts +22 -4
package/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
11
11
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
12
12
|
// Generated from: https://documentai.googleapis.com/$discovery/rest?version=v1
|
|
13
|
-
// Revision:
|
|
13
|
+
// Revision: 20220824
|
|
14
14
|
|
|
15
15
|
/// <reference types="gapi.client" />
|
|
16
16
|
|
|
@@ -26,13 +26,17 @@ declare namespace gapi.client {
|
|
|
26
26
|
interface GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadata {
|
|
27
27
|
/** The basic metadata of the long running operation. */
|
|
28
28
|
commonMetadata?: GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
|
|
29
|
+
/** Total number of documents that failed to be deleted in storage. */
|
|
30
|
+
errorDocumentCount?: number;
|
|
29
31
|
/** The list of response details of each document. */
|
|
30
32
|
individualBatchDeleteStatuses?: GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus[];
|
|
33
|
+
/** Total number of documents deleting from dataset. */
|
|
34
|
+
totalDocumentCount?: number;
|
|
31
35
|
}
|
|
32
36
|
interface GoogleCloudDocumentaiUiv1beta3BatchDeleteDocumentsMetadataIndividualBatchDeleteStatus {
|
|
33
37
|
/** The document id of the document. */
|
|
34
38
|
documentId?: GoogleCloudDocumentaiUiv1beta3DocumentId;
|
|
35
|
-
/** The status of deleting the document. */
|
|
39
|
+
/** The status of deleting the document in storage. */
|
|
36
40
|
status?: GoogleRpcStatus;
|
|
37
41
|
}
|
|
38
42
|
// tslint:disable-next-line:no-empty-interface
|
|
@@ -129,6 +133,31 @@ declare namespace gapi.client {
|
|
|
129
133
|
/** The resource name of the created evaluation. */
|
|
130
134
|
evaluation?: string;
|
|
131
135
|
}
|
|
136
|
+
interface GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadata {
|
|
137
|
+
/** The basic metadata of the long running operation. */
|
|
138
|
+
commonMetadata?: GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
|
|
139
|
+
/** The list of response details of each document. */
|
|
140
|
+
individualExportStatuses?: GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus[];
|
|
141
|
+
/** The list of statistics for each dataset split type. */
|
|
142
|
+
splitExportStats?: GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat[];
|
|
143
|
+
}
|
|
144
|
+
interface GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataIndividualExportStatus {
|
|
145
|
+
/** The path to source docproto of the document. */
|
|
146
|
+
documentId?: GoogleCloudDocumentaiUiv1beta3DocumentId;
|
|
147
|
+
/** The output_gcs_destination of the exported document if it was successful, otherwise empty. */
|
|
148
|
+
outputGcsDestination?: string;
|
|
149
|
+
/** The status of the exporting of the document. */
|
|
150
|
+
status?: GoogleRpcStatus;
|
|
151
|
+
}
|
|
152
|
+
interface GoogleCloudDocumentaiUiv1beta3ExportDocumentsMetadataSplitExportStat {
|
|
153
|
+
/** The dataset split type. */
|
|
154
|
+
splitType?: string;
|
|
155
|
+
/** Total number of documents with the given dataset split type to be exported. */
|
|
156
|
+
totalDocumentCount?: number;
|
|
157
|
+
}
|
|
158
|
+
// tslint:disable-next-line:no-empty-interface
|
|
159
|
+
interface GoogleCloudDocumentaiUiv1beta3ExportDocumentsResponse {
|
|
160
|
+
}
|
|
132
161
|
interface GoogleCloudDocumentaiUiv1beta3ExportProcessorVersionMetadata {
|
|
133
162
|
/** The common metadata about the operation. */
|
|
134
163
|
commonMetadata?: GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
|
|
@@ -140,11 +169,19 @@ declare namespace gapi.client {
|
|
|
140
169
|
interface GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadata {
|
|
141
170
|
/** The basic metadata of the long running operation. */
|
|
142
171
|
commonMetadata?: GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
|
|
172
|
+
/** Validation statuses of the batch documents import config. */
|
|
173
|
+
importConfigValidationResults?: GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult[];
|
|
143
174
|
/** The list of response details of each document. */
|
|
144
175
|
individualImportStatuses?: GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus[];
|
|
145
176
|
/** Total number of the documents that are qualified for importing. */
|
|
146
177
|
totalDocumentCount?: number;
|
|
147
178
|
}
|
|
179
|
+
interface GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataImportConfigValidationResult {
|
|
180
|
+
/** The source Cloud Storage URI specified in the import config. */
|
|
181
|
+
inputGcsSource?: string;
|
|
182
|
+
/** The validation status of import config. */
|
|
183
|
+
status?: GoogleRpcStatus;
|
|
184
|
+
}
|
|
148
185
|
interface GoogleCloudDocumentaiUiv1beta3ImportDocumentsMetadataIndividualImportStatus {
|
|
149
186
|
/** The source Cloud Storage URI of the document. */
|
|
150
187
|
inputGcsSource?: string;
|
|
@@ -159,15 +196,23 @@ declare namespace gapi.client {
|
|
|
159
196
|
interface GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadata {
|
|
160
197
|
/** The basic metadata of the long running operation. */
|
|
161
198
|
commonMetadata?: GoogleCloudDocumentaiUiv1beta3CommonOperationMetadata;
|
|
162
|
-
/**
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/** The
|
|
169
|
-
|
|
170
|
-
/** The
|
|
199
|
+
/** The list of dataset resync statuses. Not checked when `dataset_documents` is specified in ResyncRequest. */
|
|
200
|
+
datasetResyncStatuses?: GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus[];
|
|
201
|
+
/** The list of document resync statuses. The same document could have multiple `individual_document_resync_statuses` if it has multiple inconsistencies. */
|
|
202
|
+
individualDocumentResyncStatuses?: GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus[];
|
|
203
|
+
}
|
|
204
|
+
interface GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataDatasetResyncStatus {
|
|
205
|
+
/** The type of the inconsistency of the dataset. */
|
|
206
|
+
datasetInconsistencyType?: string;
|
|
207
|
+
/** The status of resyncing the dataset with regards to the detected inconsistency. Empty if `validate_only` is true in the request. */
|
|
208
|
+
status?: GoogleRpcStatus;
|
|
209
|
+
}
|
|
210
|
+
interface GoogleCloudDocumentaiUiv1beta3ResyncDatasetMetadataIndividualDocumentResyncStatus {
|
|
211
|
+
/** The document identifier. */
|
|
212
|
+
documentId?: GoogleCloudDocumentaiUiv1beta3DocumentId;
|
|
213
|
+
/** The type of document inconsistency. */
|
|
214
|
+
documentInconsistencyType?: string;
|
|
215
|
+
/** The status of resyncing the document with regards to the detected inconsistency. Empty if `validate_only` is true in the request. */
|
|
171
216
|
status?: GoogleRpcStatus;
|
|
172
217
|
}
|
|
173
218
|
// tslint:disable-next-line:no-empty-interface
|
|
@@ -373,11 +418,6 @@ declare namespace gapi.client {
|
|
|
373
418
|
mentionId?: string;
|
|
374
419
|
/** Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty. */
|
|
375
420
|
mentionText?: string;
|
|
376
|
-
/**
|
|
377
|
-
* Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a
|
|
378
|
-
* false negative. A non-present entity should have an empty mention_text and text_anchor.
|
|
379
|
-
*/
|
|
380
|
-
nonPresent?: boolean;
|
|
381
421
|
/**
|
|
382
422
|
* Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only
|
|
383
423
|
* populated for certain supported document types.
|
|
@@ -855,11 +895,6 @@ declare namespace gapi.client {
|
|
|
855
895
|
mentionId?: string;
|
|
856
896
|
/** Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty. */
|
|
857
897
|
mentionText?: string;
|
|
858
|
-
/**
|
|
859
|
-
* Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a
|
|
860
|
-
* false negative. A non-present entity should have an empty mention_text and text_anchor.
|
|
861
|
-
*/
|
|
862
|
-
nonPresent?: boolean;
|
|
863
898
|
/**
|
|
864
899
|
* Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only
|
|
865
900
|
* populated for certain supported document types.
|
|
@@ -1489,11 +1524,6 @@ declare namespace gapi.client {
|
|
|
1489
1524
|
mentionId?: string;
|
|
1490
1525
|
/** Optional. Text value in the document e.g. `1600 Amphitheatre Pkwy`. If the entity is not present in the document, this field will be empty. */
|
|
1491
1526
|
mentionText?: string;
|
|
1492
|
-
/**
|
|
1493
|
-
* Optional. This attribute indicates that the processing didn't actually identify this entity, but a confidence score was assigned that represent the potential that this could be a
|
|
1494
|
-
* false negative. A non-present entity should have an empty mention_text and text_anchor.
|
|
1495
|
-
*/
|
|
1496
|
-
nonPresent?: boolean;
|
|
1497
1527
|
/**
|
|
1498
1528
|
* Optional. Normalized entity value. Absent if the extracted value could not be converted or the type (e.g. address) is not supported for certain parsers. This field is also only
|
|
1499
1529
|
* populated for certain supported document types.
|
|
@@ -1815,6 +1845,8 @@ declare namespace gapi.client {
|
|
|
1815
1845
|
baseTypes?: string[];
|
|
1816
1846
|
/** User defined name for the type. */
|
|
1817
1847
|
displayName?: string;
|
|
1848
|
+
/** Metadata for the entity type. */
|
|
1849
|
+
entityTypeMetadata?: GoogleCloudDocumentaiV1EntityTypeMetadata;
|
|
1818
1850
|
/**
|
|
1819
1851
|
* 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
|
|
1820
1852
|
* `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file.
|
|
@@ -1822,7 +1854,7 @@ declare namespace gapi.client {
|
|
|
1822
1854
|
enumValues?: GoogleCloudDocumentaiV1DocumentSchemaEntityTypeEnumValues;
|
|
1823
1855
|
/**
|
|
1824
1856
|
* 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
|
|
1825
|
-
* is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters [a-z0-9_-]
|
|
1857
|
+
* is case-insensitive - Maximum 64 characters. - Must start with a letter. - Allowed characters: ASCII letters `[a-z0-9_-]`. (For backward compatibility internal infrastructure and
|
|
1826
1858
|
* 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
|
|
1827
1859
|
* honored for backward compatibility.
|
|
1828
1860
|
*/
|
|
@@ -1839,6 +1871,8 @@ declare namespace gapi.client {
|
|
|
1839
1871
|
name?: string;
|
|
1840
1872
|
/** Occurrence type limits the number of instances an entity type appears in the document. */
|
|
1841
1873
|
occurrenceType?: string;
|
|
1874
|
+
/** Any additional metadata about the property can be added here. */
|
|
1875
|
+
propertyMetadata?: GoogleCloudDocumentaiV1PropertyMetadata;
|
|
1842
1876
|
/** A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field. */
|
|
1843
1877
|
valueType?: string;
|
|
1844
1878
|
}
|
|
@@ -1918,6 +1952,16 @@ declare namespace gapi.client {
|
|
|
1918
1952
|
// tslint:disable-next-line:no-empty-interface
|
|
1919
1953
|
interface GoogleCloudDocumentaiV1EnableProcessorResponse {
|
|
1920
1954
|
}
|
|
1955
|
+
interface GoogleCloudDocumentaiV1EntityTypeMetadata {
|
|
1956
|
+
/** Human review labeling config on the property. */
|
|
1957
|
+
humanReviewLabelingMetadata?: GoogleCloudDocumentaiV1HumanReviewLabelingMetadata;
|
|
1958
|
+
/** Human review config on the entity type. */
|
|
1959
|
+
humanReviewMetadata?: GoogleCloudDocumentaiV1HumanReviewValidationMetadata;
|
|
1960
|
+
/** Whether the entity type should be considered as "inactive". */
|
|
1961
|
+
inactive?: boolean;
|
|
1962
|
+
/** If set, the properties of this entity type must be prefixed with the parents. */
|
|
1963
|
+
prefixedNamingOnProperties?: boolean;
|
|
1964
|
+
}
|
|
1921
1965
|
interface GoogleCloudDocumentaiV1FetchProcessorTypesResponse {
|
|
1922
1966
|
/** The list of processor types. */
|
|
1923
1967
|
processorTypes?: GoogleCloudDocumentaiV1ProcessorType[];
|
|
@@ -1936,6 +1980,10 @@ declare namespace gapi.client {
|
|
|
1936
1980
|
/** The URI prefix. */
|
|
1937
1981
|
gcsUriPrefix?: string;
|
|
1938
1982
|
}
|
|
1983
|
+
interface GoogleCloudDocumentaiV1HumanReviewLabelingMetadata {
|
|
1984
|
+
/** Whether to enable normalization editing. */
|
|
1985
|
+
enableNormalizationEditing?: boolean;
|
|
1986
|
+
}
|
|
1939
1987
|
interface GoogleCloudDocumentaiV1HumanReviewStatus {
|
|
1940
1988
|
/**
|
|
1941
1989
|
* 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
|
|
@@ -1947,6 +1995,12 @@ declare namespace gapi.client {
|
|
|
1947
1995
|
/** A message providing more details about the human review state. */
|
|
1948
1996
|
stateMessage?: string;
|
|
1949
1997
|
}
|
|
1998
|
+
interface GoogleCloudDocumentaiV1HumanReviewValidationMetadata {
|
|
1999
|
+
/** The confidence threshold if human review validation is enabled. */
|
|
2000
|
+
confidenceThreshold?: number;
|
|
2001
|
+
/** Whether to enable human review validation. */
|
|
2002
|
+
enableValidation?: boolean;
|
|
2003
|
+
}
|
|
1950
2004
|
interface GoogleCloudDocumentaiV1ListProcessorsResponse {
|
|
1951
2005
|
/** Points to the next processor, otherwise empty. */
|
|
1952
2006
|
nextPageToken?: string;
|
|
@@ -2047,6 +2101,14 @@ declare namespace gapi.client {
|
|
|
2047
2101
|
/** The status of human review on the processed document. */
|
|
2048
2102
|
humanReviewStatus?: GoogleCloudDocumentaiV1HumanReviewStatus;
|
|
2049
2103
|
}
|
|
2104
|
+
interface GoogleCloudDocumentaiV1PropertyMetadata {
|
|
2105
|
+
/** Human review labeling config on the property. */
|
|
2106
|
+
humanReviewLabelingMetadata?: GoogleCloudDocumentaiV1HumanReviewLabelingMetadata;
|
|
2107
|
+
/** Human review validation config on the property. */
|
|
2108
|
+
humanReviewMetadata?: GoogleCloudDocumentaiV1HumanReviewValidationMetadata;
|
|
2109
|
+
/** Whether the property should be considered as "inactive". */
|
|
2110
|
+
inactive?: boolean;
|
|
2111
|
+
}
|
|
2050
2112
|
interface GoogleCloudDocumentaiV1RawDocument {
|
|
2051
2113
|
/** Inline document content. */
|
|
2052
2114
|
content?: string;
|
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: 20220824
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -150,7 +150,6 @@ gapi.load('client', async () => {
|
|
|
150
150
|
id: "Test string",
|
|
151
151
|
mentionId: "Test string",
|
|
152
152
|
mentionText: "Test string",
|
|
153
|
-
nonPresent: true,
|
|
154
153
|
normalizedValue: {
|
|
155
154
|
addressValue: {
|
|
156
155
|
addressLines: [
|
|
@@ -963,6 +962,17 @@ gapi.load('client', async () => {
|
|
|
963
962
|
"Test string"
|
|
964
963
|
],
|
|
965
964
|
displayName: "Test string",
|
|
965
|
+
entityTypeMetadata: {
|
|
966
|
+
humanReviewLabelingMetadata: {
|
|
967
|
+
enableNormalizationEditing: true,
|
|
968
|
+
},
|
|
969
|
+
humanReviewMetadata: {
|
|
970
|
+
confidenceThreshold: 42,
|
|
971
|
+
enableValidation: true,
|
|
972
|
+
},
|
|
973
|
+
inactive: true,
|
|
974
|
+
prefixedNamingOnProperties: true,
|
|
975
|
+
},
|
|
966
976
|
enumValues: {
|
|
967
977
|
values: [
|
|
968
978
|
"Test string"
|
|
@@ -973,6 +983,16 @@ gapi.load('client', async () => {
|
|
|
973
983
|
{
|
|
974
984
|
name: "Test string",
|
|
975
985
|
occurrenceType: "Test string",
|
|
986
|
+
propertyMetadata: {
|
|
987
|
+
humanReviewLabelingMetadata: {
|
|
988
|
+
enableNormalizationEditing: true,
|
|
989
|
+
},
|
|
990
|
+
humanReviewMetadata: {
|
|
991
|
+
confidenceThreshold: 42,
|
|
992
|
+
enableValidation: true,
|
|
993
|
+
},
|
|
994
|
+
inactive: true,
|
|
995
|
+
},
|
|
976
996
|
valueType: "Test string",
|
|
977
997
|
}
|
|
978
998
|
],
|
|
@@ -994,7 +1014,6 @@ gapi.load('client', async () => {
|
|
|
994
1014
|
id: "Test string",
|
|
995
1015
|
mentionId: "Test string",
|
|
996
1016
|
mentionText: "Test string",
|
|
997
|
-
nonPresent: true,
|
|
998
1017
|
normalizedValue: {
|
|
999
1018
|
addressValue: {
|
|
1000
1019
|
addressLines: [
|
|
@@ -1840,7 +1859,6 @@ gapi.load('client', async () => {
|
|
|
1840
1859
|
id: "Test string",
|
|
1841
1860
|
mentionId: "Test string",
|
|
1842
1861
|
mentionText: "Test string",
|
|
1843
|
-
nonPresent: true,
|
|
1844
1862
|
normalizedValue: {
|
|
1845
1863
|
addressValue: {
|
|
1846
1864
|
addressLines: [
|