@maxim_mazurok/gapi.client.documentai-v1 0.0.20230106 → 0.0.20230113
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 +306 -1
- package/package.json +1 -1
- package/tests.ts +168 -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:
|
|
12
|
+
// Revision: 20230113
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -109,6 +109,8 @@ declare namespace gapi.client {
|
|
|
109
109
|
interface GoogleCloudDocumentaiUiv1beta3DocumentId {
|
|
110
110
|
gcsManagedDocId?: GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId;
|
|
111
111
|
/** Points to a specific revision of the document if set. */
|
|
112
|
+
revisionRef?: GoogleCloudDocumentaiUiv1beta3RevisionRef;
|
|
113
|
+
/** Points to a specific revision of the document if set. */
|
|
112
114
|
revisionReference?: GoogleCloudDocumentaiUiv1beta3RevisionReference;
|
|
113
115
|
}
|
|
114
116
|
interface GoogleCloudDocumentaiUiv1beta3DocumentIdGCSManagedDocumentId {
|
|
@@ -217,6 +219,17 @@ declare namespace gapi.client {
|
|
|
217
219
|
// tslint:disable-next-line:no-empty-interface
|
|
218
220
|
interface GoogleCloudDocumentaiUiv1beta3ResyncDatasetResponse {
|
|
219
221
|
}
|
|
222
|
+
interface GoogleCloudDocumentaiUiv1beta3RevisionRef {
|
|
223
|
+
/**
|
|
224
|
+
* Reads the revision generated by the processor version. The format takes the full resource name of processor version.
|
|
225
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
|
226
|
+
*/
|
|
227
|
+
latestProcessorVersion?: string;
|
|
228
|
+
/** Reads the revision by the predefined case. */
|
|
229
|
+
revisionCase?: string;
|
|
230
|
+
/** Reads the revision given by the id. */
|
|
231
|
+
revisionId?: string;
|
|
232
|
+
}
|
|
220
233
|
interface GoogleCloudDocumentaiUiv1beta3RevisionReference {
|
|
221
234
|
/** Reads the revision generated by the processor version. */
|
|
222
235
|
latestProcessorVersion?: string;
|
|
@@ -2037,6 +2050,92 @@ declare namespace gapi.client {
|
|
|
2037
2050
|
// tslint:disable-next-line:no-empty-interface
|
|
2038
2051
|
interface GoogleCloudDocumentaiV1EnableProcessorResponse {
|
|
2039
2052
|
}
|
|
2053
|
+
interface GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest {
|
|
2054
|
+
/** Optional. The documents used in the evaluation. If unspecified, use the processor's dataset as evaluation input. */
|
|
2055
|
+
evaluationDocuments?: GoogleCloudDocumentaiV1BatchDocumentsInputConfig;
|
|
2056
|
+
}
|
|
2057
|
+
interface GoogleCloudDocumentaiV1Evaluation {
|
|
2058
|
+
/** Metrics for all the entities in aggregate. */
|
|
2059
|
+
allEntitiesMetrics?: GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics;
|
|
2060
|
+
/** The time that the evaluation was created. */
|
|
2061
|
+
createTime?: string;
|
|
2062
|
+
/** Counters for the documents used in the evaluation. */
|
|
2063
|
+
documentCounters?: GoogleCloudDocumentaiV1EvaluationCounters;
|
|
2064
|
+
/** Metrics across confidence levels, for different entities. */
|
|
2065
|
+
entityMetrics?: { [P in string]: GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics };
|
|
2066
|
+
/** The KMS key name used for encryption. */
|
|
2067
|
+
kmsKeyName?: string;
|
|
2068
|
+
/** The KMS key version with which data is encrypted. */
|
|
2069
|
+
kmsKeyVersionName?: string;
|
|
2070
|
+
/** The resource name of the evaluation. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` */
|
|
2071
|
+
name?: string;
|
|
2072
|
+
}
|
|
2073
|
+
interface GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics {
|
|
2074
|
+
/** The confidence level. */
|
|
2075
|
+
confidenceLevel?: number;
|
|
2076
|
+
/** The metrics at the specific confidence level. */
|
|
2077
|
+
metrics?: GoogleCloudDocumentaiV1EvaluationMetrics;
|
|
2078
|
+
}
|
|
2079
|
+
interface GoogleCloudDocumentaiV1EvaluationCounters {
|
|
2080
|
+
/** How many documents were used in the evaluation. */
|
|
2081
|
+
evaluatedDocumentsCount?: number;
|
|
2082
|
+
/** How many documents were not included in the evaluation as Document AI failed to process them. */
|
|
2083
|
+
failedDocumentsCount?: number;
|
|
2084
|
+
/** How many documents were sent for evaluation. */
|
|
2085
|
+
inputDocumentsCount?: number;
|
|
2086
|
+
/** How many documents were not included in the evaluation as they didn't pass validation. */
|
|
2087
|
+
invalidDocumentsCount?: number;
|
|
2088
|
+
}
|
|
2089
|
+
interface GoogleCloudDocumentaiV1EvaluationMetrics {
|
|
2090
|
+
/** The calculated f1 score. */
|
|
2091
|
+
f1Score?: number;
|
|
2092
|
+
/** The amount of false negatives. */
|
|
2093
|
+
falseNegativesCount?: number;
|
|
2094
|
+
/** The amount of false positives. */
|
|
2095
|
+
falsePositivesCount?: number;
|
|
2096
|
+
/** The amount of documents with a ground truth occurrence. */
|
|
2097
|
+
groundTruthDocumentCount?: number;
|
|
2098
|
+
/** The amount of occurrences in ground truth documents. */
|
|
2099
|
+
groundTruthOccurrencesCount?: number;
|
|
2100
|
+
/** The calculated precision. */
|
|
2101
|
+
precision?: number;
|
|
2102
|
+
/** The amount of documents with a predicted occurrence. */
|
|
2103
|
+
predictedDocumentCount?: number;
|
|
2104
|
+
/** The amount of occurrences in predicted documents. */
|
|
2105
|
+
predictedOccurrencesCount?: number;
|
|
2106
|
+
/** The calculated recall. */
|
|
2107
|
+
recall?: number;
|
|
2108
|
+
/** The amount of documents that had an occurrence of this label. */
|
|
2109
|
+
totalDocumentsCount?: number;
|
|
2110
|
+
/** The amount of true positives. */
|
|
2111
|
+
truePositivesCount?: number;
|
|
2112
|
+
}
|
|
2113
|
+
interface GoogleCloudDocumentaiV1EvaluationMultiConfidenceMetrics {
|
|
2114
|
+
/** The calculated area under the precision recall curve (AUPRC), computed by integrating over all confidence thresholds. */
|
|
2115
|
+
auprc?: number;
|
|
2116
|
+
/** The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching only. */
|
|
2117
|
+
auprcExact?: number;
|
|
2118
|
+
/** Metrics across confidence levels with fuzzy matching enabled. */
|
|
2119
|
+
confidenceLevelMetrics?: GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics[];
|
|
2120
|
+
/** Metrics across confidence levels with only exact matching. */
|
|
2121
|
+
confidenceLevelMetricsExact?: GoogleCloudDocumentaiV1EvaluationConfidenceLevelMetrics[];
|
|
2122
|
+
/** The Estimated Calibration Error (ECE) of the confidence of the predicted entities. */
|
|
2123
|
+
estimatedCalibrationError?: number;
|
|
2124
|
+
/** The ECE for the predicted entities with fuzzy matching disabled, i.e., exact matching only. */
|
|
2125
|
+
estimatedCalibrationErrorExact?: number;
|
|
2126
|
+
/** The metrics type for the label. */
|
|
2127
|
+
metricsType?: string;
|
|
2128
|
+
}
|
|
2129
|
+
interface GoogleCloudDocumentaiV1EvaluationReference {
|
|
2130
|
+
/** An aggregate of the statistics for the evaluation with fuzzy matching on. */
|
|
2131
|
+
aggregateMetrics?: GoogleCloudDocumentaiV1EvaluationMetrics;
|
|
2132
|
+
/** An aggregate of the statistics for the evaluation with fuzzy matching off. */
|
|
2133
|
+
aggregateMetricsExact?: GoogleCloudDocumentaiV1EvaluationMetrics;
|
|
2134
|
+
/** The resource name of the evaluation. */
|
|
2135
|
+
evaluation?: string;
|
|
2136
|
+
/** The resource name of the Long Running Operation for the evaluation. */
|
|
2137
|
+
operation?: string;
|
|
2138
|
+
}
|
|
2040
2139
|
interface GoogleCloudDocumentaiV1FetchProcessorTypesResponse {
|
|
2041
2140
|
/** The list of processor types. */
|
|
2042
2141
|
processorTypes?: GoogleCloudDocumentaiV1ProcessorType[];
|
|
@@ -2066,6 +2165,12 @@ declare namespace gapi.client {
|
|
|
2066
2165
|
/** A message providing more details about the human review state. */
|
|
2067
2166
|
stateMessage?: string;
|
|
2068
2167
|
}
|
|
2168
|
+
interface GoogleCloudDocumentaiV1ListEvaluationsResponse {
|
|
2169
|
+
/** The evaluations requested. */
|
|
2170
|
+
evaluations?: GoogleCloudDocumentaiV1Evaluation[];
|
|
2171
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
2172
|
+
nextPageToken?: string;
|
|
2173
|
+
}
|
|
2069
2174
|
interface GoogleCloudDocumentaiV1ListProcessorsResponse {
|
|
2070
2175
|
/** Points to the next processor, otherwise empty. */
|
|
2071
2176
|
nextPageToken?: string;
|
|
@@ -2143,6 +2248,8 @@ declare namespace gapi.client {
|
|
|
2143
2248
|
kmsKeyName?: string;
|
|
2144
2249
|
/** The KMS key version with which data is encrypted. */
|
|
2145
2250
|
kmsKeyVersionName?: string;
|
|
2251
|
+
/** The most recently invoked evaluation for the processor version. */
|
|
2252
|
+
latestEvaluation?: GoogleCloudDocumentaiV1EvaluationReference;
|
|
2146
2253
|
/** The resource name of the processor version. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}` */
|
|
2147
2254
|
name?: string;
|
|
2148
2255
|
/** The state of the processor version. */
|
|
@@ -2214,6 +2321,25 @@ declare namespace gapi.client {
|
|
|
2214
2321
|
// tslint:disable-next-line:no-empty-interface
|
|
2215
2322
|
interface GoogleCloudDocumentaiV1SetDefaultProcessorVersionResponse {
|
|
2216
2323
|
}
|
|
2324
|
+
interface GoogleCloudDocumentaiV1TrainProcessorVersionRequest {
|
|
2325
|
+
/**
|
|
2326
|
+
* Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format:
|
|
2327
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
|
|
2328
|
+
*/
|
|
2329
|
+
baseProcessorVersion?: string;
|
|
2330
|
+
/** Optional. The schema the processor version will be trained with. */
|
|
2331
|
+
documentSchema?: GoogleCloudDocumentaiV1DocumentSchema;
|
|
2332
|
+
/** Optional. The input data used to train the `ProcessorVersion`. */
|
|
2333
|
+
inputData?: GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData;
|
|
2334
|
+
/** Required. The processor version to be created. */
|
|
2335
|
+
processorVersion?: GoogleCloudDocumentaiV1ProcessorVersion;
|
|
2336
|
+
}
|
|
2337
|
+
interface GoogleCloudDocumentaiV1TrainProcessorVersionRequestInputData {
|
|
2338
|
+
/** The documents used for testing the trained version. */
|
|
2339
|
+
testDocuments?: GoogleCloudDocumentaiV1BatchDocumentsInputConfig;
|
|
2340
|
+
/** The documents used for training the new version. */
|
|
2341
|
+
trainingDocuments?: GoogleCloudDocumentaiV1BatchDocumentsInputConfig;
|
|
2342
|
+
}
|
|
2217
2343
|
interface GoogleCloudDocumentaiV1UndeployProcessorVersionMetadata {
|
|
2218
2344
|
/** The basic metadata of the long running operation. */
|
|
2219
2345
|
commonMetadata?: GoogleCloudDocumentaiV1CommonOperationMetadata;
|
|
@@ -2593,6 +2719,72 @@ declare namespace gapi.client {
|
|
|
2593
2719
|
},
|
|
2594
2720
|
body: GoogleCloudDocumentaiV1ReviewDocumentRequest): Request<GoogleLongrunningOperation>;
|
|
2595
2721
|
}
|
|
2722
|
+
interface EvaluationsResource {
|
|
2723
|
+
/** Retrieves a specific evaluation. */
|
|
2724
|
+
get(request?: {
|
|
2725
|
+
/** V1 error format. */
|
|
2726
|
+
"$.xgafv"?: string;
|
|
2727
|
+
/** OAuth access token. */
|
|
2728
|
+
access_token?: string;
|
|
2729
|
+
/** Data format for response. */
|
|
2730
|
+
alt?: string;
|
|
2731
|
+
/** JSONP */
|
|
2732
|
+
callback?: string;
|
|
2733
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2734
|
+
fields?: string;
|
|
2735
|
+
/** 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. */
|
|
2736
|
+
key?: string;
|
|
2737
|
+
/**
|
|
2738
|
+
* Required. The resource name of the Evaluation to get.
|
|
2739
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
|
|
2740
|
+
*/
|
|
2741
|
+
name: string;
|
|
2742
|
+
/** OAuth 2.0 token for the current user. */
|
|
2743
|
+
oauth_token?: string;
|
|
2744
|
+
/** Returns response with indentations and line breaks. */
|
|
2745
|
+
prettyPrint?: boolean;
|
|
2746
|
+
/** 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. */
|
|
2747
|
+
quotaUser?: string;
|
|
2748
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2749
|
+
upload_protocol?: string;
|
|
2750
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2751
|
+
uploadType?: string;
|
|
2752
|
+
}): Request<GoogleCloudDocumentaiV1Evaluation>;
|
|
2753
|
+
/** Retrieves a set of evaluations for a given processor version. */
|
|
2754
|
+
list(request?: {
|
|
2755
|
+
/** V1 error format. */
|
|
2756
|
+
"$.xgafv"?: string;
|
|
2757
|
+
/** OAuth access token. */
|
|
2758
|
+
access_token?: string;
|
|
2759
|
+
/** Data format for response. */
|
|
2760
|
+
alt?: string;
|
|
2761
|
+
/** JSONP */
|
|
2762
|
+
callback?: string;
|
|
2763
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2764
|
+
fields?: string;
|
|
2765
|
+
/** 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. */
|
|
2766
|
+
key?: string;
|
|
2767
|
+
/** OAuth 2.0 token for the current user. */
|
|
2768
|
+
oauth_token?: string;
|
|
2769
|
+
/** The standard list page size. If unspecified, at most 5 evaluations will be returned. The maximum value is 100; values above 100 will be coerced to 100. */
|
|
2770
|
+
pageSize?: number;
|
|
2771
|
+
/** A page token, received from a previous `ListEvaluations` call. Provide this to retrieve the subsequent page. */
|
|
2772
|
+
pageToken?: string;
|
|
2773
|
+
/**
|
|
2774
|
+
* Required. The resource name of the ProcessorVersion to list evaluations for.
|
|
2775
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
|
2776
|
+
*/
|
|
2777
|
+
parent: string;
|
|
2778
|
+
/** Returns response with indentations and line breaks. */
|
|
2779
|
+
prettyPrint?: boolean;
|
|
2780
|
+
/** 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. */
|
|
2781
|
+
quotaUser?: string;
|
|
2782
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2783
|
+
upload_protocol?: string;
|
|
2784
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2785
|
+
uploadType?: string;
|
|
2786
|
+
}): Request<GoogleCloudDocumentaiV1ListEvaluationsResponse>;
|
|
2787
|
+
}
|
|
2596
2788
|
interface ProcessorVersionsResource {
|
|
2597
2789
|
/** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. */
|
|
2598
2790
|
batchProcess(request: {
|
|
@@ -2739,6 +2931,62 @@ declare namespace gapi.client {
|
|
|
2739
2931
|
uploadType?: string;
|
|
2740
2932
|
},
|
|
2741
2933
|
body: GoogleCloudDocumentaiV1DeployProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
2934
|
+
/** Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. */
|
|
2935
|
+
evaluateProcessorVersion(request: {
|
|
2936
|
+
/** V1 error format. */
|
|
2937
|
+
"$.xgafv"?: string;
|
|
2938
|
+
/** OAuth access token. */
|
|
2939
|
+
access_token?: string;
|
|
2940
|
+
/** Data format for response. */
|
|
2941
|
+
alt?: string;
|
|
2942
|
+
/** JSONP */
|
|
2943
|
+
callback?: string;
|
|
2944
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2945
|
+
fields?: string;
|
|
2946
|
+
/** 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. */
|
|
2947
|
+
key?: string;
|
|
2948
|
+
/** OAuth 2.0 token for the current user. */
|
|
2949
|
+
oauth_token?: string;
|
|
2950
|
+
/** Returns response with indentations and line breaks. */
|
|
2951
|
+
prettyPrint?: boolean;
|
|
2952
|
+
/** Required. The resource name of the ProcessorVersion to evaluate. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */
|
|
2953
|
+
processorVersion: string;
|
|
2954
|
+
/** 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. */
|
|
2955
|
+
quotaUser?: string;
|
|
2956
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2957
|
+
upload_protocol?: string;
|
|
2958
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2959
|
+
uploadType?: string;
|
|
2960
|
+
/** Request body */
|
|
2961
|
+
resource: GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest;
|
|
2962
|
+
}): Request<GoogleLongrunningOperation>;
|
|
2963
|
+
evaluateProcessorVersion(request: {
|
|
2964
|
+
/** V1 error format. */
|
|
2965
|
+
"$.xgafv"?: string;
|
|
2966
|
+
/** OAuth access token. */
|
|
2967
|
+
access_token?: string;
|
|
2968
|
+
/** Data format for response. */
|
|
2969
|
+
alt?: string;
|
|
2970
|
+
/** JSONP */
|
|
2971
|
+
callback?: string;
|
|
2972
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2973
|
+
fields?: string;
|
|
2974
|
+
/** 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. */
|
|
2975
|
+
key?: string;
|
|
2976
|
+
/** OAuth 2.0 token for the current user. */
|
|
2977
|
+
oauth_token?: string;
|
|
2978
|
+
/** Returns response with indentations and line breaks. */
|
|
2979
|
+
prettyPrint?: boolean;
|
|
2980
|
+
/** Required. The resource name of the ProcessorVersion to evaluate. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */
|
|
2981
|
+
processorVersion: string;
|
|
2982
|
+
/** 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. */
|
|
2983
|
+
quotaUser?: string;
|
|
2984
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2985
|
+
upload_protocol?: string;
|
|
2986
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2987
|
+
uploadType?: string;
|
|
2988
|
+
},
|
|
2989
|
+
body: GoogleCloudDocumentaiV1EvaluateProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
2742
2990
|
/** Gets a processor version detail. */
|
|
2743
2991
|
get(request?: {
|
|
2744
2992
|
/** V1 error format. */
|
|
@@ -2862,6 +3110,62 @@ declare namespace gapi.client {
|
|
|
2862
3110
|
uploadType?: string;
|
|
2863
3111
|
},
|
|
2864
3112
|
body: GoogleCloudDocumentaiV1ProcessRequest): Request<GoogleCloudDocumentaiV1ProcessResponse>;
|
|
3113
|
+
/** Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata. */
|
|
3114
|
+
train(request: {
|
|
3115
|
+
/** V1 error format. */
|
|
3116
|
+
"$.xgafv"?: string;
|
|
3117
|
+
/** OAuth access token. */
|
|
3118
|
+
access_token?: string;
|
|
3119
|
+
/** Data format for response. */
|
|
3120
|
+
alt?: string;
|
|
3121
|
+
/** JSONP */
|
|
3122
|
+
callback?: string;
|
|
3123
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3124
|
+
fields?: string;
|
|
3125
|
+
/** 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. */
|
|
3126
|
+
key?: string;
|
|
3127
|
+
/** OAuth 2.0 token for the current user. */
|
|
3128
|
+
oauth_token?: string;
|
|
3129
|
+
/** Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. */
|
|
3130
|
+
parent: string;
|
|
3131
|
+
/** Returns response with indentations and line breaks. */
|
|
3132
|
+
prettyPrint?: boolean;
|
|
3133
|
+
/** 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. */
|
|
3134
|
+
quotaUser?: string;
|
|
3135
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3136
|
+
upload_protocol?: string;
|
|
3137
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3138
|
+
uploadType?: string;
|
|
3139
|
+
/** Request body */
|
|
3140
|
+
resource: GoogleCloudDocumentaiV1TrainProcessorVersionRequest;
|
|
3141
|
+
}): Request<GoogleLongrunningOperation>;
|
|
3142
|
+
train(request: {
|
|
3143
|
+
/** V1 error format. */
|
|
3144
|
+
"$.xgafv"?: string;
|
|
3145
|
+
/** OAuth access token. */
|
|
3146
|
+
access_token?: string;
|
|
3147
|
+
/** Data format for response. */
|
|
3148
|
+
alt?: string;
|
|
3149
|
+
/** JSONP */
|
|
3150
|
+
callback?: string;
|
|
3151
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3152
|
+
fields?: string;
|
|
3153
|
+
/** 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. */
|
|
3154
|
+
key?: string;
|
|
3155
|
+
/** OAuth 2.0 token for the current user. */
|
|
3156
|
+
oauth_token?: string;
|
|
3157
|
+
/** Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. */
|
|
3158
|
+
parent: string;
|
|
3159
|
+
/** Returns response with indentations and line breaks. */
|
|
3160
|
+
prettyPrint?: boolean;
|
|
3161
|
+
/** 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. */
|
|
3162
|
+
quotaUser?: string;
|
|
3163
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3164
|
+
upload_protocol?: string;
|
|
3165
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3166
|
+
uploadType?: string;
|
|
3167
|
+
},
|
|
3168
|
+
body: GoogleCloudDocumentaiV1TrainProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
2865
3169
|
/** Undeploys the processor version. */
|
|
2866
3170
|
undeploy(request: {
|
|
2867
3171
|
/** V1 error format. */
|
|
@@ -2918,6 +3222,7 @@ declare namespace gapi.client {
|
|
|
2918
3222
|
uploadType?: string;
|
|
2919
3223
|
},
|
|
2920
3224
|
body: GoogleCloudDocumentaiV1UndeployProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
3225
|
+
evaluations: EvaluationsResource;
|
|
2921
3226
|
}
|
|
2922
3227
|
interface ProcessorsResource {
|
|
2923
3228
|
/** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] 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: 20230113
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -1869,6 +1869,24 @@ gapi.load('client', async () => {
|
|
|
1869
1869
|
name: "Test string",
|
|
1870
1870
|
}, {
|
|
1871
1871
|
});
|
|
1872
|
+
/** Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. */
|
|
1873
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.evaluateProcessorVersion({
|
|
1874
|
+
processorVersion: "Test string",
|
|
1875
|
+
}, {
|
|
1876
|
+
evaluationDocuments: {
|
|
1877
|
+
gcsDocuments: {
|
|
1878
|
+
documents: [
|
|
1879
|
+
{
|
|
1880
|
+
gcsUri: "Test string",
|
|
1881
|
+
mimeType: "Test string",
|
|
1882
|
+
}
|
|
1883
|
+
],
|
|
1884
|
+
},
|
|
1885
|
+
gcsPrefix: {
|
|
1886
|
+
gcsUriPrefix: "Test string",
|
|
1887
|
+
},
|
|
1888
|
+
},
|
|
1889
|
+
});
|
|
1872
1890
|
/** Gets a processor version detail. */
|
|
1873
1891
|
await gapi.client.documentai.projects.locations.processors.processorVersions.get({
|
|
1874
1892
|
name: "Test string",
|
|
@@ -2707,11 +2725,160 @@ gapi.load('client', async () => {
|
|
|
2707
2725
|
},
|
|
2708
2726
|
skipHumanReview: true,
|
|
2709
2727
|
});
|
|
2728
|
+
/** Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata. */
|
|
2729
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.train({
|
|
2730
|
+
parent: "Test string",
|
|
2731
|
+
}, {
|
|
2732
|
+
baseProcessorVersion: "Test string",
|
|
2733
|
+
documentSchema: {
|
|
2734
|
+
description: "Test string",
|
|
2735
|
+
displayName: "Test string",
|
|
2736
|
+
entityTypes: [
|
|
2737
|
+
{
|
|
2738
|
+
baseTypes: [
|
|
2739
|
+
"Test string"
|
|
2740
|
+
],
|
|
2741
|
+
displayName: "Test string",
|
|
2742
|
+
enumValues: {
|
|
2743
|
+
values: [
|
|
2744
|
+
"Test string"
|
|
2745
|
+
],
|
|
2746
|
+
},
|
|
2747
|
+
name: "Test string",
|
|
2748
|
+
properties: [
|
|
2749
|
+
{
|
|
2750
|
+
name: "Test string",
|
|
2751
|
+
occurrenceType: "Test string",
|
|
2752
|
+
valueType: "Test string",
|
|
2753
|
+
}
|
|
2754
|
+
],
|
|
2755
|
+
}
|
|
2756
|
+
],
|
|
2757
|
+
metadata: {
|
|
2758
|
+
documentAllowMultipleLabels: true,
|
|
2759
|
+
documentSplitter: true,
|
|
2760
|
+
prefixedNamingOnProperties: true,
|
|
2761
|
+
skipNamingValidation: true,
|
|
2762
|
+
},
|
|
2763
|
+
},
|
|
2764
|
+
inputData: {
|
|
2765
|
+
testDocuments: {
|
|
2766
|
+
gcsDocuments: {
|
|
2767
|
+
documents: [
|
|
2768
|
+
{
|
|
2769
|
+
gcsUri: "Test string",
|
|
2770
|
+
mimeType: "Test string",
|
|
2771
|
+
}
|
|
2772
|
+
],
|
|
2773
|
+
},
|
|
2774
|
+
gcsPrefix: {
|
|
2775
|
+
gcsUriPrefix: "Test string",
|
|
2776
|
+
},
|
|
2777
|
+
},
|
|
2778
|
+
trainingDocuments: {
|
|
2779
|
+
gcsDocuments: {
|
|
2780
|
+
documents: [
|
|
2781
|
+
{
|
|
2782
|
+
gcsUri: "Test string",
|
|
2783
|
+
mimeType: "Test string",
|
|
2784
|
+
}
|
|
2785
|
+
],
|
|
2786
|
+
},
|
|
2787
|
+
gcsPrefix: {
|
|
2788
|
+
gcsUriPrefix: "Test string",
|
|
2789
|
+
},
|
|
2790
|
+
},
|
|
2791
|
+
},
|
|
2792
|
+
processorVersion: {
|
|
2793
|
+
createTime: "Test string",
|
|
2794
|
+
deprecationInfo: {
|
|
2795
|
+
deprecationTime: "Test string",
|
|
2796
|
+
replacementProcessorVersion: "Test string",
|
|
2797
|
+
},
|
|
2798
|
+
displayName: "Test string",
|
|
2799
|
+
documentSchema: {
|
|
2800
|
+
description: "Test string",
|
|
2801
|
+
displayName: "Test string",
|
|
2802
|
+
entityTypes: [
|
|
2803
|
+
{
|
|
2804
|
+
baseTypes: [
|
|
2805
|
+
"Test string"
|
|
2806
|
+
],
|
|
2807
|
+
displayName: "Test string",
|
|
2808
|
+
enumValues: {
|
|
2809
|
+
values: [
|
|
2810
|
+
"Test string"
|
|
2811
|
+
],
|
|
2812
|
+
},
|
|
2813
|
+
name: "Test string",
|
|
2814
|
+
properties: [
|
|
2815
|
+
{
|
|
2816
|
+
name: "Test string",
|
|
2817
|
+
occurrenceType: "Test string",
|
|
2818
|
+
valueType: "Test string",
|
|
2819
|
+
}
|
|
2820
|
+
],
|
|
2821
|
+
}
|
|
2822
|
+
],
|
|
2823
|
+
metadata: {
|
|
2824
|
+
documentAllowMultipleLabels: true,
|
|
2825
|
+
documentSplitter: true,
|
|
2826
|
+
prefixedNamingOnProperties: true,
|
|
2827
|
+
skipNamingValidation: true,
|
|
2828
|
+
},
|
|
2829
|
+
},
|
|
2830
|
+
googleManaged: true,
|
|
2831
|
+
kmsKeyName: "Test string",
|
|
2832
|
+
kmsKeyVersionName: "Test string",
|
|
2833
|
+
latestEvaluation: {
|
|
2834
|
+
aggregateMetrics: {
|
|
2835
|
+
f1Score: 42,
|
|
2836
|
+
falseNegativesCount: 42,
|
|
2837
|
+
falsePositivesCount: 42,
|
|
2838
|
+
groundTruthDocumentCount: 42,
|
|
2839
|
+
groundTruthOccurrencesCount: 42,
|
|
2840
|
+
precision: 42,
|
|
2841
|
+
predictedDocumentCount: 42,
|
|
2842
|
+
predictedOccurrencesCount: 42,
|
|
2843
|
+
recall: 42,
|
|
2844
|
+
totalDocumentsCount: 42,
|
|
2845
|
+
truePositivesCount: 42,
|
|
2846
|
+
},
|
|
2847
|
+
aggregateMetricsExact: {
|
|
2848
|
+
f1Score: 42,
|
|
2849
|
+
falseNegativesCount: 42,
|
|
2850
|
+
falsePositivesCount: 42,
|
|
2851
|
+
groundTruthDocumentCount: 42,
|
|
2852
|
+
groundTruthOccurrencesCount: 42,
|
|
2853
|
+
precision: 42,
|
|
2854
|
+
predictedDocumentCount: 42,
|
|
2855
|
+
predictedOccurrencesCount: 42,
|
|
2856
|
+
recall: 42,
|
|
2857
|
+
totalDocumentsCount: 42,
|
|
2858
|
+
truePositivesCount: 42,
|
|
2859
|
+
},
|
|
2860
|
+
evaluation: "Test string",
|
|
2861
|
+
operation: "Test string",
|
|
2862
|
+
},
|
|
2863
|
+
name: "Test string",
|
|
2864
|
+
state: "Test string",
|
|
2865
|
+
},
|
|
2866
|
+
});
|
|
2710
2867
|
/** Undeploys the processor version. */
|
|
2711
2868
|
await gapi.client.documentai.projects.locations.processors.processorVersions.undeploy({
|
|
2712
2869
|
name: "Test string",
|
|
2713
2870
|
}, {
|
|
2714
2871
|
});
|
|
2872
|
+
/** Retrieves a specific evaluation. */
|
|
2873
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.evaluations.get({
|
|
2874
|
+
name: "Test string",
|
|
2875
|
+
});
|
|
2876
|
+
/** Retrieves a set of evaluations for a given processor version. */
|
|
2877
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.evaluations.list({
|
|
2878
|
+
pageSize: 42,
|
|
2879
|
+
pageToken: "Test string",
|
|
2880
|
+
parent: "Test string",
|
|
2881
|
+
});
|
|
2715
2882
|
/** Gets a processor type detail. */
|
|
2716
2883
|
await gapi.client.documentai.projects.locations.processorTypes.get({
|
|
2717
2884
|
name: "Test string",
|