@azure/ai-form-recognizer 5.0.0 → 5.1.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/LICENSE +3 -3
- package/README.md +322 -340
- package/dist/browser/azureKeyCredentialPolicy.d.ts +8 -0
- package/dist/browser/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/azureKeyCredentialPolicy.js +1 -1
- package/dist/browser/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/browser/bin/defaultFields.d.ts +14 -0
- package/dist/browser/bin/defaultFields.d.ts.map +1 -0
- package/dist/browser/bin/defaultFields.js +83 -0
- package/dist/browser/bin/defaultFields.js.map +1 -0
- package/dist/browser/bin/gen-model.d.ts +3 -0
- package/dist/browser/bin/gen-model.d.ts.map +1 -0
- package/dist/browser/bin/gen-model.js +101 -0
- package/dist/browser/bin/gen-model.js.map +1 -0
- package/dist/browser/bin/utils.d.ts +22 -0
- package/dist/browser/bin/utils.d.ts.map +1 -0
- package/dist/browser/bin/utils.js +21 -0
- package/dist/browser/bin/utils.js.map +1 -0
- package/dist/browser/bin/writeModelCode.d.ts +9 -0
- package/dist/browser/bin/writeModelCode.d.ts.map +1 -0
- package/dist/browser/bin/writeModelCode.js +323 -0
- package/dist/browser/bin/writeModelCode.js.map +1 -0
- package/dist/browser/constants.d.ts +29 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/constants.js +32 -0
- package/dist/browser/constants.js.map +1 -0
- package/dist/browser/documentAnalysisClient.d.ts +485 -0
- package/dist/browser/documentAnalysisClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/documentAnalysisClient.js +85 -47
- package/dist/browser/documentAnalysisClient.js.map +1 -0
- package/dist/browser/documentModel.d.ts +34 -0
- package/dist/browser/documentModel.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/documentModel.js +3 -3
- package/dist/browser/documentModel.js.map +1 -0
- package/dist/browser/documentModelAdministrationClient.d.ts +792 -0
- package/dist/browser/documentModelAdministrationClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/documentModelAdministrationClient.js +202 -92
- package/dist/browser/documentModelAdministrationClient.js.map +1 -0
- package/dist/browser/error.d.ts +31 -0
- package/dist/browser/error.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/error.js +1 -1
- package/dist/browser/error.js.map +1 -0
- package/dist/browser/generated/generatedClient.d.ts +21 -0
- package/dist/browser/generated/generatedClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/generatedClient.js +2 -2
- package/dist/browser/generated/generatedClient.js.map +1 -0
- package/dist/browser/generated/index.d.ts +4 -0
- package/dist/browser/generated/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/index.js +3 -3
- package/dist/browser/generated/index.js.map +1 -0
- package/dist/browser/generated/models/index.d.ts +1208 -0
- package/dist/browser/generated/models/index.d.ts.map +1 -0
- package/dist/browser/generated/models/mappers.d.ts +67 -0
- package/dist/browser/generated/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/models/parameters.d.ts +31 -0
- package/dist/browser/generated/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/models/parameters.js +1 -1
- package/dist/browser/generated/models/parameters.js.map +1 -0
- package/dist/browser/generated/operations/documentClassifiers.d.ts +78 -0
- package/dist/browser/generated/operations/documentClassifiers.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/operations/documentClassifiers.js +5 -10
- package/dist/browser/generated/operations/documentClassifiers.js.map +1 -0
- package/dist/browser/generated/operations/documentModels.d.ts +98 -0
- package/dist/browser/generated/operations/documentModels.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/operations/documentModels.js +5 -10
- package/dist/browser/generated/operations/documentModels.js.map +1 -0
- package/dist/browser/generated/operations/index.d.ts +4 -0
- package/dist/browser/generated/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/operationsInterfaces → dist/browser/generated/operations}/index.js +3 -3
- package/{dist-esm/src → dist/browser}/generated/operations/index.js.map +1 -1
- package/dist/browser/generated/operations/miscellaneous.d.ts +43 -0
- package/dist/browser/generated/operations/miscellaneous.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/operations/miscellaneous.js +5 -10
- package/dist/browser/generated/operations/miscellaneous.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
- package/dist/browser/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/documentModels.d.ts +69 -0
- package/dist/browser/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/documentModels.js.map +1 -0
- package/dist/browser/generated/operationsInterfaces/index.d.ts +4 -0
- package/dist/browser/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/index.js +11 -0
- package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
- package/dist/browser/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
- package/dist/browser/generated/operationsInterfaces/miscellaneous.js.map +1 -0
- package/dist/browser/index.d.ts +18 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/index.js +8 -7
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/lro/administration.d.ts +101 -0
- package/dist/browser/lro/administration.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/lro/administration.js +2 -2
- package/dist/browser/lro/administration.js.map +1 -0
- package/dist/browser/lro/analysis.d.ts +210 -0
- package/dist/browser/lro/analysis.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/lro/analysis.js +5 -5
- package/dist/browser/lro/analysis.js.map +1 -0
- package/dist/browser/lro/util/delayMs.d.ts +32 -0
- package/dist/browser/lro/util/delayMs.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/lro/util/delayMs.js +3 -3
- package/dist/browser/lro/util/delayMs.js.map +1 -0
- package/dist/browser/lro/util/poller.d.ts +41 -0
- package/dist/browser/lro/util/poller.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/lro/util/poller.js +2 -2
- package/dist/browser/lro/util/poller.js.map +1 -0
- package/dist/browser/models/contentSource.d.ts +56 -0
- package/dist/browser/models/contentSource.d.ts.map +1 -0
- package/dist/browser/models/contentSource.js +4 -0
- package/dist/browser/models/contentSource.js.map +1 -0
- package/dist/browser/models/documentElements.d.ts +210 -0
- package/dist/browser/models/documentElements.d.ts.map +1 -0
- package/dist/browser/models/documentElements.js +4 -0
- package/dist/browser/models/documentElements.js.map +1 -0
- package/dist/browser/models/fields.d.ts +205 -0
- package/dist/browser/models/fields.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/models/fields.js +3 -3
- package/{dist-esm/src → dist/browser}/models/fields.js.map +1 -1
- package/dist/browser/models/index.d.ts +4 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +4 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/options/AnalyzeDocumentOptions.d.ts +69 -0
- package/dist/browser/options/AnalyzeDocumentOptions.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/options/AnalyzeDocumentOptions.js +1 -1
- package/dist/browser/options/AnalyzeDocumentOptions.js.map +1 -0
- package/dist/browser/options/BeginCopyModelOptions.d.ts +9 -0
- package/dist/browser/options/BeginCopyModelOptions.d.ts.map +1 -0
- package/dist/browser/options/BeginCopyModelOptions.js +4 -0
- package/dist/browser/options/BeginCopyModelOptions.js.map +1 -0
- package/dist/browser/options/BuildDocumentClassifierOptions.d.ts +13 -0
- package/dist/browser/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
- package/dist/browser/options/BuildDocumentClassifierOptions.js +4 -0
- package/dist/browser/options/BuildDocumentClassifierOptions.js.map +1 -0
- package/dist/browser/options/BuildModelOptions.d.ts +61 -0
- package/dist/browser/options/BuildModelOptions.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/options/BuildModelOptions.js +1 -1
- package/dist/browser/options/BuildModelOptions.js.map +1 -0
- package/dist/browser/options/ClassifyDocumentOptions.d.ts +9 -0
- package/dist/browser/options/ClassifyDocumentOptions.d.ts.map +1 -0
- package/dist/browser/options/ClassifyDocumentOptions.js +4 -0
- package/dist/browser/options/ClassifyDocumentOptions.js.map +1 -0
- package/dist/browser/options/DeleteModelOptions.d.ts +7 -0
- package/dist/browser/options/DeleteModelOptions.d.ts.map +1 -0
- package/dist/browser/options/DeleteModelOptions.js +4 -0
- package/dist/browser/options/DeleteModelOptions.js.map +1 -0
- package/dist/browser/options/FormRecognizerClientOptions.d.ts +70 -0
- package/dist/browser/options/FormRecognizerClientOptions.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/options/FormRecognizerClientOptions.js +1 -1
- package/dist/browser/options/FormRecognizerClientOptions.js.map +1 -0
- package/dist/browser/options/GetCopyAuthorizationOptions.d.ts +8 -0
- package/dist/browser/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
- package/dist/browser/options/GetCopyAuthorizationOptions.js +4 -0
- package/dist/browser/options/GetCopyAuthorizationOptions.js.map +1 -0
- package/dist/browser/options/GetModelOptions.d.ts +7 -0
- package/dist/browser/options/GetModelOptions.d.ts.map +1 -0
- package/dist/browser/options/GetModelOptions.js +4 -0
- package/dist/browser/options/GetModelOptions.js.map +1 -0
- package/dist/browser/options/GetOperationOptions.d.ts +7 -0
- package/dist/browser/options/GetOperationOptions.d.ts.map +1 -0
- package/dist/browser/options/GetOperationOptions.js +4 -0
- package/dist/browser/options/GetOperationOptions.js.map +1 -0
- package/dist/browser/options/GetResourceDetailsOptions.d.ts +7 -0
- package/dist/browser/options/GetResourceDetailsOptions.d.ts.map +1 -0
- package/dist/browser/options/GetResourceDetailsOptions.js +4 -0
- package/{dist-esm/src → dist/browser}/options/GetResourceDetailsOptions.js.map +1 -1
- package/dist/browser/options/ListModelsOptions.d.ts +7 -0
- package/dist/browser/options/ListModelsOptions.d.ts.map +1 -0
- package/dist/browser/options/ListModelsOptions.js +4 -0
- package/dist/browser/options/ListModelsOptions.js.map +1 -0
- package/dist/browser/options/ListOperationsOptions.d.ts +7 -0
- package/dist/browser/options/ListOperationsOptions.d.ts.map +1 -0
- package/dist/browser/options/ListOperationsOptions.js +4 -0
- package/{dist-esm/src → dist/browser}/options/ListOperationsOptions.js.map +1 -1
- package/dist/browser/options/PollerOptions.d.ts +22 -0
- package/dist/browser/options/PollerOptions.d.ts.map +1 -0
- package/dist/browser/options/PollerOptions.js +4 -0
- package/dist/browser/options/PollerOptions.js.map +1 -0
- package/dist/browser/options/index.d.ts +16 -0
- package/dist/browser/options/index.d.ts.map +1 -0
- package/dist/browser/options/index.js +7 -0
- package/dist/browser/options/index.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/transforms/polygon.d.ts +20 -0
- package/dist/browser/transforms/polygon.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/transforms/polygon.js +1 -1
- package/dist/browser/transforms/polygon.js.map +1 -0
- package/dist/browser/util.d.ts +33 -0
- package/dist/browser/util.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/util.js +12 -7
- package/dist/browser/util.js.map +1 -0
- package/dist/commonjs/azureKeyCredentialPolicy.d.ts +8 -0
- package/dist/commonjs/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/commonjs/azureKeyCredentialPolicy.js +20 -0
- package/dist/commonjs/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/commonjs/bin/defaultFields.d.ts +14 -0
- package/dist/commonjs/bin/defaultFields.d.ts.map +1 -0
- package/dist/commonjs/bin/defaultFields.js +87 -0
- package/dist/commonjs/bin/defaultFields.js.map +1 -0
- package/dist/commonjs/bin/gen-model.d.ts +3 -0
- package/dist/commonjs/bin/gen-model.d.ts.map +1 -0
- package/dist/commonjs/bin/gen-model.js +103 -0
- package/dist/commonjs/bin/gen-model.js.map +1 -0
- package/dist/commonjs/bin/utils.d.ts +22 -0
- package/dist/commonjs/bin/utils.d.ts.map +1 -0
- package/dist/commonjs/bin/utils.js +26 -0
- package/dist/commonjs/bin/utils.js.map +1 -0
- package/dist/commonjs/bin/writeModelCode.d.ts +9 -0
- package/dist/commonjs/bin/writeModelCode.d.ts.map +1 -0
- package/dist/commonjs/bin/writeModelCode.js +326 -0
- package/dist/commonjs/bin/writeModelCode.js.map +1 -0
- package/dist/commonjs/constants.d.ts +29 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +35 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/documentAnalysisClient.d.ts +485 -0
- package/dist/commonjs/documentAnalysisClient.d.ts.map +1 -0
- package/dist/commonjs/documentAnalysisClient.js +351 -0
- package/dist/commonjs/documentAnalysisClient.js.map +1 -0
- package/dist/commonjs/documentModel.d.ts +34 -0
- package/dist/commonjs/documentModel.d.ts.map +1 -0
- package/dist/commonjs/documentModel.js +76 -0
- package/dist/commonjs/documentModel.js.map +1 -0
- package/dist/commonjs/documentModelAdministrationClient.d.ts +792 -0
- package/dist/commonjs/documentModelAdministrationClient.d.ts.map +1 -0
- package/dist/commonjs/documentModelAdministrationClient.js +763 -0
- package/dist/commonjs/documentModelAdministrationClient.js.map +1 -0
- package/dist/commonjs/error.d.ts +31 -0
- package/dist/commonjs/error.d.ts.map +1 -0
- package/dist/commonjs/error.js +43 -0
- package/dist/commonjs/error.js.map +1 -0
- package/dist/commonjs/generated/generatedClient.d.ts +21 -0
- package/dist/commonjs/generated/generatedClient.d.ts.map +1 -0
- package/dist/commonjs/generated/generatedClient.js +94 -0
- package/dist/commonjs/generated/generatedClient.js.map +1 -0
- package/dist/commonjs/generated/index.d.ts +4 -0
- package/dist/commonjs/generated/index.d.ts.map +1 -0
- package/dist/commonjs/generated/index.js +17 -0
- package/dist/commonjs/generated/index.js.map +1 -0
- package/dist/commonjs/generated/models/index.d.ts +1208 -0
- package/dist/commonjs/generated/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/models/index.js +207 -0
- package/dist/commonjs/generated/models/index.js.map +1 -0
- package/dist/commonjs/generated/models/mappers.d.ts +67 -0
- package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/models/mappers.js +2505 -0
- package/dist/commonjs/generated/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/models/parameters.d.ts +31 -0
- package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/models/parameters.js +294 -0
- package/dist/commonjs/generated/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/operations/documentClassifiers.d.ts +78 -0
- package/dist/commonjs/generated/operations/documentClassifiers.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/documentClassifiers.js +334 -0
- package/dist/commonjs/generated/operations/documentClassifiers.js.map +1 -0
- package/dist/commonjs/generated/operations/documentModels.d.ts +98 -0
- package/dist/commonjs/generated/operations/documentModels.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/documentModels.js +428 -0
- package/dist/commonjs/generated/operations/documentModels.js.map +1 -0
- package/dist/commonjs/generated/operations/index.d.ts +4 -0
- package/dist/commonjs/generated/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/index.js +14 -0
- package/dist/commonjs/generated/operations/index.js.map +1 -0
- package/dist/commonjs/generated/operations/miscellaneous.d.ts +43 -0
- package/dist/commonjs/generated/operations/miscellaneous.d.ts.map +1 -0
- package/dist/commonjs/generated/operations/miscellaneous.js +173 -0
- package/dist/commonjs/generated/operations/miscellaneous.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
- package/dist/commonjs/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
- package/{dist-esm/src/generated/operations/index.js → dist/commonjs/generated/operationsInterfaces/documentClassifiers.js} +3 -4
- package/dist/commonjs/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/documentModels.d.ts +69 -0
- package/dist/commonjs/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/documentModels.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/documentModels.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts +4 -0
- package/dist/commonjs/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js +14 -0
- package/dist/commonjs/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
- package/dist/commonjs/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
- package/dist/commonjs/generated/operationsInterfaces/miscellaneous.js +10 -0
- package/dist/commonjs/generated/operationsInterfaces/miscellaneous.js.map +1 -0
- package/dist/commonjs/index.d.ts +18 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +38 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lro/administration.d.ts +101 -0
- package/dist/commonjs/lro/administration.d.ts.map +1 -0
- package/dist/commonjs/lro/administration.js +32 -0
- package/dist/commonjs/lro/administration.js.map +1 -0
- package/dist/commonjs/lro/analysis.d.ts +210 -0
- package/dist/commonjs/lro/analysis.d.ts.map +1 -0
- package/dist/commonjs/lro/analysis.js +186 -0
- package/dist/commonjs/lro/analysis.js.map +1 -0
- package/dist/commonjs/lro/util/delayMs.d.ts +32 -0
- package/dist/commonjs/lro/util/delayMs.d.ts.map +1 -0
- package/dist/commonjs/lro/util/delayMs.js +55 -0
- package/dist/commonjs/lro/util/delayMs.js.map +1 -0
- package/dist/commonjs/lro/util/poller.d.ts +41 -0
- package/dist/commonjs/lro/util/poller.d.ts.map +1 -0
- package/dist/commonjs/lro/util/poller.js +87 -0
- package/dist/commonjs/lro/util/poller.js.map +1 -0
- package/dist/commonjs/models/contentSource.d.ts +56 -0
- package/dist/commonjs/models/contentSource.d.ts.map +1 -0
- package/dist/commonjs/models/contentSource.js +5 -0
- package/dist/commonjs/models/contentSource.js.map +1 -0
- package/dist/commonjs/models/documentElements.d.ts +210 -0
- package/dist/commonjs/models/documentElements.d.ts.map +1 -0
- package/dist/commonjs/models/documentElements.js +5 -0
- package/dist/commonjs/models/documentElements.js.map +1 -0
- package/dist/commonjs/models/fields.d.ts +205 -0
- package/dist/commonjs/models/fields.d.ts.map +1 -0
- package/dist/commonjs/models/fields.js +59 -0
- package/dist/commonjs/models/fields.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +5 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/options/AnalyzeDocumentOptions.d.ts +69 -0
- package/dist/commonjs/options/AnalyzeDocumentOptions.d.ts.map +1 -0
- package/dist/commonjs/options/AnalyzeDocumentOptions.js +36 -0
- package/dist/commonjs/options/AnalyzeDocumentOptions.js.map +1 -0
- package/dist/commonjs/options/BeginCopyModelOptions.d.ts +9 -0
- package/dist/commonjs/options/BeginCopyModelOptions.d.ts.map +1 -0
- package/dist/commonjs/options/BeginCopyModelOptions.js +5 -0
- package/dist/commonjs/options/BeginCopyModelOptions.js.map +1 -0
- package/dist/commonjs/options/BuildDocumentClassifierOptions.d.ts +13 -0
- package/dist/commonjs/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
- package/dist/commonjs/options/BuildDocumentClassifierOptions.js +5 -0
- package/dist/commonjs/options/BuildDocumentClassifierOptions.js.map +1 -0
- package/dist/commonjs/options/BuildModelOptions.d.ts +61 -0
- package/dist/commonjs/options/BuildModelOptions.d.ts.map +1 -0
- package/dist/commonjs/options/BuildModelOptions.js +22 -0
- package/dist/commonjs/options/BuildModelOptions.js.map +1 -0
- package/dist/commonjs/options/ClassifyDocumentOptions.d.ts +9 -0
- package/dist/commonjs/options/ClassifyDocumentOptions.d.ts.map +1 -0
- package/dist/commonjs/options/ClassifyDocumentOptions.js +5 -0
- package/dist/commonjs/options/ClassifyDocumentOptions.js.map +1 -0
- package/dist/commonjs/options/DeleteModelOptions.d.ts +7 -0
- package/dist/commonjs/options/DeleteModelOptions.d.ts.map +1 -0
- package/dist/commonjs/options/DeleteModelOptions.js +5 -0
- package/dist/commonjs/options/DeleteModelOptions.js.map +1 -0
- package/dist/commonjs/options/FormRecognizerClientOptions.d.ts +70 -0
- package/dist/commonjs/options/FormRecognizerClientOptions.d.ts.map +1 -0
- package/dist/commonjs/options/FormRecognizerClientOptions.js +28 -0
- package/dist/commonjs/options/FormRecognizerClientOptions.js.map +1 -0
- package/dist/commonjs/options/GetCopyAuthorizationOptions.d.ts +8 -0
- package/dist/commonjs/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
- package/dist/commonjs/options/GetCopyAuthorizationOptions.js +5 -0
- package/dist/commonjs/options/GetCopyAuthorizationOptions.js.map +1 -0
- package/dist/commonjs/options/GetModelOptions.d.ts +7 -0
- package/dist/commonjs/options/GetModelOptions.d.ts.map +1 -0
- package/dist/commonjs/options/GetModelOptions.js +5 -0
- package/dist/commonjs/options/GetModelOptions.js.map +1 -0
- package/dist/commonjs/options/GetOperationOptions.d.ts +7 -0
- package/dist/commonjs/options/GetOperationOptions.d.ts.map +1 -0
- package/dist/commonjs/options/GetOperationOptions.js +5 -0
- package/dist/commonjs/options/GetOperationOptions.js.map +1 -0
- package/dist/commonjs/options/GetResourceDetailsOptions.d.ts +7 -0
- package/dist/commonjs/options/GetResourceDetailsOptions.d.ts.map +1 -0
- package/dist/commonjs/options/GetResourceDetailsOptions.js +5 -0
- package/dist/commonjs/options/GetResourceDetailsOptions.js.map +1 -0
- package/dist/commonjs/options/ListModelsOptions.d.ts +7 -0
- package/dist/commonjs/options/ListModelsOptions.d.ts.map +1 -0
- package/dist/commonjs/options/ListModelsOptions.js +5 -0
- package/dist/commonjs/options/ListModelsOptions.js.map +1 -0
- package/dist/commonjs/options/ListOperationsOptions.d.ts +7 -0
- package/dist/commonjs/options/ListOperationsOptions.d.ts.map +1 -0
- package/dist/commonjs/options/ListOperationsOptions.js +5 -0
- package/dist/commonjs/options/ListOperationsOptions.js.map +1 -0
- package/dist/commonjs/options/PollerOptions.d.ts +22 -0
- package/dist/commonjs/options/PollerOptions.d.ts.map +1 -0
- package/dist/commonjs/options/PollerOptions.js +5 -0
- package/dist/commonjs/options/PollerOptions.js.map +1 -0
- package/dist/commonjs/options/index.d.ts +16 -0
- package/dist/commonjs/options/index.d.ts.map +1 -0
- package/dist/commonjs/options/index.js +12 -0
- package/dist/commonjs/options/index.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/transforms/polygon.d.ts +20 -0
- package/dist/commonjs/transforms/polygon.d.ts.map +1 -0
- package/dist/commonjs/transforms/polygon.js +32 -0
- package/dist/commonjs/transforms/polygon.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/util.d.ts +33 -0
- package/dist/commonjs/util.d.ts.map +1 -0
- package/dist/commonjs/util.js +65 -0
- package/dist/commonjs/util.js.map +1 -0
- package/dist/esm/azureKeyCredentialPolicy.d.ts +8 -0
- package/dist/esm/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/esm/azureKeyCredentialPolicy.js +17 -0
- package/dist/esm/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/esm/bin/defaultFields.d.ts +14 -0
- package/dist/esm/bin/defaultFields.d.ts.map +1 -0
- package/dist/esm/bin/defaultFields.js +83 -0
- package/dist/esm/bin/defaultFields.js.map +1 -0
- package/dist/esm/bin/gen-model.d.ts +3 -0
- package/dist/esm/bin/gen-model.d.ts.map +1 -0
- package/dist/esm/bin/gen-model.js +101 -0
- package/dist/esm/bin/gen-model.js.map +1 -0
- package/dist/esm/bin/utils.d.ts +22 -0
- package/dist/esm/bin/utils.d.ts.map +1 -0
- package/dist/esm/bin/utils.js +21 -0
- package/dist/esm/bin/utils.js.map +1 -0
- package/dist/esm/bin/writeModelCode.d.ts +9 -0
- package/dist/esm/bin/writeModelCode.d.ts.map +1 -0
- package/dist/esm/bin/writeModelCode.js +323 -0
- package/dist/esm/bin/writeModelCode.js.map +1 -0
- package/dist/esm/constants.d.ts +29 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +32 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/documentAnalysisClient.d.ts +485 -0
- package/dist/esm/documentAnalysisClient.d.ts.map +1 -0
- package/dist/esm/documentAnalysisClient.js +347 -0
- package/dist/esm/documentAnalysisClient.js.map +1 -0
- package/dist/esm/documentModel.d.ts +34 -0
- package/dist/esm/documentModel.d.ts.map +1 -0
- package/dist/esm/documentModel.js +73 -0
- package/dist/esm/documentModel.js.map +1 -0
- package/dist/esm/documentModelAdministrationClient.d.ts +792 -0
- package/dist/esm/documentModelAdministrationClient.d.ts.map +1 -0
- package/dist/esm/documentModelAdministrationClient.js +759 -0
- package/dist/esm/documentModelAdministrationClient.js.map +1 -0
- package/dist/esm/error.d.ts +31 -0
- package/dist/esm/error.d.ts.map +1 -0
- package/dist/esm/error.js +39 -0
- package/dist/esm/error.js.map +1 -0
- package/dist/esm/generated/generatedClient.d.ts +21 -0
- package/dist/esm/generated/generatedClient.d.ts.map +1 -0
- package/dist/esm/generated/generatedClient.js +89 -0
- package/dist/esm/generated/generatedClient.js.map +1 -0
- package/dist/esm/generated/index.d.ts +4 -0
- package/dist/esm/generated/index.d.ts.map +1 -0
- package/dist/esm/generated/index.js +12 -0
- package/dist/esm/generated/index.js.map +1 -0
- package/dist/esm/generated/models/index.d.ts +1208 -0
- package/dist/esm/generated/models/index.d.ts.map +1 -0
- package/dist/esm/generated/models/index.js +204 -0
- package/dist/esm/generated/models/index.js.map +1 -0
- package/dist/esm/generated/models/mappers.d.ts +67 -0
- package/dist/esm/generated/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/models/mappers.js +2501 -0
- package/dist/esm/generated/models/mappers.js.map +1 -0
- package/dist/esm/generated/models/parameters.d.ts +31 -0
- package/dist/esm/generated/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/models/parameters.js +291 -0
- package/dist/esm/generated/models/parameters.js.map +1 -0
- package/dist/esm/generated/operations/documentClassifiers.d.ts +78 -0
- package/dist/esm/generated/operations/documentClassifiers.d.ts.map +1 -0
- package/dist/esm/generated/operations/documentClassifiers.js +330 -0
- package/dist/esm/generated/operations/documentClassifiers.js.map +1 -0
- package/dist/esm/generated/operations/documentModels.d.ts +98 -0
- package/dist/esm/generated/operations/documentModels.d.ts.map +1 -0
- package/dist/esm/generated/operations/documentModels.js +424 -0
- package/dist/esm/generated/operations/documentModels.js.map +1 -0
- package/dist/esm/generated/operations/index.d.ts +4 -0
- package/dist/esm/generated/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/operations/index.js +11 -0
- package/dist/esm/generated/operations/index.js.map +1 -0
- package/dist/esm/generated/operations/miscellaneous.d.ts +43 -0
- package/dist/esm/generated/operations/miscellaneous.d.ts.map +1 -0
- package/dist/esm/generated/operations/miscellaneous.js +169 -0
- package/dist/esm/generated/operations/miscellaneous.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
- package/dist/esm/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/documentClassifiers.js +9 -0
- package/dist/esm/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/documentModels.d.ts +69 -0
- package/dist/esm/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/documentModels.js +9 -0
- package/dist/esm/generated/operationsInterfaces/documentModels.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts +4 -0
- package/dist/esm/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/index.js +11 -0
- package/dist/esm/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
- package/dist/esm/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
- package/dist/esm/generated/operationsInterfaces/miscellaneous.js +9 -0
- package/dist/esm/generated/operationsInterfaces/miscellaneous.js.map +1 -0
- package/dist/esm/index.d.ts +18 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +19 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lro/administration.d.ts +101 -0
- package/dist/esm/lro/administration.d.ts.map +1 -0
- package/dist/esm/lro/administration.js +29 -0
- package/dist/esm/lro/administration.js.map +1 -0
- package/dist/esm/lro/analysis.d.ts +210 -0
- package/dist/esm/lro/analysis.d.ts.map +1 -0
- package/dist/esm/lro/analysis.js +175 -0
- package/dist/esm/lro/analysis.js.map +1 -0
- package/dist/esm/lro/util/delayMs.d.ts +32 -0
- package/dist/esm/lro/util/delayMs.d.ts.map +1 -0
- package/dist/esm/lro/util/delayMs.js +52 -0
- package/dist/esm/lro/util/delayMs.js.map +1 -0
- package/dist/esm/lro/util/poller.d.ts +41 -0
- package/dist/esm/lro/util/poller.d.ts.map +1 -0
- package/dist/esm/lro/util/poller.js +84 -0
- package/dist/esm/lro/util/poller.js.map +1 -0
- package/dist/esm/models/contentSource.d.ts +56 -0
- package/dist/esm/models/contentSource.d.ts.map +1 -0
- package/dist/esm/models/contentSource.js +4 -0
- package/dist/esm/models/contentSource.js.map +1 -0
- package/dist/esm/models/documentElements.d.ts +210 -0
- package/dist/esm/models/documentElements.d.ts.map +1 -0
- package/dist/esm/models/documentElements.js +4 -0
- package/dist/esm/models/documentElements.js.map +1 -0
- package/dist/esm/models/fields.d.ts +205 -0
- package/dist/esm/models/fields.d.ts.map +1 -0
- package/dist/esm/models/fields.js +55 -0
- package/dist/esm/models/fields.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/options/AnalyzeDocumentOptions.d.ts +69 -0
- package/dist/esm/options/AnalyzeDocumentOptions.d.ts.map +1 -0
- package/dist/esm/options/AnalyzeDocumentOptions.js +33 -0
- package/dist/esm/options/AnalyzeDocumentOptions.js.map +1 -0
- package/dist/esm/options/BeginCopyModelOptions.d.ts +9 -0
- package/dist/esm/options/BeginCopyModelOptions.d.ts.map +1 -0
- package/dist/esm/options/BeginCopyModelOptions.js +4 -0
- package/dist/esm/options/BeginCopyModelOptions.js.map +1 -0
- package/dist/esm/options/BuildDocumentClassifierOptions.d.ts +13 -0
- package/dist/esm/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
- package/dist/esm/options/BuildDocumentClassifierOptions.js +4 -0
- package/dist/esm/options/BuildDocumentClassifierOptions.js.map +1 -0
- package/dist/esm/options/BuildModelOptions.d.ts +61 -0
- package/dist/esm/options/BuildModelOptions.d.ts.map +1 -0
- package/dist/esm/options/BuildModelOptions.js +19 -0
- package/dist/esm/options/BuildModelOptions.js.map +1 -0
- package/dist/esm/options/ClassifyDocumentOptions.d.ts +9 -0
- package/dist/esm/options/ClassifyDocumentOptions.d.ts.map +1 -0
- package/dist/esm/options/ClassifyDocumentOptions.js +4 -0
- package/dist/esm/options/ClassifyDocumentOptions.js.map +1 -0
- package/dist/esm/options/DeleteModelOptions.d.ts +7 -0
- package/dist/esm/options/DeleteModelOptions.d.ts.map +1 -0
- package/dist/esm/options/DeleteModelOptions.js +4 -0
- package/dist/esm/options/DeleteModelOptions.js.map +1 -0
- package/dist/esm/options/FormRecognizerClientOptions.d.ts +70 -0
- package/dist/esm/options/FormRecognizerClientOptions.d.ts.map +1 -0
- package/dist/esm/options/FormRecognizerClientOptions.js +25 -0
- package/dist/esm/options/FormRecognizerClientOptions.js.map +1 -0
- package/dist/esm/options/GetCopyAuthorizationOptions.d.ts +8 -0
- package/dist/esm/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
- package/dist/esm/options/GetCopyAuthorizationOptions.js +4 -0
- package/dist/esm/options/GetCopyAuthorizationOptions.js.map +1 -0
- package/dist/esm/options/GetModelOptions.d.ts +7 -0
- package/dist/esm/options/GetModelOptions.d.ts.map +1 -0
- package/dist/esm/options/GetModelOptions.js +4 -0
- package/dist/esm/options/GetModelOptions.js.map +1 -0
- package/dist/esm/options/GetOperationOptions.d.ts +7 -0
- package/dist/esm/options/GetOperationOptions.d.ts.map +1 -0
- package/dist/esm/options/GetOperationOptions.js +4 -0
- package/dist/esm/options/GetOperationOptions.js.map +1 -0
- package/dist/esm/options/GetResourceDetailsOptions.d.ts +7 -0
- package/dist/esm/options/GetResourceDetailsOptions.d.ts.map +1 -0
- package/dist/esm/options/GetResourceDetailsOptions.js +4 -0
- package/dist/esm/options/GetResourceDetailsOptions.js.map +1 -0
- package/dist/esm/options/ListModelsOptions.d.ts +7 -0
- package/dist/esm/options/ListModelsOptions.d.ts.map +1 -0
- package/dist/esm/options/ListModelsOptions.js +4 -0
- package/dist/esm/options/ListModelsOptions.js.map +1 -0
- package/dist/esm/options/ListOperationsOptions.d.ts +7 -0
- package/dist/esm/options/ListOperationsOptions.d.ts.map +1 -0
- package/dist/esm/options/ListOperationsOptions.js +4 -0
- package/dist/esm/options/ListOperationsOptions.js.map +1 -0
- package/dist/esm/options/PollerOptions.d.ts +22 -0
- package/dist/esm/options/PollerOptions.d.ts.map +1 -0
- package/dist/esm/options/PollerOptions.js +4 -0
- package/dist/esm/options/PollerOptions.js.map +1 -0
- package/dist/esm/options/index.d.ts +16 -0
- package/dist/esm/options/index.d.ts.map +1 -0
- package/dist/esm/options/index.js +7 -0
- package/dist/esm/options/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/transforms/polygon.d.ts +20 -0
- package/dist/esm/transforms/polygon.d.ts.map +1 -0
- package/dist/esm/transforms/polygon.js +26 -0
- package/dist/esm/transforms/polygon.js.map +1 -0
- package/dist/esm/util.d.ts +33 -0
- package/dist/esm/util.d.ts.map +1 -0
- package/dist/esm/util.js +56 -0
- package/dist/esm/util.js.map +1 -0
- package/dist/react-native/azureKeyCredentialPolicy.d.ts +8 -0
- package/dist/react-native/azureKeyCredentialPolicy.d.ts.map +1 -0
- package/dist/react-native/azureKeyCredentialPolicy.js +17 -0
- package/dist/react-native/azureKeyCredentialPolicy.js.map +1 -0
- package/dist/react-native/bin/defaultFields.d.ts +14 -0
- package/dist/react-native/bin/defaultFields.d.ts.map +1 -0
- package/dist/react-native/bin/defaultFields.js +83 -0
- package/dist/react-native/bin/defaultFields.js.map +1 -0
- package/dist/react-native/bin/gen-model.d.ts +3 -0
- package/dist/react-native/bin/gen-model.d.ts.map +1 -0
- package/dist/react-native/bin/gen-model.js +101 -0
- package/dist/react-native/bin/gen-model.js.map +1 -0
- package/dist/react-native/bin/utils.d.ts +22 -0
- package/dist/react-native/bin/utils.d.ts.map +1 -0
- package/dist/react-native/bin/utils.js +21 -0
- package/dist/react-native/bin/utils.js.map +1 -0
- package/dist/react-native/bin/writeModelCode.d.ts +9 -0
- package/dist/react-native/bin/writeModelCode.d.ts.map +1 -0
- package/dist/react-native/bin/writeModelCode.js +323 -0
- package/dist/react-native/bin/writeModelCode.js.map +1 -0
- package/dist/react-native/constants.d.ts +29 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +32 -0
- package/dist/react-native/constants.js.map +1 -0
- package/dist/react-native/documentAnalysisClient.d.ts +485 -0
- package/dist/react-native/documentAnalysisClient.d.ts.map +1 -0
- package/dist/react-native/documentAnalysisClient.js +347 -0
- package/dist/react-native/documentAnalysisClient.js.map +1 -0
- package/dist/react-native/documentModel.d.ts +34 -0
- package/dist/react-native/documentModel.d.ts.map +1 -0
- package/dist/react-native/documentModel.js +73 -0
- package/dist/react-native/documentModel.js.map +1 -0
- package/dist/react-native/documentModelAdministrationClient.d.ts +792 -0
- package/dist/react-native/documentModelAdministrationClient.d.ts.map +1 -0
- package/dist/react-native/documentModelAdministrationClient.js +759 -0
- package/dist/react-native/documentModelAdministrationClient.js.map +1 -0
- package/dist/react-native/error.d.ts +31 -0
- package/dist/react-native/error.d.ts.map +1 -0
- package/dist/react-native/error.js +39 -0
- package/dist/react-native/error.js.map +1 -0
- package/dist/react-native/generated/generatedClient.d.ts +21 -0
- package/dist/react-native/generated/generatedClient.d.ts.map +1 -0
- package/dist/react-native/generated/generatedClient.js +89 -0
- package/dist/react-native/generated/generatedClient.js.map +1 -0
- package/dist/react-native/generated/index.d.ts +4 -0
- package/dist/react-native/generated/index.d.ts.map +1 -0
- package/dist/react-native/generated/index.js +12 -0
- package/dist/react-native/generated/index.js.map +1 -0
- package/dist/react-native/generated/models/index.d.ts +1208 -0
- package/dist/react-native/generated/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/models/index.js +204 -0
- package/dist/react-native/generated/models/index.js.map +1 -0
- package/dist/react-native/generated/models/mappers.d.ts +67 -0
- package/dist/react-native/generated/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/models/mappers.js +2501 -0
- package/dist/react-native/generated/models/mappers.js.map +1 -0
- package/dist/react-native/generated/models/parameters.d.ts +31 -0
- package/dist/react-native/generated/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/models/parameters.js +291 -0
- package/dist/react-native/generated/models/parameters.js.map +1 -0
- package/dist/react-native/generated/operations/documentClassifiers.d.ts +78 -0
- package/dist/react-native/generated/operations/documentClassifiers.d.ts.map +1 -0
- package/dist/react-native/generated/operations/documentClassifiers.js +330 -0
- package/dist/react-native/generated/operations/documentClassifiers.js.map +1 -0
- package/dist/react-native/generated/operations/documentModels.d.ts +98 -0
- package/dist/react-native/generated/operations/documentModels.d.ts.map +1 -0
- package/dist/react-native/generated/operations/documentModels.js +424 -0
- package/dist/react-native/generated/operations/documentModels.js.map +1 -0
- package/dist/react-native/generated/operations/index.d.ts +4 -0
- package/dist/react-native/generated/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/operations/index.js +11 -0
- package/dist/react-native/generated/operations/index.js.map +1 -0
- package/dist/react-native/generated/operations/miscellaneous.d.ts +43 -0
- package/dist/react-native/generated/operations/miscellaneous.d.ts.map +1 -0
- package/dist/react-native/generated/operations/miscellaneous.js +169 -0
- package/dist/react-native/generated/operations/miscellaneous.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/documentClassifiers.d.ts +53 -0
- package/dist/react-native/generated/operationsInterfaces/documentClassifiers.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/documentClassifiers.js +9 -0
- package/dist/react-native/generated/operationsInterfaces/documentClassifiers.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/documentModels.d.ts +69 -0
- package/dist/react-native/generated/operationsInterfaces/documentModels.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/documentModels.js +9 -0
- package/dist/react-native/generated/operationsInterfaces/documentModels.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/index.d.ts +4 -0
- package/dist/react-native/generated/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/index.js +11 -0
- package/dist/react-native/generated/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/miscellaneous.d.ts +22 -0
- package/dist/react-native/generated/operationsInterfaces/miscellaneous.d.ts.map +1 -0
- package/dist/react-native/generated/operationsInterfaces/miscellaneous.js +9 -0
- package/dist/react-native/generated/operationsInterfaces/miscellaneous.js.map +1 -0
- package/dist/react-native/index.d.ts +18 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +19 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/lro/administration.d.ts +101 -0
- package/dist/react-native/lro/administration.d.ts.map +1 -0
- package/dist/react-native/lro/administration.js +29 -0
- package/dist/react-native/lro/administration.js.map +1 -0
- package/dist/react-native/lro/analysis.d.ts +210 -0
- package/dist/react-native/lro/analysis.d.ts.map +1 -0
- package/dist/react-native/lro/analysis.js +175 -0
- package/dist/react-native/lro/analysis.js.map +1 -0
- package/dist/react-native/lro/util/delayMs.d.ts +32 -0
- package/dist/react-native/lro/util/delayMs.d.ts.map +1 -0
- package/dist/react-native/lro/util/delayMs.js +52 -0
- package/dist/react-native/lro/util/delayMs.js.map +1 -0
- package/dist/react-native/lro/util/poller.d.ts +41 -0
- package/dist/react-native/lro/util/poller.d.ts.map +1 -0
- package/dist/react-native/lro/util/poller.js +84 -0
- package/dist/react-native/lro/util/poller.js.map +1 -0
- package/dist/react-native/models/contentSource.d.ts +56 -0
- package/dist/react-native/models/contentSource.d.ts.map +1 -0
- package/dist/react-native/models/contentSource.js +4 -0
- package/dist/react-native/models/contentSource.js.map +1 -0
- package/dist/react-native/models/documentElements.d.ts +210 -0
- package/dist/react-native/models/documentElements.d.ts.map +1 -0
- package/dist/react-native/models/documentElements.js +4 -0
- package/dist/react-native/models/documentElements.js.map +1 -0
- package/dist/react-native/models/fields.d.ts +205 -0
- package/dist/react-native/models/fields.d.ts.map +1 -0
- package/dist/react-native/models/fields.js +55 -0
- package/dist/react-native/models/fields.js.map +1 -0
- package/dist/react-native/models/index.d.ts +4 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +4 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/options/AnalyzeDocumentOptions.d.ts +69 -0
- package/dist/react-native/options/AnalyzeDocumentOptions.d.ts.map +1 -0
- package/dist/react-native/options/AnalyzeDocumentOptions.js +33 -0
- package/dist/react-native/options/AnalyzeDocumentOptions.js.map +1 -0
- package/dist/react-native/options/BeginCopyModelOptions.d.ts +9 -0
- package/dist/react-native/options/BeginCopyModelOptions.d.ts.map +1 -0
- package/dist/react-native/options/BeginCopyModelOptions.js +4 -0
- package/dist/react-native/options/BeginCopyModelOptions.js.map +1 -0
- package/dist/react-native/options/BuildDocumentClassifierOptions.d.ts +13 -0
- package/dist/react-native/options/BuildDocumentClassifierOptions.d.ts.map +1 -0
- package/dist/react-native/options/BuildDocumentClassifierOptions.js +4 -0
- package/dist/react-native/options/BuildDocumentClassifierOptions.js.map +1 -0
- package/dist/react-native/options/BuildModelOptions.d.ts +61 -0
- package/dist/react-native/options/BuildModelOptions.d.ts.map +1 -0
- package/dist/react-native/options/BuildModelOptions.js +19 -0
- package/dist/react-native/options/BuildModelOptions.js.map +1 -0
- package/dist/react-native/options/ClassifyDocumentOptions.d.ts +9 -0
- package/dist/react-native/options/ClassifyDocumentOptions.d.ts.map +1 -0
- package/dist/react-native/options/ClassifyDocumentOptions.js +4 -0
- package/dist/react-native/options/ClassifyDocumentOptions.js.map +1 -0
- package/dist/react-native/options/DeleteModelOptions.d.ts +7 -0
- package/dist/react-native/options/DeleteModelOptions.d.ts.map +1 -0
- package/dist/react-native/options/DeleteModelOptions.js +4 -0
- package/dist/react-native/options/DeleteModelOptions.js.map +1 -0
- package/dist/react-native/options/FormRecognizerClientOptions.d.ts +70 -0
- package/dist/react-native/options/FormRecognizerClientOptions.d.ts.map +1 -0
- package/dist/react-native/options/FormRecognizerClientOptions.js +25 -0
- package/dist/react-native/options/FormRecognizerClientOptions.js.map +1 -0
- package/dist/react-native/options/GetCopyAuthorizationOptions.d.ts +8 -0
- package/dist/react-native/options/GetCopyAuthorizationOptions.d.ts.map +1 -0
- package/dist/react-native/options/GetCopyAuthorizationOptions.js +4 -0
- package/dist/react-native/options/GetCopyAuthorizationOptions.js.map +1 -0
- package/dist/react-native/options/GetModelOptions.d.ts +7 -0
- package/dist/react-native/options/GetModelOptions.d.ts.map +1 -0
- package/dist/react-native/options/GetModelOptions.js +4 -0
- package/dist/react-native/options/GetModelOptions.js.map +1 -0
- package/dist/react-native/options/GetOperationOptions.d.ts +7 -0
- package/dist/react-native/options/GetOperationOptions.d.ts.map +1 -0
- package/dist/react-native/options/GetOperationOptions.js +4 -0
- package/dist/react-native/options/GetOperationOptions.js.map +1 -0
- package/dist/react-native/options/GetResourceDetailsOptions.d.ts +7 -0
- package/dist/react-native/options/GetResourceDetailsOptions.d.ts.map +1 -0
- package/dist/react-native/options/GetResourceDetailsOptions.js +4 -0
- package/dist/react-native/options/GetResourceDetailsOptions.js.map +1 -0
- package/dist/react-native/options/ListModelsOptions.d.ts +7 -0
- package/dist/react-native/options/ListModelsOptions.d.ts.map +1 -0
- package/dist/react-native/options/ListModelsOptions.js +4 -0
- package/dist/react-native/options/ListModelsOptions.js.map +1 -0
- package/dist/react-native/options/ListOperationsOptions.d.ts +7 -0
- package/dist/react-native/options/ListOperationsOptions.d.ts.map +1 -0
- package/dist/react-native/options/ListOperationsOptions.js +4 -0
- package/dist/react-native/options/ListOperationsOptions.js.map +1 -0
- package/dist/react-native/options/PollerOptions.d.ts +22 -0
- package/dist/react-native/options/PollerOptions.d.ts.map +1 -0
- package/dist/react-native/options/PollerOptions.js +4 -0
- package/dist/react-native/options/PollerOptions.js.map +1 -0
- package/dist/react-native/options/index.d.ts +16 -0
- package/dist/react-native/options/index.d.ts.map +1 -0
- package/dist/react-native/options/index.js +7 -0
- package/dist/react-native/options/index.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/transforms/polygon.d.ts +20 -0
- package/dist/react-native/transforms/polygon.d.ts.map +1 -0
- package/dist/react-native/transforms/polygon.js +26 -0
- package/dist/react-native/transforms/polygon.js.map +1 -0
- package/dist/react-native/util.d.ts +33 -0
- package/dist/react-native/util.d.ts.map +1 -0
- package/dist/react-native/util.js +56 -0
- package/dist/react-native/util.js.map +1 -0
- package/package.json +85 -74
- package/dist/index.js +0 -5721
- package/dist/index.js.map +0 -1
- package/dist-esm/src/azureKeyCredentialPolicy.js.map +0 -1
- package/dist-esm/src/constants.js +0 -13
- package/dist-esm/src/constants.js.map +0 -1
- package/dist-esm/src/documentAnalysisClient.js.map +0 -1
- package/dist-esm/src/documentModel.js.map +0 -1
- package/dist-esm/src/documentModelAdministrationClient.js.map +0 -1
- package/dist-esm/src/error.js.map +0 -1
- package/dist-esm/src/generated/generatedClient.js.map +0 -1
- package/dist-esm/src/generated/index.js.map +0 -1
- package/dist-esm/src/generated/models/parameters.js.map +0 -1
- package/dist-esm/src/generated/operations/documentClassifiers.js.map +0 -1
- package/dist-esm/src/generated/operations/documentModels.js.map +0 -1
- package/dist-esm/src/generated/operations/miscellaneous.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/documentClassifiers.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/documentModels.js.map +0 -1
- package/dist-esm/src/generated/operationsInterfaces/miscellaneous.js.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/lro/administration.js.map +0 -1
- package/dist-esm/src/lro/analysis.js.map +0 -1
- package/dist-esm/src/lro/util/delayMs.js.map +0 -1
- package/dist-esm/src/lro/util/poller.js.map +0 -1
- package/dist-esm/src/models/contentSource.js +0 -4
- package/dist-esm/src/models/contentSource.js.map +0 -1
- package/dist-esm/src/models/documentElements.js +0 -4
- package/dist-esm/src/models/documentElements.js.map +0 -1
- package/dist-esm/src/models/index.js +0 -4
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/options/AnalyzeDocumentOptions.js.map +0 -1
- package/dist-esm/src/options/BeginCopyModelOptions.js +0 -4
- package/dist-esm/src/options/BeginCopyModelOptions.js.map +0 -1
- package/dist-esm/src/options/BuildDocumentClassifierOptions.js +0 -4
- package/dist-esm/src/options/BuildDocumentClassifierOptions.js.map +0 -1
- package/dist-esm/src/options/BuildModelOptions.js.map +0 -1
- package/dist-esm/src/options/ClassifyDocumentOptions.js +0 -4
- package/dist-esm/src/options/ClassifyDocumentOptions.js.map +0 -1
- package/dist-esm/src/options/DeleteModelOptions.js +0 -4
- package/dist-esm/src/options/DeleteModelOptions.js.map +0 -1
- package/dist-esm/src/options/FormRecognizerClientOptions.js.map +0 -1
- package/dist-esm/src/options/GetCopyAuthorizationOptions.js +0 -4
- package/dist-esm/src/options/GetCopyAuthorizationOptions.js.map +0 -1
- package/dist-esm/src/options/GetModelOptions.js +0 -4
- package/dist-esm/src/options/GetModelOptions.js.map +0 -1
- package/dist-esm/src/options/GetOperationOptions.js +0 -4
- package/dist-esm/src/options/GetOperationOptions.js.map +0 -1
- package/dist-esm/src/options/GetResourceDetailsOptions.js +0 -4
- package/dist-esm/src/options/ListModelsOptions.js +0 -4
- package/dist-esm/src/options/ListModelsOptions.js.map +0 -1
- package/dist-esm/src/options/ListOperationsOptions.js +0 -4
- package/dist-esm/src/options/PollerOptions.js +0 -4
- package/dist-esm/src/options/PollerOptions.js.map +0 -1
- package/dist-esm/src/options/index.js +0 -7
- package/dist-esm/src/options/index.js.map +0 -1
- package/dist-esm/src/transforms/polygon.js.map +0 -1
- package/dist-esm/src/util.js.map +0 -1
- package/types/ai-form-recognizer.d.ts +0 -2670
- /package/{dist-esm/src → dist/browser}/generated/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/documentClassifiers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/documentModels.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/operationsInterfaces/miscellaneous.js +0 -0
|
@@ -1,2670 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)
|
|
3
|
-
* uses cloud-based machine learning to extract structured data from form documents.
|
|
4
|
-
*
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
|
|
10
|
-
import { AzureKeyCredential } from '@azure/core-auth';
|
|
11
|
-
import { CommonClientOptions } from '@azure/core-client';
|
|
12
|
-
import { KeyCredential } from '@azure/core-auth';
|
|
13
|
-
import { OperationOptions } from '@azure/core-client';
|
|
14
|
-
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
15
|
-
import { PollerLike } from '@azure/core-lro';
|
|
16
|
-
import { PollOperationState } from '@azure/core-lro';
|
|
17
|
-
import { TokenCredential } from '@azure/core-auth';
|
|
18
|
-
|
|
19
|
-
/** Address field value. */
|
|
20
|
-
export declare interface AddressValue {
|
|
21
|
-
/** House or building number. */
|
|
22
|
-
houseNumber?: string;
|
|
23
|
-
/** Post office box number. */
|
|
24
|
-
poBox?: string;
|
|
25
|
-
/** Street name. */
|
|
26
|
-
road?: string;
|
|
27
|
-
/** Name of city, town, village, etc. */
|
|
28
|
-
city?: string;
|
|
29
|
-
/** First-level administrative division. */
|
|
30
|
-
state?: string;
|
|
31
|
-
/** Postal code used for mail sorting. */
|
|
32
|
-
postalCode?: string;
|
|
33
|
-
/** Country/region. */
|
|
34
|
-
countryRegion?: string;
|
|
35
|
-
/** Street-level address, excluding city, state, countryRegion, and postalCode. */
|
|
36
|
-
streetAddress?: string;
|
|
37
|
-
/** Apartment or office number */
|
|
38
|
-
unit?: string;
|
|
39
|
-
/** Districts or boroughs within a city, such as Brooklyn in New York City or City of Westminster in London. */
|
|
40
|
-
cityDistrict?: string;
|
|
41
|
-
/** Second-level administrative division used in certain locales. */
|
|
42
|
-
stateDistrict?: string;
|
|
43
|
-
/** Unofficial neighborhood name, like Chinatown. */
|
|
44
|
-
suburb?: string;
|
|
45
|
-
/** Build name, such as World Trade Center. */
|
|
46
|
-
house?: string;
|
|
47
|
-
/** Floor number, such as 3F. */
|
|
48
|
-
level?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* A long-running operation (poller) that tracks the state of an analysis operation, eventually producing the result
|
|
53
|
-
* type that corresponds to the model.
|
|
54
|
-
*/
|
|
55
|
-
export declare type AnalysisPoller<Result = AnalyzeResult<AnalyzedDocument>> = PollerLike<DocumentAnalysisPollOperationState<Result>, Result>;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* An extracted document object.
|
|
59
|
-
*
|
|
60
|
-
* An AnalyzedDocument is an instance of one of the document types within a model. Its fields correspond to the field
|
|
61
|
-
* schema of the document type.
|
|
62
|
-
*/
|
|
63
|
-
export declare interface AnalyzedDocument {
|
|
64
|
-
/**
|
|
65
|
-
* The type of the document that was extracted. A model can have multiple document types (for example, in a composed
|
|
66
|
-
* model), so this property indicates which document type the fields of this document correspond to.
|
|
67
|
-
*/
|
|
68
|
-
docType: string;
|
|
69
|
-
/**
|
|
70
|
-
* The extracted fields, which correspond to the document type's field schema.
|
|
71
|
-
*/
|
|
72
|
-
fields: {
|
|
73
|
-
[field: string]: DocumentField;
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Bounding regions covering the document.
|
|
77
|
-
*/
|
|
78
|
-
boundingRegions?: BoundingRegion[];
|
|
79
|
-
/**
|
|
80
|
-
* Locations of the document's elements in the `content` text (reading-order-concatenated content).
|
|
81
|
-
*/
|
|
82
|
-
spans: DocumentSpan[];
|
|
83
|
-
/**
|
|
84
|
-
* The service's confidence that it has correctly extracted the document.
|
|
85
|
-
*/
|
|
86
|
-
confidence: number;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Options for the document analysis operation.
|
|
91
|
-
*/
|
|
92
|
-
export declare interface AnalyzeDocumentOptions<Result = AnalyzeResult<AnalyzedDocument>> extends OperationOptions, PollerOptions<DocumentAnalysisPollOperationState<Result>> {
|
|
93
|
-
/**
|
|
94
|
-
* Locale hint for text recognition and document analysis.
|
|
95
|
-
*
|
|
96
|
-
* The value may specify only the two-letter language code or a BCP-47 language tag indicating both language and region.
|
|
97
|
-
*
|
|
98
|
-
* Examples:
|
|
99
|
-
* - "en-US" (US English)
|
|
100
|
-
* - "fr" (French - no region)
|
|
101
|
-
*/
|
|
102
|
-
locale?: string;
|
|
103
|
-
/**
|
|
104
|
-
* A list of page ranges (1-indexed) within the input document to analyze, separated by commas
|
|
105
|
-
*
|
|
106
|
-
* Examples: "1", "3-5", "1,3-5"
|
|
107
|
-
*/
|
|
108
|
-
pages?: string;
|
|
109
|
-
/**
|
|
110
|
-
* A list of features to enable in the model. Enabling features may incur additional costs, so be sure to consult the
|
|
111
|
-
* service documentation to understand the nature of the features and any added costs associated with using them.
|
|
112
|
-
*
|
|
113
|
-
* For more information about the features available in Form Recognizer, see the service documentation: https://aka.ms/azsdk/formrecognizer/features
|
|
114
|
-
*/
|
|
115
|
-
features?: FormRecognizerFeature[];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The result of an analysis operation. The type of the Document may be determined by the model used to perform the
|
|
120
|
-
* analysis.
|
|
121
|
-
*/
|
|
122
|
-
export declare interface AnalyzeResult<Document = AnalyzedDocument> extends AnalyzeResultCommon {
|
|
123
|
-
/**
|
|
124
|
-
* Extracted pages.
|
|
125
|
-
*/
|
|
126
|
-
pages?: DocumentPage[];
|
|
127
|
-
/**
|
|
128
|
-
* Extracted tables.
|
|
129
|
-
*/
|
|
130
|
-
tables?: DocumentTable[];
|
|
131
|
-
/**
|
|
132
|
-
* Extracted key-value pairs.
|
|
133
|
-
*/
|
|
134
|
-
keyValuePairs?: DocumentKeyValuePair[];
|
|
135
|
-
/**
|
|
136
|
-
* Extracted text languages.
|
|
137
|
-
*/
|
|
138
|
-
languages?: DocumentLanguage[];
|
|
139
|
-
/**
|
|
140
|
-
* Extracted font styles.
|
|
141
|
-
*/
|
|
142
|
-
styles?: DocumentStyle[];
|
|
143
|
-
/**
|
|
144
|
-
* Extracted documents (instances of any of the model's document types and corresponding field schemas).
|
|
145
|
-
*/
|
|
146
|
-
documents?: Document[];
|
|
147
|
-
/**
|
|
148
|
-
* Extracted document paragraphs.
|
|
149
|
-
*/
|
|
150
|
-
paragraphs?: DocumentParagraph[];
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* The common fields of all AnalyzeResult-like types, such as LayoutResult, ReadResult, and GeneralDocumentResult.
|
|
155
|
-
*/
|
|
156
|
-
export declare interface AnalyzeResultCommon {
|
|
157
|
-
/**
|
|
158
|
-
* The service API version used to produce this result.
|
|
159
|
-
*/
|
|
160
|
-
apiVersion: string;
|
|
161
|
-
/**
|
|
162
|
-
* The unique ID of the model that was used to produce this result.
|
|
163
|
-
*/
|
|
164
|
-
modelId: string;
|
|
165
|
-
/**
|
|
166
|
-
* A string representation of all textual and visual elements in the input, concatenated by reading order (the order
|
|
167
|
-
* in which the service "reads" or extracts the textual and visual content from the document).
|
|
168
|
-
*/
|
|
169
|
-
content: string;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/** Defines values for AnalyzeResultOperationStatus. */
|
|
173
|
-
export declare type AnalyzeResultOperationStatus = "notStarted" | "running" | "failed" | "succeeded";
|
|
174
|
-
|
|
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;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/** File list in Azure Blob Storage. */
|
|
190
|
-
export declare interface AzureBlobFileListSourceDetails {
|
|
191
|
-
/** Azure Blob Storage container URL. */
|
|
192
|
-
containerUrl: string;
|
|
193
|
-
/** Path to a JSONL file within the container specifying a subset of documents for training. */
|
|
194
|
-
fileList: string;
|
|
195
|
-
}
|
|
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
|
-
|
|
219
|
-
export { AzureKeyCredential }
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Options for the document classifier build operation.
|
|
223
|
-
*/
|
|
224
|
-
export declare interface BeginBuildDocumentClassifierOptions extends OperationOptions, PollerOptions<DocumentClassifierOperationState> {
|
|
225
|
-
/**
|
|
226
|
-
* A textual description of the classifier (can be any text).
|
|
227
|
-
*/
|
|
228
|
-
description?: string;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Options for the model build operation.
|
|
233
|
-
*/
|
|
234
|
-
export declare interface BeginBuildDocumentModelOptions extends CreateDocumentModelOptions {
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* Options for the model compose operation.
|
|
239
|
-
*/
|
|
240
|
-
export declare interface BeginComposeDocumentModelOptions extends CreateDocumentModelOptions {
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Options for the copy model operation.
|
|
245
|
-
*/
|
|
246
|
-
export declare interface BeginCopyModelOptions extends OperationOptions, PollerOptions<DocumentModelOperationState> {
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/** Bounding polygon on a specific page of the input. */
|
|
250
|
-
export declare interface BoundingRegion extends HasBoundingPolygon {
|
|
251
|
-
/** 1-based page number of page containing the bounding region. */
|
|
252
|
-
pageNumber: number;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/** Classifier document type info. */
|
|
256
|
-
export declare interface ClassifierDocumentTypeDetails {
|
|
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;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Options for the document classification operation.
|
|
265
|
-
*/
|
|
266
|
-
export declare interface ClassifyDocumentOptions extends OperationOptions, PollerOptions<DocumentAnalysisPollOperationState> {
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Options common to all operations that define new models, such as `beginBuildDocumentModel`,
|
|
271
|
-
* `beginComposeDocumentModel`, and `getCopyAuthorization`.
|
|
272
|
-
*/
|
|
273
|
-
export declare interface CommonModelCreationOptions {
|
|
274
|
-
/**
|
|
275
|
-
* A textual description of the model (can be any text).
|
|
276
|
-
*/
|
|
277
|
-
description?: string;
|
|
278
|
-
/**
|
|
279
|
-
* Additional, user-specified key-value pairs to associate with the model as persistent metadata.
|
|
280
|
-
*/
|
|
281
|
-
tags?: Record<string, string>;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/** Authorization to copy a document model to the specified target resource and modelId. */
|
|
285
|
-
export declare interface CopyAuthorization {
|
|
286
|
-
/** ID of the target Azure resource where the document model should be copied to. */
|
|
287
|
-
targetResourceId: string;
|
|
288
|
-
/** Location of the target Azure resource where the document model should be copied to. */
|
|
289
|
-
targetResourceRegion: string;
|
|
290
|
-
/** Identifier of the target document model. */
|
|
291
|
-
targetModelId: string;
|
|
292
|
-
/** URL of the copied document model in the target account. */
|
|
293
|
-
targetModelLocation: string;
|
|
294
|
-
/** Token used to authorize the request. */
|
|
295
|
-
accessToken: string;
|
|
296
|
-
/** Date/time when the access token expires. */
|
|
297
|
-
expirationDateTime: Date;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/**
|
|
301
|
-
* Options for the model creation operation.
|
|
302
|
-
*/
|
|
303
|
-
export declare interface CreateDocumentModelOptions extends OperationOptions, CommonModelCreationOptions, PollerOptions<DocumentModelOperationState> {
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* Create a DocumentModel that performs analysis using the given schema.
|
|
308
|
-
*
|
|
309
|
-
* The types of `documents` are created from the schema, so they are `unknown` unless they are asserted to be a
|
|
310
|
-
* different type.
|
|
311
|
-
*
|
|
312
|
-
* @hidden
|
|
313
|
-
* @param schema - model schema contents
|
|
314
|
-
* @returns - a DocumentModel that encodes the schema
|
|
315
|
-
*/
|
|
316
|
-
export declare function createModelFromSchema(schema: Omit<DocumentModelDetails, "createdOn">): DocumentModel<AnalyzeResult<unknown>>;
|
|
317
|
-
|
|
318
|
-
/** Currency field value. */
|
|
319
|
-
export declare interface CurrencyValue {
|
|
320
|
-
/** Currency amount. */
|
|
321
|
-
amount: number;
|
|
322
|
-
/** Currency symbol label, if any. */
|
|
323
|
-
currencySymbol?: string;
|
|
324
|
-
/** Resolved currency code (ISO 4217), if any. */
|
|
325
|
-
currencyCode?: string;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/** Details regarding custom document models. */
|
|
329
|
-
export declare interface CustomDocumentModelsDetails {
|
|
330
|
-
/** Number of custom document models in the current resource. */
|
|
331
|
-
count: number;
|
|
332
|
-
/** Maximum number of custom document models supported in the current resource. */
|
|
333
|
-
limit: number;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Options for model deletion.
|
|
338
|
-
*/
|
|
339
|
-
export declare interface DeleteDocumentModelOptions extends OperationOptions {
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* A document field that describes a structured physical address.
|
|
344
|
-
*/
|
|
345
|
-
export declare interface DocumentAddressField extends DocumentFieldCommon {
|
|
346
|
-
/** Field kind: "address". */
|
|
347
|
-
kind: "address";
|
|
348
|
-
/**
|
|
349
|
-
* The properties of the extracted address.
|
|
350
|
-
*/
|
|
351
|
-
value?: AddressValue;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* A client for interacting with the Form Recognizer service's analysis features.
|
|
356
|
-
*
|
|
357
|
-
* ### Examples:
|
|
358
|
-
*
|
|
359
|
-
* The Form Recognizer service and clients support two means of authentication:
|
|
360
|
-
*
|
|
361
|
-
* #### Azure Active Directory
|
|
362
|
-
*
|
|
363
|
-
* ```javascript
|
|
364
|
-
* import { DocumentAnalysisClient } from "@azure/ai-form-recognizer";
|
|
365
|
-
* import { DefaultAzureCredential } from "@azure/identity";
|
|
366
|
-
*
|
|
367
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
368
|
-
* const credential = new DefaultAzureCredential();
|
|
369
|
-
*
|
|
370
|
-
* const client = new DocumentAnalysisClient(endpoint, credential);
|
|
371
|
-
* ```
|
|
372
|
-
*
|
|
373
|
-
* #### API Key (Subscription Key)
|
|
374
|
-
*
|
|
375
|
-
* ```javascript
|
|
376
|
-
* import { DocumentAnalysisClient, AzureKeyCredential } from "@azure/ai-form-recognizer";
|
|
377
|
-
*
|
|
378
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
379
|
-
* const credential = new AzureKeyCredential("<api key>");
|
|
380
|
-
*
|
|
381
|
-
* const client = new DocumentAnalysisClient(endpoint, credential);
|
|
382
|
-
* ```
|
|
383
|
-
*/
|
|
384
|
-
export declare class DocumentAnalysisClient {
|
|
385
|
-
private _restClient;
|
|
386
|
-
private _tracing;
|
|
387
|
-
/**
|
|
388
|
-
* Create a `DocumentAnalysisClient` instance from a resource endpoint and a an Azure Identity `TokenCredential`.
|
|
389
|
-
*
|
|
390
|
-
* See the [`@azure/identity`](https://npmjs.com/package/\@azure/identity) package for more information about
|
|
391
|
-
* authenticating with Azure Active Directory.
|
|
392
|
-
*
|
|
393
|
-
* ### Example:
|
|
394
|
-
*
|
|
395
|
-
* ```javascript
|
|
396
|
-
* import { DocumentAnalysisClient } from "@azure/ai-form-recognizer";
|
|
397
|
-
* import { DefaultAzureCredential } from "@azure/identity";
|
|
398
|
-
*
|
|
399
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
400
|
-
* const credential = new DefaultAzureCredential();
|
|
401
|
-
*
|
|
402
|
-
* const client = new DocumentAnalysisClient(endpoint, credential);
|
|
403
|
-
* ```
|
|
404
|
-
*
|
|
405
|
-
* @param endpoint - the endpoint URL of an Azure Cognitive Services instance
|
|
406
|
-
* @param credential - a TokenCredential instance from the `@azure/identity` package
|
|
407
|
-
* @param options - optional settings for configuring all methods in the client
|
|
408
|
-
*/
|
|
409
|
-
constructor(endpoint: string, credential: TokenCredential, options?: DocumentAnalysisClientOptions);
|
|
410
|
-
/**
|
|
411
|
-
* Create a `DocumentAnalysisClient` instance from a resource endpoint and a static API key (`KeyCredential`),
|
|
412
|
-
*
|
|
413
|
-
* ### Example:
|
|
414
|
-
*
|
|
415
|
-
* ```javascript
|
|
416
|
-
* import { DocumentAnalysisClient, AzureKeyCredential } from "@azure/ai-form-recognizer";
|
|
417
|
-
*
|
|
418
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
419
|
-
* const credential = new AzureKeyCredential("<api key>");
|
|
420
|
-
*
|
|
421
|
-
* const client = new DocumentAnalysisClient(endpoint, credential);
|
|
422
|
-
* ```
|
|
423
|
-
*
|
|
424
|
-
* @param endpoint - the endpoint URL of an Azure Cognitive Services instance
|
|
425
|
-
* @param credential - a KeyCredential containing the Cognitive Services instance subscription key
|
|
426
|
-
* @param options - optional settings for configuring all methods in the client
|
|
427
|
-
*/
|
|
428
|
-
constructor(endpoint: string, credential: KeyCredential, options?: DocumentAnalysisClientOptions);
|
|
429
|
-
/**
|
|
430
|
-
* @hidden
|
|
431
|
-
*/
|
|
432
|
-
constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: DocumentAnalysisClientOptions);
|
|
433
|
-
/**
|
|
434
|
-
* Extract data from an input using a model given by its unique ID.
|
|
435
|
-
*
|
|
436
|
-
* This operation supports custom as well as prebuilt models. For example, to use the prebuilt invoice model, provide
|
|
437
|
-
* the model ID "prebuilt-invoice", or to use the simpler prebuilt layout model, provide the model ID
|
|
438
|
-
* "prebuilt-layout".
|
|
439
|
-
*
|
|
440
|
-
* The fields produced in the `AnalyzeResult` depend on the model that is used for analysis, and the values in any
|
|
441
|
-
* extracted documents' fields depend on the document types in the model (if any) and their corresponding field
|
|
442
|
-
* schemas.
|
|
443
|
-
*
|
|
444
|
-
* ### Examples
|
|
445
|
-
*
|
|
446
|
-
* This method supports streamable request bodies ({@link FormRecognizerRequestBody}) such as Node.JS `ReadableStream`
|
|
447
|
-
* objects, browser `Blob`s, and `ArrayBuffer`s. The contents of the body will be uploaded to the service for analysis.
|
|
448
|
-
*
|
|
449
|
-
* ```javascript
|
|
450
|
-
* import * as fs from "fs";
|
|
451
|
-
*
|
|
452
|
-
* const file = fs.createReadStream("path/to/receipt.pdf");
|
|
453
|
-
*
|
|
454
|
-
* // The model that is passed to the following function call determines the type of the eventual result. In the
|
|
455
|
-
* // example, we will use the prebuilt receipt model, but you could use a custom model ID/name instead.
|
|
456
|
-
* const poller = await client.beginAnalyzeDocument("prebuilt-receipt", file);
|
|
457
|
-
*
|
|
458
|
-
* // The result is a long-running operation (poller), which must itself be polled until the operation completes
|
|
459
|
-
* const {
|
|
460
|
-
* pages, // pages extracted from the document, which contain lines and words
|
|
461
|
-
* tables, // extracted tables, organized into cells that contain their contents
|
|
462
|
-
* styles, // text styles (ex. handwriting) that were observed in the document
|
|
463
|
-
* keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)
|
|
464
|
-
* entities, // extracted entities in the input's content, which are categorized (ex. "Location" or "Organization")
|
|
465
|
-
* documents // extracted documents (instances of one of the model's document types and its field schema)
|
|
466
|
-
* } = await poller.pollUntilDone();
|
|
467
|
-
*
|
|
468
|
-
* // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model
|
|
469
|
-
* const [{ fields: receipt }] = documents;
|
|
470
|
-
*
|
|
471
|
-
* // The fields correspond to the model's document types and their field schemas. Refer to the Form Recognizer
|
|
472
|
-
* // documentation for information about the document types and field schemas within a model, or use the `getModel`
|
|
473
|
-
* // operation to view this information programmatically.
|
|
474
|
-
* console.log("The type of this receipt is:", receipt?.["ReceiptType"]?.value);
|
|
475
|
-
* ```
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
* @param modelId - the unique ID (name) of the model within this client's resource
|
|
479
|
-
* @param document - a {@link FormRecognizerRequestBody} that will be uploaded with the request
|
|
480
|
-
* @param options - optional settings for the analysis operation and poller
|
|
481
|
-
* @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`
|
|
482
|
-
*/
|
|
483
|
-
beginAnalyzeDocument(modelId: string, document: FormRecognizerRequestBody, options?: AnalyzeDocumentOptions): Promise<AnalysisPoller>;
|
|
484
|
-
/**
|
|
485
|
-
* Extract data from an input using a model that has a known, strongly-typed document schema (a {@link DocumentModel}).
|
|
486
|
-
*
|
|
487
|
-
* The fields produced in the `AnalyzeResult` depend on the model that is used for analysis. In TypeScript, the type
|
|
488
|
-
* of the result for this method overload is inferred from the type of the input `DocumentModel`.
|
|
489
|
-
*
|
|
490
|
-
* ### Examples
|
|
491
|
-
*
|
|
492
|
-
* This method supports streamable request bodies ({@link FormRecognizerRequestBody}) such as Node.JS `ReadableStream`
|
|
493
|
-
* objects, browser `Blob`s, and `ArrayBuffer`s. The contents of the body will be uploaded to the service for analysis.
|
|
494
|
-
*
|
|
495
|
-
* If the input provided is a string, it will be treated as a URL to the location of a document to be analyzed. See the
|
|
496
|
-
* {@link beginAnalyzeDocumentFromUrl} method for more information. Use of that method is preferred when using URLs,
|
|
497
|
-
* and URL support is only provided in this method for backwards compatibility.
|
|
498
|
-
*
|
|
499
|
-
* ```typescript
|
|
500
|
-
* import * as fs from "fs";
|
|
501
|
-
*
|
|
502
|
-
* // See the `prebuilt` folder in the SDK samples (http://aka.ms/azsdk/formrecognizer/js/samples) for examples of
|
|
503
|
-
* // DocumentModels for known prebuilts.
|
|
504
|
-
* import { PrebuiltReceiptModel } from "./prebuilt-receipt.ts";
|
|
505
|
-
*
|
|
506
|
-
* const file = fs.createReadStream("path/to/receipt.pdf");
|
|
507
|
-
*
|
|
508
|
-
* // The model that is passed to the following function call determines the type of the eventual result. In the
|
|
509
|
-
* // example, we will use the prebuilt receipt model.
|
|
510
|
-
* const poller = await client.beginAnalyzeDocument(PrebuiltReceiptModel, file);
|
|
511
|
-
*
|
|
512
|
-
* // The result is a long-running operation (poller), which must itself be polled until the operation completes
|
|
513
|
-
* const {
|
|
514
|
-
* pages, // pages extracted from the document, which contain lines and words
|
|
515
|
-
* tables, // extracted tables, organized into cells that contain their contents
|
|
516
|
-
* styles, // text styles (ex. handwriting) that were observed in the document
|
|
517
|
-
* keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)
|
|
518
|
-
*
|
|
519
|
-
* documents // extracted documents (instances of one of the model's document types and its field schema)
|
|
520
|
-
* } = await poller.pollUntilDone();
|
|
521
|
-
*
|
|
522
|
-
* // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model
|
|
523
|
-
* const [{ fields: receipt }] = documents;
|
|
524
|
-
*
|
|
525
|
-
* // Since we used the strongly-typed PrebuiltReceiptModel object instead of the "prebuilt-receipt" model ID
|
|
526
|
-
* // string, the fields of the receipt are strongly-typed and have camelCase names (as opposed to PascalCase).
|
|
527
|
-
* console.log("The type of this receipt is:", receipt.receiptType?.value);
|
|
528
|
-
* ```
|
|
529
|
-
*
|
|
530
|
-
* @param model - a {@link DocumentModel} representing the model to use for analysis and the expected output type
|
|
531
|
-
* @param document - a {@link FormRecognizerRequestBody} that will be uploaded with the request
|
|
532
|
-
* @param options - optional settings for the analysis operation and poller
|
|
533
|
-
* @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult` with documents that have
|
|
534
|
-
* the result type associated with the input model
|
|
535
|
-
*/
|
|
536
|
-
beginAnalyzeDocument<Result>(model: DocumentModel<Result>, document: FormRecognizerRequestBody, options?: AnalyzeDocumentOptions<Result>): Promise<AnalysisPoller<Result>>;
|
|
537
|
-
/**
|
|
538
|
-
* Extract data from an input using a model given by its unique ID.
|
|
539
|
-
*
|
|
540
|
-
* This operation supports custom as well as prebuilt models. For example, to use the prebuilt invoice model, provide
|
|
541
|
-
* the model ID "prebuilt-invoice", or to use the simpler prebuilt layout model, provide the model ID
|
|
542
|
-
* "prebuilt-layout".
|
|
543
|
-
*
|
|
544
|
-
* The fields produced in the `AnalyzeResult` depend on the model that is used for analysis, and the values in any
|
|
545
|
-
* extracted documents' fields depend on the document types in the model (if any) and their corresponding field
|
|
546
|
-
* schemas.
|
|
547
|
-
*
|
|
548
|
-
* ### Examples
|
|
549
|
-
*
|
|
550
|
-
* This method supports extracting data from a file at a given URL. The Form Recognizer service will attempt to
|
|
551
|
-
* download a file using the submitted URL, so the URL must be accessible from the public internet. For example, a SAS
|
|
552
|
-
* token can be used to grant read access to a blob in Azure Storage, and the service will use the SAS-encoded URL to
|
|
553
|
-
* request the file.
|
|
554
|
-
*
|
|
555
|
-
* ```javascript
|
|
556
|
-
* // the URL must be publicly accessible
|
|
557
|
-
* const url = "<receipt document url>";
|
|
558
|
-
*
|
|
559
|
-
* // The model that is passed to the following function call determines the type of the eventual result. In the
|
|
560
|
-
* // example, we will use the prebuilt receipt model, but you could use a custom model ID/name instead.
|
|
561
|
-
* const poller = await client.beginAnalyzeDocument("prebuilt-receipt", url);
|
|
562
|
-
*
|
|
563
|
-
* // The result is a long-running operation (poller), which must itself be polled until the operation completes
|
|
564
|
-
* const {
|
|
565
|
-
* pages, // pages extracted from the document, which contain lines and words
|
|
566
|
-
* tables, // extracted tables, organized into cells that contain their contents
|
|
567
|
-
* styles, // text styles (ex. handwriting) that were observed in the document
|
|
568
|
-
* keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)
|
|
569
|
-
*
|
|
570
|
-
* documents // extracted documents (instances of one of the model's document types and its field schema)
|
|
571
|
-
* } = await poller.pollUntilDone();
|
|
572
|
-
*
|
|
573
|
-
* // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model
|
|
574
|
-
* const [{ fields: receipt }] = documents;
|
|
575
|
-
*
|
|
576
|
-
* // The fields correspond to the model's document types and their field schemas. Refer to the Form Recognizer
|
|
577
|
-
* // documentation for information about the document types and field schemas within a model, or use the `getModel`
|
|
578
|
-
* // operation to view this information programmatically.
|
|
579
|
-
* console.log("The type of this receipt is:", receipt?.["ReceiptType"]?.value);
|
|
580
|
-
* ```
|
|
581
|
-
*
|
|
582
|
-
* @param modelId - the unique ID (name) of the model within this client's resource
|
|
583
|
-
* @param documentUrl - a URL (string) to an input document accessible from the public internet
|
|
584
|
-
* @param options - optional settings for the analysis operation and poller
|
|
585
|
-
* @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`
|
|
586
|
-
*/
|
|
587
|
-
beginAnalyzeDocumentFromUrl(modelId: string, documentUrl: string, options?: AnalyzeDocumentOptions): Promise<AnalysisPoller>;
|
|
588
|
-
/**
|
|
589
|
-
* Extract data from an input using a model that has a known, strongly-typed document schema (a {@link DocumentModel}).
|
|
590
|
-
*
|
|
591
|
-
* The fields produced in the `AnalyzeResult` depend on the model that is used for analysis. In TypeScript, the type
|
|
592
|
-
* of the result for this method overload is inferred from the type of the input `DocumentModel`.
|
|
593
|
-
*
|
|
594
|
-
* ### Examples
|
|
595
|
-
*
|
|
596
|
-
* This method supports extracting data from a file at a given URL. The Form Recognizer service will attempt to
|
|
597
|
-
* download a file using the submitted URL, so the URL must be accessible from the public internet. For example, a SAS
|
|
598
|
-
* token can be used to grant read access to a blob in Azure Storage, and the service will use the SAS-encoded URL to
|
|
599
|
-
* request the file.
|
|
600
|
-
*
|
|
601
|
-
* ```typescript
|
|
602
|
-
* // See the `prebuilt` folder in the SDK samples (http://aka.ms/azsdk/formrecognizer/js/samples) for examples of
|
|
603
|
-
* // DocumentModels for known prebuilts.
|
|
604
|
-
* import { PrebuiltReceiptModel } from "./prebuilt-receipt.ts";
|
|
605
|
-
*
|
|
606
|
-
* // the URL must be publicly accessible
|
|
607
|
-
* const url = "<receipt document url>";
|
|
608
|
-
*
|
|
609
|
-
* // The model that is passed to the following function call determines the type of the eventual result. In the
|
|
610
|
-
* // example, we will use the prebuilt receipt model.
|
|
611
|
-
* const poller = await client.beginAnalyzeDocument(PrebuiltReceiptModel, url);
|
|
612
|
-
*
|
|
613
|
-
* // The result is a long-running operation (poller), which must itself be polled until the operation completes
|
|
614
|
-
* const {
|
|
615
|
-
* pages, // pages extracted from the document, which contain lines and words
|
|
616
|
-
* tables, // extracted tables, organized into cells that contain their contents
|
|
617
|
-
* styles, // text styles (ex. handwriting) that were observed in the document
|
|
618
|
-
* keyValuePairs, // extracted pairs of elements (directed associations from one element in the input to another)
|
|
619
|
-
*
|
|
620
|
-
* documents // extracted documents (instances of one of the model's document types and its field schema)
|
|
621
|
-
* } = await poller.pollUntilDone();
|
|
622
|
-
*
|
|
623
|
-
* // Extract the fields of the first document. These fields constitute a receipt, because we used the receipt model
|
|
624
|
-
* const [{ fields: receipt }] = documents;
|
|
625
|
-
*
|
|
626
|
-
* // Since we used the strongly-typed PrebuiltReceiptModel object instead of the "prebuilt-receipt" model ID
|
|
627
|
-
* // string, the fields of the receipt are strongly-typed and have camelCase names (as opposed to PascalCase).
|
|
628
|
-
* console.log("The type of this receipt is:", receipt.receiptType?.value);
|
|
629
|
-
* ```
|
|
630
|
-
*
|
|
631
|
-
* @param model - a {@link DocumentModel} representing the model to use for analysis and the expected output type
|
|
632
|
-
* @param documentUrl - a URL (string) to an input document accessible from the public internet
|
|
633
|
-
* @param options - optional settings for the analysis operation and poller
|
|
634
|
-
* @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`
|
|
635
|
-
*/
|
|
636
|
-
beginAnalyzeDocumentFromUrl<Result>(model: DocumentModel<Result>, documentUrl: string, options?: AnalyzeDocumentOptions<Result>): Promise<AnalysisPoller<Result>>;
|
|
637
|
-
/**
|
|
638
|
-
* A helper method for running analysis polymorphically.
|
|
639
|
-
*
|
|
640
|
-
* @param model - the model ID or DocumentModel to use for analysis
|
|
641
|
-
* @param input - the string URL or request body to use
|
|
642
|
-
* @param options - analysis options
|
|
643
|
-
* @returns - an analysis poller
|
|
644
|
-
*/
|
|
645
|
-
private analyze;
|
|
646
|
-
/**
|
|
647
|
-
* Classify a document using a custom classifier given by its ID.
|
|
648
|
-
*
|
|
649
|
-
* This method produces a long-running operation (poller) that will eventually produce an `AnalyzeResult`. This is the
|
|
650
|
-
* same type as `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl`, but the result will only contain a small
|
|
651
|
-
* subset of its fields. Only the `documents` field and `pages` field will be populated, and only minimal page
|
|
652
|
-
* information will be returned. The `documents` field will contain information about all the identified documents and
|
|
653
|
-
* the `docType` that they were classified as.
|
|
654
|
-
*
|
|
655
|
-
* ### Example
|
|
656
|
-
*
|
|
657
|
-
* This method supports streamable request bodies ({@link FormRecognizerRequestBody}) such as Node.JS `ReadableStream`
|
|
658
|
-
* objects, browser `Blob`s, and `ArrayBuffer`s. The contents of the body will be uploaded to the service for analysis.
|
|
659
|
-
*
|
|
660
|
-
* ```typescript
|
|
661
|
-
* import * as fs from "fs";
|
|
662
|
-
*
|
|
663
|
-
* const file = fs.createReadStream("path/to/file.pdf");
|
|
664
|
-
*
|
|
665
|
-
* const poller = await client.beginClassifyDocument("<classifier ID>", file);
|
|
666
|
-
*
|
|
667
|
-
* // The result is a long-running operation (poller), which must itself be polled until the operation completes
|
|
668
|
-
* const {
|
|
669
|
-
* pages, // pages extracted from the document, which contain only basic information for classifiers
|
|
670
|
-
* documents // extracted documents and their types
|
|
671
|
-
* } = await poller.pollUntilDone();
|
|
672
|
-
*
|
|
673
|
-
* // We'll print the documents and their types
|
|
674
|
-
* for (const { docType } of documents) {
|
|
675
|
-
* console.log("The type of this document is:", docType);
|
|
676
|
-
* }
|
|
677
|
-
* ```
|
|
678
|
-
*
|
|
679
|
-
* @param classifierId - the ID of the custom classifier to use for analysis
|
|
680
|
-
* @param document - the document to classify
|
|
681
|
-
* @param options - options for the classification operation
|
|
682
|
-
* @returns a long-running operation (poller) that will eventually produce an `AnalyzeResult`
|
|
683
|
-
*/
|
|
684
|
-
beginClassifyDocument(classifierId: string, document: FormRecognizerRequestBody, options?: ClassifyDocumentOptions): Promise<AnalysisPoller>;
|
|
685
|
-
/**
|
|
686
|
-
* Classify a document from a URL using a custom classifier given by its ID.
|
|
687
|
-
*
|
|
688
|
-
* This method produces a long-running operation (poller) that will eventually produce an `AnalyzeResult`. This is the
|
|
689
|
-
* same type as `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl`, but the result will only contain a small
|
|
690
|
-
* subset of its fields. Only the `documents` field and `pages` field will be populated, and only minimal page
|
|
691
|
-
* information will be returned. The `documents` field will contain information about all the identified documents and
|
|
692
|
-
* the `docType` that they were classified as.
|
|
693
|
-
*
|
|
694
|
-
* ### Example
|
|
695
|
-
*
|
|
696
|
-
* This method supports extracting data from a file at a given URL. The Form Recognizer service will attempt to
|
|
697
|
-
* download a file using the submitted URL, so the URL must be accessible from the public internet. For example, a SAS
|
|
698
|
-
* token can be used to grant read access to a blob in Azure Storage, and the service will use the SAS-encoded URL to
|
|
699
|
-
* request the file.
|
|
700
|
-
*
|
|
701
|
-
* ```typescript
|
|
702
|
-
* // the URL must be publicly accessible
|
|
703
|
-
* const url = "<file url>";
|
|
704
|
-
*
|
|
705
|
-
* const poller = await client.beginClassifyDocument("<classifier ID>", url);
|
|
706
|
-
*
|
|
707
|
-
* // The result is a long-running operation (poller), which must itself be polled until the operation completes
|
|
708
|
-
* const {
|
|
709
|
-
* pages, // pages extracted from the document, which contain only basic information for classifiers
|
|
710
|
-
* documents // extracted documents and their types
|
|
711
|
-
* } = await poller.pollUntilDone();
|
|
712
|
-
*
|
|
713
|
-
* // We'll print the documents and their types
|
|
714
|
-
* for (const { docType } of documents) {
|
|
715
|
-
* console.log("The type of this document is:", docType);
|
|
716
|
-
* }
|
|
717
|
-
* ```
|
|
718
|
-
* @param classifierId - the ID of the custom classifier to use for analysis
|
|
719
|
-
* @param documentUrl - the URL of the document to classify
|
|
720
|
-
* @param options -
|
|
721
|
-
* @returns
|
|
722
|
-
*/
|
|
723
|
-
beginClassifyDocumentFromUrl(classifierId: string, documentUrl: string, options?: ClassifyDocumentOptions): Promise<AnalysisPoller>;
|
|
724
|
-
/**
|
|
725
|
-
* A helper method for running classification polymorphically.
|
|
726
|
-
* @param classifierId - the ID of the classifier to use
|
|
727
|
-
* @param input - the string URL or request body to use
|
|
728
|
-
* @param options - analysis options
|
|
729
|
-
* @returns an analysis poller
|
|
730
|
-
*/
|
|
731
|
-
private classify;
|
|
732
|
-
/**
|
|
733
|
-
* Create an LRO poller that handles analysis operations.
|
|
734
|
-
*
|
|
735
|
-
* This is the meat of all analysis polling operations.
|
|
736
|
-
*
|
|
737
|
-
* @param startOperation - function that starts the operation and returns the operation location
|
|
738
|
-
* @param definition - operation definition (initial model ID, operation transforms, request options)
|
|
739
|
-
* @returns - an analysis poller that produces the given return types according to the operation spec
|
|
740
|
-
*/
|
|
741
|
-
private createUnifiedPoller;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
/**
|
|
745
|
-
* Configurable options for DocumentAnalysisClient.
|
|
746
|
-
*/
|
|
747
|
-
export declare interface DocumentAnalysisClientOptions extends CommonClientOptions {
|
|
748
|
-
/**
|
|
749
|
-
* The unit of string offset/length values that the service returns.
|
|
750
|
-
*
|
|
751
|
-
* In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need
|
|
752
|
-
* Unicode code-point units instead.
|
|
753
|
-
*
|
|
754
|
-
* Default: "utf16CodeUnit"
|
|
755
|
-
*/
|
|
756
|
-
stringIndexType?: StringIndexType;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* The state of an analysis operation, which will eventually produce the result type that corresponds to the model.
|
|
761
|
-
*/
|
|
762
|
-
export declare interface DocumentAnalysisPollOperationState<Result = AnalyzeResult<AnalyzedDocument>> extends PollOperationState<Result> {
|
|
763
|
-
/**
|
|
764
|
-
* The status of the operation. One of:
|
|
765
|
-
*
|
|
766
|
-
* - "notStarted"
|
|
767
|
-
* - "running"
|
|
768
|
-
* - "succeeded"
|
|
769
|
-
* - "failed"
|
|
770
|
-
*/
|
|
771
|
-
status: AnalyzeResultOperationStatus;
|
|
772
|
-
/**
|
|
773
|
-
* The model ID that the analysis operation will use to produce the result.
|
|
774
|
-
*/
|
|
775
|
-
modelId: string;
|
|
776
|
-
/**
|
|
777
|
-
* The URL to the operation.
|
|
778
|
-
*/
|
|
779
|
-
operationLocation: string;
|
|
780
|
-
/**
|
|
781
|
-
* The Date and Time that the operation was created.
|
|
782
|
-
*/
|
|
783
|
-
createdOn: Date;
|
|
784
|
-
/**
|
|
785
|
-
* The date & time that the operation state was last modified.
|
|
786
|
-
*/
|
|
787
|
-
lastUpdatedOn: Date;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
/**
|
|
791
|
-
* A visual annotation element in the document, such as a check mark or cross.
|
|
792
|
-
*/
|
|
793
|
-
export declare interface DocumentAnnotation extends HasBoundingPolygon {
|
|
794
|
-
/** Confidence of correctly extracting the annotation. */
|
|
795
|
-
confidence: number;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/**
|
|
799
|
-
* A DocumentField that consists of an array of nested fields. All fields in the array will have the same type.
|
|
800
|
-
*/
|
|
801
|
-
export declare interface DocumentArrayField<T = DocumentField> extends DocumentFieldCommon {
|
|
802
|
-
/** Field kind: "array". */
|
|
803
|
-
kind: "array";
|
|
804
|
-
/**
|
|
805
|
-
* The extracted members of the array field.
|
|
806
|
-
*/
|
|
807
|
-
values: T[];
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* An extracted barcode.
|
|
812
|
-
*/
|
|
813
|
-
export declare interface DocumentBarcode extends HasBoundingPolygon {
|
|
814
|
-
/**
|
|
815
|
-
* The type of barcode that was extracted. See the `DocumentBarcodeKind` type for a list of possible values.
|
|
816
|
-
*/
|
|
817
|
-
kind: DocumentBarcodeKind;
|
|
818
|
-
/** The encoded data in the barcode. */
|
|
819
|
-
value: string;
|
|
820
|
-
/** The location of the barcode in the reading-order concatenated `content`. */
|
|
821
|
-
span: DocumentSpan;
|
|
822
|
-
/** Confidence of correctly extracting the barcode. */
|
|
823
|
-
confidence: number;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
/**
|
|
827
|
-
* Defines values for DocumentBarcodeKind. \
|
|
828
|
-
* {@link KnownDocumentBarcodeKind} can be used interchangeably with DocumentBarcodeKind,
|
|
829
|
-
* this enum contains the known values that the service supports.
|
|
830
|
-
* ### Known values supported by the service
|
|
831
|
-
* **QRCode**: QR code, as defined in ISO\/IEC 18004:2015. \
|
|
832
|
-
* **PDF417**: PDF417, as defined in ISO 15438. \
|
|
833
|
-
* **UPCA**: GS1 12-digit Universal Product Code. \
|
|
834
|
-
* **UPCE**: GS1 6-digit Universal Product Code. \
|
|
835
|
-
* **Code39**: Code 39 barcode, as defined in ISO\/IEC 16388:2007. \
|
|
836
|
-
* **Code128**: Code 128 barcode, as defined in ISO\/IEC 15417:2007. \
|
|
837
|
-
* **EAN8**: GS1 8-digit International Article Number (European Article Number). \
|
|
838
|
-
* **EAN13**: GS1 13-digit International Article Number (European Article Number). \
|
|
839
|
-
* **DataBar**: GS1 DataBar barcode. \
|
|
840
|
-
* **Code93**: Code 93 barcode, as defined in ANSI\/AIM BC5-1995. \
|
|
841
|
-
* **Codabar**: Codabar barcode, as defined in ANSI\/AIM BC3-1995. \
|
|
842
|
-
* **DataBarExpanded**: GS1 DataBar Expanded barcode. \
|
|
843
|
-
* **ITF**: Interleaved 2 of 5 barcode, as defined in ANSI\/AIM BC2-1995. \
|
|
844
|
-
* **MicroQRCode**: Micro QR code, as defined in ISO\/IEC 23941:2022. \
|
|
845
|
-
* **Aztec**: Aztec code, as defined in ISO\/IEC 24778:2008. \
|
|
846
|
-
* **DataMatrix**: Data matrix code, as defined in ISO\/IEC 16022:2006. \
|
|
847
|
-
* **MaxiCode**: MaxiCode, as defined in ISO\/IEC 16023:2000.
|
|
848
|
-
*/
|
|
849
|
-
export declare type DocumentBarcodeKind = string;
|
|
850
|
-
|
|
851
|
-
/**
|
|
852
|
-
* A DocumentField that has a boolean value.
|
|
853
|
-
*/
|
|
854
|
-
export declare interface DocumentBooleanField extends DocumentValueField<boolean> {
|
|
855
|
-
/** Field kind: "boolean". */
|
|
856
|
-
kind: "boolean";
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
/**
|
|
860
|
-
* Defines values for DocumentBuildMode. \
|
|
861
|
-
* {@link KnownDocumentBuildMode} can be used interchangeably with DocumentBuildMode,
|
|
862
|
-
* this enum contains the known values that the service supports.
|
|
863
|
-
* ### Known values supported by the service
|
|
864
|
-
* **template**: Target documents with similar visual templates. \
|
|
865
|
-
* **neural**: Support documents with diverse visual templates.
|
|
866
|
-
*/
|
|
867
|
-
export declare type DocumentBuildMode = string;
|
|
868
|
-
|
|
869
|
-
/** An object representing the location and content of a table caption. */
|
|
870
|
-
export declare interface DocumentCaption {
|
|
871
|
-
/** Table caption content. */
|
|
872
|
-
content: string;
|
|
873
|
-
/** Bounding regions covering the table caption. */
|
|
874
|
-
boundingRegions?: BoundingRegion[];
|
|
875
|
-
/** Location of the table caption in the reading order concatenated content. */
|
|
876
|
-
spans: DocumentSpan[];
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
/** Get Operation response object. */
|
|
880
|
-
export declare interface DocumentClassifierBuildOperationDetails extends OperationDetails {
|
|
881
|
-
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
882
|
-
kind: "documentClassifierBuild";
|
|
883
|
-
/** Operation result upon success. */
|
|
884
|
-
result?: DocumentClassifierDetails;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
/** Document classifier info. */
|
|
888
|
-
export declare interface DocumentClassifierDetails {
|
|
889
|
-
/** Unique document classifier name. */
|
|
890
|
-
classifierId: string;
|
|
891
|
-
/** Document classifier description. */
|
|
892
|
-
description?: string;
|
|
893
|
-
/** Date and time (UTC) when the document classifier was created. */
|
|
894
|
-
createdOn: Date;
|
|
895
|
-
/** Date and time (UTC) when the document classifier will expire. */
|
|
896
|
-
expiresOn?: Date;
|
|
897
|
-
/** API version used to create this document classifier. */
|
|
898
|
-
apiVersion: string;
|
|
899
|
-
/** List of document types to classify against. */
|
|
900
|
-
docTypes: {
|
|
901
|
-
[propertyName: string]: ClassifierDocumentTypeDetails;
|
|
902
|
-
};
|
|
903
|
-
}
|
|
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
|
-
|
|
917
|
-
/**
|
|
918
|
-
* The state of a model creation operation.
|
|
919
|
-
*/
|
|
920
|
-
export declare interface DocumentClassifierOperationState extends PollOperationState<DocumentClassifierDetails>, ModelAdministrationOperationStateCommon {
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* A long-running operation (poller) that tracks the state of a custom classifier creation operation, eventually
|
|
925
|
-
* producing a {@link DocumentClassifierDetails}.
|
|
926
|
-
*/
|
|
927
|
-
export declare type DocumentClassifierPoller = PollerLike<DocumentClassifierOperationState, DocumentClassifierDetails>;
|
|
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
|
-
|
|
938
|
-
/**
|
|
939
|
-
* A DocumentField that has a value indicating a country or region, represented as a string.
|
|
940
|
-
*/
|
|
941
|
-
export declare interface DocumentCountryRegionField extends DocumentFieldCommon {
|
|
942
|
-
/** Field kind: "countryRegion". */
|
|
943
|
-
kind: "countryRegion";
|
|
944
|
-
/**
|
|
945
|
-
* The 3-letter country/region code (ISO 3166-1 alpha-3) of the extracted country or region.
|
|
946
|
-
*/
|
|
947
|
-
value?: string;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
/**
|
|
951
|
-
* A DocumentField that describes an amount of a certain currency.
|
|
952
|
-
*/
|
|
953
|
-
export declare interface DocumentCurrencyField extends DocumentFieldCommon {
|
|
954
|
-
/** Field kind: "currency". */
|
|
955
|
-
kind: "currency";
|
|
956
|
-
/**
|
|
957
|
-
* The properties of the extracted currency.
|
|
958
|
-
*/
|
|
959
|
-
value?: CurrencyValue;
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
/**
|
|
963
|
-
* A DocumentField that has a Date value.
|
|
964
|
-
*/
|
|
965
|
-
export declare interface DocumentDateField extends DocumentValueField<Date> {
|
|
966
|
-
/** Field kind: "date". */
|
|
967
|
-
kind: "date";
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
/**
|
|
971
|
-
* An extracted field. The `kind` property identifies (discriminates) the type of the `DocumentField`.
|
|
972
|
-
*/
|
|
973
|
-
export declare type DocumentField = DocumentStringField | DocumentDateField | DocumentTimeField | DocumentPhoneNumberField | DocumentNumberField | DocumentIntegerField | DocumentBooleanField | DocumentSelectionMarkField | DocumentCountryRegionField | DocumentSignatureField | DocumentCurrencyField | DocumentAddressField | DocumentArrayField | DocumentObjectField;
|
|
974
|
-
|
|
975
|
-
/**
|
|
976
|
-
* Fields that are common to all DocumentField variants.
|
|
977
|
-
*/
|
|
978
|
-
export declare interface DocumentFieldCommon {
|
|
979
|
-
/**
|
|
980
|
-
* The verbatim extracted text content of the field.
|
|
981
|
-
*/
|
|
982
|
-
content?: string;
|
|
983
|
-
/**
|
|
984
|
-
* Bounding regions covering the field.
|
|
985
|
-
*/
|
|
986
|
-
boundingRegions?: BoundingRegion[];
|
|
987
|
-
/**
|
|
988
|
-
* Confidence of correctly extracting the field.
|
|
989
|
-
*/
|
|
990
|
-
confidence?: number;
|
|
991
|
-
/**
|
|
992
|
-
* Location of the field in the reading order concatenated content.
|
|
993
|
-
*/
|
|
994
|
-
spans?: DocumentSpan[];
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
/** Description of the field semantic schema using a JSON Schema style syntax. */
|
|
998
|
-
export declare interface DocumentFieldSchema {
|
|
999
|
-
/** Semantic data type of the field value. */
|
|
1000
|
-
type: DocumentFieldType;
|
|
1001
|
-
/** Field description. */
|
|
1002
|
-
description?: string;
|
|
1003
|
-
/** Example field content. */
|
|
1004
|
-
example?: string;
|
|
1005
|
-
/** Field type schema of each array element. */
|
|
1006
|
-
items?: DocumentFieldSchema;
|
|
1007
|
-
/** Named sub-fields of the object field. */
|
|
1008
|
-
properties?: {
|
|
1009
|
-
[propertyName: string]: DocumentFieldSchema;
|
|
1010
|
-
};
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
/**
|
|
1014
|
-
* Defines values for DocumentFieldType. \
|
|
1015
|
-
* {@link KnownDocumentFieldType} can be used interchangeably with DocumentFieldType,
|
|
1016
|
-
* this enum contains the known values that the service supports.
|
|
1017
|
-
* ### Known values supported by the service
|
|
1018
|
-
* **string**: Plain text. \
|
|
1019
|
-
* **date**: Date, normalized to ISO 8601 (YYYY-MM-DD) format. \
|
|
1020
|
-
* **time**: Time, normalized to ISO 8601 (hh:mm:ss) format. \
|
|
1021
|
-
* **phoneNumber**: Phone number, normalized to E.164 (+{CountryCode}{SubscriberNumber}) format. \
|
|
1022
|
-
* **number**: Floating point number, normalized to double precision floating point. \
|
|
1023
|
-
* **integer**: Integer number, normalized to 64-bit signed integer. \
|
|
1024
|
-
* **selectionMark**: Is field selected? \
|
|
1025
|
-
* **countryRegion**: Country\/region, normalized to ISO 3166-1 alpha-3 format (ex. USA). \
|
|
1026
|
-
* **signature**: Is signature present? \
|
|
1027
|
-
* **array**: List of subfields of the same type. \
|
|
1028
|
-
* **object**: Named list of subfields of potentially different types. \
|
|
1029
|
-
* **currency**: Currency amount with optional currency symbol and unit. \
|
|
1030
|
-
* **address**: Parsed address. \
|
|
1031
|
-
* **boolean**: Boolean value, normalized to true or false.
|
|
1032
|
-
*/
|
|
1033
|
-
export declare type DocumentFieldType = string;
|
|
1034
|
-
|
|
1035
|
-
/** An object representing the location and content of a table footnote. */
|
|
1036
|
-
export declare interface DocumentFootnote {
|
|
1037
|
-
/** Table footnote content. */
|
|
1038
|
-
content: string;
|
|
1039
|
-
/** Bounding regions covering the table footnote. */
|
|
1040
|
-
boundingRegions?: BoundingRegion[];
|
|
1041
|
-
/** Location of the table footnote in the reading order concatenated content. */
|
|
1042
|
-
spans: DocumentSpan[];
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
/**
|
|
1046
|
-
* An extracted formula.
|
|
1047
|
-
*/
|
|
1048
|
-
export declare interface DocumentFormula extends HasBoundingPolygon {
|
|
1049
|
-
/**
|
|
1050
|
-
* The type of formula that was extracted. One of:
|
|
1051
|
-
* - "inline": a formula embedded in the content of a paragraph.
|
|
1052
|
-
* - "display": a formula in display mode that takes up a whole line.
|
|
1053
|
-
*/
|
|
1054
|
-
kind: DocumentFormulaKind;
|
|
1055
|
-
/** A LaTeX expression describing the formula. */
|
|
1056
|
-
value: string;
|
|
1057
|
-
/** Location of the formula in the reading-order concatenated content. */
|
|
1058
|
-
span: DocumentSpan;
|
|
1059
|
-
/** Confidence of correctly extracting the formula. */
|
|
1060
|
-
confidence: number;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
/**
|
|
1064
|
-
* Defines values for DocumentFormulaKind. \
|
|
1065
|
-
* {@link KnownDocumentFormulaKind} can be used interchangeably with DocumentFormulaKind,
|
|
1066
|
-
* this enum contains the known values that the service supports.
|
|
1067
|
-
* ### Known values supported by the service
|
|
1068
|
-
* **inline**: A formula embedded within the content of a paragraph. \
|
|
1069
|
-
* **display**: A formula in display mode that takes up an entire line.
|
|
1070
|
-
*/
|
|
1071
|
-
export declare type DocumentFormulaKind = string;
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* A DocumentField that has an integer value.
|
|
1075
|
-
*/
|
|
1076
|
-
export declare interface DocumentIntegerField extends DocumentValueField<number> {
|
|
1077
|
-
/** Field kind: "integer". */
|
|
1078
|
-
kind: "integer";
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
/** An object representing the field key or value in a key-value pair. */
|
|
1082
|
-
export declare interface DocumentKeyValueElement {
|
|
1083
|
-
/** Concatenated content of the key-value element in reading order. */
|
|
1084
|
-
content: string;
|
|
1085
|
-
/** Bounding regions covering the key-value element. */
|
|
1086
|
-
boundingRegions?: BoundingRegion[];
|
|
1087
|
-
/** Location of the key-value element in the reading order concatenated content. */
|
|
1088
|
-
spans: DocumentSpan[];
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
/** An object representing a form field with distinct field label (key) and field value (may be empty). */
|
|
1092
|
-
export declare interface DocumentKeyValuePair {
|
|
1093
|
-
/** Field label of the key-value pair. */
|
|
1094
|
-
key: DocumentKeyValueElement;
|
|
1095
|
-
/** Field value of the key-value pair. */
|
|
1096
|
-
value?: DocumentKeyValueElement;
|
|
1097
|
-
/** Confidence of correctly extracting the key-value pair. */
|
|
1098
|
-
confidence: number;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
/** An object representing the detected language for a given text span. */
|
|
1102
|
-
export declare interface DocumentLanguage {
|
|
1103
|
-
/** Detected language. Value may an ISO 639-1 language code (ex. "en", "fr") or BCP 47 language tag (ex. "zh-Hans"). */
|
|
1104
|
-
locale: string;
|
|
1105
|
-
/** Location of the text elements in the concatenated content the language applies to. */
|
|
1106
|
-
spans: DocumentSpan[];
|
|
1107
|
-
/** Confidence of correctly identifying the language. */
|
|
1108
|
-
confidence: number;
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
/** A content line object consisting of an adjacent sequence of content elements, such as words and selection marks. */
|
|
1112
|
-
export declare interface DocumentLine extends HasBoundingPolygon {
|
|
1113
|
-
/** Concatenated content of the contained elements in reading order. */
|
|
1114
|
-
content: string;
|
|
1115
|
-
/** Location of the line in the reading order concatenated content. */
|
|
1116
|
-
spans: DocumentSpan[];
|
|
1117
|
-
/**
|
|
1118
|
-
* Compute the `DocumentWord`s that are related to this line.
|
|
1119
|
-
*
|
|
1120
|
-
* This function produces a lazy iterator that will yield one word before computing the next.
|
|
1121
|
-
*/
|
|
1122
|
-
words: () => IterableIterator<DocumentWord>;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* A well-known model specification that supports extracting structured documents.
|
|
1127
|
-
*
|
|
1128
|
-
* See the `beginAnalyzeDocument` method of {@link DocumentAnalysisClient}, which supports consuming these
|
|
1129
|
-
* `DocumentModel` objects instead of model ID strings to provide stronger result types.
|
|
1130
|
-
*/
|
|
1131
|
-
export declare interface DocumentModel<Result> {
|
|
1132
|
-
/**
|
|
1133
|
-
* The unique ID of this model.
|
|
1134
|
-
*/
|
|
1135
|
-
modelId: string;
|
|
1136
|
-
/**
|
|
1137
|
-
* The API version of the model.
|
|
1138
|
-
*/
|
|
1139
|
-
apiVersion?: string;
|
|
1140
|
-
/**
|
|
1141
|
-
* An associated transformation that is used to conver the base (weak) Result type to the strong version.
|
|
1142
|
-
*/
|
|
1143
|
-
transformResult: (input: AnalyzeResult) => Result;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* A client for interacting with the Form Recognizer service's model management features, such as creating, reading,
|
|
1148
|
-
* listing, deleting, and copying models.
|
|
1149
|
-
*
|
|
1150
|
-
* ### Examples:
|
|
1151
|
-
*
|
|
1152
|
-
* #### Azure Active Directory
|
|
1153
|
-
*
|
|
1154
|
-
* ```typescript
|
|
1155
|
-
* import { DocumentModelAdministrationClient } from "@azure/ai-form-recognizer";
|
|
1156
|
-
* import { DefaultAzureCredential } from "@azure/identity";
|
|
1157
|
-
*
|
|
1158
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
1159
|
-
* const credential = new DefaultAzureCredential();
|
|
1160
|
-
*
|
|
1161
|
-
* const client = new DocumentModelAdministrationClient(endpoint, credential);
|
|
1162
|
-
* ```
|
|
1163
|
-
*
|
|
1164
|
-
* #### API Key (Subscription Key)
|
|
1165
|
-
*
|
|
1166
|
-
* ```typescript
|
|
1167
|
-
* import { DocumentModelAdministrationClient, AzureKeyCredential } from "@azure/ai-form-recognizer";
|
|
1168
|
-
*
|
|
1169
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
1170
|
-
* const credential = new AzureKeyCredential("<api key>");
|
|
1171
|
-
*
|
|
1172
|
-
* const client = new DocumentModelAdministrationClient(endpoint, credential);
|
|
1173
|
-
* ```
|
|
1174
|
-
*/
|
|
1175
|
-
export declare class DocumentModelAdministrationClient {
|
|
1176
|
-
private _restClient;
|
|
1177
|
-
private _tracing;
|
|
1178
|
-
/**
|
|
1179
|
-
* Create a DocumentModelAdministrationClient instance from a resource endpoint and a an Azure Identity `TokenCredential`.
|
|
1180
|
-
*
|
|
1181
|
-
* See the [`@azure/identity`](https://npmjs.com/package/\@azure/identity) package for more information about
|
|
1182
|
-
* authenticating with Azure Active Directory.
|
|
1183
|
-
*
|
|
1184
|
-
* ### Example:
|
|
1185
|
-
*
|
|
1186
|
-
* ```javascript
|
|
1187
|
-
* import { DocumentModelAdministrationClient } from "@azure/ai-form-recognizer";
|
|
1188
|
-
* import { DefaultAzureCredential } from "@azure/identity";
|
|
1189
|
-
*
|
|
1190
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
1191
|
-
* const credential = new DefaultAzureCredential();
|
|
1192
|
-
*
|
|
1193
|
-
* const client = new DocumentModelAdministrationClient(endpoint, credential);
|
|
1194
|
-
* ```
|
|
1195
|
-
*
|
|
1196
|
-
* @param endpoint - the endpoint URL of an Azure Cognitive Services instance
|
|
1197
|
-
* @param credential - a TokenCredential instance from the `@azure/identity` package
|
|
1198
|
-
* @param options - optional settings for configuring all methods in the client
|
|
1199
|
-
*/
|
|
1200
|
-
constructor(endpoint: string, credential: TokenCredential, options?: DocumentModelAdministrationClientOptions);
|
|
1201
|
-
/**
|
|
1202
|
-
* Create a DocumentModelAdministrationClient instance from a resource endpoint and a static API key
|
|
1203
|
-
* (`KeyCredential`),
|
|
1204
|
-
*
|
|
1205
|
-
* ### Example:
|
|
1206
|
-
*
|
|
1207
|
-
* ```javascript
|
|
1208
|
-
* import { DocumentModelAdministrationClient, AzureKeyCredential } from "@azure/ai-form-recognizer";
|
|
1209
|
-
*
|
|
1210
|
-
* const endpoint = "https://<resource name>.cognitiveservices.azure.com";
|
|
1211
|
-
* const credential = new AzureKeyCredential("<api key>");
|
|
1212
|
-
*
|
|
1213
|
-
* const client = new DocumentModelAdministrationClient(endpoint, credential);
|
|
1214
|
-
* ```
|
|
1215
|
-
*
|
|
1216
|
-
* @param endpoint - the endpoint URL of an Azure Cognitive Services instance
|
|
1217
|
-
* @param credential - a KeyCredential containing the Cognitive Services instance subscription key
|
|
1218
|
-
* @param options - optional settings for configuring all methods in the client
|
|
1219
|
-
*/
|
|
1220
|
-
constructor(endpoint: string, credential: KeyCredential, options?: DocumentModelAdministrationClientOptions);
|
|
1221
|
-
/**
|
|
1222
|
-
* @hidden
|
|
1223
|
-
*/
|
|
1224
|
-
constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: DocumentModelAdministrationClientOptions);
|
|
1225
|
-
/**
|
|
1226
|
-
* Build a new model with a given ID from a set of input documents and labeled fields.
|
|
1227
|
-
*
|
|
1228
|
-
* The Model ID can consist of any text, so long as it does not begin with "prebuilt-" (as these models refer to
|
|
1229
|
-
* prebuilt Form Recognizer models that are common to all resources), and so long as it does not already exist within
|
|
1230
|
-
* the resource.
|
|
1231
|
-
*
|
|
1232
|
-
* The Form Recognizer service reads the training data set from an Azure Storage container, given as a URL to the
|
|
1233
|
-
* container with a SAS token that allows the service backend to communicate with the container. At a minimum, the
|
|
1234
|
-
* "read" and "list" permissions are required. In addition, the data in the given container must be organized
|
|
1235
|
-
* according to a particular convention, which is documented in [the service's documentation for building custom
|
|
1236
|
-
* models](https://aka.ms/form-recognizer/custom).
|
|
1237
|
-
*
|
|
1238
|
-
* ### Example
|
|
1239
|
-
*
|
|
1240
|
-
* ```javascript
|
|
1241
|
-
* const modelId = "aNewModel";
|
|
1242
|
-
* const containerUrl = "<training data container SAS URL>";
|
|
1243
|
-
*
|
|
1244
|
-
* const poller = await client.beginBuildDocumentModel(modelId, containerUrl, {
|
|
1245
|
-
* // Optionally, a text description may be attached to the model
|
|
1246
|
-
* description: "This is an example model!"
|
|
1247
|
-
* });
|
|
1248
|
-
*
|
|
1249
|
-
* // Model building, like all other model creation operations, returns a poller that eventually produces a ModelDetails
|
|
1250
|
-
* // object
|
|
1251
|
-
* const modelDetails = await poller.pollUntilDone();
|
|
1252
|
-
*
|
|
1253
|
-
* const {
|
|
1254
|
-
* modelId, // identical to the modelId given when creating the model
|
|
1255
|
-
* description, // identical to the description given when creating the model
|
|
1256
|
-
* createdOn, // the Date (timestamp) that the model was created
|
|
1257
|
-
* docTypes // information about the document types in the model and their field schemas
|
|
1258
|
-
* } = modelDetails;
|
|
1259
|
-
* ```
|
|
1260
|
-
*
|
|
1261
|
-
* @param modelId - the unique ID of the model to create
|
|
1262
|
-
* @param containerUrl - SAS-encoded URL to an Azure Storage container holding the training data set
|
|
1263
|
-
* @param buildMode - the mode to use when building the model (see `DocumentModelBuildMode`)
|
|
1264
|
-
* @param options - optional settings for the model build operation
|
|
1265
|
-
* @returns a long-running operation (poller) that will eventually produce the created model information or an error
|
|
1266
|
-
*/
|
|
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>;
|
|
1307
|
-
/**
|
|
1308
|
-
* Creates a single composed model from several pre-existing submodels.
|
|
1309
|
-
*
|
|
1310
|
-
* The resulting composed model combines the document types of its component models, and inserts a classification step
|
|
1311
|
-
* into the extraction pipeline to determine which of its component submodels is most appropriate for the given input.
|
|
1312
|
-
*
|
|
1313
|
-
* ### Example
|
|
1314
|
-
*
|
|
1315
|
-
* ```javascript
|
|
1316
|
-
* const modelId = "aNewComposedModel";
|
|
1317
|
-
* const subModelIds = [
|
|
1318
|
-
* "documentType1Model",
|
|
1319
|
-
* "documentType2Model",
|
|
1320
|
-
* "documentType3Model"
|
|
1321
|
-
* ];
|
|
1322
|
-
*
|
|
1323
|
-
* // The resulting composed model can classify and extract data from documents
|
|
1324
|
-
* // conforming to any of the above document types
|
|
1325
|
-
* const poller = await client.beginComposeDocumentModel(modelId, subModelIds, {
|
|
1326
|
-
* description: "This is a composed model that can handle several document types."
|
|
1327
|
-
* });
|
|
1328
|
-
*
|
|
1329
|
-
* // Model composition, like all other model creation operations, returns a poller that eventually produces a
|
|
1330
|
-
* // ModelDetails object
|
|
1331
|
-
* const modelDetails = await poller.pollUntilDone();
|
|
1332
|
-
*
|
|
1333
|
-
* const {
|
|
1334
|
-
* modelId, // identical to the modelId given when creating the model
|
|
1335
|
-
* description, // identical to the description given when creating the model
|
|
1336
|
-
* createdOn, // the Date (timestamp) that the model was created
|
|
1337
|
-
* docTypes // information about the document types of the composed submodels
|
|
1338
|
-
* } = modelDetails;
|
|
1339
|
-
* ```
|
|
1340
|
-
*
|
|
1341
|
-
* @param modelId - the unique ID of the model to create
|
|
1342
|
-
* @param componentModelIds - an Iterable of strings representing the unique model IDs of the models to compose
|
|
1343
|
-
* @param options - optional settings for model creation
|
|
1344
|
-
* @returns a long-running operation (poller) that will eventually produce the created model information or an error
|
|
1345
|
-
*/
|
|
1346
|
-
beginComposeDocumentModel(modelId: string, componentModelIds: Iterable<string>, options?: BeginComposeDocumentModelOptions): Promise<DocumentModelPoller>;
|
|
1347
|
-
/**
|
|
1348
|
-
* Creates an authorization to copy a model into the resource, used with the `beginCopyModelTo` method.
|
|
1349
|
-
*
|
|
1350
|
-
* The `CopyAuthorization` grants another cognitive service resource the right to create a model in this client's
|
|
1351
|
-
* resource with the model ID and optional description that are encoded into the authorization.
|
|
1352
|
-
*
|
|
1353
|
-
* ### Example
|
|
1354
|
-
*
|
|
1355
|
-
* ```javascript
|
|
1356
|
-
* // The copyAuthorization data structure stored below grants any cognitive services resource the right to copy a
|
|
1357
|
-
* // model into the client's resource with the given destination model ID.
|
|
1358
|
-
* const copyAuthorization = await client.getCopyAuthorization("<destination model ID>");
|
|
1359
|
-
* ```
|
|
1360
|
-
*
|
|
1361
|
-
* @param destinationModelId - the unique ID of the destination model (the ID to copy the model into)
|
|
1362
|
-
* @param options - optional settings for creating the copy authorization
|
|
1363
|
-
* @returns a copy authorization that encodes the given modelId and optional description
|
|
1364
|
-
*/
|
|
1365
|
-
getCopyAuthorization(destinationModelId: string, options?: GetCopyAuthorizationOptions): Promise<CopyAuthorization>;
|
|
1366
|
-
/**
|
|
1367
|
-
* Copies a model with the given ID into the resource and model ID encoded by a given copy authorization.
|
|
1368
|
-
*
|
|
1369
|
-
* See {@link CopyAuthorization} and {@link getCopyAuthorization}.
|
|
1370
|
-
*
|
|
1371
|
-
* ### Example
|
|
1372
|
-
*
|
|
1373
|
-
* ```javascript
|
|
1374
|
-
* // We need a client for the source model's resource
|
|
1375
|
-
* const sourceEndpoint = "https://<source resource name>.cognitiveservices.azure.com";
|
|
1376
|
-
* const sourceCredential = new AzureKeyCredential("<source api key>");
|
|
1377
|
-
* const sourceClient = new DocumentModelAdministrationClient(sourceEndpoint, sourceCredential);
|
|
1378
|
-
*
|
|
1379
|
-
* // We create the copy authorization using a client authenticated with the destination resource. Note that these two
|
|
1380
|
-
* // resources can be the same (you can copy a model to a new ID in the same resource).
|
|
1381
|
-
* const copyAuthorization = await client.getCopyAuthorization("<destination model ID>");
|
|
1382
|
-
*
|
|
1383
|
-
* // Finally, use the _source_ client to copy the model and await the copy operation
|
|
1384
|
-
* const poller = await sourceClient.beginCopyModelTo("<source model ID>");
|
|
1385
|
-
*
|
|
1386
|
-
* // Model copying, like all other model creation operations, returns a poller that eventually produces a ModelDetails
|
|
1387
|
-
* // object
|
|
1388
|
-
* const modelDetails = await poller.pollUntilDone();
|
|
1389
|
-
*
|
|
1390
|
-
* const {
|
|
1391
|
-
* modelId, // identical to the modelId given when creating the copy authorization
|
|
1392
|
-
* description, // identical to the description given when creating the copy authorization
|
|
1393
|
-
* createdOn, // the Date (timestamp) that the model was created
|
|
1394
|
-
* docTypes // information about the document types of the model (identical to the original, source model)
|
|
1395
|
-
* } = modelDetails;
|
|
1396
|
-
* ```
|
|
1397
|
-
*
|
|
1398
|
-
* @param sourceModelId - the unique ID of the source model that will be copied
|
|
1399
|
-
* @param authorization - an authorization to copy the model, created using the {@link getCopyAuthorization}
|
|
1400
|
-
* @param options - optional settings for
|
|
1401
|
-
* @returns a long-running operation (poller) that will eventually produce the copied model information or an error
|
|
1402
|
-
*/
|
|
1403
|
-
beginCopyModelTo(sourceModelId: string, authorization: CopyAuthorization, options?: BeginCopyModelOptions): Promise<DocumentModelPoller>;
|
|
1404
|
-
/**
|
|
1405
|
-
* Build a new document classifier with the given classifier ID and document types.
|
|
1406
|
-
*
|
|
1407
|
-
* The classifier ID must be unique among classifiers within the resource.
|
|
1408
|
-
*
|
|
1409
|
-
* The document types are given as an object that maps the name of the document type to the training data set for that
|
|
1410
|
-
* document type. Two training data input methods are supported:
|
|
1411
|
-
*
|
|
1412
|
-
* - `azureBlobSource`, which trains a classifier using the data in the given Azure Blob Storage container.
|
|
1413
|
-
* - `azureBlobFileListSource`, which is similar to `azureBlobSource` but allows for more fine-grained control over
|
|
1414
|
-
* the files that are included in the training data set by using a JSONL-formatted file list.
|
|
1415
|
-
*
|
|
1416
|
-
* The Form Recognizer service reads the training data set from an Azure Storage container, given as a URL to the
|
|
1417
|
-
* container with a SAS token that allows the service backend to communicate with the container. At a minimum, the
|
|
1418
|
-
* "read" and "list" permissions are required. In addition, the data in the given container must be organized
|
|
1419
|
-
* according to a particular convention, which is documented in [the service's documentation for building custom
|
|
1420
|
-
* document classifiers](https://aka.ms/azsdk/formrecognizer/buildclassifiermodel).
|
|
1421
|
-
*
|
|
1422
|
-
* ### Example
|
|
1423
|
-
*
|
|
1424
|
-
* ```javascript
|
|
1425
|
-
* const classifierId = "aNewClassifier";
|
|
1426
|
-
* const containerUrl1 = "<training data container SAS URL 1>";
|
|
1427
|
-
* const containerUrl2 = "<training data container SAS URL 2>";
|
|
1428
|
-
*
|
|
1429
|
-
* const poller = await client.beginBuildDocumentClassifier(
|
|
1430
|
-
* classifierId,
|
|
1431
|
-
* {
|
|
1432
|
-
* // The document types. Each entry in this object should map a document type name to a
|
|
1433
|
-
* // `ClassifierDocumentTypeDetails` object
|
|
1434
|
-
* "formX": {
|
|
1435
|
-
* azureBlobSource: {
|
|
1436
|
-
* containerUrl: containerUrl1,
|
|
1437
|
-
* }
|
|
1438
|
-
* },
|
|
1439
|
-
* "formY": {
|
|
1440
|
-
* azureBlobFileListSource: {
|
|
1441
|
-
* containerUrl: containerUrl2,
|
|
1442
|
-
* fileList: "path/to/fileList.jsonl"
|
|
1443
|
-
* }
|
|
1444
|
-
* },
|
|
1445
|
-
* },
|
|
1446
|
-
* {
|
|
1447
|
-
* // Optionally, a text description may be attached to the classifier
|
|
1448
|
-
* description: "This is an example classifier!"
|
|
1449
|
-
* }
|
|
1450
|
-
* );
|
|
1451
|
-
*
|
|
1452
|
-
* // Classifier building, like model creation operations, returns a poller that eventually produces a
|
|
1453
|
-
* // DocumentClassifierDetails object
|
|
1454
|
-
* const classifierDetails = await poller.pollUntilDone();
|
|
1455
|
-
*
|
|
1456
|
-
* const {
|
|
1457
|
-
* classifierId, // identical to the classifierId given when creating the classifier
|
|
1458
|
-
* description, // identical to the description given when creating the classifier (if any)
|
|
1459
|
-
* createdOn, // the Date (timestamp) that the classifier was created
|
|
1460
|
-
* docTypes // information about the document types in the classifier and their details
|
|
1461
|
-
* } = classifierDetails;
|
|
1462
|
-
* ```
|
|
1463
|
-
*
|
|
1464
|
-
* @param classifierId - the unique ID of the classifier to create
|
|
1465
|
-
* @param docTypeSources - the document types to include in the classifier and their sources (a map of document type
|
|
1466
|
-
* names to `ClassifierDocumentTypeDetails`)
|
|
1467
|
-
* @param options - optional settings for the classifier build operation
|
|
1468
|
-
* @returns a long-running operation (poller) that will eventually produce the created classifier details or an error
|
|
1469
|
-
*/
|
|
1470
|
-
beginBuildDocumentClassifier(classifierId: string, docTypeSources: DocumentClassifierDocumentTypeSources, options?: BeginBuildDocumentClassifierOptions): Promise<DocumentClassifierPoller>;
|
|
1471
|
-
/**
|
|
1472
|
-
* Create an LRO poller that handles model creation operations.
|
|
1473
|
-
*
|
|
1474
|
-
* This is the meat of the above model creation operations.
|
|
1475
|
-
*
|
|
1476
|
-
* @param definition - operation definition (start operation method, request options)
|
|
1477
|
-
* @returns a model poller (produces a ModelDetails)
|
|
1478
|
-
*/
|
|
1479
|
-
private createAdministrationPoller;
|
|
1480
|
-
/**
|
|
1481
|
-
* Retrieve basic information about this client's resource.
|
|
1482
|
-
*
|
|
1483
|
-
* ### Example
|
|
1484
|
-
*
|
|
1485
|
-
* ```javascript
|
|
1486
|
-
* const {
|
|
1487
|
-
* // Information about the custom models in the current resource
|
|
1488
|
-
* customDocumentModelDetails: {
|
|
1489
|
-
* // The number of custom models in the current resource
|
|
1490
|
-
* count,
|
|
1491
|
-
* // The maximum number of models that the current resource can support
|
|
1492
|
-
* limit
|
|
1493
|
-
* }
|
|
1494
|
-
* } = await client.getResourceDetails();
|
|
1495
|
-
* ```
|
|
1496
|
-
*
|
|
1497
|
-
* @param options - optional settings for the request
|
|
1498
|
-
* @returns basic information about this client's resource
|
|
1499
|
-
*/
|
|
1500
|
-
getResourceDetails(options?: GetResourceDetailsOptions): Promise<ResourceDetails>;
|
|
1501
|
-
/**
|
|
1502
|
-
* Retrieves information about a model ({@link DocumentModelDetails}) by ID.
|
|
1503
|
-
*
|
|
1504
|
-
* This method can retrieve information about custom as well as prebuilt models.
|
|
1505
|
-
*
|
|
1506
|
-
* ### **Breaking Change**
|
|
1507
|
-
*
|
|
1508
|
-
* In previous versions of the Form Recognizer REST API and SDK, the `getModel` method could return any model, even
|
|
1509
|
-
* one that failed to create due to errors. In the new service versions, `getDocumentModel` and `listDocumentModels`
|
|
1510
|
-
* _only produce successfully created models_ (i.e. models that are "ready" for use). Failed models are now retrieved
|
|
1511
|
-
* through the "operations" APIs, see {@link getOperation} and {@link listOperations}.
|
|
1512
|
-
*
|
|
1513
|
-
* ### Example
|
|
1514
|
-
*
|
|
1515
|
-
* ```javascript
|
|
1516
|
-
* // The ID of the prebuilt business card model
|
|
1517
|
-
* const modelId = "prebuilt-businessCard";
|
|
1518
|
-
*
|
|
1519
|
-
* const {
|
|
1520
|
-
* modelId, // identical to the modelId given when calling `getDocumentModel`
|
|
1521
|
-
* description, // a textual description of the model, if provided during model creation
|
|
1522
|
-
* createdOn, // the Date (timestamp) that the model was created
|
|
1523
|
-
* // information about the document types in the model and their field schemas
|
|
1524
|
-
* docTypes: {
|
|
1525
|
-
* // the document type of the prebuilt business card model
|
|
1526
|
-
* "prebuilt:businesscard": {
|
|
1527
|
-
* // an optional, textual description of this document type
|
|
1528
|
-
* description,
|
|
1529
|
-
* // the schema of the fields in this document type, see the FieldSchema type
|
|
1530
|
-
* fieldSchema,
|
|
1531
|
-
* // the service's confidences in the fields (an object with field names as properties and numeric confidence
|
|
1532
|
-
* // values)
|
|
1533
|
-
* fieldConfidence
|
|
1534
|
-
* }
|
|
1535
|
-
* }
|
|
1536
|
-
* } = await client.getDocumentModel(modelId);
|
|
1537
|
-
* ```
|
|
1538
|
-
*
|
|
1539
|
-
* @param modelId - the unique ID of the model to query
|
|
1540
|
-
* @param options - optional settings for the request
|
|
1541
|
-
* @returns information about the model with the given ID
|
|
1542
|
-
*/
|
|
1543
|
-
getDocumentModel(modelId: string, options?: GetModelOptions): Promise<DocumentModelDetails>;
|
|
1544
|
-
/**
|
|
1545
|
-
* List summaries of models in the resource. Custom as well as prebuilt models will be included. This operation
|
|
1546
|
-
* supports paging.
|
|
1547
|
-
*
|
|
1548
|
-
* The model summary ({@link DocumentModelSummary}) includes only the basic information about the model, and does not include
|
|
1549
|
-
* information about the document types in the model (such as the field schemas and confidence values).
|
|
1550
|
-
*
|
|
1551
|
-
* To access the full information about the model, use {@link getDocumentModel}.
|
|
1552
|
-
*
|
|
1553
|
-
* ### **Breaking Change**
|
|
1554
|
-
*
|
|
1555
|
-
* In previous versions of the Form Recognizer REST API and SDK, the `listModels` method would return all models, even
|
|
1556
|
-
* those that failed to create due to errors. In the new service versions, `listDocumentModels` and `getDocumentModel`
|
|
1557
|
-
* _only produce successfully created models_ (i.e. models that are "ready" for use). Failed models are now retrieved
|
|
1558
|
-
* through the "operations" APIs, see {@link getOperation} and {@link listOperations}.
|
|
1559
|
-
*
|
|
1560
|
-
* ### Examples
|
|
1561
|
-
*
|
|
1562
|
-
* #### Async Iteration
|
|
1563
|
-
*
|
|
1564
|
-
* ```javascript
|
|
1565
|
-
* for await (const summary of client.listDocumentModels()) {
|
|
1566
|
-
* const {
|
|
1567
|
-
* modelId, // The model's unique ID
|
|
1568
|
-
* description, // a textual description of the model, if provided during model creation
|
|
1569
|
-
* } = summary;
|
|
1570
|
-
*
|
|
1571
|
-
* // You can get the full model info using `getDocumentModel`
|
|
1572
|
-
* const model = await client.getDocumentModel(modelId);
|
|
1573
|
-
* }
|
|
1574
|
-
* ```
|
|
1575
|
-
*
|
|
1576
|
-
* #### By Page
|
|
1577
|
-
*
|
|
1578
|
-
* ```javascript
|
|
1579
|
-
* // The listDocumentModels method is paged, and you can iterate by page using the `byPage` method.
|
|
1580
|
-
* const pages = client.listDocumentModels().byPage();
|
|
1581
|
-
*
|
|
1582
|
-
* for await (const page of pages) {
|
|
1583
|
-
* // Each page is an array of models and can be iterated synchronously
|
|
1584
|
-
* for (const model of page) {
|
|
1585
|
-
* const {
|
|
1586
|
-
* modelId, // The model's unique ID
|
|
1587
|
-
* description, // a textual description of the model, if provided during model creation
|
|
1588
|
-
* } = summary;
|
|
1589
|
-
*
|
|
1590
|
-
* // You can get the full model info using `getDocumentModel`
|
|
1591
|
-
* const model = await client.getDocumentModel(modelId);
|
|
1592
|
-
* }
|
|
1593
|
-
* }
|
|
1594
|
-
* ```
|
|
1595
|
-
*
|
|
1596
|
-
* @param options - optional settings for the model requests
|
|
1597
|
-
* @returns an async iterable of model summaries that supports paging
|
|
1598
|
-
*/
|
|
1599
|
-
listDocumentModels(options?: ListModelsOptions): PagedAsyncIterableIterator<DocumentModelSummary>;
|
|
1600
|
-
/**
|
|
1601
|
-
* Deletes a model with the given ID from the client's resource, if it exists. This operation CANNOT be reverted.
|
|
1602
|
-
*
|
|
1603
|
-
* ### Example
|
|
1604
|
-
*
|
|
1605
|
-
* ```javascript
|
|
1606
|
-
* await client.deleteDocumentModel("<model ID to delete>"));
|
|
1607
|
-
* ```
|
|
1608
|
-
*
|
|
1609
|
-
* @param modelId - the unique ID of the model to delete from the resource
|
|
1610
|
-
* @param options - optional settings for the request
|
|
1611
|
-
*/
|
|
1612
|
-
deleteDocumentModel(modelId: string, options?: DeleteDocumentModelOptions): Promise<void>;
|
|
1613
|
-
/**
|
|
1614
|
-
* Retrieves information about a classifier ({@link DocumentClassifierDetails}) by ID.
|
|
1615
|
-
*
|
|
1616
|
-
* ### Example
|
|
1617
|
-
*
|
|
1618
|
-
* ```javascript
|
|
1619
|
-
* const classifierId = "<classifier ID";
|
|
1620
|
-
*
|
|
1621
|
-
* const {
|
|
1622
|
-
* classifierId, // identical to the ID given when calling `getDocumentClassifier`
|
|
1623
|
-
* description, // a textual description of the classifier, if provided during classifier creation
|
|
1624
|
-
* createdOn, // the Date (timestamp) that the classifier was created
|
|
1625
|
-
* // information about the document types in the classifier and their corresponding traning data
|
|
1626
|
-
* docTypes
|
|
1627
|
-
* } = await client.getDocumentClassifier(classifierId);
|
|
1628
|
-
*
|
|
1629
|
-
* // The `docTypes` property is a map of document type names to information about the training data
|
|
1630
|
-
* // for that document type.
|
|
1631
|
-
* for (const [docTypeName, classifierDocTypeDetails] of Object.entries(docTypes)) {
|
|
1632
|
-
* console.log(`- '${docTypeName}': `, classifierDocTypeDetails);
|
|
1633
|
-
* }
|
|
1634
|
-
* ```
|
|
1635
|
-
*
|
|
1636
|
-
* @param classifierId - the unique ID of the classifier to query
|
|
1637
|
-
* @param options - optional settings for the request
|
|
1638
|
-
* @returns information about the classifier with the given ID
|
|
1639
|
-
*/
|
|
1640
|
-
getDocumentClassifier(classifierId: string, options?: OperationOptions): Promise<DocumentClassifierDetails>;
|
|
1641
|
-
/**
|
|
1642
|
-
* List details about classifiers in the resource. This operation supports paging.
|
|
1643
|
-
*
|
|
1644
|
-
* ### Examples
|
|
1645
|
-
*
|
|
1646
|
-
* #### Async Iteration
|
|
1647
|
-
*
|
|
1648
|
-
* ```javascript
|
|
1649
|
-
* for await (const details of client.listDocumentClassifiers()) {
|
|
1650
|
-
* const {
|
|
1651
|
-
* classifierId, // The classifier's unique ID
|
|
1652
|
-
* description, // a textual description of the classifier, if provided during creation
|
|
1653
|
-
* docTypes, // information about the document types in the classifier and their corresponding traning data
|
|
1654
|
-
* } = details;
|
|
1655
|
-
* }
|
|
1656
|
-
* ```
|
|
1657
|
-
*
|
|
1658
|
-
* #### By Page
|
|
1659
|
-
*
|
|
1660
|
-
* ```javascript
|
|
1661
|
-
* // The listDocumentClassifiers method is paged, and you can iterate by page using the `byPage` method.
|
|
1662
|
-
* const pages = client.listDocumentClassifiers().byPage();
|
|
1663
|
-
*
|
|
1664
|
-
* for await (const page of pages) {
|
|
1665
|
-
* // Each page is an array of classifiers and can be iterated synchronously
|
|
1666
|
-
* for (const details of page) {
|
|
1667
|
-
* const {
|
|
1668
|
-
* classifierId, // The classifier's unique ID
|
|
1669
|
-
* description, // a textual description of the classifier, if provided during creation
|
|
1670
|
-
* docTypes, // information about the document types in the classifier and their corresponding traning data
|
|
1671
|
-
* } = details;
|
|
1672
|
-
* }
|
|
1673
|
-
* }
|
|
1674
|
-
* ```
|
|
1675
|
-
*
|
|
1676
|
-
* @param options - optional settings for the classifier requests
|
|
1677
|
-
* @returns an async iterable of classifier details that supports paging
|
|
1678
|
-
*/
|
|
1679
|
-
listDocumentClassifiers(options?: ListModelsOptions): PagedAsyncIterableIterator<DocumentClassifierDetails>;
|
|
1680
|
-
/**
|
|
1681
|
-
* Deletes a classifier with the given ID from the client's resource, if it exists. This operation CANNOT be reverted.
|
|
1682
|
-
*
|
|
1683
|
-
* ### Example
|
|
1684
|
-
*
|
|
1685
|
-
* ```javascript
|
|
1686
|
-
* await client.deleteDocumentClassifier("<classifier ID to delete>"));
|
|
1687
|
-
* ```
|
|
1688
|
-
*
|
|
1689
|
-
* @param classifierId - the unique ID of the classifier to delete from the resource
|
|
1690
|
-
* @param options - optional settings for the request
|
|
1691
|
-
*/
|
|
1692
|
-
deleteDocumentClassifier(classifierId: string, options?: OperationOptions): Promise<void>;
|
|
1693
|
-
/**
|
|
1694
|
-
* Retrieves information about an operation (`OperationDetails`) by its ID.
|
|
1695
|
-
*
|
|
1696
|
-
* Operations represent non-analysis tasks, such as building, composing, or copying a model.
|
|
1697
|
-
*
|
|
1698
|
-
* @param operationId - the ID of the operation to query
|
|
1699
|
-
* @param options - optional settings for the request
|
|
1700
|
-
* @returns information about the operation with the given ID
|
|
1701
|
-
*
|
|
1702
|
-
* ### Example
|
|
1703
|
-
*
|
|
1704
|
-
* ```javascript
|
|
1705
|
-
* // The ID of the operation, which should be a GUID
|
|
1706
|
-
* const operationId = "<operation GUID>";
|
|
1707
|
-
*
|
|
1708
|
-
* const {
|
|
1709
|
-
* operationId, // identical to the operationId given when calling `getOperation`
|
|
1710
|
-
* kind, // the operation kind, one of "documentModelBuild", "documentModelCompose", or "documentModelCopyTo"
|
|
1711
|
-
* status, // the status of the operation, one of "notStarted", "running", "failed", "succeeded", or "canceled"
|
|
1712
|
-
* percentCompleted, // a number between 0 and 100 representing the progress of the operation
|
|
1713
|
-
* createdOn, // a Date object that reflects the time when the operation was started
|
|
1714
|
-
* lastUpdatedOn, // a Date object that reflects the time when the operation state was last modified
|
|
1715
|
-
* } = await client.getOperation(operationId);
|
|
1716
|
-
* ```
|
|
1717
|
-
*/
|
|
1718
|
-
getOperation(operationId: string, options?: GetOperationOptions): Promise<OperationDetails>;
|
|
1719
|
-
/**
|
|
1720
|
-
* List model creation operations in the resource. This will produce all operations, including operations that failed
|
|
1721
|
-
* to create models successfully. This operation supports paging.
|
|
1722
|
-
*
|
|
1723
|
-
* ### Examples
|
|
1724
|
-
*
|
|
1725
|
-
* #### Async Iteration
|
|
1726
|
-
*
|
|
1727
|
-
* ```javascript
|
|
1728
|
-
* for await (const operation of client.listOperations()) {
|
|
1729
|
-
* const {
|
|
1730
|
-
* operationId, // the operation's GUID
|
|
1731
|
-
* status, // the operation status, one of "notStarted", "running", "succeeded", "failed", or "canceled"
|
|
1732
|
-
* percentCompleted // the progress of the operation, from 0 to 100
|
|
1733
|
-
* } = operation;
|
|
1734
|
-
* }
|
|
1735
|
-
* ```
|
|
1736
|
-
*
|
|
1737
|
-
* #### By Page
|
|
1738
|
-
*
|
|
1739
|
-
* ```javascript
|
|
1740
|
-
* // The listOperations method is paged, and you can iterate by page using the `byPage` method.
|
|
1741
|
-
* const pages = client.listOperations().byPage();
|
|
1742
|
-
*
|
|
1743
|
-
* for await (const page of pages) {
|
|
1744
|
-
* // Each page is an array of operation info objects and can be iterated synchronously
|
|
1745
|
-
* for (const operation of page) {
|
|
1746
|
-
* const {
|
|
1747
|
-
* operationId, // the operation's GUID
|
|
1748
|
-
* status, // the operation status, one of "notStarted", "running", "succeeded", "failed", or "canceled"
|
|
1749
|
-
* percentCompleted // the progress of the operation, from 0 to 100
|
|
1750
|
-
* } = operation;
|
|
1751
|
-
* }
|
|
1752
|
-
* }
|
|
1753
|
-
* ```
|
|
1754
|
-
*
|
|
1755
|
-
* @param options - optional settings for the operation requests
|
|
1756
|
-
* @returns an async iterable of operation information objects that supports paging
|
|
1757
|
-
*/
|
|
1758
|
-
listOperations(options?: ListOperationsOptions): PagedAsyncIterableIterator<OperationSummary>;
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
/**
|
|
1762
|
-
* Configurable options for DocumentModelAdministrationClient.
|
|
1763
|
-
*/
|
|
1764
|
-
export declare interface DocumentModelAdministrationClientOptions extends CommonClientOptions {
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
/**
|
|
1768
|
-
* Supported model build modes. The model build mode selects the engine that the service uses to train the model based
|
|
1769
|
-
* on the labeled training data.
|
|
1770
|
-
*
|
|
1771
|
-
* The options are:
|
|
1772
|
-
* - "neural", which yields the highest quality of model that is capable of extracting data from classes of documents
|
|
1773
|
-
* that have the same structure of data, but different layouts (for example, W2 tax forms, which may vary from company
|
|
1774
|
-
* to company, but always contain the same information).
|
|
1775
|
-
* - "template", which requires all documents to have the same fixed layout (template).
|
|
1776
|
-
*
|
|
1777
|
-
* Please see the following link for more information: https://aka.ms/azsdk/formrecognizer/buildmode
|
|
1778
|
-
*/
|
|
1779
|
-
export declare type DocumentModelBuildMode = (typeof DocumentModelBuildMode)[keyof typeof DocumentModelBuildMode];
|
|
1780
|
-
|
|
1781
|
-
/**
|
|
1782
|
-
* Supported values of `DocumentModelBuildMode`.
|
|
1783
|
-
*/
|
|
1784
|
-
export declare const DocumentModelBuildMode: {
|
|
1785
|
-
/**
|
|
1786
|
-
* A mode that builds a model assuming that documents all follow the same, fixed template layout (the same relative
|
|
1787
|
-
* positioning of fields between documents).
|
|
1788
|
-
*/
|
|
1789
|
-
readonly Template: "template";
|
|
1790
|
-
/**
|
|
1791
|
-
* A mode that uses a neural engine to extract fields, allowing for documents that have different visual appearances,
|
|
1792
|
-
* but that contain the same information.
|
|
1793
|
-
*/
|
|
1794
|
-
readonly Neural: "neural";
|
|
1795
|
-
};
|
|
1796
|
-
|
|
1797
|
-
/** Get Operation response object. */
|
|
1798
|
-
export declare interface DocumentModelBuildOperationDetails extends OperationDetails {
|
|
1799
|
-
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1800
|
-
kind: "documentModelBuild";
|
|
1801
|
-
/** Operation result upon success. */
|
|
1802
|
-
result?: DocumentModelDetails;
|
|
1803
|
-
}
|
|
1804
|
-
|
|
1805
|
-
/** Get Operation response object. */
|
|
1806
|
-
export declare interface DocumentModelComposeOperationDetails extends OperationDetails {
|
|
1807
|
-
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1808
|
-
kind: "documentModelCompose";
|
|
1809
|
-
/** Operation result upon success. */
|
|
1810
|
-
result?: DocumentModelDetails;
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
/** Get Operation response object. */
|
|
1814
|
-
export declare interface DocumentModelCopyToOperationDetails extends OperationDetails {
|
|
1815
|
-
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
1816
|
-
kind: "documentModelCopyTo";
|
|
1817
|
-
/** Operation result upon success. */
|
|
1818
|
-
result?: DocumentModelDetails;
|
|
1819
|
-
}
|
|
1820
|
-
|
|
1821
|
-
/** Document model info. */
|
|
1822
|
-
export declare interface DocumentModelDetails {
|
|
1823
|
-
/** Unique document model name. */
|
|
1824
|
-
modelId: string;
|
|
1825
|
-
/** Document model description. */
|
|
1826
|
-
description?: string;
|
|
1827
|
-
/** Date and time (UTC) when the document model was created. */
|
|
1828
|
-
createdOn: Date;
|
|
1829
|
-
/** Date and time (UTC) when the document model will expire. */
|
|
1830
|
-
expiresOn?: Date;
|
|
1831
|
-
/** API version used to create this document model. */
|
|
1832
|
-
apiVersion?: string;
|
|
1833
|
-
/** List of key-value tag attributes associated with the document model. */
|
|
1834
|
-
tags?: {
|
|
1835
|
-
[propertyName: string]: string;
|
|
1836
|
-
};
|
|
1837
|
-
/** Supported document types. */
|
|
1838
|
-
docTypes?: {
|
|
1839
|
-
[propertyName: string]: DocumentTypeDetails;
|
|
1840
|
-
};
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
/**
|
|
1844
|
-
* The state of a model creation operation.
|
|
1845
|
-
*/
|
|
1846
|
-
export declare interface DocumentModelOperationState extends PollOperationState<DocumentModelDetails>, ModelAdministrationOperationStateCommon {
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
/**
|
|
1850
|
-
* A long-running operation (poller) that tracks the state of a model creation operation, eventually producing a
|
|
1851
|
-
* {@link DocumentModelDetails}.
|
|
1852
|
-
*/
|
|
1853
|
-
export declare type DocumentModelPoller = PollerLike<DocumentModelOperationState, DocumentModelDetails>;
|
|
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
|
-
|
|
1864
|
-
/** Document model summary. */
|
|
1865
|
-
export declare interface DocumentModelSummary {
|
|
1866
|
-
/** Unique document model name. */
|
|
1867
|
-
modelId: string;
|
|
1868
|
-
/** Document model description. */
|
|
1869
|
-
description?: string;
|
|
1870
|
-
/** Date and time (UTC) when the document model was created. */
|
|
1871
|
-
createdOn: Date;
|
|
1872
|
-
/** Date and time (UTC) when the document model will expire. */
|
|
1873
|
-
expiresOn?: Date;
|
|
1874
|
-
/** API version used to create this document model. */
|
|
1875
|
-
apiVersion?: string;
|
|
1876
|
-
/** List of key-value tag attributes associated with the document model. */
|
|
1877
|
-
tags?: {
|
|
1878
|
-
[propertyName: string]: string;
|
|
1879
|
-
};
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
/**
|
|
1883
|
-
* A DocumentField that has a number value.
|
|
1884
|
-
*/
|
|
1885
|
-
export declare interface DocumentNumberField extends DocumentValueField<number> {
|
|
1886
|
-
/** Field kind: "number". */
|
|
1887
|
-
kind: "number";
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* A DocumentField that consists of several named properties that have their own DocumentField values.
|
|
1892
|
-
*/
|
|
1893
|
-
export declare interface DocumentObjectField<Properties = {
|
|
1894
|
-
[k: string]: DocumentField | undefined;
|
|
1895
|
-
}> extends DocumentFieldCommon {
|
|
1896
|
-
/** Field kind: "object". */
|
|
1897
|
-
kind: "object";
|
|
1898
|
-
/**
|
|
1899
|
-
* The extracted object properties. Each property of this object is, itself, a nested DocumentField.
|
|
1900
|
-
*/
|
|
1901
|
-
properties: Properties;
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
/** Content and layout elements extracted from a page from the input. */
|
|
1905
|
-
export declare interface DocumentPage {
|
|
1906
|
-
/** 1-based page number in the input document. */
|
|
1907
|
-
pageNumber: number;
|
|
1908
|
-
/** The general orientation of the content in clockwise direction, measured in degrees between (-180, 180]. */
|
|
1909
|
-
angle?: number;
|
|
1910
|
-
/** The width of the image/PDF in pixels/inches, respectively. */
|
|
1911
|
-
width?: number;
|
|
1912
|
-
/** The height of the image/PDF in pixels/inches, respectively. */
|
|
1913
|
-
height?: number;
|
|
1914
|
-
/** The unit used by the width, height, and polygon properties. For images, the unit is "pixel". PDF, the unit is "inch". */
|
|
1915
|
-
unit?: LengthUnit;
|
|
1916
|
-
/** Location of the page in the reading order concatenated content. */
|
|
1917
|
-
spans: DocumentSpan[];
|
|
1918
|
-
/** Extracted words from the page. */
|
|
1919
|
-
words?: DocumentWord[];
|
|
1920
|
-
/** Extracted selection marks from the page. */
|
|
1921
|
-
selectionMarks?: DocumentSelectionMark[];
|
|
1922
|
-
/** Extracted lines from the page, potentially containing both textual and visual elements. */
|
|
1923
|
-
lines?: DocumentLine[];
|
|
1924
|
-
/**
|
|
1925
|
-
* Extracted barcodes from the page.
|
|
1926
|
-
*/
|
|
1927
|
-
barcodes?: DocumentBarcode[];
|
|
1928
|
-
/**
|
|
1929
|
-
* Extracted formulas from the page.
|
|
1930
|
-
*
|
|
1931
|
-
* The `"formulas"` feature must be enabled or this property will be undefined.
|
|
1932
|
-
*
|
|
1933
|
-
* See {@link AnalyzeDocumentOptions#features}.
|
|
1934
|
-
*/
|
|
1935
|
-
formulas?: DocumentFormula[];
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
/** A paragraph object consisting with contiguous lines generally with common alignment and spacing. */
|
|
1939
|
-
export declare interface DocumentParagraph {
|
|
1940
|
-
/** Semantic role of the paragraph. */
|
|
1941
|
-
role?: ParagraphRole;
|
|
1942
|
-
/** Concatenated content of the paragraph in reading order. */
|
|
1943
|
-
content: string;
|
|
1944
|
-
/** Bounding regions covering the paragraph. */
|
|
1945
|
-
boundingRegions?: BoundingRegion[];
|
|
1946
|
-
/** Location of the paragraph in the reading order concatenated content. */
|
|
1947
|
-
spans: DocumentSpan[];
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
/**
|
|
1951
|
-
* A DocumentField that has a phone number value, represented as a string.
|
|
1952
|
-
*/
|
|
1953
|
-
export declare interface DocumentPhoneNumberField extends DocumentFieldCommon {
|
|
1954
|
-
/** Field kind: "phoneNumber". */
|
|
1955
|
-
kind: "phoneNumber";
|
|
1956
|
-
/**
|
|
1957
|
-
* The field's value, which is a string containing the phone number.
|
|
1958
|
-
*
|
|
1959
|
-
* The phone number value is normalized to a standard format. If the value could not be normalized, this value may be
|
|
1960
|
-
* undefined, and the `content` property will contain the verbatim text of the DocumentField as it appeared in the
|
|
1961
|
-
* input.
|
|
1962
|
-
*/
|
|
1963
|
-
value?: string;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
/** A selection mark object representing check boxes, radio buttons, and other elements indicating a selection. */
|
|
1967
|
-
export declare interface DocumentSelectionMark extends HasBoundingPolygon {
|
|
1968
|
-
/** State of the selection mark. */
|
|
1969
|
-
state: SelectionMarkState;
|
|
1970
|
-
/** Location of the selection mark in the reading order concatenated content. */
|
|
1971
|
-
span: DocumentSpan;
|
|
1972
|
-
/** Confidence of correctly extracting the selection mark. */
|
|
1973
|
-
confidence: number;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
/**
|
|
1977
|
-
* A DocumentField that is has a value indicating a selection mark state (such as a checkbox or radio button),
|
|
1978
|
-
* represented as a string.
|
|
1979
|
-
*/
|
|
1980
|
-
export declare interface DocumentSelectionMarkField extends DocumentFieldCommon {
|
|
1981
|
-
/** Field kind: "selectionMark". */
|
|
1982
|
-
kind: "selectionMark";
|
|
1983
|
-
/**
|
|
1984
|
-
* The state of the selection mark. One of:
|
|
1985
|
-
*
|
|
1986
|
-
* - "selected"
|
|
1987
|
-
* - "unselected"
|
|
1988
|
-
*
|
|
1989
|
-
* This value may be undefined, and other variants may be introduced in the future.
|
|
1990
|
-
*/
|
|
1991
|
-
value?: string;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
/**
|
|
1995
|
-
* A DocumentField that indicates the state of a signature, represented as a string.
|
|
1996
|
-
*/
|
|
1997
|
-
export declare interface DocumentSignatureField extends DocumentFieldCommon {
|
|
1998
|
-
/** Field kind: "signature". */
|
|
1999
|
-
kind: "signature";
|
|
2000
|
-
/**
|
|
2001
|
-
* The state of the signature field. One of:
|
|
2002
|
-
*
|
|
2003
|
-
* - "unsigned"
|
|
2004
|
-
* - "signed"
|
|
2005
|
-
*
|
|
2006
|
-
* This value may be undefined, and other variants may be introduced in the future.
|
|
2007
|
-
*/
|
|
2008
|
-
value: "signed" | "unsigned";
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
/**
|
|
2012
|
-
* Defines values for DocumentSignatureType. \
|
|
2013
|
-
* {@link KnownDocumentSignatureType} can be used interchangeably with DocumentSignatureType,
|
|
2014
|
-
* this enum contains the known values that the service supports.
|
|
2015
|
-
* ### Known values supported by the service
|
|
2016
|
-
* **signed**: A signature is detected. \
|
|
2017
|
-
* **unsigned**: No signatures are detected.
|
|
2018
|
-
*/
|
|
2019
|
-
export declare type DocumentSignatureType = string;
|
|
2020
|
-
|
|
2021
|
-
/** Contiguous region of the concatenated content property, specified as an offset and length. */
|
|
2022
|
-
export declare interface DocumentSpan {
|
|
2023
|
-
/** Zero-based index of the content represented by the span. */
|
|
2024
|
-
offset: number;
|
|
2025
|
-
/** Number of characters in the content represented by the span. */
|
|
2026
|
-
length: number;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
/**
|
|
2030
|
-
* A DocumentField that has a string value.
|
|
2031
|
-
*/
|
|
2032
|
-
export declare interface DocumentStringField<Value extends string = string> extends DocumentValueField<Value> {
|
|
2033
|
-
/** Field kind: "string". */
|
|
2034
|
-
kind: "string";
|
|
2035
|
-
}
|
|
2036
|
-
|
|
2037
|
-
/** An object representing observed text styles. */
|
|
2038
|
-
export declare interface DocumentStyle {
|
|
2039
|
-
/** Is content handwritten? */
|
|
2040
|
-
isHandwritten?: boolean;
|
|
2041
|
-
/** Visually most similar font from among the set of supported font families, with fallback fonts following CSS convention (ex. 'Arial, sans-serif'). */
|
|
2042
|
-
similarFontFamily?: string;
|
|
2043
|
-
/** Font style. */
|
|
2044
|
-
fontStyle?: FontStyle;
|
|
2045
|
-
/** Font weight. */
|
|
2046
|
-
fontWeight?: FontWeight;
|
|
2047
|
-
/** Foreground color in #rrggbb hexadecimal format. */
|
|
2048
|
-
color?: string;
|
|
2049
|
-
/** Background color in #rrggbb hexadecimal format.. */
|
|
2050
|
-
backgroundColor?: string;
|
|
2051
|
-
/** Location of the text elements in the concatenated content the style applies to. */
|
|
2052
|
-
spans: DocumentSpan[];
|
|
2053
|
-
/** Confidence of correctly identifying the style. */
|
|
2054
|
-
confidence: number;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
/** A table object consisting table cells arranged in a rectangular layout. */
|
|
2058
|
-
export declare interface DocumentTable {
|
|
2059
|
-
/** Number of rows in the table. */
|
|
2060
|
-
rowCount: number;
|
|
2061
|
-
/** Number of columns in the table. */
|
|
2062
|
-
columnCount: number;
|
|
2063
|
-
/** Cells contained within the table. */
|
|
2064
|
-
cells: DocumentTableCell[];
|
|
2065
|
-
/** Bounding regions covering the table. */
|
|
2066
|
-
boundingRegions?: BoundingRegion[];
|
|
2067
|
-
/** Location of the table in the reading order concatenated content. */
|
|
2068
|
-
spans: DocumentSpan[];
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
/** An object representing the location and content of a table cell. */
|
|
2072
|
-
export declare interface DocumentTableCell {
|
|
2073
|
-
/** Table cell kind. */
|
|
2074
|
-
kind?: DocumentTableCellKind;
|
|
2075
|
-
/** Row index of the cell. */
|
|
2076
|
-
rowIndex: number;
|
|
2077
|
-
/** Column index of the cell. */
|
|
2078
|
-
columnIndex: number;
|
|
2079
|
-
/** Number of rows spanned by this cell. */
|
|
2080
|
-
rowSpan?: number;
|
|
2081
|
-
/** Number of columns spanned by this cell. */
|
|
2082
|
-
columnSpan?: number;
|
|
2083
|
-
/** Concatenated content of the table cell in reading order. */
|
|
2084
|
-
content: string;
|
|
2085
|
-
/** Bounding regions covering the table cell. */
|
|
2086
|
-
boundingRegions?: BoundingRegion[];
|
|
2087
|
-
/** Location of the table cell in the reading order concatenated content. */
|
|
2088
|
-
spans: DocumentSpan[];
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
/**
|
|
2092
|
-
* Defines values for DocumentTableCellKind. \
|
|
2093
|
-
* {@link KnownDocumentTableCellKind} can be used interchangeably with DocumentTableCellKind,
|
|
2094
|
-
* this enum contains the known values that the service supports.
|
|
2095
|
-
* ### Known values supported by the service
|
|
2096
|
-
* **content**: Contains the main content\/data. \
|
|
2097
|
-
* **rowHeader**: Describes the content of the row. \
|
|
2098
|
-
* **columnHeader**: Describes the content of the column. \
|
|
2099
|
-
* **stubHead**: Describes the row headers, usually located at the top left corner of a table. \
|
|
2100
|
-
* **description**: Describes the content in (parts of) the table.
|
|
2101
|
-
*/
|
|
2102
|
-
export declare type DocumentTableCellKind = string;
|
|
2103
|
-
|
|
2104
|
-
/**
|
|
2105
|
-
* A DocumentField that has a time value, represented as a string.
|
|
2106
|
-
*/
|
|
2107
|
-
export declare interface DocumentTimeField extends DocumentFieldCommon {
|
|
2108
|
-
/** Field kind: "time". */
|
|
2109
|
-
kind: "time";
|
|
2110
|
-
/**
|
|
2111
|
-
* The field's value, which is a time in "HH:MM:SS" (ISO 8601) format.
|
|
2112
|
-
*/
|
|
2113
|
-
value?: string;
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
/** Document type info. */
|
|
2117
|
-
export declare interface DocumentTypeDetails {
|
|
2118
|
-
/** Document model description. */
|
|
2119
|
-
description?: string;
|
|
2120
|
-
/** Custom document model build mode. */
|
|
2121
|
-
buildMode?: DocumentBuildMode;
|
|
2122
|
-
/** Description of the document semantic schema using a JSON Schema style syntax. */
|
|
2123
|
-
fieldSchema: {
|
|
2124
|
-
[propertyName: string]: DocumentFieldSchema;
|
|
2125
|
-
};
|
|
2126
|
-
/** Estimated confidence for each field. */
|
|
2127
|
-
fieldConfidence?: {
|
|
2128
|
-
[propertyName: string]: number;
|
|
2129
|
-
};
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
/**
|
|
2133
|
-
* A simple field that has a primitive value, such as a string, number etc.
|
|
2134
|
-
*/
|
|
2135
|
-
export declare interface DocumentValueField<T> extends DocumentFieldCommon {
|
|
2136
|
-
/**
|
|
2137
|
-
* The field's value, which has the type specified in the field's schema.
|
|
2138
|
-
*/
|
|
2139
|
-
value?: T;
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
/** A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word. */
|
|
2143
|
-
export declare interface DocumentWord extends HasBoundingPolygon {
|
|
2144
|
-
/** Text content of the word. */
|
|
2145
|
-
content: string;
|
|
2146
|
-
/** Location of the word in the reading order concatenated content. */
|
|
2147
|
-
span: DocumentSpan;
|
|
2148
|
-
/** Confidence of correctly extracting the word. */
|
|
2149
|
-
confidence: number;
|
|
2150
|
-
}
|
|
2151
|
-
|
|
2152
|
-
/** Error info. */
|
|
2153
|
-
export declare interface ErrorModel {
|
|
2154
|
-
/** Error code. */
|
|
2155
|
-
code: string;
|
|
2156
|
-
/** Error message. */
|
|
2157
|
-
message: string;
|
|
2158
|
-
/** Target of the error. */
|
|
2159
|
-
target?: string;
|
|
2160
|
-
/** List of detailed errors. */
|
|
2161
|
-
details?: ErrorModel[];
|
|
2162
|
-
/** Detailed error. */
|
|
2163
|
-
innererror?: InnerError;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
/**
|
|
2167
|
-
* Defines values for FontStyle. \
|
|
2168
|
-
* {@link KnownFontStyle} can be used interchangeably with FontStyle,
|
|
2169
|
-
* this enum contains the known values that the service supports.
|
|
2170
|
-
* ### Known values supported by the service
|
|
2171
|
-
* **normal**: Characters are represented normally. \
|
|
2172
|
-
* **italic**: Characters are visually slanted to the right.
|
|
2173
|
-
*/
|
|
2174
|
-
export declare type FontStyle = string;
|
|
2175
|
-
|
|
2176
|
-
/**
|
|
2177
|
-
* Defines values for FontWeight. \
|
|
2178
|
-
* {@link KnownFontWeight} can be used interchangeably with FontWeight,
|
|
2179
|
-
* this enum contains the known values that the service supports.
|
|
2180
|
-
* ### Known values supported by the service
|
|
2181
|
-
* **normal**: Characters are represented normally. \
|
|
2182
|
-
* **bold**: Characters are represented with thicker strokes.
|
|
2183
|
-
*/
|
|
2184
|
-
export declare type FontWeight = string;
|
|
2185
|
-
|
|
2186
|
-
/**
|
|
2187
|
-
* Add-on capabilities (features) that can be enabled for the request.
|
|
2188
|
-
*
|
|
2189
|
-
* For more information about the features available in Form Recognizer, see the service documentation:
|
|
2190
|
-
*
|
|
2191
|
-
* https://aka.ms/azsdk/formrecognizer/features
|
|
2192
|
-
*/
|
|
2193
|
-
export declare type FormRecognizerFeature = (typeof FormRecognizerFeature)[keyof typeof FormRecognizerFeature] | (string & {});
|
|
2194
|
-
|
|
2195
|
-
/**
|
|
2196
|
-
* Known feature flags supported by the Form Recognizer clients.
|
|
2197
|
-
*/
|
|
2198
|
-
export declare const FormRecognizerFeature: {
|
|
2199
|
-
/**
|
|
2200
|
-
* Enables extracting extra font information.
|
|
2201
|
-
*/
|
|
2202
|
-
readonly Fonts: "styleFont";
|
|
2203
|
-
/**
|
|
2204
|
-
* Enables high-resolution processing for documents with small text.
|
|
2205
|
-
*/
|
|
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";
|
|
2219
|
-
/**
|
|
2220
|
-
* Enables the detection of general key value pairs (form fields) in the document.
|
|
2221
|
-
*/
|
|
2222
|
-
readonly KeyValuePairs: "keyValuePairs";
|
|
2223
|
-
};
|
|
2224
|
-
|
|
2225
|
-
/**
|
|
2226
|
-
* A request input that can be uploaded as binary data to the Form Recognizer service. Form Recognizer treats `string`
|
|
2227
|
-
* inputs as URLs, so to send a string as a _binary_ input, first convert the string to one of the following input
|
|
2228
|
-
* types.
|
|
2229
|
-
*/
|
|
2230
|
-
export declare type FormRecognizerRequestBody = NodeJS.ReadableStream | Blob | ArrayBuffer | ArrayBufferView;
|
|
2231
|
-
|
|
2232
|
-
/**
|
|
2233
|
-
* Options for the get copy authorization method.
|
|
2234
|
-
*/
|
|
2235
|
-
export declare interface GetCopyAuthorizationOptions extends OperationOptions, CommonModelCreationOptions {
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
/**
|
|
2239
|
-
* Options for retrieving model information.
|
|
2240
|
-
*/
|
|
2241
|
-
export declare interface GetModelOptions extends OperationOptions {
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
/**
|
|
2245
|
-
* Options for retrieving an operation state.
|
|
2246
|
-
*/
|
|
2247
|
-
export declare interface GetOperationOptions extends OperationOptions {
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
/**
|
|
2251
|
-
* Options for retrieving Form Recognizer resource information.
|
|
2252
|
-
*/
|
|
2253
|
-
export declare interface GetResourceDetailsOptions extends OperationOptions {
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
/** Simple document elements such as words, selection marks and lines are bounded by the polygon. */
|
|
2257
|
-
export declare interface HasBoundingPolygon {
|
|
2258
|
-
/** Bounding polygon of the entity. */
|
|
2259
|
-
polygon?: Point2D[];
|
|
2260
|
-
}
|
|
2261
|
-
|
|
2262
|
-
/** Detailed error. */
|
|
2263
|
-
export declare interface InnerError {
|
|
2264
|
-
/** Error code. */
|
|
2265
|
-
code: string;
|
|
2266
|
-
/** Error message. */
|
|
2267
|
-
message?: string;
|
|
2268
|
-
/** Detailed error. */
|
|
2269
|
-
innererror?: InnerError;
|
|
2270
|
-
}
|
|
2271
|
-
|
|
2272
|
-
/** Known values of {@link DocumentBarcodeKind} that the service accepts. */
|
|
2273
|
-
export declare enum KnownDocumentBarcodeKind {
|
|
2274
|
-
/** QR code, as defined in ISO/IEC 18004:2015. */
|
|
2275
|
-
QRCode = "QRCode",
|
|
2276
|
-
/** PDF417, as defined in ISO 15438. */
|
|
2277
|
-
PDF417 = "PDF417",
|
|
2278
|
-
/** GS1 12-digit Universal Product Code. */
|
|
2279
|
-
Upca = "UPCA",
|
|
2280
|
-
/** GS1 6-digit Universal Product Code. */
|
|
2281
|
-
Upce = "UPCE",
|
|
2282
|
-
/** Code 39 barcode, as defined in ISO/IEC 16388:2007. */
|
|
2283
|
-
Code39 = "Code39",
|
|
2284
|
-
/** Code 128 barcode, as defined in ISO/IEC 15417:2007. */
|
|
2285
|
-
Code128 = "Code128",
|
|
2286
|
-
/** GS1 8-digit International Article Number (European Article Number). */
|
|
2287
|
-
EAN8 = "EAN8",
|
|
2288
|
-
/** GS1 13-digit International Article Number (European Article Number). */
|
|
2289
|
-
EAN13 = "EAN13",
|
|
2290
|
-
/** GS1 DataBar barcode. */
|
|
2291
|
-
DataBar = "DataBar",
|
|
2292
|
-
/** Code 93 barcode, as defined in ANSI/AIM BC5-1995. */
|
|
2293
|
-
Code93 = "Code93",
|
|
2294
|
-
/** Codabar barcode, as defined in ANSI/AIM BC3-1995. */
|
|
2295
|
-
Codabar = "Codabar",
|
|
2296
|
-
/** GS1 DataBar Expanded barcode. */
|
|
2297
|
-
DataBarExpanded = "DataBarExpanded",
|
|
2298
|
-
/** Interleaved 2 of 5 barcode, as defined in ANSI/AIM BC2-1995. */
|
|
2299
|
-
ITF = "ITF",
|
|
2300
|
-
/** Micro QR code, as defined in ISO/IEC 23941:2022. */
|
|
2301
|
-
MicroQRCode = "MicroQRCode",
|
|
2302
|
-
/** Aztec code, as defined in ISO/IEC 24778:2008. */
|
|
2303
|
-
Aztec = "Aztec",
|
|
2304
|
-
/** Data matrix code, as defined in ISO/IEC 16022:2006. */
|
|
2305
|
-
DataMatrix = "DataMatrix",
|
|
2306
|
-
/** MaxiCode, as defined in ISO/IEC 16023:2000. */
|
|
2307
|
-
MaxiCode = "MaxiCode"
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
/** Known values of {@link DocumentBuildMode} that the service accepts. */
|
|
2311
|
-
export declare enum KnownDocumentBuildMode {
|
|
2312
|
-
/** Target documents with similar visual templates. */
|
|
2313
|
-
Template = "template",
|
|
2314
|
-
/** Support documents with diverse visual templates. */
|
|
2315
|
-
Neural = "neural"
|
|
2316
|
-
}
|
|
2317
|
-
|
|
2318
|
-
/** Known values of {@link DocumentFieldType} that the service accepts. */
|
|
2319
|
-
export declare enum KnownDocumentFieldType {
|
|
2320
|
-
/** Plain text. */
|
|
2321
|
-
String = "string",
|
|
2322
|
-
/** Date, normalized to ISO 8601 (YYYY-MM-DD) format. */
|
|
2323
|
-
Date = "date",
|
|
2324
|
-
/** Time, normalized to ISO 8601 (hh:mm:ss) format. */
|
|
2325
|
-
Time = "time",
|
|
2326
|
-
/** Phone number, normalized to E.164 (+{CountryCode}{SubscriberNumber}) format. */
|
|
2327
|
-
PhoneNumber = "phoneNumber",
|
|
2328
|
-
/** Floating point number, normalized to double precision floating point. */
|
|
2329
|
-
Number = "number",
|
|
2330
|
-
/** Integer number, normalized to 64-bit signed integer. */
|
|
2331
|
-
Integer = "integer",
|
|
2332
|
-
/** Is field selected? */
|
|
2333
|
-
SelectionMark = "selectionMark",
|
|
2334
|
-
/** Country/region, normalized to ISO 3166-1 alpha-3 format (ex. USA). */
|
|
2335
|
-
CountryRegion = "countryRegion",
|
|
2336
|
-
/** Is signature present? */
|
|
2337
|
-
Signature = "signature",
|
|
2338
|
-
/** List of subfields of the same type. */
|
|
2339
|
-
Array = "array",
|
|
2340
|
-
/** Named list of subfields of potentially different types. */
|
|
2341
|
-
Object = "object",
|
|
2342
|
-
/** Currency amount with optional currency symbol and unit. */
|
|
2343
|
-
Currency = "currency",
|
|
2344
|
-
/** Parsed address. */
|
|
2345
|
-
Address = "address",
|
|
2346
|
-
/** Boolean value, normalized to true or false. */
|
|
2347
|
-
Boolean = "boolean"
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
/** Known values of {@link DocumentFormulaKind} that the service accepts. */
|
|
2351
|
-
export declare enum KnownDocumentFormulaKind {
|
|
2352
|
-
/** A formula embedded within the content of a paragraph. */
|
|
2353
|
-
Inline = "inline",
|
|
2354
|
-
/** A formula in display mode that takes up an entire line. */
|
|
2355
|
-
Display = "display"
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
/** Known values of {@link DocumentSignatureType} that the service accepts. */
|
|
2359
|
-
export declare enum KnownDocumentSignatureType {
|
|
2360
|
-
/** A signature is detected. */
|
|
2361
|
-
Signed = "signed",
|
|
2362
|
-
/** No signatures are detected. */
|
|
2363
|
-
Unsigned = "unsigned"
|
|
2364
|
-
}
|
|
2365
|
-
|
|
2366
|
-
/** Known values of {@link DocumentTableCellKind} that the service accepts. */
|
|
2367
|
-
export declare enum KnownDocumentTableCellKind {
|
|
2368
|
-
/** Contains the main content/data. */
|
|
2369
|
-
Content = "content",
|
|
2370
|
-
/** Describes the content of the row. */
|
|
2371
|
-
RowHeader = "rowHeader",
|
|
2372
|
-
/** Describes the content of the column. */
|
|
2373
|
-
ColumnHeader = "columnHeader",
|
|
2374
|
-
/** Describes the row headers, usually located at the top left corner of a table. */
|
|
2375
|
-
StubHead = "stubHead",
|
|
2376
|
-
/** Describes the content in (parts of) the table. */
|
|
2377
|
-
Description = "description"
|
|
2378
|
-
}
|
|
2379
|
-
|
|
2380
|
-
/** Known values of {@link FontStyle} that the service accepts. */
|
|
2381
|
-
export declare enum KnownFontStyle {
|
|
2382
|
-
/** Characters are represented normally. */
|
|
2383
|
-
Normal = "normal",
|
|
2384
|
-
/** Characters are visually slanted to the right. */
|
|
2385
|
-
Italic = "italic"
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
|
-
/** Known values of {@link FontWeight} that the service accepts. */
|
|
2389
|
-
export declare enum KnownFontWeight {
|
|
2390
|
-
/** Characters are represented normally. */
|
|
2391
|
-
Normal = "normal",
|
|
2392
|
-
/** Characters are represented with thicker strokes. */
|
|
2393
|
-
Bold = "bold"
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
/** Known values of {@link LengthUnit} that the service accepts. */
|
|
2397
|
-
export declare enum KnownLengthUnit {
|
|
2398
|
-
/** Length unit for image files. */
|
|
2399
|
-
Pixel = "pixel",
|
|
2400
|
-
/** Length unit for PDF files. */
|
|
2401
|
-
Inch = "inch"
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
/** Known values of {@link OperationKind} that the service accepts. */
|
|
2405
|
-
export declare enum KnownOperationKind {
|
|
2406
|
-
/** Build a new custom document model. */
|
|
2407
|
-
DocumentModelBuild = "documentModelBuild",
|
|
2408
|
-
/** Compose a new custom document model from existing models. */
|
|
2409
|
-
DocumentModelCompose = "documentModelCompose",
|
|
2410
|
-
/** Copy an existing document model to potentially a different resource, region, or subscription. */
|
|
2411
|
-
DocumentModelCopyTo = "documentModelCopyTo",
|
|
2412
|
-
/** Build a new custom classifier model. */
|
|
2413
|
-
DocumentClassifierBuild = "documentClassifierBuild"
|
|
2414
|
-
}
|
|
2415
|
-
|
|
2416
|
-
/** Known values of {@link ParagraphRole} that the service accepts. */
|
|
2417
|
-
export declare enum KnownParagraphRole {
|
|
2418
|
-
/** Text near the top edge of the page. */
|
|
2419
|
-
PageHeader = "pageHeader",
|
|
2420
|
-
/** Text near the bottom edge of the page. */
|
|
2421
|
-
PageFooter = "pageFooter",
|
|
2422
|
-
/** Page number. */
|
|
2423
|
-
PageNumber = "pageNumber",
|
|
2424
|
-
/** Top-level title describing the entire document. */
|
|
2425
|
-
Title = "title",
|
|
2426
|
-
/** Sub heading describing a section of the document. */
|
|
2427
|
-
SectionHeading = "sectionHeading",
|
|
2428
|
-
/** A note usually placed after the main content on a page. */
|
|
2429
|
-
Footnote = "footnote",
|
|
2430
|
-
/** A block of formulas, often with shared alignment. */
|
|
2431
|
-
FormulaBlock = "formulaBlock"
|
|
2432
|
-
}
|
|
2433
|
-
|
|
2434
|
-
/** Known values of {@link SelectionMarkState} that the service accepts. */
|
|
2435
|
-
export declare enum KnownSelectionMarkState {
|
|
2436
|
-
/** The selection mark is selected, often indicated by a check ✓ or cross X inside the selection mark. */
|
|
2437
|
-
Selected = "selected",
|
|
2438
|
-
/** The selection mark is not selected. */
|
|
2439
|
-
Unselected = "unselected"
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* Defines values for LengthUnit. \
|
|
2444
|
-
* {@link KnownLengthUnit} can be used interchangeably with LengthUnit,
|
|
2445
|
-
* this enum contains the known values that the service supports.
|
|
2446
|
-
* ### Known values supported by the service
|
|
2447
|
-
* **pixel**: Length unit for image files. \
|
|
2448
|
-
* **inch**: Length unit for PDF files.
|
|
2449
|
-
*/
|
|
2450
|
-
export declare type LengthUnit = string;
|
|
2451
|
-
|
|
2452
|
-
/**
|
|
2453
|
-
* Options for listing models.
|
|
2454
|
-
*/
|
|
2455
|
-
export declare interface ListModelsOptions extends OperationOptions {
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
/**
|
|
2459
|
-
* Options for listing operations.
|
|
2460
|
-
*/
|
|
2461
|
-
export declare interface ListOperationsOptions extends OperationOptions {
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
/**
|
|
2465
|
-
* The set of fields common to all administration operations.
|
|
2466
|
-
*/
|
|
2467
|
-
export declare interface ModelAdministrationOperationStateCommon {
|
|
2468
|
-
/**
|
|
2469
|
-
* The status of the operation. One of:
|
|
2470
|
-
*
|
|
2471
|
-
* - "notStarted"
|
|
2472
|
-
* - "running"
|
|
2473
|
-
* - "succeeded"
|
|
2474
|
-
* - "failed"
|
|
2475
|
-
* - "canceled"
|
|
2476
|
-
*/
|
|
2477
|
-
status: OperationStatus;
|
|
2478
|
-
/**
|
|
2479
|
-
* The API version used to train this model.
|
|
2480
|
-
*/
|
|
2481
|
-
apiVersion?: string;
|
|
2482
|
-
/**
|
|
2483
|
-
* The unique ID of this operation.
|
|
2484
|
-
*/
|
|
2485
|
-
operationId: string;
|
|
2486
|
-
/**
|
|
2487
|
-
* A number between 0 and 100 representing the progress of the operation.
|
|
2488
|
-
*/
|
|
2489
|
-
percentCompleted: number;
|
|
2490
|
-
/**
|
|
2491
|
-
* The Date and Time that the operation was created.
|
|
2492
|
-
*/
|
|
2493
|
-
createdOn: Date;
|
|
2494
|
-
/**
|
|
2495
|
-
* The date & time that the operation state was last modified.
|
|
2496
|
-
*/
|
|
2497
|
-
lastUpdatedOn: Date;
|
|
2498
|
-
/**
|
|
2499
|
-
* Additional, user-defined key-value pairs associated with the model as metadata.
|
|
2500
|
-
*/
|
|
2501
|
-
tags?: Record<string, string>;
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
/** Get Operation response object. */
|
|
2505
|
-
export declare interface OperationDetails {
|
|
2506
|
-
/** Polymorphic discriminator, which specifies the different types this object can be */
|
|
2507
|
-
kind: "documentModelBuild" | "documentModelCompose" | "documentModelCopyTo" | "documentClassifierBuild";
|
|
2508
|
-
/** Operation ID */
|
|
2509
|
-
operationId: string;
|
|
2510
|
-
/** Operation status. */
|
|
2511
|
-
status: OperationStatus;
|
|
2512
|
-
/** Operation progress (0-100). */
|
|
2513
|
-
percentCompleted?: number;
|
|
2514
|
-
/** Date and time (UTC) when the operation was created. */
|
|
2515
|
-
createdOn: Date;
|
|
2516
|
-
/** Date and time (UTC) when the status was last updated. */
|
|
2517
|
-
lastUpdatedOn: Date;
|
|
2518
|
-
/** URL of the resource targeted by this operation. */
|
|
2519
|
-
resourceLocation: string;
|
|
2520
|
-
/** API version used to create this operation. */
|
|
2521
|
-
apiVersion?: string;
|
|
2522
|
-
/** List of key-value tag attributes associated with the document model. */
|
|
2523
|
-
tags?: {
|
|
2524
|
-
[propertyName: string]: string;
|
|
2525
|
-
};
|
|
2526
|
-
/** Encountered error. */
|
|
2527
|
-
error?: ErrorModel;
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
/**
|
|
2531
|
-
* Details about any of several different types of Form Recognizer management operations.
|
|
2532
|
-
*/
|
|
2533
|
-
export declare type OperationDetailsUnion = OperationDetails | DocumentModelBuildOperationDetails | DocumentModelComposeOperationDetails | DocumentModelCopyToOperationDetails | DocumentClassifierBuildOperationDetails;
|
|
2534
|
-
|
|
2535
|
-
/**
|
|
2536
|
-
* Defines values for OperationKind. \
|
|
2537
|
-
* {@link KnownOperationKind} can be used interchangeably with OperationKind,
|
|
2538
|
-
* this enum contains the known values that the service supports.
|
|
2539
|
-
* ### Known values supported by the service
|
|
2540
|
-
* **documentModelBuild**: Build a new custom document model. \
|
|
2541
|
-
* **documentModelCompose**: Compose a new custom document model from existing models. \
|
|
2542
|
-
* **documentModelCopyTo**: Copy an existing document model to potentially a different resource, region, or subscription. \
|
|
2543
|
-
* **documentClassifierBuild**: Build a new custom classifier model.
|
|
2544
|
-
*/
|
|
2545
|
-
export declare type OperationKind = string;
|
|
2546
|
-
|
|
2547
|
-
/** Defines values for OperationStatus. */
|
|
2548
|
-
export declare type OperationStatus = "notStarted" | "running" | "failed" | "succeeded" | "canceled";
|
|
2549
|
-
|
|
2550
|
-
/** Operation info. */
|
|
2551
|
-
export declare interface OperationSummary {
|
|
2552
|
-
/** Operation ID */
|
|
2553
|
-
operationId: string;
|
|
2554
|
-
/** Operation status. */
|
|
2555
|
-
status: OperationStatus;
|
|
2556
|
-
/** Operation progress (0-100). */
|
|
2557
|
-
percentCompleted?: number;
|
|
2558
|
-
/** Date and time (UTC) when the operation was created. */
|
|
2559
|
-
createdOn: Date;
|
|
2560
|
-
/** Date and time (UTC) when the status was last updated. */
|
|
2561
|
-
lastUpdatedOn: Date;
|
|
2562
|
-
/** Type of operation. */
|
|
2563
|
-
kind: OperationKind;
|
|
2564
|
-
/** URL of the resource targeted by this operation. */
|
|
2565
|
-
resourceLocation: string;
|
|
2566
|
-
/** API version used to create this operation. */
|
|
2567
|
-
apiVersion?: string;
|
|
2568
|
-
/** List of key-value tag attributes associated with the document model. */
|
|
2569
|
-
tags?: {
|
|
2570
|
-
[propertyName: string]: string;
|
|
2571
|
-
};
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
/**
|
|
2575
|
-
* Defines values for ParagraphRole. \
|
|
2576
|
-
* {@link KnownParagraphRole} can be used interchangeably with ParagraphRole,
|
|
2577
|
-
* this enum contains the known values that the service supports.
|
|
2578
|
-
* ### Known values supported by the service
|
|
2579
|
-
* **pageHeader**: Text near the top edge of the page. \
|
|
2580
|
-
* **pageFooter**: Text near the bottom edge of the page. \
|
|
2581
|
-
* **pageNumber**: Page number. \
|
|
2582
|
-
* **title**: Top-level title describing the entire document. \
|
|
2583
|
-
* **sectionHeading**: Sub heading describing a section of the document. \
|
|
2584
|
-
* **footnote**: A note usually placed after the main content on a page. \
|
|
2585
|
-
* **formulaBlock**: A block of formulas, often with shared alignment.
|
|
2586
|
-
*/
|
|
2587
|
-
export declare type ParagraphRole = string;
|
|
2588
|
-
|
|
2589
|
-
/**
|
|
2590
|
-
* Represents a point used to define bounding polygons. The unit is either 'pixel' or 'inch' (See {@link LengthUnit}).
|
|
2591
|
-
*/
|
|
2592
|
-
export declare interface Point2D {
|
|
2593
|
-
/**
|
|
2594
|
-
* x coordinate - relative from the left side of the page
|
|
2595
|
-
*/
|
|
2596
|
-
x: number;
|
|
2597
|
-
/**
|
|
2598
|
-
* y coordinate - relative from the top of the page
|
|
2599
|
-
*/
|
|
2600
|
-
y: number;
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
/**
|
|
2604
|
-
* Options for long-running operations (pollers) in the Form Recognizer clients.
|
|
2605
|
-
*/
|
|
2606
|
-
export declare interface PollerOptions<TState extends PollOperationState<unknown>> extends OperationOptions {
|
|
2607
|
-
/**
|
|
2608
|
-
* The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.
|
|
2609
|
-
*/
|
|
2610
|
-
updateIntervalInMs?: number;
|
|
2611
|
-
/**
|
|
2612
|
-
* A serialized poller state. If provided, the polling operation will be resumed from the given state instead of
|
|
2613
|
-
* started as if it were a new operation.
|
|
2614
|
-
*/
|
|
2615
|
-
resumeFrom?: string;
|
|
2616
|
-
/**
|
|
2617
|
-
* An optional initial progress handler that will be called when the poller state updates. This handler will be called
|
|
2618
|
-
* once immediately after the poller state is initialized.
|
|
2619
|
-
*/
|
|
2620
|
-
onProgress?: (state: TState) => void;
|
|
2621
|
-
}
|
|
2622
|
-
|
|
2623
|
-
/** Quota used, limit, and next reset date/time. */
|
|
2624
|
-
export declare interface QuotaDetails {
|
|
2625
|
-
/** Amount of the resource quota used. */
|
|
2626
|
-
used: number;
|
|
2627
|
-
/** Resource quota limit. */
|
|
2628
|
-
quota: number;
|
|
2629
|
-
/** Date/time when the resource quota usage will be reset. */
|
|
2630
|
-
quotaResetOn: Date;
|
|
2631
|
-
}
|
|
2632
|
-
|
|
2633
|
-
/** General information regarding the current resource. */
|
|
2634
|
-
export declare interface ResourceDetails {
|
|
2635
|
-
/** Details regarding custom document models. */
|
|
2636
|
-
customDocumentModels: CustomDocumentModelsDetails;
|
|
2637
|
-
/** Quota used, limit, and next reset date/time. */
|
|
2638
|
-
customNeuralDocumentModelBuilds: QuotaDetails;
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
|
-
/**
|
|
2642
|
-
* Defines values for SelectionMarkState. \
|
|
2643
|
-
* {@link KnownSelectionMarkState} can be used interchangeably with SelectionMarkState,
|
|
2644
|
-
* this enum contains the known values that the service supports.
|
|
2645
|
-
* ### Known values supported by the service
|
|
2646
|
-
* **selected**: The selection mark is selected, often indicated by a check ✓ or cross X inside the selection mark. \
|
|
2647
|
-
* **unselected**: The selection mark is not selected.
|
|
2648
|
-
*/
|
|
2649
|
-
export declare type SelectionMarkState = string;
|
|
2650
|
-
|
|
2651
|
-
/**
|
|
2652
|
-
* Valid string index types supported by the Form Recognizer service and SDK clients.
|
|
2653
|
-
*/
|
|
2654
|
-
export declare type StringIndexType = (typeof StringIndexType)[keyof typeof StringIndexType];
|
|
2655
|
-
|
|
2656
|
-
/**
|
|
2657
|
-
* Supported values of StringIndexType.
|
|
2658
|
-
*/
|
|
2659
|
-
export declare const StringIndexType: {
|
|
2660
|
-
/**
|
|
2661
|
-
* UTF-16 code units
|
|
2662
|
-
*/
|
|
2663
|
-
readonly Utf16CodeUnit: "utf16CodeUnit";
|
|
2664
|
-
/**
|
|
2665
|
-
* Unicode code points
|
|
2666
|
-
*/
|
|
2667
|
-
readonly UnicodeCodePoint: "unicodeCodePoint";
|
|
2668
|
-
};
|
|
2669
|
-
|
|
2670
|
-
export { }
|