@azure/ai-form-recognizer 4.1.0-beta.1 → 5.0.0
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/README.md +25 -35
- package/dist/index.js +98 -302
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +2 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/documentAnalysisClient.js +5 -7
- package/dist-esm/src/documentAnalysisClient.js.map +1 -1
- package/dist-esm/src/documentModel.js.map +1 -1
- package/dist-esm/src/documentModelAdministrationClient.js +13 -55
- package/dist-esm/src/documentModelAdministrationClient.js.map +1 -1
- package/dist-esm/src/generated/generatedClient.js +2 -2
- package/dist-esm/src/generated/generatedClient.js.map +1 -1
- package/dist-esm/src/generated/models/index.js +10 -26
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js +4 -131
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +1 -19
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/operations/documentClassifiers.js +12 -5
- package/dist-esm/src/generated/operations/documentClassifiers.js.map +1 -1
- package/dist-esm/src/generated/operations/documentModels.js +15 -11
- package/dist-esm/src/generated/operations/documentModels.js.map +1 -1
- package/dist-esm/src/generated/operations/miscellaneous.js +12 -5
- package/dist-esm/src/generated/operations/miscellaneous.js.map +1 -1
- package/dist-esm/src/index.js +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/lro/analysis.js +2 -2
- package/dist-esm/src/lro/analysis.js.map +1 -1
- package/dist-esm/src/models/contentSource.js +4 -0
- package/dist-esm/src/models/contentSource.js.map +1 -0
- package/dist-esm/src/models/documentElements.js.map +1 -1
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/options/AnalyzeDocumentOptions.js +19 -8
- package/dist-esm/src/options/AnalyzeDocumentOptions.js.map +1 -1
- package/dist-esm/src/options/FormRecognizerClientOptions.js +0 -27
- package/dist-esm/src/options/FormRecognizerClientOptions.js.map +1 -1
- package/dist-esm/src/options/index.js +2 -2
- package/dist-esm/src/options/index.js.map +1 -1
- package/dist-esm/src/util.js +2 -4
- package/dist-esm/src/util.js.map +1 -1
- package/package.json +6 -6
- package/types/ai-form-recognizer.d.ts +140 -171
|
@@ -106,24 +106,13 @@ export declare interface AnalyzeDocumentOptions<Result = AnalyzeResult<AnalyzedD
|
|
|
106
106
|
* Examples: "1", "3-5", "1,3-5"
|
|
107
107
|
*/
|
|
108
108
|
pages?: string;
|
|
109
|
-
/**
|
|
110
|
-
* A list of additional fields to add to the extracted documents.
|
|
111
|
-
*
|
|
112
|
-
* Additional fields are extracted dynamically and do not require any training. This capability is only available if
|
|
113
|
-
* the "queryFields.premium" feature is enabled. Pass "queryFields.premium" in the `features` parameter
|
|
114
|
-
* to enable it.
|
|
115
|
-
*
|
|
116
|
-
* NOTE: This feature incurs additional costs, so be sure to consult the service documentation to understand the added
|
|
117
|
-
* costs associated with using it. See the service documentation for more information: https://aka.ms/azsdk/formrecognizer/queryfields
|
|
118
|
-
*/
|
|
119
|
-
queryFields?: string[];
|
|
120
109
|
/**
|
|
121
110
|
* A list of features to enable in the model. Enabling features may incur additional costs, so be sure to consult the
|
|
122
111
|
* service documentation to understand the nature of the features and any added costs associated with using them.
|
|
123
112
|
*
|
|
124
113
|
* For more information about the features available in Form Recognizer, see the service documentation: https://aka.ms/azsdk/formrecognizer/features
|
|
125
114
|
*/
|
|
126
|
-
features?:
|
|
115
|
+
features?: FormRecognizerFeature[];
|
|
127
116
|
}
|
|
128
117
|
|
|
129
118
|
/**
|
|
@@ -168,7 +157,7 @@ export declare interface AnalyzeResultCommon {
|
|
|
168
157
|
/**
|
|
169
158
|
* The service API version used to produce this result.
|
|
170
159
|
*/
|
|
171
|
-
apiVersion:
|
|
160
|
+
apiVersion: string;
|
|
172
161
|
/**
|
|
173
162
|
* The unique ID of the model that was used to produce this result.
|
|
174
163
|
*/
|
|
@@ -183,22 +172,50 @@ export declare interface AnalyzeResultCommon {
|
|
|
183
172
|
/** Defines values for AnalyzeResultOperationStatus. */
|
|
184
173
|
export declare type AnalyzeResultOperationStatus = "notStarted" | "running" | "failed" | "succeeded";
|
|
185
174
|
|
|
186
|
-
/**
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
|
|
175
|
+
/**
|
|
176
|
+
* A training data source defined by an Azure Blob Container and a JSONL file list within the container.
|
|
177
|
+
*/
|
|
178
|
+
export declare interface AzureBlobFileListSource {
|
|
179
|
+
/**
|
|
180
|
+
* The underlying details of the Azure Blob File List Source.
|
|
181
|
+
*/
|
|
182
|
+
azureBlobFileListSource: AzureBlobFileListSourceDetails;
|
|
183
|
+
/**
|
|
184
|
+
* Must be undefined for a Blob File List Source.
|
|
185
|
+
*/
|
|
186
|
+
azureBlobSource?: undefined;
|
|
192
187
|
}
|
|
193
188
|
|
|
194
189
|
/** File list in Azure Blob Storage. */
|
|
195
|
-
export declare interface
|
|
190
|
+
export declare interface AzureBlobFileListSourceDetails {
|
|
196
191
|
/** Azure Blob Storage container URL. */
|
|
197
192
|
containerUrl: string;
|
|
198
193
|
/** Path to a JSONL file within the container specifying a subset of documents for training. */
|
|
199
194
|
fileList: string;
|
|
200
195
|
}
|
|
201
196
|
|
|
197
|
+
/**
|
|
198
|
+
* A training data source defined by an Azure Blob Container.
|
|
199
|
+
*/
|
|
200
|
+
export declare interface AzureBlobSource {
|
|
201
|
+
/**
|
|
202
|
+
* The underlying details of the Azure Blob Source.
|
|
203
|
+
*/
|
|
204
|
+
azureBlobSource: AzureBlobSourceDetails;
|
|
205
|
+
/**
|
|
206
|
+
* Must be undefined for a Blob Source.
|
|
207
|
+
*/
|
|
208
|
+
azureBlobFileListSource?: undefined;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Azure Blob Storage content. */
|
|
212
|
+
export declare interface AzureBlobSourceDetails {
|
|
213
|
+
/** Azure Blob Storage container URL. */
|
|
214
|
+
containerUrl: string;
|
|
215
|
+
/** Blob name prefix. */
|
|
216
|
+
prefix?: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
202
219
|
export { AzureKeyCredential }
|
|
203
220
|
|
|
204
221
|
/**
|
|
@@ -235,12 +252,12 @@ export declare interface BoundingRegion extends HasBoundingPolygon {
|
|
|
235
252
|
pageNumber: number;
|
|
236
253
|
}
|
|
237
254
|
|
|
238
|
-
/**
|
|
255
|
+
/** Classifier document type info. */
|
|
239
256
|
export declare interface ClassifierDocumentTypeDetails {
|
|
240
|
-
/** Azure Blob Storage location containing the training data. */
|
|
241
|
-
azureBlobSource?:
|
|
242
|
-
/** Azure Blob Storage file list specifying the training data. */
|
|
243
|
-
azureBlobFileListSource?:
|
|
257
|
+
/** Azure Blob Storage location containing the training data for a classifier document type. Either azureBlobSource or azureBlobFileListSource must be specified. */
|
|
258
|
+
azureBlobSource?: AzureBlobSourceDetails;
|
|
259
|
+
/** Azure Blob Storage file list specifying the training data for a classifier document type. Either azureBlobSource or azureBlobFileListSource must be specified. */
|
|
260
|
+
azureBlobFileListSource?: AzureBlobFileListSourceDetails;
|
|
244
261
|
}
|
|
245
262
|
|
|
246
263
|
/**
|
|
@@ -367,7 +384,6 @@ export declare interface DocumentAddressField extends DocumentFieldCommon {
|
|
|
367
384
|
export declare class DocumentAnalysisClient {
|
|
368
385
|
private _restClient;
|
|
369
386
|
private _tracing;
|
|
370
|
-
private _apiVersion;
|
|
371
387
|
/**
|
|
372
388
|
* Create a `DocumentAnalysisClient` instance from a resource endpoint and a an Azure Identity `TokenCredential`.
|
|
373
389
|
*
|
|
@@ -728,7 +744,7 @@ export declare class DocumentAnalysisClient {
|
|
|
728
744
|
/**
|
|
729
745
|
* Configurable options for DocumentAnalysisClient.
|
|
730
746
|
*/
|
|
731
|
-
export declare interface DocumentAnalysisClientOptions extends
|
|
747
|
+
export declare interface DocumentAnalysisClientOptions extends CommonClientOptions {
|
|
732
748
|
/**
|
|
733
749
|
* The unit of string offset/length values that the service returns.
|
|
734
750
|
*
|
|
@@ -775,26 +791,10 @@ export declare interface DocumentAnalysisPollOperationState<Result = AnalyzeResu
|
|
|
775
791
|
* A visual annotation element in the document, such as a check mark or cross.
|
|
776
792
|
*/
|
|
777
793
|
export declare interface DocumentAnnotation extends HasBoundingPolygon {
|
|
778
|
-
/**
|
|
779
|
-
* The kind of annotation that this element represents. One of:
|
|
780
|
-
* - "check": A check mark (✓).
|
|
781
|
-
* - "cross": A cross mark (X).
|
|
782
|
-
*/
|
|
783
|
-
kind: DocumentAnnotationKind;
|
|
784
794
|
/** Confidence of correctly extracting the annotation. */
|
|
785
795
|
confidence: number;
|
|
786
796
|
}
|
|
787
797
|
|
|
788
|
-
/**
|
|
789
|
-
* Defines values for DocumentAnnotationKind. \
|
|
790
|
-
* {@link KnownDocumentAnnotationKind} can be used interchangeably with DocumentAnnotationKind,
|
|
791
|
-
* this enum contains the known values that the service supports.
|
|
792
|
-
* ### Known values supported by the service
|
|
793
|
-
* **check**: A visual check ✓. \
|
|
794
|
-
* **cross**: A visual cross X.
|
|
795
|
-
*/
|
|
796
|
-
export declare type DocumentAnnotationKind = string;
|
|
797
|
-
|
|
798
798
|
/**
|
|
799
799
|
* A DocumentField that consists of an array of nested fields. All fields in the array will have the same type.
|
|
800
800
|
*/
|
|
@@ -902,6 +902,18 @@ export declare interface DocumentClassifierDetails {
|
|
|
902
902
|
};
|
|
903
903
|
}
|
|
904
904
|
|
|
905
|
+
/**
|
|
906
|
+
* A set of sources used to create a document classifier. This is a map of
|
|
907
|
+
* document type names to sources that will be used to train the model to
|
|
908
|
+
* classify documents of the corresponding source type.
|
|
909
|
+
*/
|
|
910
|
+
export declare interface DocumentClassifierDocumentTypeSources {
|
|
911
|
+
/**
|
|
912
|
+
* The training data source of a given document type name.
|
|
913
|
+
*/
|
|
914
|
+
[docType: string]: DocumentClassifierSource;
|
|
915
|
+
}
|
|
916
|
+
|
|
905
917
|
/**
|
|
906
918
|
* The state of a model creation operation.
|
|
907
919
|
*/
|
|
@@ -914,6 +926,15 @@ export declare interface DocumentClassifierOperationState extends PollOperationS
|
|
|
914
926
|
*/
|
|
915
927
|
export declare type DocumentClassifierPoller = PollerLike<DocumentClassifierOperationState, DocumentClassifierDetails>;
|
|
916
928
|
|
|
929
|
+
/**
|
|
930
|
+
* A content source that may be used to build a document classifier.
|
|
931
|
+
*
|
|
932
|
+
* One of:
|
|
933
|
+
* - BlobSource
|
|
934
|
+
* - BlobFileListSource
|
|
935
|
+
*/
|
|
936
|
+
export declare type DocumentClassifierSource = AzureBlobSource | AzureBlobFileListSource;
|
|
937
|
+
|
|
917
938
|
/**
|
|
918
939
|
* A DocumentField that has a value indicating a country or region, represented as a string.
|
|
919
940
|
*/
|
|
@@ -1049,20 +1070,6 @@ export declare interface DocumentFormula extends HasBoundingPolygon {
|
|
|
1049
1070
|
*/
|
|
1050
1071
|
export declare type DocumentFormulaKind = string;
|
|
1051
1072
|
|
|
1052
|
-
/**
|
|
1053
|
-
* An extracted image. Images are represented as pages, so this type contains the 1-based index of the page containing
|
|
1054
|
-
* this image's data as well as the layout information of the image (`span`, `boundingPolygon`) and the confidence
|
|
1055
|
-
* value.
|
|
1056
|
-
*/
|
|
1057
|
-
export declare interface DocumentImage extends HasBoundingPolygon {
|
|
1058
|
-
/** Page number of this image's data. (1-based) */
|
|
1059
|
-
pageNumber: number;
|
|
1060
|
-
/** Location of the image in the reading-order concatenated `content`. */
|
|
1061
|
-
span: DocumentSpan;
|
|
1062
|
-
/** Confidence of correctly extracting the image. */
|
|
1063
|
-
confidence: number;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
1073
|
/**
|
|
1067
1074
|
* A DocumentField that has an integer value.
|
|
1068
1075
|
*/
|
|
@@ -1087,8 +1094,6 @@ export declare interface DocumentKeyValuePair {
|
|
|
1087
1094
|
key: DocumentKeyValueElement;
|
|
1088
1095
|
/** Field value of the key-value pair. */
|
|
1089
1096
|
value?: DocumentKeyValueElement;
|
|
1090
|
-
/** Common name of the key-value pair. */
|
|
1091
|
-
commonName?: string;
|
|
1092
1097
|
/** Confidence of correctly extracting the key-value pair. */
|
|
1093
1098
|
confidence: number;
|
|
1094
1099
|
}
|
|
@@ -1131,7 +1136,7 @@ export declare interface DocumentModel<Result> {
|
|
|
1131
1136
|
/**
|
|
1132
1137
|
* The API version of the model.
|
|
1133
1138
|
*/
|
|
1134
|
-
apiVersion?:
|
|
1139
|
+
apiVersion?: string;
|
|
1135
1140
|
/**
|
|
1136
1141
|
* An associated transformation that is used to conver the base (weak) Result type to the strong version.
|
|
1137
1142
|
*/
|
|
@@ -1260,6 +1265,45 @@ export declare class DocumentModelAdministrationClient {
|
|
|
1260
1265
|
* @returns a long-running operation (poller) that will eventually produce the created model information or an error
|
|
1261
1266
|
*/
|
|
1262
1267
|
beginBuildDocumentModel(modelId: string, containerUrl: string, buildMode: DocumentModelBuildMode, options?: BeginBuildDocumentModelOptions): Promise<DocumentModelPoller>;
|
|
1268
|
+
/**
|
|
1269
|
+
* Build a new model with a given ID from a model content source.
|
|
1270
|
+
*
|
|
1271
|
+
* The Model ID can consist of any text, so long as it does not begin with "prebuilt-" (as these models refer to
|
|
1272
|
+
* prebuilt Form Recognizer models that are common to all resources), and so long as it does not already exist within
|
|
1273
|
+
* the resource.
|
|
1274
|
+
*
|
|
1275
|
+
* The content source describes the mechanism the service will use to read the input training data. See the
|
|
1276
|
+
* {@link DocumentModelContentSource} type for more information.
|
|
1277
|
+
*
|
|
1278
|
+
* ### Example
|
|
1279
|
+
*
|
|
1280
|
+
* ```javascript
|
|
1281
|
+
* const modelId = "aNewModel";
|
|
1282
|
+
*
|
|
1283
|
+
* const poller = await client.beginBuildDocumentModel(modelId, { containerUrl: "<SAS-encoded blob container URL>" }, {
|
|
1284
|
+
* // Optionally, a text description may be attached to the model
|
|
1285
|
+
* description: "This is an example model!"
|
|
1286
|
+
* });
|
|
1287
|
+
*
|
|
1288
|
+
* // Model building, like all other model creation operations, returns a poller that eventually produces a ModelDetails
|
|
1289
|
+
* // object
|
|
1290
|
+
* const modelDetails = await poller.pollUntilDone();
|
|
1291
|
+
*
|
|
1292
|
+
* const {
|
|
1293
|
+
* modelId, // identical to the modelId given when creating the model
|
|
1294
|
+
* description, // identical to the description given when creating the model
|
|
1295
|
+
* createdOn, // the Date (timestamp) that the model was created
|
|
1296
|
+
* docTypes // information about the document types in the model and their field schemas
|
|
1297
|
+
* } = modelDetails;
|
|
1298
|
+
* ```
|
|
1299
|
+
*
|
|
1300
|
+
* @param modelId - the unique ID of the model to create
|
|
1301
|
+
* @param contentSource - a content source that provides the training data for this model
|
|
1302
|
+
* @param buildMode - the mode to use when building the model (see `DocumentModelBuildMode`)
|
|
1303
|
+
* @param options - optional settings for the model build operation
|
|
1304
|
+
* @returns a long-running operation (poller) that will eventually produce the created model information or an error
|
|
1305
|
+
*/
|
|
1306
|
+
beginBuildDocumentModel(modelId: string, contentSource: DocumentModelSource, buildMode: DocumentModelBuildMode, options?: BeginBuildDocumentModelOptions): Promise<DocumentModelPoller>;
|
|
1263
1307
|
/**
|
|
1264
1308
|
* Creates a single composed model from several pre-existing submodels.
|
|
1265
1309
|
*
|
|
@@ -1418,13 +1462,12 @@ export declare class DocumentModelAdministrationClient {
|
|
|
1418
1462
|
* ```
|
|
1419
1463
|
*
|
|
1420
1464
|
* @param classifierId - the unique ID of the classifier to create
|
|
1421
|
-
* @param
|
|
1465
|
+
* @param docTypeSources - the document types to include in the classifier and their sources (a map of document type
|
|
1466
|
+
* names to `ClassifierDocumentTypeDetails`)
|
|
1422
1467
|
* @param options - optional settings for the classifier build operation
|
|
1423
1468
|
* @returns a long-running operation (poller) that will eventually produce the created classifier details or an error
|
|
1424
1469
|
*/
|
|
1425
|
-
beginBuildDocumentClassifier(classifierId: string,
|
|
1426
|
-
[docType: string]: ClassifierDocumentTypeDetails;
|
|
1427
|
-
}, options?: BeginBuildDocumentClassifierOptions): Promise<DocumentClassifierPoller>;
|
|
1470
|
+
beginBuildDocumentClassifier(classifierId: string, docTypeSources: DocumentClassifierDocumentTypeSources, options?: BeginBuildDocumentClassifierOptions): Promise<DocumentClassifierPoller>;
|
|
1428
1471
|
/**
|
|
1429
1472
|
* Create an LRO poller that handles model creation operations.
|
|
1430
1473
|
*
|
|
@@ -1718,7 +1761,7 @@ export declare class DocumentModelAdministrationClient {
|
|
|
1718
1761
|
/**
|
|
1719
1762
|
* Configurable options for DocumentModelAdministrationClient.
|
|
1720
1763
|
*/
|
|
1721
|
-
export declare interface DocumentModelAdministrationClientOptions extends
|
|
1764
|
+
export declare interface DocumentModelAdministrationClientOptions extends CommonClientOptions {
|
|
1722
1765
|
}
|
|
1723
1766
|
|
|
1724
1767
|
/**
|
|
@@ -1809,6 +1852,15 @@ export declare interface DocumentModelOperationState extends PollOperationState<
|
|
|
1809
1852
|
*/
|
|
1810
1853
|
export declare type DocumentModelPoller = PollerLike<DocumentModelOperationState, DocumentModelDetails>;
|
|
1811
1854
|
|
|
1855
|
+
/**
|
|
1856
|
+
* A content source that may be used to build a document model.
|
|
1857
|
+
*
|
|
1858
|
+
* One of:
|
|
1859
|
+
* - BlobSource
|
|
1860
|
+
* - BlobFileListSource
|
|
1861
|
+
*/
|
|
1862
|
+
export declare type DocumentModelSource = AzureBlobSource | AzureBlobFileListSource;
|
|
1863
|
+
|
|
1812
1864
|
/** Document model summary. */
|
|
1813
1865
|
export declare interface DocumentModelSummary {
|
|
1814
1866
|
/** Unique document model name. */
|
|
@@ -1851,17 +1903,6 @@ export declare interface DocumentObjectField<Properties = {
|
|
|
1851
1903
|
|
|
1852
1904
|
/** Content and layout elements extracted from a page from the input. */
|
|
1853
1905
|
export declare interface DocumentPage {
|
|
1854
|
-
/**
|
|
1855
|
-
* The type of content that this page represents. One of:
|
|
1856
|
-
*
|
|
1857
|
-
* - "document": A page from a PDF or image file. All content from Office/HTML files is represented as a single page.
|
|
1858
|
-
* - "sheet": A sheet from a spreadsheet.
|
|
1859
|
-
* - "slide": A slide from a presentation.
|
|
1860
|
-
* - "image": An embedded image from an Office/HTML file.
|
|
1861
|
-
*
|
|
1862
|
-
* If the page type is not known, the value is "document" by default.
|
|
1863
|
-
*/
|
|
1864
|
-
kind: DocumentPageKind;
|
|
1865
1906
|
/** 1-based page number in the input document. */
|
|
1866
1907
|
pageNumber: number;
|
|
1867
1908
|
/** The general orientation of the content in clockwise direction, measured in degrees between (-180, 180]. */
|
|
@@ -1880,10 +1921,6 @@ export declare interface DocumentPage {
|
|
|
1880
1921
|
selectionMarks?: DocumentSelectionMark[];
|
|
1881
1922
|
/** Extracted lines from the page, potentially containing both textual and visual elements. */
|
|
1882
1923
|
lines?: DocumentLine[];
|
|
1883
|
-
/**
|
|
1884
|
-
* Extracted annotations from the page, such as check marks or cross marks.
|
|
1885
|
-
*/
|
|
1886
|
-
annotations?: DocumentAnnotation[];
|
|
1887
1924
|
/**
|
|
1888
1925
|
* Extracted barcodes from the page.
|
|
1889
1926
|
*/
|
|
@@ -1891,29 +1928,13 @@ export declare interface DocumentPage {
|
|
|
1891
1928
|
/**
|
|
1892
1929
|
* Extracted formulas from the page.
|
|
1893
1930
|
*
|
|
1894
|
-
* The `"
|
|
1931
|
+
* The `"formulas"` feature must be enabled or this property will be undefined.
|
|
1895
1932
|
*
|
|
1896
1933
|
* See {@link AnalyzeDocumentOptions#features}.
|
|
1897
1934
|
*/
|
|
1898
1935
|
formulas?: DocumentFormula[];
|
|
1899
|
-
/**
|
|
1900
|
-
* Extracted images in the page.
|
|
1901
|
-
*/
|
|
1902
|
-
images?: DocumentImage[];
|
|
1903
1936
|
}
|
|
1904
1937
|
|
|
1905
|
-
/**
|
|
1906
|
-
* Defines values for DocumentPageKind. \
|
|
1907
|
-
* {@link KnownDocumentPageKind} can be used interchangeably with DocumentPageKind,
|
|
1908
|
-
* this enum contains the known values that the service supports.
|
|
1909
|
-
* ### Known values supported by the service
|
|
1910
|
-
* **document**: A page from a PDF or image file. All content from Office\/HTML files is represented as a single page. \
|
|
1911
|
-
* **sheet**: A sheet from a spreadsheet. \
|
|
1912
|
-
* **slide**: A slide from a presentation. \
|
|
1913
|
-
* **image**: An embedded image from an Office\/HTML file.
|
|
1914
|
-
*/
|
|
1915
|
-
export declare type DocumentPageKind = string;
|
|
1916
|
-
|
|
1917
1938
|
/** A paragraph object consisting with contiguous lines generally with common alignment and spacing. */
|
|
1918
1939
|
export declare interface DocumentParagraph {
|
|
1919
1940
|
/** Semantic role of the paragraph. */
|
|
@@ -2162,52 +2183,6 @@ export declare type FontStyle = string;
|
|
|
2162
2183
|
*/
|
|
2163
2184
|
export declare type FontWeight = string;
|
|
2164
2185
|
|
|
2165
|
-
/**
|
|
2166
|
-
* Valid values of the Form Recognizer service REST API version.
|
|
2167
|
-
*/
|
|
2168
|
-
export declare type FormRecognizerApiVersion = (typeof FormRecognizerApiVersion)[keyof typeof FormRecognizerApiVersion];
|
|
2169
|
-
|
|
2170
|
-
/**
|
|
2171
|
-
* Supported and common values of FormRecognizerApiVersion.
|
|
2172
|
-
*/
|
|
2173
|
-
export declare const FormRecognizerApiVersion: {
|
|
2174
|
-
/**
|
|
2175
|
-
* The newest version of the service known to be supported by the client (default).
|
|
2176
|
-
*
|
|
2177
|
-
* If using a beta package version, this will be identical to the latest preview version. Otherwise, it will be
|
|
2178
|
-
* identical to the latest stable version.
|
|
2179
|
-
*/
|
|
2180
|
-
readonly Latest: "2023-02-28-preview";
|
|
2181
|
-
/**
|
|
2182
|
-
* The newest stable version of the service known to be supported by the package. This will be a Generally Available
|
|
2183
|
-
* (GA) version, even if the package version is a beta.
|
|
2184
|
-
*/
|
|
2185
|
-
readonly Stable: "2022-08-31";
|
|
2186
|
-
/**
|
|
2187
|
-
* Form Recognizer API version 2022-08-31 (GA).
|
|
2188
|
-
*/
|
|
2189
|
-
readonly "2022-08-31": "2022-08-31";
|
|
2190
|
-
/**
|
|
2191
|
-
* Form Recognizer API version 2023-02-28-preview.
|
|
2192
|
-
*/
|
|
2193
|
-
readonly "2023-02-28-preview": "2023-02-28-preview";
|
|
2194
|
-
};
|
|
2195
|
-
|
|
2196
|
-
/**
|
|
2197
|
-
* Configurable options for the Form Recognizer service clients (DocumentAnalysisClient and
|
|
2198
|
-
* DocumentModelAdministrationClient).
|
|
2199
|
-
*/
|
|
2200
|
-
export declare interface FormRecognizerCommonClientOptions extends CommonClientOptions {
|
|
2201
|
-
/**
|
|
2202
|
-
* The version of the Form Recognizer REST API to call. Service versions 2.1 and lower (non-date-based versions) are
|
|
2203
|
-
* not supported by this client. To use API version 2.1, please use version 3 of the Azure Form Recognizer SDK for
|
|
2204
|
-
* JavaScript (\@azure/ai-form-recognizer\@^3.2.0).
|
|
2205
|
-
*
|
|
2206
|
-
* Default: FormRecognizerApiVersion.Stable ("2022-08-31")
|
|
2207
|
-
*/
|
|
2208
|
-
apiVersion?: FormRecognizerApiVersion;
|
|
2209
|
-
}
|
|
2210
|
-
|
|
2211
2186
|
/**
|
|
2212
2187
|
* Add-on capabilities (features) that can be enabled for the request.
|
|
2213
2188
|
*
|
|
@@ -2217,23 +2192,34 @@ export declare interface FormRecognizerCommonClientOptions extends CommonClientO
|
|
|
2217
2192
|
*/
|
|
2218
2193
|
export declare type FormRecognizerFeature = (typeof FormRecognizerFeature)[keyof typeof FormRecognizerFeature] | (string & {});
|
|
2219
2194
|
|
|
2195
|
+
/**
|
|
2196
|
+
* Known feature flags supported by the Form Recognizer clients.
|
|
2197
|
+
*/
|
|
2220
2198
|
export declare const FormRecognizerFeature: {
|
|
2221
|
-
/**
|
|
2222
|
-
* Enables the use of Query Fields.
|
|
2223
|
-
*/
|
|
2224
|
-
readonly QueryFieldsPremium: "queryFields.premium";
|
|
2225
2199
|
/**
|
|
2226
2200
|
* Enables extracting extra font information.
|
|
2227
2201
|
*/
|
|
2228
|
-
readonly
|
|
2202
|
+
readonly Fonts: "styleFont";
|
|
2229
2203
|
/**
|
|
2230
2204
|
* Enables high-resolution processing for documents with small text.
|
|
2231
2205
|
*/
|
|
2232
|
-
readonly OcrHighResolution: "
|
|
2206
|
+
readonly OcrHighResolution: "ocrHighResolution";
|
|
2207
|
+
/**
|
|
2208
|
+
* Enables the detection of mathematical expressions in the document..
|
|
2209
|
+
*/
|
|
2210
|
+
readonly Formulas: "formulas";
|
|
2211
|
+
/**
|
|
2212
|
+
* Enables the detection of the text content language.
|
|
2213
|
+
*/
|
|
2214
|
+
readonly Languages: "languages";
|
|
2215
|
+
/**
|
|
2216
|
+
* Enables the detection of barcodes in the document.
|
|
2217
|
+
*/
|
|
2218
|
+
readonly Barcodes: "barcodes";
|
|
2233
2219
|
/**
|
|
2234
|
-
*
|
|
2220
|
+
* Enables the detection of general key value pairs (form fields) in the document.
|
|
2235
2221
|
*/
|
|
2236
|
-
readonly
|
|
2222
|
+
readonly KeyValuePairs: "keyValuePairs";
|
|
2237
2223
|
};
|
|
2238
2224
|
|
|
2239
2225
|
/**
|
|
@@ -2283,14 +2269,6 @@ export declare interface InnerError {
|
|
|
2283
2269
|
innererror?: InnerError;
|
|
2284
2270
|
}
|
|
2285
2271
|
|
|
2286
|
-
/** Known values of {@link DocumentAnnotationKind} that the service accepts. */
|
|
2287
|
-
export declare enum KnownDocumentAnnotationKind {
|
|
2288
|
-
/** A visual check ✓. */
|
|
2289
|
-
Check = "check",
|
|
2290
|
-
/** A visual cross X. */
|
|
2291
|
-
Cross = "cross"
|
|
2292
|
-
}
|
|
2293
|
-
|
|
2294
2272
|
/** Known values of {@link DocumentBarcodeKind} that the service accepts. */
|
|
2295
2273
|
export declare enum KnownDocumentBarcodeKind {
|
|
2296
2274
|
/** QR code, as defined in ISO/IEC 18004:2015. */
|
|
@@ -2377,18 +2355,6 @@ export declare enum KnownDocumentFormulaKind {
|
|
|
2377
2355
|
Display = "display"
|
|
2378
2356
|
}
|
|
2379
2357
|
|
|
2380
|
-
/** Known values of {@link DocumentPageKind} that the service accepts. */
|
|
2381
|
-
export declare enum KnownDocumentPageKind {
|
|
2382
|
-
/** A page from a PDF or image file. All content from Office/HTML files is represented as a single page. */
|
|
2383
|
-
Document = "document",
|
|
2384
|
-
/** A sheet from a spreadsheet. */
|
|
2385
|
-
Sheet = "sheet",
|
|
2386
|
-
/** A slide from a presentation. */
|
|
2387
|
-
Slide = "slide",
|
|
2388
|
-
/** An embedded image from an Office/HTML file. */
|
|
2389
|
-
Image = "image"
|
|
2390
|
-
}
|
|
2391
|
-
|
|
2392
2358
|
/** Known values of {@link DocumentSignatureType} that the service accepts. */
|
|
2393
2359
|
export declare enum KnownDocumentSignatureType {
|
|
2394
2360
|
/** A signature is detected. */
|
|
@@ -2561,6 +2527,9 @@ export declare interface OperationDetails {
|
|
|
2561
2527
|
error?: ErrorModel;
|
|
2562
2528
|
}
|
|
2563
2529
|
|
|
2530
|
+
/**
|
|
2531
|
+
* Details about any of several different types of Form Recognizer management operations.
|
|
2532
|
+
*/
|
|
2564
2533
|
export declare type OperationDetailsUnion = OperationDetails | DocumentModelBuildOperationDetails | DocumentModelComposeOperationDetails | DocumentModelCopyToOperationDetails | DocumentClassifierBuildOperationDetails;
|
|
2565
2534
|
|
|
2566
2535
|
/**
|