@maxim_mazurok/gapi.client.documentai-v1beta3 0.0.20221027 → 0.0.20221108
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 +280 -12
- package/package.json +1 -1
- package/tests.ts +138 -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: 20221108
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -1839,8 +1839,6 @@ declare namespace gapi.client {
|
|
|
1839
1839
|
baseTypes?: string[];
|
|
1840
1840
|
/** User defined name for the type. */
|
|
1841
1841
|
displayName?: string;
|
|
1842
|
-
/** Metadata for the entity type. */
|
|
1843
|
-
entityTypeMetadata?: GoogleCloudDocumentaiV1beta3EntityTypeMetadata;
|
|
1844
1842
|
/**
|
|
1845
1843
|
* 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
|
|
1846
1844
|
* `EntityType.value_ontology` field and specify a list of all possible values in a value ontology file.
|
|
@@ -1865,8 +1863,6 @@ declare namespace gapi.client {
|
|
|
1865
1863
|
name?: string;
|
|
1866
1864
|
/** Occurrence type limits the number of instances an entity type appears in the document. */
|
|
1867
1865
|
occurrenceType?: string;
|
|
1868
|
-
/** Any additional metadata about the property can be added here. */
|
|
1869
|
-
propertyMetadata?: GoogleCloudDocumentaiV1beta3PropertyMetadata;
|
|
1870
1866
|
/** A reference to the value type of the property. This type is subject to the same conventions as the `Entity.base_types` field. */
|
|
1871
1867
|
valueType?: string;
|
|
1872
1868
|
}
|
|
@@ -1948,9 +1944,81 @@ declare namespace gapi.client {
|
|
|
1948
1944
|
// tslint:disable-next-line:no-empty-interface
|
|
1949
1945
|
interface GoogleCloudDocumentaiV1beta3EnableProcessorResponse {
|
|
1950
1946
|
}
|
|
1951
|
-
interface
|
|
1952
|
-
/**
|
|
1953
|
-
|
|
1947
|
+
interface GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest {
|
|
1948
|
+
/** Optional. The documents used in the evaluation. If unspecified, use the processor's dataset as evaluation input. */
|
|
1949
|
+
evaluationDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
|
|
1950
|
+
}
|
|
1951
|
+
interface GoogleCloudDocumentaiV1beta3Evaluation {
|
|
1952
|
+
/** Metrics for all the entities in aggregate. */
|
|
1953
|
+
allEntitiesMetrics?: GoogleCloudDocumentaiV1beta3EvaluationMultiConfidenceMetrics;
|
|
1954
|
+
/** The time that the evaluation was created. */
|
|
1955
|
+
createTime?: string;
|
|
1956
|
+
/** Counters for the documents used in the evaluation. */
|
|
1957
|
+
documentCounters?: GoogleCloudDocumentaiV1beta3EvaluationCounters;
|
|
1958
|
+
/** Metrics across confidence levels, for different entities. */
|
|
1959
|
+
entityMetrics?: { [P in string]: GoogleCloudDocumentaiV1beta3EvaluationMultiConfidenceMetrics };
|
|
1960
|
+
/** The KMS key name used for encryption. */
|
|
1961
|
+
kmsKeyName?: string;
|
|
1962
|
+
/** The KMS key version with which data is encrypted. */
|
|
1963
|
+
kmsKeyVersionName?: string;
|
|
1964
|
+
/** The resource name of the evaluation. Format: `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processor_version}/evaluations/{evaluation}` */
|
|
1965
|
+
name?: string;
|
|
1966
|
+
}
|
|
1967
|
+
interface GoogleCloudDocumentaiV1beta3EvaluationConfidenceLevelMetrics {
|
|
1968
|
+
/** The confidence level. */
|
|
1969
|
+
confidenceLevel?: number;
|
|
1970
|
+
/** The metrics at the specific confidence level. */
|
|
1971
|
+
metrics?: GoogleCloudDocumentaiV1beta3EvaluationMetrics;
|
|
1972
|
+
}
|
|
1973
|
+
interface GoogleCloudDocumentaiV1beta3EvaluationCounters {
|
|
1974
|
+
/** How many documents were used in the evaluation. */
|
|
1975
|
+
evaluatedDocumentsCount?: number;
|
|
1976
|
+
/** How many documents were not included in the evaluation as Document AI failed to process them. */
|
|
1977
|
+
failedDocumentsCount?: number;
|
|
1978
|
+
/** How many documents were sent for evaluation. */
|
|
1979
|
+
inputDocumentsCount?: number;
|
|
1980
|
+
/** How many documents were not included in the evaluation as they didn't pass validation. */
|
|
1981
|
+
invalidDocumentsCount?: number;
|
|
1982
|
+
}
|
|
1983
|
+
interface GoogleCloudDocumentaiV1beta3EvaluationMetrics {
|
|
1984
|
+
/** The calculated f1 score. */
|
|
1985
|
+
f1Score?: number;
|
|
1986
|
+
/** The amount of false negatives. */
|
|
1987
|
+
falseNegativesCount?: number;
|
|
1988
|
+
/** The amount of false positives. */
|
|
1989
|
+
falsePositivesCount?: number;
|
|
1990
|
+
/** The amount of documents with a ground truth occurrence. */
|
|
1991
|
+
groundTruthDocumentCount?: number;
|
|
1992
|
+
/** The amount of occurrences in ground truth documents. */
|
|
1993
|
+
groundTruthOccurrencesCount?: number;
|
|
1994
|
+
/** The calculated precision. */
|
|
1995
|
+
precision?: number;
|
|
1996
|
+
/** The amount of documents with a predicted occurrence. */
|
|
1997
|
+
predictedDocumentCount?: number;
|
|
1998
|
+
/** The amount of occurrences in predicted documents. */
|
|
1999
|
+
predictedOccurrencesCount?: number;
|
|
2000
|
+
/** The calculated recall. */
|
|
2001
|
+
recall?: number;
|
|
2002
|
+
/** The amount of documents that had an occurrence of this label. */
|
|
2003
|
+
totalDocumentsCount?: number;
|
|
2004
|
+
/** The amount of true positives. */
|
|
2005
|
+
truePositivesCount?: number;
|
|
2006
|
+
}
|
|
2007
|
+
interface GoogleCloudDocumentaiV1beta3EvaluationMultiConfidenceMetrics {
|
|
2008
|
+
/** The calculated area under the precision recall curve (AUPRC), computed by integrating over all confidence thresholds. */
|
|
2009
|
+
auprc?: number;
|
|
2010
|
+
/** The AUPRC for metrics with fuzzy matching disabled, i.e., exact matching only. */
|
|
2011
|
+
auprcExact?: number;
|
|
2012
|
+
/** Metrics across confidence levels with fuzzy matching enabled. */
|
|
2013
|
+
confidenceLevelMetrics?: GoogleCloudDocumentaiV1beta3EvaluationConfidenceLevelMetrics[];
|
|
2014
|
+
/** Metrics across confidence levels with only exact matching. */
|
|
2015
|
+
confidenceLevelMetricsExact?: GoogleCloudDocumentaiV1beta3EvaluationConfidenceLevelMetrics[];
|
|
2016
|
+
/** The Estimated Calibration Error (ECE) of the confidence of the predicted entities. */
|
|
2017
|
+
estimatedCalibrationError?: number;
|
|
2018
|
+
/** The ECE for the predicted entities with fuzzy matching disabled, i.e., exact matching only. */
|
|
2019
|
+
estimatedCalibrationErrorExact?: number;
|
|
2020
|
+
/** The metrics type for the label. */
|
|
2021
|
+
metricsType?: string;
|
|
1954
2022
|
}
|
|
1955
2023
|
interface GoogleCloudDocumentaiV1beta3FetchProcessorTypesResponse {
|
|
1956
2024
|
/** The list of processor types. */
|
|
@@ -1981,6 +2049,12 @@ declare namespace gapi.client {
|
|
|
1981
2049
|
/** A message providing more details about the human review state. */
|
|
1982
2050
|
stateMessage?: string;
|
|
1983
2051
|
}
|
|
2052
|
+
interface GoogleCloudDocumentaiV1beta3ListEvaluationsResponse {
|
|
2053
|
+
/** The evaluations requested. */
|
|
2054
|
+
evaluations?: GoogleCloudDocumentaiV1beta3Evaluation[];
|
|
2055
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
2056
|
+
nextPageToken?: string;
|
|
2057
|
+
}
|
|
1984
2058
|
interface GoogleCloudDocumentaiV1beta3ListProcessorsResponse {
|
|
1985
2059
|
/** Points to the next processor, otherwise empty. */
|
|
1986
2060
|
nextPageToken?: string;
|
|
@@ -2093,10 +2167,6 @@ declare namespace gapi.client {
|
|
|
2093
2167
|
/** The status of human review on the processed document. */
|
|
2094
2168
|
humanReviewStatus?: GoogleCloudDocumentaiV1beta3HumanReviewStatus;
|
|
2095
2169
|
}
|
|
2096
|
-
interface GoogleCloudDocumentaiV1beta3PropertyMetadata {
|
|
2097
|
-
/** Whether the property should be considered as "inactive". */
|
|
2098
|
-
inactive?: boolean;
|
|
2099
|
-
}
|
|
2100
2170
|
interface GoogleCloudDocumentaiV1beta3RawDocument {
|
|
2101
2171
|
/** Inline document content. */
|
|
2102
2172
|
content?: string;
|
|
@@ -2148,6 +2218,25 @@ declare namespace gapi.client {
|
|
|
2148
2218
|
// tslint:disable-next-line:no-empty-interface
|
|
2149
2219
|
interface GoogleCloudDocumentaiV1beta3SetDefaultProcessorVersionResponse {
|
|
2150
2220
|
}
|
|
2221
|
+
interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest {
|
|
2222
|
+
/**
|
|
2223
|
+
* Optional. The processor version to use as a base for training. This processor version must be a child of `parent`. Format:
|
|
2224
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`.
|
|
2225
|
+
*/
|
|
2226
|
+
baseProcessorVersion?: string;
|
|
2227
|
+
/** Optional. The schema the processor version will be trained with. */
|
|
2228
|
+
documentSchema?: GoogleCloudDocumentaiV1beta3DocumentSchema;
|
|
2229
|
+
/** Optional. The input data used to train the `ProcessorVersion`. */
|
|
2230
|
+
inputData?: GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData;
|
|
2231
|
+
/** Required. The processor version to be created. */
|
|
2232
|
+
processorVersion?: GoogleCloudDocumentaiV1beta3ProcessorVersion;
|
|
2233
|
+
}
|
|
2234
|
+
interface GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequestInputData {
|
|
2235
|
+
/** The documents used for testing the trained version. */
|
|
2236
|
+
testDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
|
|
2237
|
+
/** The documents used for training the new version. */
|
|
2238
|
+
trainingDocuments?: GoogleCloudDocumentaiV1beta3BatchDocumentsInputConfig;
|
|
2239
|
+
}
|
|
2151
2240
|
interface GoogleCloudDocumentaiV1beta3UndeployProcessorVersionMetadata {
|
|
2152
2241
|
/** The basic metadata of the long running operation. */
|
|
2153
2242
|
commonMetadata?: GoogleCloudDocumentaiV1beta3CommonOperationMetadata;
|
|
@@ -2575,6 +2664,72 @@ declare namespace gapi.client {
|
|
|
2575
2664
|
},
|
|
2576
2665
|
body: GoogleCloudDocumentaiV1beta3ReviewDocumentRequest): Request<GoogleLongrunningOperation>;
|
|
2577
2666
|
}
|
|
2667
|
+
interface EvaluationsResource {
|
|
2668
|
+
/** Retrieves a specific evaluation. */
|
|
2669
|
+
get(request?: {
|
|
2670
|
+
/** V1 error format. */
|
|
2671
|
+
"$.xgafv"?: string;
|
|
2672
|
+
/** OAuth access token. */
|
|
2673
|
+
access_token?: string;
|
|
2674
|
+
/** Data format for response. */
|
|
2675
|
+
alt?: string;
|
|
2676
|
+
/** JSONP */
|
|
2677
|
+
callback?: string;
|
|
2678
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2679
|
+
fields?: string;
|
|
2680
|
+
/** 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. */
|
|
2681
|
+
key?: string;
|
|
2682
|
+
/**
|
|
2683
|
+
* Required. The resource name of the Evaluation to get.
|
|
2684
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}/evaluations/{evaluation}`
|
|
2685
|
+
*/
|
|
2686
|
+
name: string;
|
|
2687
|
+
/** OAuth 2.0 token for the current user. */
|
|
2688
|
+
oauth_token?: string;
|
|
2689
|
+
/** Returns response with indentations and line breaks. */
|
|
2690
|
+
prettyPrint?: boolean;
|
|
2691
|
+
/** 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. */
|
|
2692
|
+
quotaUser?: string;
|
|
2693
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2694
|
+
upload_protocol?: string;
|
|
2695
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2696
|
+
uploadType?: string;
|
|
2697
|
+
}): Request<GoogleCloudDocumentaiV1beta3Evaluation>;
|
|
2698
|
+
/** Retrieves a set of evaluations for a given processor version. */
|
|
2699
|
+
list(request?: {
|
|
2700
|
+
/** V1 error format. */
|
|
2701
|
+
"$.xgafv"?: string;
|
|
2702
|
+
/** OAuth access token. */
|
|
2703
|
+
access_token?: string;
|
|
2704
|
+
/** Data format for response. */
|
|
2705
|
+
alt?: string;
|
|
2706
|
+
/** JSONP */
|
|
2707
|
+
callback?: string;
|
|
2708
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2709
|
+
fields?: string;
|
|
2710
|
+
/** 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. */
|
|
2711
|
+
key?: string;
|
|
2712
|
+
/** OAuth 2.0 token for the current user. */
|
|
2713
|
+
oauth_token?: string;
|
|
2714
|
+
/** 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. */
|
|
2715
|
+
pageSize?: number;
|
|
2716
|
+
/** A page token, received from a previous `ListEvaluations` call. Provide this to retrieve the subsequent page. */
|
|
2717
|
+
pageToken?: string;
|
|
2718
|
+
/**
|
|
2719
|
+
* Required. The resource name of the ProcessorVersion to list evaluations for.
|
|
2720
|
+
* `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}`
|
|
2721
|
+
*/
|
|
2722
|
+
parent: string;
|
|
2723
|
+
/** Returns response with indentations and line breaks. */
|
|
2724
|
+
prettyPrint?: boolean;
|
|
2725
|
+
/** 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. */
|
|
2726
|
+
quotaUser?: string;
|
|
2727
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2728
|
+
upload_protocol?: string;
|
|
2729
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2730
|
+
uploadType?: string;
|
|
2731
|
+
}): Request<GoogleCloudDocumentaiV1beta3ListEvaluationsResponse>;
|
|
2732
|
+
}
|
|
2578
2733
|
interface ProcessorVersionsResource {
|
|
2579
2734
|
/** LRO endpoint to batch process many documents. The output is written to Cloud Storage as JSON in the [Document] format. */
|
|
2580
2735
|
batchProcess(request: {
|
|
@@ -2721,6 +2876,62 @@ declare namespace gapi.client {
|
|
|
2721
2876
|
uploadType?: string;
|
|
2722
2877
|
},
|
|
2723
2878
|
body: GoogleCloudDocumentaiV1beta3DeployProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
2879
|
+
/** Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. */
|
|
2880
|
+
evaluateProcessorVersion(request: {
|
|
2881
|
+
/** V1 error format. */
|
|
2882
|
+
"$.xgafv"?: string;
|
|
2883
|
+
/** OAuth access token. */
|
|
2884
|
+
access_token?: string;
|
|
2885
|
+
/** Data format for response. */
|
|
2886
|
+
alt?: string;
|
|
2887
|
+
/** JSONP */
|
|
2888
|
+
callback?: string;
|
|
2889
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2890
|
+
fields?: string;
|
|
2891
|
+
/** 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. */
|
|
2892
|
+
key?: string;
|
|
2893
|
+
/** OAuth 2.0 token for the current user. */
|
|
2894
|
+
oauth_token?: string;
|
|
2895
|
+
/** Returns response with indentations and line breaks. */
|
|
2896
|
+
prettyPrint?: boolean;
|
|
2897
|
+
/** Required. The resource name of the ProcessorVersion to evaluate. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */
|
|
2898
|
+
processorVersion: string;
|
|
2899
|
+
/** 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. */
|
|
2900
|
+
quotaUser?: string;
|
|
2901
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2902
|
+
upload_protocol?: string;
|
|
2903
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2904
|
+
uploadType?: string;
|
|
2905
|
+
/** Request body */
|
|
2906
|
+
resource: GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest;
|
|
2907
|
+
}): Request<GoogleLongrunningOperation>;
|
|
2908
|
+
evaluateProcessorVersion(request: {
|
|
2909
|
+
/** V1 error format. */
|
|
2910
|
+
"$.xgafv"?: string;
|
|
2911
|
+
/** OAuth access token. */
|
|
2912
|
+
access_token?: string;
|
|
2913
|
+
/** Data format for response. */
|
|
2914
|
+
alt?: string;
|
|
2915
|
+
/** JSONP */
|
|
2916
|
+
callback?: string;
|
|
2917
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
2918
|
+
fields?: string;
|
|
2919
|
+
/** 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. */
|
|
2920
|
+
key?: string;
|
|
2921
|
+
/** OAuth 2.0 token for the current user. */
|
|
2922
|
+
oauth_token?: string;
|
|
2923
|
+
/** Returns response with indentations and line breaks. */
|
|
2924
|
+
prettyPrint?: boolean;
|
|
2925
|
+
/** Required. The resource name of the ProcessorVersion to evaluate. `projects/{project}/locations/{location}/processors/{processor}/processorVersions/{processorVersion}` */
|
|
2926
|
+
processorVersion: string;
|
|
2927
|
+
/** 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. */
|
|
2928
|
+
quotaUser?: string;
|
|
2929
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
2930
|
+
upload_protocol?: string;
|
|
2931
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
2932
|
+
uploadType?: string;
|
|
2933
|
+
},
|
|
2934
|
+
body: GoogleCloudDocumentaiV1beta3EvaluateProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
2724
2935
|
/** Gets a processor version detail. */
|
|
2725
2936
|
get(request?: {
|
|
2726
2937
|
/** V1 error format. */
|
|
@@ -2844,6 +3055,62 @@ declare namespace gapi.client {
|
|
|
2844
3055
|
uploadType?: string;
|
|
2845
3056
|
},
|
|
2846
3057
|
body: GoogleCloudDocumentaiV1beta3ProcessRequest): Request<GoogleCloudDocumentaiV1beta3ProcessResponse>;
|
|
3058
|
+
/** Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata. */
|
|
3059
|
+
train(request: {
|
|
3060
|
+
/** V1 error format. */
|
|
3061
|
+
"$.xgafv"?: string;
|
|
3062
|
+
/** OAuth access token. */
|
|
3063
|
+
access_token?: string;
|
|
3064
|
+
/** Data format for response. */
|
|
3065
|
+
alt?: string;
|
|
3066
|
+
/** JSONP */
|
|
3067
|
+
callback?: string;
|
|
3068
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3069
|
+
fields?: string;
|
|
3070
|
+
/** 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. */
|
|
3071
|
+
key?: string;
|
|
3072
|
+
/** OAuth 2.0 token for the current user. */
|
|
3073
|
+
oauth_token?: string;
|
|
3074
|
+
/** Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. */
|
|
3075
|
+
parent: string;
|
|
3076
|
+
/** Returns response with indentations and line breaks. */
|
|
3077
|
+
prettyPrint?: boolean;
|
|
3078
|
+
/** 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. */
|
|
3079
|
+
quotaUser?: string;
|
|
3080
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3081
|
+
upload_protocol?: string;
|
|
3082
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3083
|
+
uploadType?: string;
|
|
3084
|
+
/** Request body */
|
|
3085
|
+
resource: GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest;
|
|
3086
|
+
}): Request<GoogleLongrunningOperation>;
|
|
3087
|
+
train(request: {
|
|
3088
|
+
/** V1 error format. */
|
|
3089
|
+
"$.xgafv"?: string;
|
|
3090
|
+
/** OAuth access token. */
|
|
3091
|
+
access_token?: string;
|
|
3092
|
+
/** Data format for response. */
|
|
3093
|
+
alt?: string;
|
|
3094
|
+
/** JSONP */
|
|
3095
|
+
callback?: string;
|
|
3096
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
3097
|
+
fields?: string;
|
|
3098
|
+
/** 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. */
|
|
3099
|
+
key?: string;
|
|
3100
|
+
/** OAuth 2.0 token for the current user. */
|
|
3101
|
+
oauth_token?: string;
|
|
3102
|
+
/** Required. The parent (project, location and processor) to create the new version for. Format: `projects/{project}/locations/{location}/processors/{processor}`. */
|
|
3103
|
+
parent: string;
|
|
3104
|
+
/** Returns response with indentations and line breaks. */
|
|
3105
|
+
prettyPrint?: boolean;
|
|
3106
|
+
/** 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. */
|
|
3107
|
+
quotaUser?: string;
|
|
3108
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
3109
|
+
upload_protocol?: string;
|
|
3110
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
3111
|
+
uploadType?: string;
|
|
3112
|
+
},
|
|
3113
|
+
body: GoogleCloudDocumentaiV1beta3TrainProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
2847
3114
|
/** Undeploys the processor version. */
|
|
2848
3115
|
undeploy(request: {
|
|
2849
3116
|
/** V1 error format. */
|
|
@@ -2900,6 +3167,7 @@ declare namespace gapi.client {
|
|
|
2900
3167
|
uploadType?: string;
|
|
2901
3168
|
},
|
|
2902
3169
|
body: GoogleCloudDocumentaiV1beta3UndeployProcessorVersionRequest): Request<GoogleLongrunningOperation>;
|
|
3170
|
+
evaluations: EvaluationsResource;
|
|
2903
3171
|
}
|
|
2904
3172
|
interface ProcessorsResource {
|
|
2905
3173
|
/** 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: 20221108
|
|
7
7
|
|
|
8
8
|
gapi.load('client', async () => {
|
|
9
9
|
/** now we can use gapi.client */
|
|
@@ -2621,9 +2621,6 @@ gapi.load('client', async () => {
|
|
|
2621
2621
|
"Test string"
|
|
2622
2622
|
],
|
|
2623
2623
|
displayName: "Test string",
|
|
2624
|
-
entityTypeMetadata: {
|
|
2625
|
-
inactive: true,
|
|
2626
|
-
},
|
|
2627
2624
|
enumValues: {
|
|
2628
2625
|
values: [
|
|
2629
2626
|
"Test string"
|
|
@@ -2634,9 +2631,6 @@ gapi.load('client', async () => {
|
|
|
2634
2631
|
{
|
|
2635
2632
|
name: "Test string",
|
|
2636
2633
|
occurrenceType: "Test string",
|
|
2637
|
-
propertyMetadata: {
|
|
2638
|
-
inactive: true,
|
|
2639
|
-
},
|
|
2640
2634
|
valueType: "Test string",
|
|
2641
2635
|
}
|
|
2642
2636
|
],
|
|
@@ -3512,6 +3506,24 @@ gapi.load('client', async () => {
|
|
|
3512
3506
|
name: "Test string",
|
|
3513
3507
|
}, {
|
|
3514
3508
|
});
|
|
3509
|
+
/** Evaluates a ProcessorVersion against annotated documents, producing an Evaluation. */
|
|
3510
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.evaluateProcessorVersion({
|
|
3511
|
+
processorVersion: "Test string",
|
|
3512
|
+
}, {
|
|
3513
|
+
evaluationDocuments: {
|
|
3514
|
+
gcsDocuments: {
|
|
3515
|
+
documents: [
|
|
3516
|
+
{
|
|
3517
|
+
gcsUri: "Test string",
|
|
3518
|
+
mimeType: "Test string",
|
|
3519
|
+
}
|
|
3520
|
+
],
|
|
3521
|
+
},
|
|
3522
|
+
gcsPrefix: {
|
|
3523
|
+
gcsUriPrefix: "Test string",
|
|
3524
|
+
},
|
|
3525
|
+
},
|
|
3526
|
+
});
|
|
3515
3527
|
/** Gets a processor version detail. */
|
|
3516
3528
|
await gapi.client.documentai.projects.locations.processors.processorVersions.get({
|
|
3517
3529
|
name: "Test string",
|
|
@@ -5167,11 +5179,130 @@ gapi.load('client', async () => {
|
|
|
5167
5179
|
},
|
|
5168
5180
|
skipHumanReview: true,
|
|
5169
5181
|
});
|
|
5182
|
+
/** Trains a new processor version. Operation metadata is returned as cloud_documentai_core.TrainProcessorVersionMetadata. */
|
|
5183
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.train({
|
|
5184
|
+
parent: "Test string",
|
|
5185
|
+
}, {
|
|
5186
|
+
baseProcessorVersion: "Test string",
|
|
5187
|
+
documentSchema: {
|
|
5188
|
+
description: "Test string",
|
|
5189
|
+
displayName: "Test string",
|
|
5190
|
+
entityTypes: [
|
|
5191
|
+
{
|
|
5192
|
+
baseTypes: [
|
|
5193
|
+
"Test string"
|
|
5194
|
+
],
|
|
5195
|
+
displayName: "Test string",
|
|
5196
|
+
enumValues: {
|
|
5197
|
+
values: [
|
|
5198
|
+
"Test string"
|
|
5199
|
+
],
|
|
5200
|
+
},
|
|
5201
|
+
name: "Test string",
|
|
5202
|
+
properties: [
|
|
5203
|
+
{
|
|
5204
|
+
name: "Test string",
|
|
5205
|
+
occurrenceType: "Test string",
|
|
5206
|
+
valueType: "Test string",
|
|
5207
|
+
}
|
|
5208
|
+
],
|
|
5209
|
+
}
|
|
5210
|
+
],
|
|
5211
|
+
metadata: {
|
|
5212
|
+
documentAllowMultipleLabels: true,
|
|
5213
|
+
documentSplitter: true,
|
|
5214
|
+
prefixedNamingOnProperties: true,
|
|
5215
|
+
skipNamingValidation: true,
|
|
5216
|
+
},
|
|
5217
|
+
},
|
|
5218
|
+
inputData: {
|
|
5219
|
+
testDocuments: {
|
|
5220
|
+
gcsDocuments: {
|
|
5221
|
+
documents: [
|
|
5222
|
+
{
|
|
5223
|
+
gcsUri: "Test string",
|
|
5224
|
+
mimeType: "Test string",
|
|
5225
|
+
}
|
|
5226
|
+
],
|
|
5227
|
+
},
|
|
5228
|
+
gcsPrefix: {
|
|
5229
|
+
gcsUriPrefix: "Test string",
|
|
5230
|
+
},
|
|
5231
|
+
},
|
|
5232
|
+
trainingDocuments: {
|
|
5233
|
+
gcsDocuments: {
|
|
5234
|
+
documents: [
|
|
5235
|
+
{
|
|
5236
|
+
gcsUri: "Test string",
|
|
5237
|
+
mimeType: "Test string",
|
|
5238
|
+
}
|
|
5239
|
+
],
|
|
5240
|
+
},
|
|
5241
|
+
gcsPrefix: {
|
|
5242
|
+
gcsUriPrefix: "Test string",
|
|
5243
|
+
},
|
|
5244
|
+
},
|
|
5245
|
+
},
|
|
5246
|
+
processorVersion: {
|
|
5247
|
+
createTime: "Test string",
|
|
5248
|
+
deprecationInfo: {
|
|
5249
|
+
deprecationTime: "Test string",
|
|
5250
|
+
replacementProcessorVersion: "Test string",
|
|
5251
|
+
},
|
|
5252
|
+
displayName: "Test string",
|
|
5253
|
+
documentSchema: {
|
|
5254
|
+
description: "Test string",
|
|
5255
|
+
displayName: "Test string",
|
|
5256
|
+
entityTypes: [
|
|
5257
|
+
{
|
|
5258
|
+
baseTypes: [
|
|
5259
|
+
"Test string"
|
|
5260
|
+
],
|
|
5261
|
+
displayName: "Test string",
|
|
5262
|
+
enumValues: {
|
|
5263
|
+
values: [
|
|
5264
|
+
"Test string"
|
|
5265
|
+
],
|
|
5266
|
+
},
|
|
5267
|
+
name: "Test string",
|
|
5268
|
+
properties: [
|
|
5269
|
+
{
|
|
5270
|
+
name: "Test string",
|
|
5271
|
+
occurrenceType: "Test string",
|
|
5272
|
+
valueType: "Test string",
|
|
5273
|
+
}
|
|
5274
|
+
],
|
|
5275
|
+
}
|
|
5276
|
+
],
|
|
5277
|
+
metadata: {
|
|
5278
|
+
documentAllowMultipleLabels: true,
|
|
5279
|
+
documentSplitter: true,
|
|
5280
|
+
prefixedNamingOnProperties: true,
|
|
5281
|
+
skipNamingValidation: true,
|
|
5282
|
+
},
|
|
5283
|
+
},
|
|
5284
|
+
googleManaged: true,
|
|
5285
|
+
kmsKeyName: "Test string",
|
|
5286
|
+
kmsKeyVersionName: "Test string",
|
|
5287
|
+
name: "Test string",
|
|
5288
|
+
state: "Test string",
|
|
5289
|
+
},
|
|
5290
|
+
});
|
|
5170
5291
|
/** Undeploys the processor version. */
|
|
5171
5292
|
await gapi.client.documentai.projects.locations.processors.processorVersions.undeploy({
|
|
5172
5293
|
name: "Test string",
|
|
5173
5294
|
}, {
|
|
5174
5295
|
});
|
|
5296
|
+
/** Retrieves a specific evaluation. */
|
|
5297
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.evaluations.get({
|
|
5298
|
+
name: "Test string",
|
|
5299
|
+
});
|
|
5300
|
+
/** Retrieves a set of evaluations for a given processor version. */
|
|
5301
|
+
await gapi.client.documentai.projects.locations.processors.processorVersions.evaluations.list({
|
|
5302
|
+
pageSize: 42,
|
|
5303
|
+
pageToken: "Test string",
|
|
5304
|
+
parent: "Test string",
|
|
5305
|
+
});
|
|
5175
5306
|
/** Lists the processor types that exist. */
|
|
5176
5307
|
await gapi.client.documentai.projects.locations.processorTypes.list({
|
|
5177
5308
|
pageSize: 42,
|