|
5 | 5 | ### Features Added
|
6 | 6 |
|
7 | 7 | - Refactored generic `DocumentModel` support to be more robust to different kinds of models. It now supports strongly-typed results for `prebuilt-read`, `prebuilt-layout`, and `prebuilt-document`. See the "Breaking Changes" section for more information about how to replace existing usage of `PrebuiltModels` with new model code.
|
| 8 | +- `DocumentModelAdministrationClient#getOperation` returns additional `result` (operation result) and `error` (includes detailed error info) fields. |
8 | 9 |
|
9 | 10 | ### Breaking Changes
|
10 | 11 |
|
11 | 12 | - Removed `PrebuiltModels` and all of its fields as well as related helper types. The strongly-typed functionality previously provided by `PrebuiltModels` is now provided by sample code that you can copy into your own project. See the [`prebuilt` samples directory](https://github.com/azure/azure-sdk-for-js/tree/main/sdk/formrecognizer/ai-form-recognizer/samples-dev/prebuilt/) for models compatible with the current Form Recognizer API.
|
12 | 13 | - Separated URL-based and file-based analysis inputs into two separate methods: `beginAnalyzeDocument` (for file stream inputs) and `beginAnalyzeDocumentFromUrl` (for URL-based inputs). Previously, both were accepted as inputs to a single `beginAnalyzeDocument` method, and a string value would be interpreted as if it were a URL, but this was confusing. The two inputs now have distinct signatures and documentation.
|
13 | 14 | - Removed the `beginExtractLayout`, `beginExtractGeneralDocument`, and `beginReadDocument` methods. Strongly-typed `DocumentModel` instances for the corresponding `prebuilt-layout`, `prebuilt-document`, and `prebuilt-read` models are located in the [`prebuilt` samples directory](https://github.com/azure/azure-sdk-for-js/tree/main/sdk/formrecognizer/ai-form-recognizer/samples-dev/prebuilt/).
|
14 | 15 | - Changed the suffix `-Info` for the methods and interfaces such as `DocumentModelAdministrationClient#getResourceInfo` and `DocumentModelInfo` to `-Details`.
|
| 16 | +- Array properties of `AnalyzeResult`, such as `documents`, `languages`, and `pages` are now optional. If the value is `undefined`, then the model does not support the given feature. Previously, we returned an empty array, even if the model didn't support the feature. |
15 | 17 |
|
16 | 18 | ### Bugs Fixed
|
17 | 19 |
|
18 | 20 | ### Other Changes
|
19 | 21 |
|
20 | 22 | - Strongly-typed analysis functionality now checks that the `DocumentAnalysisClient`'s API version now matches the assumed API version of the `DocumentModel` exactly. This ensures that a strongly-typed model can only be used with the API version it was created for, so that future changes cannot violate the model's schema.
|
| 23 | +- Renamed the following types: |
| 24 | + - `TrainingPoller` -> `DocumentModelPoller` |
| 25 | + - `GetInfoResponse` -> `ResourceDetails` |
| 26 | + - In instances where we use `Model` as a prefix, updated it to `DocumentModel`. For example, `ModelInfo` -> `DocumentModelDetails`, `ModelSummary` -> `DocumentModelSummary`. |
| 27 | + - `BuildModelOptions` -> `CreateModelOptions`, the options bag types for `beginComposeModel` and `beginCopyModelTo`, and `beginBuildModel` methods inherit from `CreateModelOptions`. |
21 | 28 |
|
22 | 29 | ## 4.0.0-beta.5 (2022-06-22)
|
23 | 30 |
|
|
0 commit comments