@maxim_mazurok/gapi.client.documentai-v1beta3 0.0.20230302 → 0.0.20230320
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 +87 -7
- package/package.json +1 -1
- package/tests.ts +36 -7
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: 20230320
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -2085,6 +2085,18 @@ declare namespace gapi.client {
|
|
|
2085
2085
|
/** A message providing more details about the human review state. */
|
|
2086
2086
|
stateMessage?: string;
|
|
2087
2087
|
}
|
|
2088
|
+
interface GoogleCloudDocumentaiV1beta3ImportProcessorVersionMetadata {
|
|
2089
|
+
/** The basic metadata for the long running operation. */
|
|
2090
|
+
commonMetadata?: GoogleCloudDocumentaiV1beta3CommonOperationMetadata;
|
|
2091
|
+
}
|
|
2092
|
+
interface GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest {
|
|
2093
|
+
/** Required. The source processor version to import from. */
|
|
2094
|
+
processorVersionSource?: string;
|
|
2095
|
+
}
|
|
2096
|
+
interface GoogleCloudDocumentaiV1beta3ImportProcessorVersionResponse {
|
|
2097
|
+
/** The destination processor version name. */
|
|
2098
|
+
processorVersion?: string;
|
|
2099
|
+
}
|
|
2088
2100
|
interface GoogleCloudDocumentaiV1beta3ListEvaluationsResponse {
|
|
2089
2101
|
/** The evaluations requested. */
|
|
2090
2102
|
evaluations?: GoogleCloudDocumentaiV1beta3Evaluation[];
|
|
@@ -2118,8 +2130,25 @@ declare namespace gapi.client {
|
|
|
2118
2130
|
interface GoogleCloudDocumentaiV1beta3OcrConfig {
|
|
2119
2131
|
/** A list of advanced OCR options to further fine-tune OCR behavior. */
|
|
2120
2132
|
advancedOcrOptions?: string[];
|
|
2133
|
+
/**
|
|
2134
|
+
* 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
|
|
2135
|
+
* regular OCR to the process call.
|
|
2136
|
+
*/
|
|
2137
|
+
enableImageQualityScores?: boolean;
|
|
2121
2138
|
/** Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs. */
|
|
2122
2139
|
enableNativePdfParsing?: boolean;
|
|
2140
|
+
/** Includes symbol level OCR information if set to true. */
|
|
2141
|
+
enableSymbol?: boolean;
|
|
2142
|
+
/** Hints for the OCR model. */
|
|
2143
|
+
hints?: GoogleCloudDocumentaiV1beta3OcrConfigHints;
|
|
2144
|
+
}
|
|
2145
|
+
interface GoogleCloudDocumentaiV1beta3OcrConfigHints {
|
|
2146
|
+
/**
|
|
2147
|
+
* List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the
|
|
2148
|
+
* Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a
|
|
2149
|
+
* significant hindrance if the hint is wrong).
|
|
2150
|
+
*/
|
|
2151
|
+
languageHints?: string[];
|
|
2123
2152
|
}
|
|
2124
2153
|
interface GoogleCloudDocumentaiV1beta3ProcessOptions {
|
|
2125
2154
|
/** Only applicable to "Document OCR Processor". Returns error if set on other processor types. */
|
|
@@ -2671,12 +2700,7 @@ declare namespace gapi.client {
|
|
|
2671
2700
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2672
2701
|
uploadType?: string;
|
|
2673
2702
|
}): Request<GoogleLongrunningOperation>;
|
|
2674
|
-
/**
|
|
2675
|
-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services
|
|
2676
|
-
* to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as
|
|
2677
|
-
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
2678
|
-
* ensure the name binding is the parent resource, without the operations collection id.
|
|
2679
|
-
*/
|
|
2703
|
+
/** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
|
|
2680
2704
|
list(request?: {
|
|
2681
2705
|
/** V1 error format. */
|
|
2682
2706
|
"$.xgafv"?: string;
|
|
@@ -3063,6 +3087,62 @@ declare namespace gapi.client {
|
|
|
3063
3087
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3064
3088
|
uploadType?: string;
|
|
3065
3089
|
}): Request<GoogleCloudDocumentaiV1beta3ProcessorVersion>;
|
|
3090
|
+
/** Imports a processor version from source processor version. */
|
|
3091
|
+
importProcessorVersion(request: {
|
|
3092
|
+
/** V1 error format. */
|
|
3093
|
+
"$.xgafv"?: string;
|
|
3094
|
+
/** OAuth access token. */
|
|
3095
|
+
access_token?: string;
|
|
3096
|
+
/** Data format for response. */
|
|
3097
|
+
alt?: string;
|
|
3098
|
+
/** JSONP */
|
|
3099
|
+
callback?: string;
|
|
3100
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3101
|
+
fields?: string;
|
|
3102
|
+
/** 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. */
|
|
3103
|
+
key?: string;
|
|
3104
|
+
/** OAuth 2.0 token for the current user. */
|
|
3105
|
+
oauth_token?: string;
|
|
3106
|
+
/** Required. The destination processor name to create the processor version in. Format: `projects/{project}/locations/{location}/processors/{processor}` */
|
|
3107
|
+
parent: string;
|
|
3108
|
+
/** Returns response with indentations and line breaks. */
|
|
3109
|
+
prettyPrint?: boolean;
|
|
3110
|
+
/** 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. */
|
|
3111
|
+
quotaUser?: string;
|
|
3112
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3113
|
+
upload_protocol?: string;
|
|
3114
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3115
|
+
uploadType?: string;
|
|
3116
|
+
/** Request body */
|
|
3117
|
+
resource: GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest;
|
|
3118
|
+
}): Request<GoogleLongrunningOperation>;
|
|
3119
|
+
importProcessorVersion(request: {
|
|
3120
|
+
/** V1 error format. */
|
|
3121
|
+
"$.xgafv"?: string;
|
|
3122
|
+
/** OAuth access token. */
|
|
3123
|
+
access_token?: string;
|
|
3124
|
+
/** Data format for response. */
|
|
3125
|
+
alt?: string;
|
|
3126
|
+
/** JSONP */
|
|
3127
|
+
callback?: string;
|
|
3128
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3129
|
+
fields?: string;
|
|
3130
|
+
/** 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. */
|
|
3131
|
+
key?: string;
|
|
3132
|
+
/** OAuth 2.0 token for the current user. */
|
|
3133
|
+
oauth_token?: string;
|
|
3134
|
+
/** Required. The destination processor name to create the processor version in. Format: `projects/{project}/locations/{location}/processors/{processor}` */
|
|
3135
|
+
parent: string;
|
|
3136
|
+
/** Returns response with indentations and line breaks. */
|
|
3137
|
+
prettyPrint?: boolean;
|
|
3138
|
+
/** 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. */
|
|
3139
|
+
quotaUser?: string;
|
|
3140
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3141
|
+
upload_protocol?: string;
|
|
3142
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3143
|
+
uploadType?: string;
|
|
3144
|
+
},
|
|
3145
|
+
body: GoogleCloudDocumentaiV1beta3ImportProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
3066
3146
|
/** Lists all versions of a processor. */
|
|
3067
3147
|
list(request?: {
|
|
3068
3148
|
/** 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: 20230320
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -57,12 +57,7 @@ gapi.load('client', async () => {
|
|
|
57
57
|
await gapi.client.documentai.projects.locations.operations.get({
|
|
58
58
|
name: "Test string",
|
|
59
59
|
});
|
|
60
|
-
/**
|
|
61
|
-
* Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to
|
|
62
|
-
* override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as
|
|
63
|
-
* `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must
|
|
64
|
-
* ensure the name binding is the parent resource, without the operations collection id.
|
|
65
|
-
*/
|
|
60
|
+
/** Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. */
|
|
66
61
|
await gapi.client.documentai.projects.locations.operations.list({
|
|
67
62
|
filter: "Test string",
|
|
68
63
|
name: "Test string",
|
|
@@ -110,7 +105,14 @@ gapi.load('client', async () => {
|
|
|
110
105
|
advancedOcrOptions: [
|
|
111
106
|
"Test string"
|
|
112
107
|
],
|
|
108
|
+
enableImageQualityScores: true,
|
|
113
109
|
enableNativePdfParsing: true,
|
|
110
|
+
enableSymbol: true,
|
|
111
|
+
hints: {
|
|
112
|
+
languageHints: [
|
|
113
|
+
"Test string"
|
|
114
|
+
],
|
|
115
|
+
},
|
|
114
116
|
},
|
|
115
117
|
},
|
|
116
118
|
skipHumanReview: true,
|
|
@@ -1796,7 +1798,14 @@ gapi.load('client', async () => {
|
|
|
1796
1798
|
advancedOcrOptions: [
|
|
1797
1799
|
"Test string"
|
|
1798
1800
|
],
|
|
1801
|
+
enableImageQualityScores: true,
|
|
1799
1802
|
enableNativePdfParsing: true,
|
|
1803
|
+
enableSymbol: true,
|
|
1804
|
+
hints: {
|
|
1805
|
+
languageHints: [
|
|
1806
|
+
"Test string"
|
|
1807
|
+
],
|
|
1808
|
+
},
|
|
1800
1809
|
},
|
|
1801
1810
|
},
|
|
1802
1811
|
rawDocument: {
|
|
@@ -3524,7 +3533,14 @@ gapi.load('client', async () => {
|
|
|
3524
3533
|
advancedOcrOptions: [
|
|
3525
3534
|
"Test string"
|
|
3526
3535
|
],
|
|
3536
|
+
enableImageQualityScores: true,
|
|
3527
3537
|
enableNativePdfParsing: true,
|
|
3538
|
+
enableSymbol: true,
|
|
3539
|
+
hints: {
|
|
3540
|
+
languageHints: [
|
|
3541
|
+
"Test string"
|
|
3542
|
+
],
|
|
3543
|
+
},
|
|
3528
3544
|
},
|
|
3529
3545
|
},
|
|
3530
3546
|
skipHumanReview: true,
|
|
@@ -3560,6 +3576,12 @@ gapi.load('client', async () => {
|
|
|
3560
3576
|
await gapi.client.documentai.projects.locations.processors.processorVersions.get({
|
|
3561
3577
|
name: "Test string",
|
|
3562
3578
|
});
|
|
3579
|
+
/** Imports a processor version from source processor version. */
|
|
3580
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.importProcessorVersion({
|
|
3581
|
+
parent: "Test string",
|
|
3582
|
+
}, {
|
|
3583
|
+
processorVersionSource: "Test string",
|
|
3584
|
+
});
|
|
3563
3585
|
/** Lists all versions of a processor. */
|
|
3564
3586
|
await gapi.client.documentai.projects.locations.processors.processorVersions.list({
|
|
3565
3587
|
pageSize: 42,
|
|
@@ -5210,7 +5232,14 @@ gapi.load('client', async () => {
|
|
|
5210
5232
|
advancedOcrOptions: [
|
|
5211
5233
|
"Test string"
|
|
5212
5234
|
],
|
|
5235
|
+
enableImageQualityScores: true,
|
|
5213
5236
|
enableNativePdfParsing: true,
|
|
5237
|
+
enableSymbol: true,
|
|
5238
|
+
hints: {
|
|
5239
|
+
languageHints: [
|
|
5240
|
+
"Test string"
|
|
5241
|
+
],
|
|
5242
|
+
},
|
|
5214
5243
|
},
|
|
5215
5244
|
},
|
|
5216
5245
|
rawDocument: {
|