@maxim_mazurok/gapi.client.documentai-v1beta3 0.0.20230911 → 0.0.20230923
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 +181 -2
- package/package.json +1 -1
- package/tests.ts +63 -1
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://documentai.googleapis.com/$discovery/rest?version=v1beta3
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20230923
|
|
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;
|
|
@@ -2329,6 +2332,23 @@ declare namespace gapi.client {
|
|
|
2329
2332
|
docId?:
|
|
2330
2333
|
string;
|
|
2331
2334
|
}
|
|
2335
|
+
interface GoogleCloudDocumentaiV1beta3DocumentMetadata {
|
|
2336
|
+
/** Type of the dataset split to which the document belongs. */
|
|
2337
|
+
datasetType?:
|
|
2338
|
+
string;
|
|
2339
|
+
/** The display name of the document. */
|
|
2340
|
+
displayName?:
|
|
2341
|
+
string;
|
|
2342
|
+
/** Document identifier. */
|
|
2343
|
+
documentId?:
|
|
2344
|
+
GoogleCloudDocumentaiV1beta3DocumentId;
|
|
2345
|
+
/** Labelling state of the document. */
|
|
2346
|
+
labelingState?:
|
|
2347
|
+
string;
|
|
2348
|
+
/** Number of pages in the document. */
|
|
2349
|
+
pageCount?:
|
|
2350
|
+
number;
|
|
2351
|
+
}
|
|
2332
2352
|
interface GoogleCloudDocumentaiV1beta3DocumentOutputConfig {
|
|
2333
2353
|
/** Output config to write the results to Cloud Storage. */
|
|
2334
2354
|
gcsOutputConfig?:
|
|
@@ -3203,6 +3223,53 @@ declare namespace gapi.client {
|
|
|
3203
3223
|
processorVersion?:
|
|
3204
3224
|
string;
|
|
3205
3225
|
}
|
|
3226
|
+
interface GoogleCloudDocumentaiV1beta3ListDocumentsRequest {
|
|
3227
|
+
/**
|
|
3228
|
+
* Optional. Query to filter the documents based on https://google.aip.dev/160. ## Currently support query strings are:
|
|
3229
|
+
* `SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED` - `LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED` -
|
|
3230
|
+
* `DisplayName=\"file_name.pdf\"` - `EntityType=abc/def` - `TagName=\"auto-labeling-running\"|\"sampled\"` Note: - Only `AND`, `=` and `!=` are supported. e.g. `DisplayName=file_name
|
|
3231
|
+
* AND EntityType!=abc` IS supported. - Wildcard `*` is supported only in `DisplayName` filter - No duplicate filter keys are allowed, e.g. `EntityType=a AND EntityType=b` is NOT
|
|
3232
|
+
* supported. - String match is case sensitive (for filter `DisplayName` & `EntityType`).
|
|
3233
|
+
*/
|
|
3234
|
+
filter?:
|
|
3235
|
+
string;
|
|
3236
|
+
/**
|
|
3237
|
+
* The maximum number of documents to return. The service may return fewer than this value. If unspecified, at most 20 documents will be returned. The maximum value is 100; values
|
|
3238
|
+
* above 100 will be coerced to 100.
|
|
3239
|
+
*/
|
|
3240
|
+
pageSize?:
|
|
3241
|
+
number;
|
|
3242
|
+
/**
|
|
3243
|
+
* A page token, received from a previous `ListDocuments` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDocuments` must
|
|
3244
|
+
* match the call that provided the page token.
|
|
3245
|
+
*/
|
|
3246
|
+
pageToken?:
|
|
3247
|
+
string;
|
|
3248
|
+
/**
|
|
3249
|
+
* Optional. Controls if the ListDocuments request requires a total size of matched documents. See ListDocumentsResponse.total_size. Enabling this flag may adversely impact
|
|
3250
|
+
* performance. Defaults to false.
|
|
3251
|
+
*/
|
|
3252
|
+
returnTotalSize?:
|
|
3253
|
+
boolean;
|
|
3254
|
+
/**
|
|
3255
|
+
* Optional. Number of results to skip beginning from the `page_token` if provided. https://google.aip.dev/158#skipping-results. It must be a non-negative integer. Negative values wil
|
|
3256
|
+
* be rejected. Note that this is not the number of pages to skip. If this value causes the cursor to move past the end of results, `ListDocumentsResponse.document_metadata` and
|
|
3257
|
+
* `ListDocumentsResponse.next_page_token` will be empty.
|
|
3258
|
+
*/
|
|
3259
|
+
skip?:
|
|
3260
|
+
number;
|
|
3261
|
+
}
|
|
3262
|
+
interface GoogleCloudDocumentaiV1beta3ListDocumentsResponse {
|
|
3263
|
+
/** Document metadata corresponding to the listed documents. */
|
|
3264
|
+
documentMetadata?:
|
|
3265
|
+
GoogleCloudDocumentaiV1beta3DocumentMetadata[];
|
|
3266
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
3267
|
+
nextPageToken?:
|
|
3268
|
+
string;
|
|
3269
|
+
/** Total count of documents queried. */
|
|
3270
|
+
totalSize?:
|
|
3271
|
+
number;
|
|
3272
|
+
}
|
|
3206
3273
|
interface GoogleCloudDocumentaiV1beta3ListEvaluationsResponse {
|
|
3207
3274
|
/** The evaluations requested. */
|
|
3208
3275
|
evaluations?:
|
|
@@ -3250,9 +3317,12 @@ declare namespace gapi.client {
|
|
|
3250
3317
|
*/
|
|
3251
3318
|
advancedOcrOptions?:
|
|
3252
3319
|
string[];
|
|
3253
|
-
/** Turn on font identification model and return font style information. */
|
|
3320
|
+
/** Turn on font identification model and return font style information. Deprecated, use PremiumFeatures.compute_style_info instead. */
|
|
3254
3321
|
computeStyleInfo?:
|
|
3255
3322
|
boolean;
|
|
3323
|
+
/** Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors. */
|
|
3324
|
+
disableCharacterBoxesDetection?:
|
|
3325
|
+
boolean;
|
|
3256
3326
|
/**
|
|
3257
3327
|
* 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
|
|
3258
3328
|
* regular OCR to the process call.
|
|
@@ -3268,6 +3338,9 @@ declare namespace gapi.client {
|
|
|
3268
3338
|
/** Hints for the OCR model. */
|
|
3269
3339
|
hints?:
|
|
3270
3340
|
GoogleCloudDocumentaiV1beta3OcrConfigHints;
|
|
3341
|
+
/** Configurations for premium OCR features. */
|
|
3342
|
+
premiumFeatures?:
|
|
3343
|
+
GoogleCloudDocumentaiV1beta3OcrConfigPremiumFeatures;
|
|
3271
3344
|
}
|
|
3272
3345
|
interface GoogleCloudDocumentaiV1beta3OcrConfigHints {
|
|
3273
3346
|
/**
|
|
@@ -3278,7 +3351,27 @@ declare namespace gapi.client {
|
|
|
3278
3351
|
languageHints?:
|
|
3279
3352
|
string[];
|
|
3280
3353
|
}
|
|
3354
|
+
interface GoogleCloudDocumentaiV1beta3OcrConfigPremiumFeatures {
|
|
3355
|
+
/** Turn on font identification model and return font style information. */
|
|
3356
|
+
computeStyleInfo?:
|
|
3357
|
+
boolean;
|
|
3358
|
+
/** Turn on the model that can extract LaTeX math formulas. */
|
|
3359
|
+
enableMathOcr?:
|
|
3360
|
+
boolean;
|
|
3361
|
+
/** Turn on selection mark detector in OCR engine. Only available in OCR 2.0 (and later) processors. */
|
|
3362
|
+
enableSelectionMarkDetection?:
|
|
3363
|
+
boolean;
|
|
3364
|
+
}
|
|
3281
3365
|
interface GoogleCloudDocumentaiV1beta3ProcessOptions {
|
|
3366
|
+
/** Only process certain pages from the end, same as above. */
|
|
3367
|
+
fromEnd?:
|
|
3368
|
+
number;
|
|
3369
|
+
/** Only process certain pages from the start. Process all if the document has fewer pages. */
|
|
3370
|
+
fromStart?:
|
|
3371
|
+
number;
|
|
3372
|
+
/** Which pages to process (1-indexed). */
|
|
3373
|
+
individualPageSelector?:
|
|
3374
|
+
GoogleCloudDocumentaiV1beta3ProcessOptionsIndividualPageSelector;
|
|
3282
3375
|
/** Only applicable to `OCR_PROCESSOR`. Returns error if set on other processor types. */
|
|
3283
3376
|
ocrConfig?:
|
|
3284
3377
|
GoogleCloudDocumentaiV1beta3OcrConfig;
|
|
@@ -3289,6 +3382,11 @@ declare namespace gapi.client {
|
|
|
3289
3382
|
schemaOverride?:
|
|
3290
3383
|
GoogleCloudDocumentaiV1beta3DocumentSchema;
|
|
3291
3384
|
}
|
|
3385
|
+
interface GoogleCloudDocumentaiV1beta3ProcessOptionsIndividualPageSelector {
|
|
3386
|
+
/** Optional. Indices of the pages (starting from 1). */
|
|
3387
|
+
pages?:
|
|
3388
|
+
number[];
|
|
3389
|
+
}
|
|
3292
3390
|
interface GoogleCloudDocumentaiV1beta3Processor {
|
|
3293
3391
|
/** The time the processor was created. */
|
|
3294
3392
|
createTime?:
|
|
@@ -4396,6 +4494,87 @@ declare namespace gapi.client {
|
|
|
4396
4494
|
string;
|
|
4397
4495
|
},
|
|
4398
4496
|
body: GoogleCloudDocumentaiV1beta3ImportDocumentsRequest): Request<GoogleLongrunningOperation>;
|
|
4497
|
+
/** Returns a list of documents present in the dataset. */
|
|
4498
|
+
listDocuments(request: {
|
|
4499
|
+
/** V1 error format. */
|
|
4500
|
+
"$.xgafv"?:
|
|
4501
|
+
string;
|
|
4502
|
+
/** OAuth access token. */
|
|
4503
|
+
access_token?:
|
|
4504
|
+
string;
|
|
4505
|
+
/** Data format for response. */
|
|
4506
|
+
alt?:
|
|
4507
|
+
string;
|
|
4508
|
+
/** JSONP */
|
|
4509
|
+
callback?:
|
|
4510
|
+
string;
|
|
4511
|
+
/** Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset */
|
|
4512
|
+
dataset:
|
|
4513
|
+
string;
|
|
4514
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
4515
|
+
fields?:
|
|
4516
|
+
string;
|
|
4517
|
+
/** 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. */
|
|
4518
|
+
key?:
|
|
4519
|
+
string;
|
|
4520
|
+
/** OAuth 2.0 token for the current user. */
|
|
4521
|
+
oauth_token?:
|
|
4522
|
+
string;
|
|
4523
|
+
/** Returns response with indentations and line breaks. */
|
|
4524
|
+
prettyPrint?:
|
|
4525
|
+
boolean;
|
|
4526
|
+
/** 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. */
|
|
4527
|
+
quotaUser?:
|
|
4528
|
+
string;
|
|
4529
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
4530
|
+
upload_protocol?:
|
|
4531
|
+
string;
|
|
4532
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
4533
|
+
uploadType?:
|
|
4534
|
+
string;
|
|
4535
|
+
/** Request body */
|
|
4536
|
+
resource:
|
|
4537
|
+
GoogleCloudDocumentaiV1beta3ListDocumentsRequest;
|
|
4538
|
+
}): Request<GoogleCloudDocumentaiV1beta3ListDocumentsResponse>;
|
|
4539
|
+
listDocuments(request: {
|
|
4540
|
+
/** V1 error format. */
|
|
4541
|
+
"$.xgafv"?:
|
|
4542
|
+
string;
|
|
4543
|
+
/** OAuth access token. */
|
|
4544
|
+
access_token?:
|
|
4545
|
+
string;
|
|
4546
|
+
/** Data format for response. */
|
|
4547
|
+
alt?:
|
|
4548
|
+
string;
|
|
4549
|
+
/** JSONP */
|
|
4550
|
+
callback?:
|
|
4551
|
+
string;
|
|
4552
|
+
/** Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset */
|
|
4553
|
+
dataset:
|
|
4554
|
+
string;
|
|
4555
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
4556
|
+
fields?:
|
|
4557
|
+
string;
|
|
4558
|
+
/** 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. */
|
|
4559
|
+
key?:
|
|
4560
|
+
string;
|
|
4561
|
+
/** OAuth 2.0 token for the current user. */
|
|
4562
|
+
oauth_token?:
|
|
4563
|
+
string;
|
|
4564
|
+
/** Returns response with indentations and line breaks. */
|
|
4565
|
+
prettyPrint?:
|
|
4566
|
+
boolean;
|
|
4567
|
+
/** 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. */
|
|
4568
|
+
quotaUser?:
|
|
4569
|
+
string;
|
|
4570
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
4571
|
+
upload_protocol?:
|
|
4572
|
+
string;
|
|
4573
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
4574
|
+
uploadType?:
|
|
4575
|
+
string;
|
|
4576
|
+
},
|
|
4577
|
+
body: GoogleCloudDocumentaiV1beta3ListDocumentsRequest): Request<GoogleCloudDocumentaiV1beta3ListDocumentsResponse>;
|
|
4399
4578
|
/** Updates a `DatasetSchema`. */
|
|
4400
4579
|
updateDatasetSchema(request: {
|
|
4401
4580
|
/** V1 error format. */
|
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: 20230923
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -101,11 +101,19 @@ gapi.load('client', async () => {
|
|
|
101
101
|
gcsDestination: "Test string",
|
|
102
102
|
},
|
|
103
103
|
processOptions: {
|
|
104
|
+
fromEnd: 42,
|
|
105
|
+
fromStart: 42,
|
|
106
|
+
individualPageSelector: {
|
|
107
|
+
pages: [
|
|
108
|
+
42
|
|
109
|
+
],
|
|
110
|
+
},
|
|
104
111
|
ocrConfig: {
|
|
105
112
|
advancedOcrOptions: [
|
|
106
113
|
"Test string"
|
|
107
114
|
],
|
|
108
115
|
computeStyleInfo: true,
|
|
116
|
+
disableCharacterBoxesDetection: true,
|
|
109
117
|
enableImageQualityScores: true,
|
|
110
118
|
enableNativePdfParsing: true,
|
|
111
119
|
enableSymbol: true,
|
|
@@ -114,6 +122,11 @@ gapi.load('client', async () => {
|
|
|
114
122
|
"Test string"
|
|
115
123
|
],
|
|
116
124
|
},
|
|
125
|
+
premiumFeatures: {
|
|
126
|
+
computeStyleInfo: true,
|
|
127
|
+
enableMathOcr: true,
|
|
128
|
+
enableSelectionMarkDetection: true,
|
|
129
|
+
},
|
|
117
130
|
},
|
|
118
131
|
schemaOverride: {
|
|
119
132
|
description: "Test string",
|
|
@@ -1902,11 +1915,19 @@ gapi.load('client', async () => {
|
|
|
1902
1915
|
uri: "Test string",
|
|
1903
1916
|
},
|
|
1904
1917
|
processOptions: {
|
|
1918
|
+
fromEnd: 42,
|
|
1919
|
+
fromStart: 42,
|
|
1920
|
+
individualPageSelector: {
|
|
1921
|
+
pages: [
|
|
1922
|
+
42
|
|
1923
|
+
],
|
|
1924
|
+
},
|
|
1905
1925
|
ocrConfig: {
|
|
1906
1926
|
advancedOcrOptions: [
|
|
1907
1927
|
"Test string"
|
|
1908
1928
|
],
|
|
1909
1929
|
computeStyleInfo: true,
|
|
1930
|
+
disableCharacterBoxesDetection: true,
|
|
1910
1931
|
enableImageQualityScores: true,
|
|
1911
1932
|
enableNativePdfParsing: true,
|
|
1912
1933
|
enableSymbol: true,
|
|
@@ -1915,6 +1936,11 @@ gapi.load('client', async () => {
|
|
|
1915
1936
|
"Test string"
|
|
1916
1937
|
],
|
|
1917
1938
|
},
|
|
1939
|
+
premiumFeatures: {
|
|
1940
|
+
computeStyleInfo: true,
|
|
1941
|
+
enableMathOcr: true,
|
|
1942
|
+
enableSelectionMarkDetection: true,
|
|
1943
|
+
},
|
|
1918
1944
|
},
|
|
1919
1945
|
schemaOverride: {
|
|
1920
1946
|
description: "Test string",
|
|
@@ -2064,6 +2090,16 @@ gapi.load('client', async () => {
|
|
|
2064
2090
|
}
|
|
2065
2091
|
],
|
|
2066
2092
|
});
|
|
2093
|
+
/** Returns a list of documents present in the dataset. */
|
|
2094
|
+
await gapi.client.documentai.projects.locations.processors.dataset.listDocuments({
|
|
2095
|
+
dataset: "Test string",
|
|
2096
|
+
}, {
|
|
2097
|
+
filter: "Test string",
|
|
2098
|
+
pageSize: 42,
|
|
2099
|
+
pageToken: "Test string",
|
|
2100
|
+
returnTotalSize: true,
|
|
2101
|
+
skip: 42,
|
|
2102
|
+
});
|
|
2067
2103
|
/** Updates a `DatasetSchema`. */
|
|
2068
2104
|
await gapi.client.documentai.projects.locations.processors.dataset.updateDatasetSchema({
|
|
2069
2105
|
name: "Test string",
|
|
@@ -3889,11 +3925,19 @@ gapi.load('client', async () => {
|
|
|
3889
3925
|
gcsDestination: "Test string",
|
|
3890
3926
|
},
|
|
3891
3927
|
processOptions: {
|
|
3928
|
+
fromEnd: 42,
|
|
3929
|
+
fromStart: 42,
|
|
3930
|
+
individualPageSelector: {
|
|
3931
|
+
pages: [
|
|
3932
|
+
42
|
|
3933
|
+
],
|
|
3934
|
+
},
|
|
3892
3935
|
ocrConfig: {
|
|
3893
3936
|
advancedOcrOptions: [
|
|
3894
3937
|
"Test string"
|
|
3895
3938
|
],
|
|
3896
3939
|
computeStyleInfo: true,
|
|
3940
|
+
disableCharacterBoxesDetection: true,
|
|
3897
3941
|
enableImageQualityScores: true,
|
|
3898
3942
|
enableNativePdfParsing: true,
|
|
3899
3943
|
enableSymbol: true,
|
|
@@ -3902,6 +3946,11 @@ gapi.load('client', async () => {
|
|
|
3902
3946
|
"Test string"
|
|
3903
3947
|
],
|
|
3904
3948
|
},
|
|
3949
|
+
premiumFeatures: {
|
|
3950
|
+
computeStyleInfo: true,
|
|
3951
|
+
enableMathOcr: true,
|
|
3952
|
+
enableSelectionMarkDetection: true,
|
|
3953
|
+
},
|
|
3905
3954
|
},
|
|
3906
3955
|
schemaOverride: {
|
|
3907
3956
|
description: "Test string",
|
|
@@ -5694,11 +5743,19 @@ gapi.load('client', async () => {
|
|
|
5694
5743
|
uri: "Test string",
|
|
5695
5744
|
},
|
|
5696
5745
|
processOptions: {
|
|
5746
|
+
fromEnd: 42,
|
|
5747
|
+
fromStart: 42,
|
|
5748
|
+
individualPageSelector: {
|
|
5749
|
+
pages: [
|
|
5750
|
+
42
|
|
5751
|
+
],
|
|
5752
|
+
},
|
|
5697
5753
|
ocrConfig: {
|
|
5698
5754
|
advancedOcrOptions: [
|
|
5699
5755
|
"Test string"
|
|
5700
5756
|
],
|
|
5701
5757
|
computeStyleInfo: true,
|
|
5758
|
+
disableCharacterBoxesDetection: true,
|
|
5702
5759
|
enableImageQualityScores: true,
|
|
5703
5760
|
enableNativePdfParsing: true,
|
|
5704
5761
|
enableSymbol: true,
|
|
@@ -5707,6 +5764,11 @@ gapi.load('client', async () => {
|
|
|
5707
5764
|
"Test string"
|
|
5708
5765
|
],
|
|
5709
5766
|
},
|
|
5767
|
+
premiumFeatures: {
|
|
5768
|
+
computeStyleInfo: true,
|
|
5769
|
+
enableMathOcr: true,
|
|
5770
|
+
enableSelectionMarkDetection: true,
|
|
5771
|
+
},
|
|
5710
5772
|
},
|
|
5711
5773
|
schemaOverride: {
|
|
5712
5774
|
description: "Test string",
|