@azure-rest/ai-document-intelligence 1.0.0-beta.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +263 -0
- package/LICENSE +21 -0
- package/README.md +133 -7
- package/dist/browser/clientDefinitions.d.ts +175 -0
- package/dist/browser/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/clientDefinitions.js +4 -0
- package/dist/browser/clientDefinitions.js.map +1 -0
- package/dist/browser/documentIntelligence.d.ts +16 -0
- package/dist/browser/documentIntelligence.d.ts.map +1 -0
- package/dist/browser/documentIntelligence.js +44 -0
- package/dist/browser/documentIntelligence.js.map +1 -0
- package/dist/browser/index.d.ts +13 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +15 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/isUnexpected.d.ts +36 -0
- package/dist/browser/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/isUnexpected.js +18 -7
- package/dist/browser/isUnexpected.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/logger.js +1 -1
- package/{dist-esm/src → dist/browser}/logger.js.map +1 -1
- package/dist/browser/models.d.ts +254 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +4 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/outputModels.d.ts +914 -0
- package/dist/browser/outputModels.d.ts.map +1 -0
- package/dist/browser/outputModels.js +4 -0
- package/dist/browser/outputModels.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/paginateHelper.d.ts +68 -0
- package/dist/browser/paginateHelper.d.ts.map +1 -0
- package/dist/browser/paginateHelper.js +167 -0
- package/dist/browser/paginateHelper.js.map +1 -0
- package/dist/browser/parameters.d.ts +414 -0
- package/dist/browser/parameters.d.ts.map +1 -0
- package/dist/browser/parameters.js +4 -0
- package/dist/browser/parameters.js.map +1 -0
- package/dist/browser/pollingHelper.d.ts +40 -0
- package/dist/browser/pollingHelper.d.ts.map +1 -0
- package/dist/browser/pollingHelper.js +80 -0
- package/dist/browser/pollingHelper.js.map +1 -0
- package/dist/browser/responses.d.ts +473 -0
- package/dist/browser/responses.d.ts.map +1 -0
- package/dist/browser/responses.js +4 -0
- package/dist/browser/responses.js.map +1 -0
- package/dist/browser/utils.d.ts +5 -0
- package/dist/browser/utils.d.ts.map +1 -0
- package/dist/browser/utils.js +33 -0
- package/dist/browser/utils.js.map +1 -0
- package/dist/commonjs/clientDefinitions.d.ts +175 -0
- package/dist/commonjs/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/clientDefinitions.js +5 -0
- package/dist/commonjs/clientDefinitions.js.map +1 -0
- package/dist/commonjs/documentIntelligence.d.ts +16 -0
- package/dist/commonjs/documentIntelligence.d.ts.map +1 -0
- package/dist/commonjs/documentIntelligence.js +47 -0
- package/dist/commonjs/documentIntelligence.js.map +1 -0
- package/dist/commonjs/index.d.ts +13 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +18 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/isUnexpected.d.ts +36 -0
- package/dist/commonjs/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/isUnexpected.js +107 -0
- package/dist/commonjs/isUnexpected.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +254 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/outputModels.d.ts +914 -0
- package/dist/commonjs/outputModels.d.ts.map +1 -0
- package/dist/commonjs/outputModels.js +5 -0
- package/dist/commonjs/outputModels.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/paginateHelper.d.ts +68 -0
- package/dist/commonjs/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/paginateHelper.js +170 -0
- package/dist/commonjs/paginateHelper.js.map +1 -0
- package/dist/commonjs/parameters.d.ts +414 -0
- package/dist/commonjs/parameters.d.ts.map +1 -0
- package/dist/commonjs/parameters.js +5 -0
- package/dist/commonjs/parameters.js.map +1 -0
- package/dist/commonjs/pollingHelper.d.ts +40 -0
- package/dist/commonjs/pollingHelper.d.ts.map +1 -0
- package/dist/commonjs/pollingHelper.js +84 -0
- package/dist/commonjs/pollingHelper.js.map +1 -0
- package/dist/commonjs/responses.d.ts +473 -0
- package/dist/commonjs/responses.d.ts.map +1 -0
- package/dist/commonjs/responses.js +5 -0
- package/dist/commonjs/responses.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/utils.d.ts +5 -0
- package/dist/commonjs/utils.d.ts.map +1 -0
- package/dist/commonjs/utils.js +36 -0
- package/dist/commonjs/utils.js.map +1 -0
- package/dist/esm/clientDefinitions.d.ts +175 -0
- package/dist/esm/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/clientDefinitions.js +4 -0
- package/dist/esm/clientDefinitions.js.map +1 -0
- package/dist/esm/documentIntelligence.d.ts +16 -0
- package/dist/esm/documentIntelligence.d.ts.map +1 -0
- package/dist/esm/documentIntelligence.js +44 -0
- package/dist/esm/documentIntelligence.js.map +1 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +15 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/isUnexpected.d.ts +36 -0
- package/dist/esm/isUnexpected.d.ts.map +1 -0
- package/dist/esm/isUnexpected.js +104 -0
- package/dist/esm/isUnexpected.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +254 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/outputModels.d.ts +914 -0
- package/dist/esm/outputModels.d.ts.map +1 -0
- package/dist/esm/outputModels.js +4 -0
- package/dist/esm/outputModels.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/paginateHelper.d.ts +68 -0
- package/dist/esm/paginateHelper.d.ts.map +1 -0
- package/dist/esm/paginateHelper.js +167 -0
- package/dist/esm/paginateHelper.js.map +1 -0
- package/dist/esm/parameters.d.ts +414 -0
- package/dist/esm/parameters.d.ts.map +1 -0
- package/dist/esm/parameters.js +4 -0
- package/dist/esm/parameters.js.map +1 -0
- package/dist/esm/pollingHelper.d.ts +40 -0
- package/dist/esm/pollingHelper.d.ts.map +1 -0
- package/dist/esm/pollingHelper.js +80 -0
- package/dist/esm/pollingHelper.js.map +1 -0
- package/dist/esm/responses.d.ts +473 -0
- package/dist/esm/responses.d.ts.map +1 -0
- package/dist/esm/responses.js +4 -0
- package/dist/esm/responses.js.map +1 -0
- package/dist/esm/utils.d.ts +5 -0
- package/dist/esm/utils.d.ts.map +1 -0
- package/dist/esm/utils.js +33 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/react-native/clientDefinitions.d.ts +175 -0
- package/dist/react-native/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/clientDefinitions.js +4 -0
- package/dist/react-native/clientDefinitions.js.map +1 -0
- package/dist/react-native/documentIntelligence.d.ts +16 -0
- package/dist/react-native/documentIntelligence.d.ts.map +1 -0
- package/dist/react-native/documentIntelligence.js +44 -0
- package/dist/react-native/documentIntelligence.js.map +1 -0
- package/dist/react-native/index.d.ts +13 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +15 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/isUnexpected.d.ts +36 -0
- package/dist/react-native/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/isUnexpected.js +104 -0
- package/dist/react-native/isUnexpected.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +254 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/outputModels.d.ts +914 -0
- package/dist/react-native/outputModels.d.ts.map +1 -0
- package/dist/react-native/outputModels.js +4 -0
- package/dist/react-native/outputModels.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/paginateHelper.d.ts +68 -0
- package/dist/react-native/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/paginateHelper.js +167 -0
- package/dist/react-native/paginateHelper.js.map +1 -0
- package/dist/react-native/parameters.d.ts +414 -0
- package/dist/react-native/parameters.d.ts.map +1 -0
- package/dist/react-native/parameters.js +4 -0
- package/dist/react-native/parameters.js.map +1 -0
- package/dist/react-native/pollingHelper.d.ts +40 -0
- package/dist/react-native/pollingHelper.d.ts.map +1 -0
- package/dist/react-native/pollingHelper.js +80 -0
- package/dist/react-native/pollingHelper.js.map +1 -0
- package/dist/react-native/responses.d.ts +473 -0
- package/dist/react-native/responses.d.ts.map +1 -0
- package/dist/react-native/responses.js +4 -0
- package/dist/react-native/responses.js.map +1 -0
- package/dist/react-native/utils.d.ts +5 -0
- package/dist/react-native/utils.d.ts.map +1 -0
- package/dist/react-native/utils.js +33 -0
- package/dist/react-native/utils.js.map +1 -0
- package/package.json +108 -92
- package/review/ai-document-intelligence.api.md +866 -225
- package/dist/index.js +0 -252
- package/dist/index.js.map +0 -1
- package/dist-esm/src/clientDefinitions.js +0 -4
- package/dist-esm/src/clientDefinitions.js.map +0 -1
- package/dist-esm/src/documentIntelligence.js +0 -30
- package/dist-esm/src/documentIntelligence.js.map +0 -1
- package/dist-esm/src/index.js +0 -14
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/isUnexpected.js.map +0 -1
- package/dist-esm/src/models.js +0 -4
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/outputModels.js +0 -4
- package/dist-esm/src/outputModels.js.map +0 -1
- package/dist-esm/src/paginateHelper.js +0 -70
- package/dist-esm/src/paginateHelper.js.map +0 -1
- package/dist-esm/src/parameters.js +0 -4
- package/dist-esm/src/parameters.js.map +0 -1
- package/dist-esm/src/pollingHelper.js +0 -43
- package/dist-esm/src/pollingHelper.js.map +0 -1
- package/dist-esm/src/responses.js +0 -4
- package/dist-esm/src/responses.js.map +0 -1
- package/types/ai-document-intelligence.d.ts +0 -2003
package/dist/index.js
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var coreClient = require('@azure-rest/core-client');
|
|
6
|
-
var logger$1 = require('@azure/logger');
|
|
7
|
-
var corePaging = require('@azure/core-paging');
|
|
8
|
-
var coreLro = require('@azure/core-lro');
|
|
9
|
-
|
|
10
|
-
// Copyright (c) Microsoft Corporation.
|
|
11
|
-
// Licensed under the MIT license.
|
|
12
|
-
const logger = logger$1.createClientLogger("ai-document-intelligence");
|
|
13
|
-
|
|
14
|
-
// Copyright (c) Microsoft Corporation.
|
|
15
|
-
// Licensed under the MIT license.
|
|
16
|
-
/**
|
|
17
|
-
* Initialize a new instance of `DocumentIntelligenceClient`
|
|
18
|
-
* @param endpoint - The Document Intelligence service endpoint.
|
|
19
|
-
* @param credentials - uniquely identify client credential
|
|
20
|
-
* @param options - the parameter for all optional parameters
|
|
21
|
-
*/
|
|
22
|
-
function createClient(endpoint, credentials, options = {}) {
|
|
23
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
24
|
-
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/documentintelligence`;
|
|
25
|
-
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2024-02-29-preview";
|
|
26
|
-
const userAgentInfo = `azsdk-js-ai-document-intelligence-rest/1.0.0-beta.2`;
|
|
27
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
28
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
29
|
-
: `${userAgentInfo}`;
|
|
30
|
-
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
31
|
-
userAgentPrefix,
|
|
32
|
-
}, loggingOptions: {
|
|
33
|
-
logger: (_d = (_c = options.loggingOptions) === null || _c === void 0 ? void 0 : _c.logger) !== null && _d !== void 0 ? _d : logger.info,
|
|
34
|
-
}, credentials: {
|
|
35
|
-
scopes: (_f = (_e = options.credentials) === null || _e === void 0 ? void 0 : _e.scopes) !== null && _f !== void 0 ? _f : ["https://cognitiveservices.azure.com/.default"],
|
|
36
|
-
apiKeyHeaderName: (_h = (_g = options.credentials) === null || _g === void 0 ? void 0 : _g.apiKeyHeaderName) !== null && _h !== void 0 ? _h : "Ocp-Apim-Subscription-Key",
|
|
37
|
-
} });
|
|
38
|
-
const client = coreClient.getClient(baseUrl, credentials, options);
|
|
39
|
-
return client;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Copyright (c) Microsoft Corporation.
|
|
43
|
-
// Licensed under the MIT license.
|
|
44
|
-
const responseMap = {
|
|
45
|
-
"GET /operations": ["200"],
|
|
46
|
-
"GET /operations/{operationId}": ["200"],
|
|
47
|
-
"GET /info": ["200"],
|
|
48
|
-
"GET /documentModels/{modelId}/analyzeResults/{resultId}": ["200"],
|
|
49
|
-
"POST /documentModels/{modelId}:analyze": ["202"],
|
|
50
|
-
"GET /documentModels/{modelId}:analyze": ["200", "202"],
|
|
51
|
-
"GET /documentModels/{modelId}": ["200"],
|
|
52
|
-
"DELETE /documentModels/{modelId}": ["204"],
|
|
53
|
-
"POST /documentModels:build": ["202"],
|
|
54
|
-
"GET /documentModels:build": ["200", "202"],
|
|
55
|
-
"POST /documentModels:compose": ["202"],
|
|
56
|
-
"GET /documentModels:compose": ["200", "202"],
|
|
57
|
-
"POST /documentModels:authorizeCopy": ["200"],
|
|
58
|
-
"POST /documentModels/{modelId}:copyTo": ["202"],
|
|
59
|
-
"GET /documentModels/{modelId}:copyTo": ["200", "202"],
|
|
60
|
-
"GET /documentModels": ["200"],
|
|
61
|
-
"POST /documentClassifiers:build": ["202"],
|
|
62
|
-
"GET /documentClassifiers:build": ["200", "202"],
|
|
63
|
-
"GET /documentClassifiers": ["200"],
|
|
64
|
-
"GET /documentClassifiers/{classifierId}": ["200"],
|
|
65
|
-
"DELETE /documentClassifiers/{classifierId}": ["204"],
|
|
66
|
-
"POST /documentClassifiers/{classifierId}:analyze": ["202"],
|
|
67
|
-
"GET /documentClassifiers/{classifierId}:analyze": ["200", "202"],
|
|
68
|
-
"GET /documentClassifiers/{classifierId}/analyzeResults/{resultId}": ["200"],
|
|
69
|
-
};
|
|
70
|
-
function isUnexpected(response) {
|
|
71
|
-
const lroOriginal = response.headers["x-ms-original-url"];
|
|
72
|
-
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
73
|
-
const method = response.request.method;
|
|
74
|
-
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
75
|
-
if (!pathDetails) {
|
|
76
|
-
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
77
|
-
}
|
|
78
|
-
return !pathDetails.includes(response.status);
|
|
79
|
-
}
|
|
80
|
-
function getParametrizedPathSuccess(method, path) {
|
|
81
|
-
var _a, _b, _c, _d;
|
|
82
|
-
const pathParts = path.split("/");
|
|
83
|
-
// Traverse list to match the longest candidate
|
|
84
|
-
// matchedLen: the length of candidate path
|
|
85
|
-
// matchedValue: the matched status code array
|
|
86
|
-
let matchedLen = -1, matchedValue = [];
|
|
87
|
-
// Iterate the responseMap to find a match
|
|
88
|
-
for (const [key, value] of Object.entries(responseMap)) {
|
|
89
|
-
// Extracting the path from the map key which is in format
|
|
90
|
-
// GET /path/foo
|
|
91
|
-
if (!key.startsWith(method)) {
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
const candidatePath = getPathFromMapKey(key);
|
|
95
|
-
// Get each part of the url path
|
|
96
|
-
const candidateParts = candidatePath.split("/");
|
|
97
|
-
// track if we have found a match to return the values found.
|
|
98
|
-
let found = true;
|
|
99
|
-
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
100
|
-
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
101
|
-
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
102
|
-
// If the current part of the candidate is a "template" part
|
|
103
|
-
// Try to use the suffix of pattern to match the path
|
|
104
|
-
// {guid} ==> $
|
|
105
|
-
// {guid}:export ==> :export$
|
|
106
|
-
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
107
|
-
if (!isMatched) {
|
|
108
|
-
found = false;
|
|
109
|
-
break;
|
|
110
|
-
}
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
// If the candidate part is not a template and
|
|
114
|
-
// the parts don't match mark the candidate as not found
|
|
115
|
-
// to move on with the next candidate path.
|
|
116
|
-
if (candidateParts[i] !== pathParts[j]) {
|
|
117
|
-
found = false;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
// We finished evaluating the current candidate parts
|
|
122
|
-
// Update the matched value if and only if we found the longer pattern
|
|
123
|
-
if (found && candidatePath.length > matchedLen) {
|
|
124
|
-
matchedLen = candidatePath.length;
|
|
125
|
-
matchedValue = value;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
return matchedValue;
|
|
129
|
-
}
|
|
130
|
-
function getPathFromMapKey(mapKey) {
|
|
131
|
-
const pathStart = mapKey.indexOf("/");
|
|
132
|
-
return mapKey.slice(pathStart);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
// Copyright (c) Microsoft Corporation.
|
|
136
|
-
// Licensed under the MIT license.
|
|
137
|
-
/**
|
|
138
|
-
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
139
|
-
* @param client - Client to use for sending the next page requests
|
|
140
|
-
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
141
|
-
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
142
|
-
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
143
|
-
*/
|
|
144
|
-
function paginate(client, initialResponse, options = {}) {
|
|
145
|
-
let firstRun = true;
|
|
146
|
-
const itemName = "value";
|
|
147
|
-
const nextLinkName = "nextLink";
|
|
148
|
-
const { customGetPage } = options;
|
|
149
|
-
const pagedResult = {
|
|
150
|
-
firstPageLink: "",
|
|
151
|
-
getPage: typeof customGetPage === "function"
|
|
152
|
-
? customGetPage
|
|
153
|
-
: async (pageLink) => {
|
|
154
|
-
const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
|
|
155
|
-
firstRun = false;
|
|
156
|
-
checkPagingRequest(result);
|
|
157
|
-
const nextLink = getNextLink(result.body, nextLinkName);
|
|
158
|
-
const values = getElements(result.body, itemName);
|
|
159
|
-
return {
|
|
160
|
-
page: values,
|
|
161
|
-
nextPageLink: nextLink,
|
|
162
|
-
};
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
return corePaging.getPagedAsyncIterator(pagedResult);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Gets for the value of nextLink in the body
|
|
169
|
-
*/
|
|
170
|
-
function getNextLink(body, nextLinkName) {
|
|
171
|
-
if (!nextLinkName) {
|
|
172
|
-
return undefined;
|
|
173
|
-
}
|
|
174
|
-
const nextLink = body[nextLinkName];
|
|
175
|
-
if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
|
|
176
|
-
throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
|
|
177
|
-
}
|
|
178
|
-
return nextLink;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Gets the elements of the current request in the body.
|
|
182
|
-
*/
|
|
183
|
-
function getElements(body, itemName) {
|
|
184
|
-
const value = body[itemName];
|
|
185
|
-
// value has to be an array according to the x-ms-pageable extension.
|
|
186
|
-
// The fact that this must be an array is used above to calculate the
|
|
187
|
-
// type of elements in the page in PaginateReturn
|
|
188
|
-
if (!Array.isArray(value)) {
|
|
189
|
-
throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
190
|
-
}
|
|
191
|
-
return value !== null && value !== void 0 ? value : [];
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Checks if a request failed
|
|
195
|
-
*/
|
|
196
|
-
function checkPagingRequest(response) {
|
|
197
|
-
const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
|
|
198
|
-
if (!Http2xxStatusCodes.includes(response.status)) {
|
|
199
|
-
throw coreClient.createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Copyright (c) Microsoft Corporation.
|
|
204
|
-
// Licensed under the MIT license.
|
|
205
|
-
async function getLongRunningPoller(client, initialResponse, options = {}) {
|
|
206
|
-
var _a;
|
|
207
|
-
const poller = {
|
|
208
|
-
requestMethod: initialResponse.request.method,
|
|
209
|
-
requestPath: initialResponse.request.url,
|
|
210
|
-
sendInitialRequest: async () => {
|
|
211
|
-
// In the case of Rest Clients we are building the LRO poller object from a response that's the reason
|
|
212
|
-
// we are not triggering the initial request here, just extracting the information from the
|
|
213
|
-
// response we were provided.
|
|
214
|
-
return getLroResponse(initialResponse);
|
|
215
|
-
},
|
|
216
|
-
sendPollRequest: async (path) => {
|
|
217
|
-
// This is the callback that is going to be called to poll the service
|
|
218
|
-
// to get the latest status. We use the client provided and the polling path
|
|
219
|
-
// which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
|
|
220
|
-
// depending on the lro pattern that the service implements. If non is provided we default to the initial path.
|
|
221
|
-
const response = await client.pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url).get();
|
|
222
|
-
const lroResponse = getLroResponse(response);
|
|
223
|
-
lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url;
|
|
224
|
-
return lroResponse;
|
|
225
|
-
},
|
|
226
|
-
};
|
|
227
|
-
options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
|
|
228
|
-
return coreLro.createHttpPoller(poller, options);
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Converts a Rest Client response to a response that the LRO implementation understands
|
|
232
|
-
* @param response - a rest client http response
|
|
233
|
-
* @returns - An LRO response that the LRO implementation understands
|
|
234
|
-
*/
|
|
235
|
-
function getLroResponse(response) {
|
|
236
|
-
if (Number.isNaN(response.status)) {
|
|
237
|
-
throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
|
|
238
|
-
}
|
|
239
|
-
return {
|
|
240
|
-
flatResponse: response,
|
|
241
|
-
rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// Copyright (c) Microsoft Corporation.
|
|
246
|
-
// Licensed under the MIT license.
|
|
247
|
-
|
|
248
|
-
exports.default = createClient;
|
|
249
|
-
exports.getLongRunningPoller = getLongRunningPoller;
|
|
250
|
-
exports.isUnexpected = isUnexpected;
|
|
251
|
-
exports.paginate = paginate;
|
|
252
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/logger.ts","../src/documentIntelligence.ts","../src/isUnexpected.ts","../src/paginateHelper.ts","../src/pollingHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"ai-document-intelligence\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { DocumentIntelligenceClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of `DocumentIntelligenceClient`\n * @param endpoint - The Document Intelligence service endpoint.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential | KeyCredential,\n options: ClientOptions = {},\n): DocumentIntelligenceClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/documentintelligence`;\n options.apiVersion = options.apiVersion ?? \"2024-02-29-preview\";\n const userAgentInfo = `azsdk-js-ai-document-intelligence-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as DocumentIntelligenceClient;\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n ListOperations200Response,\n ListOperationsDefaultResponse,\n GetDocumentModelBuildOperation200Response,\n GetDocumentModelComposeOperation200Response,\n GetDocumentModelCopyToOperation200Response,\n GetDocumentClassifierBuildOperation200Response,\n GetOperation200Response,\n GetDocumentModelBuildOperationDefaultResponse,\n GetResourceInfo200Response,\n GetResourceInfoDefaultResponse,\n GetAnalyzeResult200Response,\n GetAnalyzeResultDefaultResponse,\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocument202Response,\n AnalyzeDocumentFromStreamLogicalResponse,\n AnalyzeDocumentLogicalResponse,\n AnalyzeDocumentFromStreamDefaultResponse,\n GetModel200Response,\n GetModelDefaultResponse,\n DeleteModel204Response,\n DeleteModelDefaultResponse,\n BuildModel202Response,\n BuildModelLogicalResponse,\n BuildModelDefaultResponse,\n ComposeModel202Response,\n ComposeModelLogicalResponse,\n ComposeModelDefaultResponse,\n AuthorizeModelCopy200Response,\n AuthorizeModelCopyDefaultResponse,\n CopyModelTo202Response,\n CopyModelToLogicalResponse,\n CopyModelToDefaultResponse,\n ListModels200Response,\n ListModelsDefaultResponse,\n BuildClassifier202Response,\n BuildClassifierLogicalResponse,\n BuildClassifierDefaultResponse,\n ListClassifiers200Response,\n ListClassifiersDefaultResponse,\n GetClassifier200Response,\n GetClassifierDefaultResponse,\n DeleteClassifier204Response,\n DeleteClassifierDefaultResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocument202Response,\n ClassifyDocumentFromStreamLogicalResponse,\n ClassifyDocumentLogicalResponse,\n ClassifyDocumentFromStreamDefaultResponse,\n GetClassifyResult200Response,\n GetClassifyResultDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /operations\": [\"200\"],\n \"GET /operations/{operationId}\": [\"200\"],\n \"GET /info\": [\"200\"],\n \"GET /documentModels/{modelId}/analyzeResults/{resultId}\": [\"200\"],\n \"POST /documentModels/{modelId}:analyze\": [\"202\"],\n \"GET /documentModels/{modelId}:analyze\": [\"200\", \"202\"],\n \"GET /documentModels/{modelId}\": [\"200\"],\n \"DELETE /documentModels/{modelId}\": [\"204\"],\n \"POST /documentModels:build\": [\"202\"],\n \"GET /documentModels:build\": [\"200\", \"202\"],\n \"POST /documentModels:compose\": [\"202\"],\n \"GET /documentModels:compose\": [\"200\", \"202\"],\n \"POST /documentModels:authorizeCopy\": [\"200\"],\n \"POST /documentModels/{modelId}:copyTo\": [\"202\"],\n \"GET /documentModels/{modelId}:copyTo\": [\"200\", \"202\"],\n \"GET /documentModels\": [\"200\"],\n \"POST /documentClassifiers:build\": [\"202\"],\n \"GET /documentClassifiers:build\": [\"200\", \"202\"],\n \"GET /documentClassifiers\": [\"200\"],\n \"GET /documentClassifiers/{classifierId}\": [\"200\"],\n \"DELETE /documentClassifiers/{classifierId}\": [\"204\"],\n \"POST /documentClassifiers/{classifierId}:analyze\": [\"202\"],\n \"GET /documentClassifiers/{classifierId}:analyze\": [\"200\", \"202\"],\n \"GET /documentClassifiers/{classifierId}/analyzeResults/{resultId}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: ListOperations200Response | ListOperationsDefaultResponse,\n): response is ListOperationsDefaultResponse;\nexport function isUnexpected(\n response:\n | GetDocumentModelBuildOperation200Response\n | GetDocumentModelComposeOperation200Response\n | GetDocumentModelCopyToOperation200Response\n | GetDocumentClassifierBuildOperation200Response\n | GetOperation200Response\n | GetDocumentModelBuildOperationDefaultResponse,\n): response is GetDocumentModelBuildOperationDefaultResponse;\nexport function isUnexpected(\n response: GetResourceInfo200Response | GetResourceInfoDefaultResponse,\n): response is GetResourceInfoDefaultResponse;\nexport function isUnexpected(\n response: GetAnalyzeResult200Response | GetAnalyzeResultDefaultResponse,\n): response is GetAnalyzeResultDefaultResponse;\nexport function isUnexpected(\n response:\n | AnalyzeDocumentFromStream202Response\n | AnalyzeDocument202Response\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse,\n): response is AnalyzeDocumentFromStreamDefaultResponse;\nexport function isUnexpected(\n response: GetModel200Response | GetModelDefaultResponse,\n): response is GetModelDefaultResponse;\nexport function isUnexpected(\n response: DeleteModel204Response | DeleteModelDefaultResponse,\n): response is DeleteModelDefaultResponse;\nexport function isUnexpected(\n response: BuildModel202Response | BuildModelLogicalResponse | BuildModelDefaultResponse,\n): response is BuildModelDefaultResponse;\nexport function isUnexpected(\n response: ComposeModel202Response | ComposeModelLogicalResponse | ComposeModelDefaultResponse,\n): response is ComposeModelDefaultResponse;\nexport function isUnexpected(\n response: AuthorizeModelCopy200Response | AuthorizeModelCopyDefaultResponse,\n): response is AuthorizeModelCopyDefaultResponse;\nexport function isUnexpected(\n response: CopyModelTo202Response | CopyModelToLogicalResponse | CopyModelToDefaultResponse,\n): response is CopyModelToDefaultResponse;\nexport function isUnexpected(\n response: ListModels200Response | ListModelsDefaultResponse,\n): response is ListModelsDefaultResponse;\nexport function isUnexpected(\n response:\n | BuildClassifier202Response\n | BuildClassifierLogicalResponse\n | BuildClassifierDefaultResponse,\n): response is BuildClassifierDefaultResponse;\nexport function isUnexpected(\n response: ListClassifiers200Response | ListClassifiersDefaultResponse,\n): response is ListClassifiersDefaultResponse;\nexport function isUnexpected(\n response: GetClassifier200Response | GetClassifierDefaultResponse,\n): response is GetClassifierDefaultResponse;\nexport function isUnexpected(\n response: DeleteClassifier204Response | DeleteClassifierDefaultResponse,\n): response is DeleteClassifierDefaultResponse;\nexport function isUnexpected(\n response:\n | ClassifyDocumentFromStream202Response\n | ClassifyDocument202Response\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse,\n): response is ClassifyDocumentFromStreamDefaultResponse;\nexport function isUnexpected(\n response: GetClassifyResult200Response | GetClassifyResultDefaultResponse,\n): response is GetClassifyResultDefaultResponse;\nexport function isUnexpected(\n response:\n | ListOperations200Response\n | ListOperationsDefaultResponse\n | GetDocumentModelBuildOperation200Response\n | GetDocumentModelComposeOperation200Response\n | GetDocumentModelCopyToOperation200Response\n | GetDocumentClassifierBuildOperation200Response\n | GetOperation200Response\n | GetDocumentModelBuildOperationDefaultResponse\n | GetResourceInfo200Response\n | GetResourceInfoDefaultResponse\n | GetAnalyzeResult200Response\n | GetAnalyzeResultDefaultResponse\n | AnalyzeDocumentFromStream202Response\n | AnalyzeDocument202Response\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse\n | GetModel200Response\n | GetModelDefaultResponse\n | DeleteModel204Response\n | DeleteModelDefaultResponse\n | BuildModel202Response\n | BuildModelLogicalResponse\n | BuildModelDefaultResponse\n | ComposeModel202Response\n | ComposeModelLogicalResponse\n | ComposeModelDefaultResponse\n | AuthorizeModelCopy200Response\n | AuthorizeModelCopyDefaultResponse\n | CopyModelTo202Response\n | CopyModelToLogicalResponse\n | CopyModelToDefaultResponse\n | ListModels200Response\n | ListModelsDefaultResponse\n | BuildClassifier202Response\n | BuildClassifierLogicalResponse\n | BuildClassifierDefaultResponse\n | ListClassifiers200Response\n | ListClassifiersDefaultResponse\n | GetClassifier200Response\n | GetClassifierDefaultResponse\n | DeleteClassifier204Response\n | DeleteClassifierDefaultResponse\n | ClassifyDocumentFromStream202Response\n | ClassifyDocument202Response\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse\n | GetClassifyResult200Response\n | GetClassifyResultDefaultResponse,\n): response is\n | ListOperationsDefaultResponse\n | GetDocumentModelBuildOperationDefaultResponse\n | GetResourceInfoDefaultResponse\n | GetAnalyzeResultDefaultResponse\n | AnalyzeDocumentFromStreamDefaultResponse\n | GetModelDefaultResponse\n | DeleteModelDefaultResponse\n | BuildModelDefaultResponse\n | ComposeModelDefaultResponse\n | AuthorizeModelCopyDefaultResponse\n | CopyModelToDefaultResponse\n | ListModelsDefaultResponse\n | BuildClassifierDefaultResponse\n | ListClassifiersDefaultResponse\n | GetClassifierDefaultResponse\n | DeleteClassifierDefaultResponse\n | ClassifyDocumentFromStreamDefaultResponse\n | GetClassifyResultDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocumentFromStreamDefaultResponse,\n AnalyzeDocumentFromStreamLogicalResponse,\n BuildModel202Response,\n BuildModelDefaultResponse,\n BuildModelLogicalResponse,\n ComposeModel202Response,\n ComposeModelDefaultResponse,\n ComposeModelLogicalResponse,\n CopyModelTo202Response,\n CopyModelToDefaultResponse,\n CopyModelToLogicalResponse,\n BuildClassifier202Response,\n BuildClassifierDefaultResponse,\n BuildClassifierLogicalResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocumentFromStreamDefaultResponse,\n ClassifyDocumentFromStreamLogicalResponse,\n} from \"./responses\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends BuildModelLogicalResponse | BuildModelDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildModel202Response | BuildModelDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends ComposeModelLogicalResponse | ComposeModelDefaultResponse,\n>(\n client: Client,\n initialResponse: ComposeModel202Response | ComposeModelDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends CopyModelToLogicalResponse | CopyModelToDefaultResponse,\n>(\n client: Client,\n initialResponse: CopyModelTo202Response | CopyModelToDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends BuildClassifierLogicalResponse | BuildClassifierDefaultResponse,\n>(\n client: Client,\n initialResponse: BuildClassifier202Response | BuildClassifierDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse: AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | ClassifyDocumentFromStream202Response\n | ClassifyDocumentFromStreamDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport DocumentIntelligence from \"./documentIntelligence\";\n\nexport * from \"./documentIntelligence\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\nexport * from \"./pollingHelper\";\n\nexport default DocumentIntelligence;\n"],"names":["createClientLogger","getClient","getPagedAsyncIterator","createRestError","createHttpPoller"],"mappings":";;;;;;;;;AAAA;AACA;AAGO,MAAM,MAAM,GAAGA,2BAAkB,CAAC,0BAA0B,CAAC;;ACJpE;AACA;AAOA;;;;;AAKG;AACW,SAAU,YAAY,CAClC,QAAgB,EAChB,WAA4C,EAC5C,OAAA,GAAyB,EAAE,EAAA;;IAE3B,MAAM,OAAO,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,OAAO,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,CAAA,EAAG,QAAQ,CAAA,qBAAA,CAAuB,CAAC;IACtE,OAAO,CAAC,UAAU,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,UAAU,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,CAAA,mDAAA,CAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;UAChE,GAAG,OAAO,CAAC,gBAAgB,CAA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;;ACvIA;AACA;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n ListOperationsParameters,\n GetDocumentModelBuildOperationParameters,\n GetDocumentModelComposeOperationParameters,\n GetDocumentModelCopyToOperationParameters,\n GetDocumentClassifierBuildOperationParameters,\n GetOperationParameters,\n GetResourceInfoParameters,\n GetAnalyzeResultParameters,\n AnalyzeDocumentFromStreamParameters,\n AnalyzeDocumentParameters,\n GetModelParameters,\n DeleteModelParameters,\n BuildModelParameters,\n ComposeModelParameters,\n AuthorizeModelCopyParameters,\n CopyModelToParameters,\n ListModelsParameters,\n BuildClassifierParameters,\n ListClassifiersParameters,\n GetClassifierParameters,\n DeleteClassifierParameters,\n ClassifyDocumentFromStreamParameters,\n ClassifyDocumentParameters,\n GetClassifyResultParameters,\n} from \"./parameters\";\nimport {\n ListOperations200Response,\n ListOperationsDefaultResponse,\n GetDocumentModelBuildOperation200Response,\n GetDocumentModelBuildOperationDefaultResponse,\n GetDocumentModelComposeOperation200Response,\n GetDocumentModelComposeOperationDefaultResponse,\n GetDocumentModelCopyToOperation200Response,\n GetDocumentModelCopyToOperationDefaultResponse,\n GetDocumentClassifierBuildOperation200Response,\n GetDocumentClassifierBuildOperationDefaultResponse,\n GetOperation200Response,\n GetOperationDefaultResponse,\n GetResourceInfo200Response,\n GetResourceInfoDefaultResponse,\n GetAnalyzeResult200Response,\n GetAnalyzeResultDefaultResponse,\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocumentFromStreamDefaultResponse,\n AnalyzeDocument202Response,\n AnalyzeDocumentDefaultResponse,\n GetModel200Response,\n GetModelDefaultResponse,\n DeleteModel204Response,\n DeleteModelDefaultResponse,\n BuildModel202Response,\n BuildModelDefaultResponse,\n ComposeModel202Response,\n ComposeModelDefaultResponse,\n AuthorizeModelCopy200Response,\n AuthorizeModelCopyDefaultResponse,\n CopyModelTo202Response,\n CopyModelToDefaultResponse,\n ListModels200Response,\n ListModelsDefaultResponse,\n BuildClassifier202Response,\n BuildClassifierDefaultResponse,\n ListClassifiers200Response,\n ListClassifiersDefaultResponse,\n GetClassifier200Response,\n GetClassifierDefaultResponse,\n DeleteClassifier204Response,\n DeleteClassifierDefaultResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocumentFromStreamDefaultResponse,\n ClassifyDocument202Response,\n ClassifyDocumentDefaultResponse,\n GetClassifyResult200Response,\n GetClassifyResultDefaultResponse,\n} from \"./responses\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface ListOperations {\n /** Lists all operations. */\n get(\n options?: ListOperationsParameters,\n ): StreamableMethod<ListOperations200Response | ListOperationsDefaultResponse>;\n}\n\nexport interface GetDocumentModelBuildOperation {\n /** Gets operation info. */\n get(\n options?: GetDocumentModelBuildOperationParameters,\n ): StreamableMethod<\n GetDocumentModelBuildOperation200Response | GetDocumentModelBuildOperationDefaultResponse\n >;\n /** Gets operation info. */\n get(\n options?: GetDocumentModelComposeOperationParameters,\n ): StreamableMethod<\n GetDocumentModelComposeOperation200Response | GetDocumentModelComposeOperationDefaultResponse\n >;\n /** Gets operation info. */\n get(\n options?: GetDocumentModelCopyToOperationParameters,\n ): StreamableMethod<\n GetDocumentModelCopyToOperation200Response | GetDocumentModelCopyToOperationDefaultResponse\n >;\n /** Gets operation info. */\n get(\n options?: GetDocumentClassifierBuildOperationParameters,\n ): StreamableMethod<\n | GetDocumentClassifierBuildOperation200Response\n | GetDocumentClassifierBuildOperationDefaultResponse\n >;\n /** Gets operation info. */\n get(\n options?: GetOperationParameters,\n ): StreamableMethod<GetOperation200Response | GetOperationDefaultResponse>;\n}\n\nexport interface GetResourceInfo {\n /** Return information about the current resource. */\n get(\n options?: GetResourceInfoParameters,\n ): StreamableMethod<GetResourceInfo200Response | GetResourceInfoDefaultResponse>;\n}\n\nexport interface GetAnalyzeResult {\n /** Gets the result of document analysis. */\n get(\n options?: GetAnalyzeResultParameters,\n ): StreamableMethod<GetAnalyzeResult200Response | GetAnalyzeResultDefaultResponse>;\n}\n\nexport interface AnalyzeDocumentFromStream {\n /** Analyzes document with document model. */\n post(\n options: AnalyzeDocumentFromStreamParameters,\n ): StreamableMethod<\n AnalyzeDocumentFromStream202Response | AnalyzeDocumentFromStreamDefaultResponse\n >;\n /** Analyzes document with document model. */\n post(\n options: AnalyzeDocumentParameters,\n ): StreamableMethod<AnalyzeDocument202Response | AnalyzeDocumentDefaultResponse>;\n}\n\nexport interface GetModel {\n /** Gets detailed document model information. */\n get(\n options?: GetModelParameters,\n ): StreamableMethod<GetModel200Response | GetModelDefaultResponse>;\n /** Deletes document model. */\n delete(\n options?: DeleteModelParameters,\n ): StreamableMethod<DeleteModel204Response | DeleteModelDefaultResponse>;\n}\n\nexport interface BuildModel {\n /** Builds a custom document analysis model. */\n post(\n options: BuildModelParameters,\n ): StreamableMethod<BuildModel202Response | BuildModelDefaultResponse>;\n}\n\nexport interface ComposeModel {\n /** Creates a new document model from document types of existing document models. */\n post(\n options: ComposeModelParameters,\n ): StreamableMethod<ComposeModel202Response | ComposeModelDefaultResponse>;\n}\n\nexport interface AuthorizeModelCopy {\n /**\n * Generates authorization to copy a document model to this location with\n * specified modelId and optional description.\n */\n post(\n options: AuthorizeModelCopyParameters,\n ): StreamableMethod<AuthorizeModelCopy200Response | AuthorizeModelCopyDefaultResponse>;\n}\n\nexport interface CopyModelTo {\n /** Copies document model to the target resource, region, and modelId. */\n post(\n options: CopyModelToParameters,\n ): StreamableMethod<CopyModelTo202Response | CopyModelToDefaultResponse>;\n}\n\nexport interface ListModels {\n /** List all document models */\n get(\n options?: ListModelsParameters,\n ): StreamableMethod<ListModels200Response | ListModelsDefaultResponse>;\n}\n\nexport interface BuildClassifier {\n /** Builds a custom document classifier. */\n post(\n options: BuildClassifierParameters,\n ): StreamableMethod<BuildClassifier202Response | BuildClassifierDefaultResponse>;\n}\n\nexport interface ListClassifiers {\n /** List all document classifiers. */\n get(\n options?: ListClassifiersParameters,\n ): StreamableMethod<ListClassifiers200Response | ListClassifiersDefaultResponse>;\n}\n\nexport interface GetClassifier {\n /** Gets detailed document classifier information. */\n get(\n options?: GetClassifierParameters,\n ): StreamableMethod<GetClassifier200Response | GetClassifierDefaultResponse>;\n /** Deletes document classifier. */\n delete(\n options?: DeleteClassifierParameters,\n ): StreamableMethod<DeleteClassifier204Response | DeleteClassifierDefaultResponse>;\n}\n\nexport interface ClassifyDocumentFromStream {\n /** Classifies document with document classifier. */\n post(\n options: ClassifyDocumentFromStreamParameters,\n ): StreamableMethod<\n ClassifyDocumentFromStream202Response | ClassifyDocumentFromStreamDefaultResponse\n >;\n /** Classifies document with document classifier. */\n post(\n options: ClassifyDocumentParameters,\n ): StreamableMethod<ClassifyDocument202Response | ClassifyDocumentDefaultResponse>;\n}\n\nexport interface GetClassifyResult {\n /** Gets the result of document classifier. */\n get(\n options?: GetClassifyResultParameters,\n ): StreamableMethod<GetClassifyResult200Response | GetClassifyResultDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/operations' has methods for the following verbs: get */\n (path: \"/operations\"): ListOperations;\n /** Resource for '/operations/\\{operationId\\}' has methods for the following verbs: get */\n (path: \"/operations/{operationId}\", operationId: string): GetDocumentModelBuildOperation;\n /** Resource for '/info' has methods for the following verbs: get */\n (path: \"/info\"): GetResourceInfo;\n /** Resource for '/documentModels/\\{modelId\\}/analyzeResults/\\{resultId\\}' has methods for the following verbs: get */\n (\n path: \"/documentModels/{modelId}/analyzeResults/{resultId}\",\n modelId: string,\n resultId: string,\n ): GetAnalyzeResult;\n /** Resource for '/documentModels/\\{modelId\\}:analyze' has methods for the following verbs: post */\n (path: \"/documentModels/{modelId}:analyze\", modelId: string): AnalyzeDocumentFromStream;\n /** Resource for '/documentModels/\\{modelId\\}' has methods for the following verbs: get, delete */\n (path: \"/documentModels/{modelId}\", modelId: string): GetModel;\n /** Resource for '/documentModels:build' has methods for the following verbs: post */\n (path: \"/documentModels:build\"): BuildModel;\n /** Resource for '/documentModels:compose' has methods for the following verbs: post */\n (path: \"/documentModels:compose\"): ComposeModel;\n /** Resource for '/documentModels:authorizeCopy' has methods for the following verbs: post */\n (path: \"/documentModels:authorizeCopy\"): AuthorizeModelCopy;\n /** Resource for '/documentModels/\\{modelId\\}:copyTo' has methods for the following verbs: post */\n (path: \"/documentModels/{modelId}:copyTo\", modelId: string): CopyModelTo;\n /** Resource for '/documentModels' has methods for the following verbs: get */\n (path: \"/documentModels\"): ListModels;\n /** Resource for '/documentClassifiers:build' has methods for the following verbs: post */\n (path: \"/documentClassifiers:build\"): BuildClassifier;\n /** Resource for '/documentClassifiers' has methods for the following verbs: get */\n (path: \"/documentClassifiers\"): ListClassifiers;\n /** Resource for '/documentClassifiers/\\{classifierId\\}' has methods for the following verbs: get, delete */\n (path: \"/documentClassifiers/{classifierId}\", classifierId: string): GetClassifier;\n /** Resource for '/documentClassifiers/\\{classifierId\\}:analyze' has methods for the following verbs: post */\n (\n path: \"/documentClassifiers/{classifierId}:analyze\",\n classifierId: string,\n ): ClassifyDocumentFromStream;\n /** Resource for '/documentClassifiers/\\{classifierId\\}/analyzeResults/\\{resultId\\}' has methods for the following verbs: get */\n (\n path: \"/documentClassifiers/{classifierId}/analyzeResults/{resultId}\",\n classifierId: string,\n resultId: string,\n ): GetClassifyResult;\n}\n\nexport type DocumentIntelligenceClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { getClient } from "@azure-rest/core-client";
|
|
4
|
-
import { logger } from "./logger";
|
|
5
|
-
/**
|
|
6
|
-
* Initialize a new instance of `DocumentIntelligenceClient`
|
|
7
|
-
* @param endpoint - The Document Intelligence service endpoint.
|
|
8
|
-
* @param credentials - uniquely identify client credential
|
|
9
|
-
* @param options - the parameter for all optional parameters
|
|
10
|
-
*/
|
|
11
|
-
export default function createClient(endpoint, credentials, options = {}) {
|
|
12
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
13
|
-
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}/documentintelligence`;
|
|
14
|
-
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2024-02-29-preview";
|
|
15
|
-
const userAgentInfo = `azsdk-js-ai-document-intelligence-rest/1.0.0-beta.2`;
|
|
16
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
17
|
-
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
18
|
-
: `${userAgentInfo}`;
|
|
19
|
-
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
20
|
-
userAgentPrefix,
|
|
21
|
-
}, loggingOptions: {
|
|
22
|
-
logger: (_d = (_c = options.loggingOptions) === null || _c === void 0 ? void 0 : _c.logger) !== null && _d !== void 0 ? _d : logger.info,
|
|
23
|
-
}, credentials: {
|
|
24
|
-
scopes: (_f = (_e = options.credentials) === null || _e === void 0 ? void 0 : _e.scopes) !== null && _f !== void 0 ? _f : ["https://cognitiveservices.azure.com/.default"],
|
|
25
|
-
apiKeyHeaderName: (_h = (_g = options.credentials) === null || _g === void 0 ? void 0 : _g.apiKeyHeaderName) !== null && _h !== void 0 ? _h : "Ocp-Apim-Subscription-Key",
|
|
26
|
-
} });
|
|
27
|
-
const client = getClient(baseUrl, credentials, options);
|
|
28
|
-
return client;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=documentIntelligence.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"documentIntelligence.js","sourceRoot":"","sources":["../../src/documentIntelligence.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAgB,EAChB,WAA4C,EAC5C,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,uBAAuB,CAAC;IACtE,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,qDAAqD,CAAC;IAC5E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;YACvF,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,2BAA2B;SACvF,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA+B,CAAC;IAEtF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { DocumentIntelligenceClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of `DocumentIntelligenceClient`\n * @param endpoint - The Document Intelligence service endpoint.\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: TokenCredential | KeyCredential,\n options: ClientOptions = {},\n): DocumentIntelligenceClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/documentintelligence`;\n options.apiVersion = options.apiVersion ?? \"2024-02-29-preview\";\n const userAgentInfo = `azsdk-js-ai-document-intelligence-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const client = getClient(baseUrl, credentials, options) as DocumentIntelligenceClient;\n\n return client;\n}\n"]}
|
package/dist-esm/src/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import DocumentIntelligence from "./documentIntelligence";
|
|
4
|
-
export * from "./documentIntelligence";
|
|
5
|
-
export * from "./parameters";
|
|
6
|
-
export * from "./responses";
|
|
7
|
-
export * from "./clientDefinitions";
|
|
8
|
-
export * from "./isUnexpected";
|
|
9
|
-
export * from "./models";
|
|
10
|
-
export * from "./outputModels";
|
|
11
|
-
export * from "./paginateHelper";
|
|
12
|
-
export * from "./pollingHelper";
|
|
13
|
-
export default DocumentIntelligence;
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAEhC,eAAe,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport DocumentIntelligence from \"./documentIntelligence\";\n\nexport * from \"./documentIntelligence\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./paginateHelper\";\nexport * from \"./pollingHelper\";\n\nexport default DocumentIntelligence;\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuDlC,MAAM,WAAW,GAA6B;IAC5C,iBAAiB,EAAE,CAAC,KAAK,CAAC;IAC1B,+BAA+B,EAAE,CAAC,KAAK,CAAC;IACxC,WAAW,EAAE,CAAC,KAAK,CAAC;IACpB,yDAAyD,EAAE,CAAC,KAAK,CAAC;IAClE,wCAAwC,EAAE,CAAC,KAAK,CAAC;IACjD,uCAAuC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;IACvD,+BAA+B,EAAE,CAAC,KAAK,CAAC;IACxC,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,2BAA2B,EAAE,CAAC,KAAK,EAAE,KAAK,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ACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n ListOperations200Response,\n ListOperationsDefaultResponse,\n GetDocumentModelBuildOperation200Response,\n GetDocumentModelComposeOperation200Response,\n GetDocumentModelCopyToOperation200Response,\n GetDocumentClassifierBuildOperation200Response,\n GetOperation200Response,\n GetDocumentModelBuildOperationDefaultResponse,\n GetResourceInfo200Response,\n GetResourceInfoDefaultResponse,\n GetAnalyzeResult200Response,\n GetAnalyzeResultDefaultResponse,\n AnalyzeDocumentFromStream202Response,\n AnalyzeDocument202Response,\n AnalyzeDocumentFromStreamLogicalResponse,\n AnalyzeDocumentLogicalResponse,\n AnalyzeDocumentFromStreamDefaultResponse,\n GetModel200Response,\n GetModelDefaultResponse,\n DeleteModel204Response,\n DeleteModelDefaultResponse,\n BuildModel202Response,\n BuildModelLogicalResponse,\n BuildModelDefaultResponse,\n ComposeModel202Response,\n ComposeModelLogicalResponse,\n ComposeModelDefaultResponse,\n AuthorizeModelCopy200Response,\n AuthorizeModelCopyDefaultResponse,\n CopyModelTo202Response,\n CopyModelToLogicalResponse,\n CopyModelToDefaultResponse,\n ListModels200Response,\n ListModelsDefaultResponse,\n BuildClassifier202Response,\n BuildClassifierLogicalResponse,\n BuildClassifierDefaultResponse,\n ListClassifiers200Response,\n ListClassifiersDefaultResponse,\n GetClassifier200Response,\n GetClassifierDefaultResponse,\n DeleteClassifier204Response,\n DeleteClassifierDefaultResponse,\n ClassifyDocumentFromStream202Response,\n ClassifyDocument202Response,\n ClassifyDocumentFromStreamLogicalResponse,\n ClassifyDocumentLogicalResponse,\n ClassifyDocumentFromStreamDefaultResponse,\n GetClassifyResult200Response,\n GetClassifyResultDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /operations\": [\"200\"],\n \"GET /operations/{operationId}\": [\"200\"],\n \"GET /info\": [\"200\"],\n \"GET /documentModels/{modelId}/analyzeResults/{resultId}\": [\"200\"],\n \"POST /documentModels/{modelId}:analyze\": [\"202\"],\n \"GET /documentModels/{modelId}:analyze\": [\"200\", \"202\"],\n \"GET /documentModels/{modelId}\": [\"200\"],\n \"DELETE /documentModels/{modelId}\": [\"204\"],\n \"POST /documentModels:build\": [\"202\"],\n \"GET /documentModels:build\": [\"200\", \"202\"],\n \"POST /documentModels:compose\": [\"202\"],\n \"GET /documentModels:compose\": [\"200\", \"202\"],\n \"POST /documentModels:authorizeCopy\": [\"200\"],\n \"POST /documentModels/{modelId}:copyTo\": [\"202\"],\n \"GET /documentModels/{modelId}:copyTo\": [\"200\", \"202\"],\n \"GET /documentModels\": [\"200\"],\n \"POST /documentClassifiers:build\": [\"202\"],\n \"GET /documentClassifiers:build\": [\"200\", \"202\"],\n \"GET /documentClassifiers\": [\"200\"],\n \"GET /documentClassifiers/{classifierId}\": [\"200\"],\n \"DELETE /documentClassifiers/{classifierId}\": [\"204\"],\n \"POST /documentClassifiers/{classifierId}:analyze\": [\"202\"],\n \"GET /documentClassifiers/{classifierId}:analyze\": [\"200\", \"202\"],\n \"GET /documentClassifiers/{classifierId}/analyzeResults/{resultId}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: ListOperations200Response | ListOperationsDefaultResponse,\n): response is ListOperationsDefaultResponse;\nexport function isUnexpected(\n response:\n | GetDocumentModelBuildOperation200Response\n | GetDocumentModelComposeOperation200Response\n | GetDocumentModelCopyToOperation200Response\n | GetDocumentClassifierBuildOperation200Response\n | GetOperation200Response\n | GetDocumentModelBuildOperationDefaultResponse,\n): response is GetDocumentModelBuildOperationDefaultResponse;\nexport function isUnexpected(\n response: GetResourceInfo200Response | GetResourceInfoDefaultResponse,\n): response is GetResourceInfoDefaultResponse;\nexport function isUnexpected(\n response: GetAnalyzeResult200Response | GetAnalyzeResultDefaultResponse,\n): response is GetAnalyzeResultDefaultResponse;\nexport function isUnexpected(\n response:\n | AnalyzeDocumentFromStream202Response\n | AnalyzeDocument202Response\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse,\n): response is AnalyzeDocumentFromStreamDefaultResponse;\nexport function isUnexpected(\n response: GetModel200Response | GetModelDefaultResponse,\n): response is GetModelDefaultResponse;\nexport function isUnexpected(\n response: DeleteModel204Response | DeleteModelDefaultResponse,\n): response is DeleteModelDefaultResponse;\nexport function isUnexpected(\n response: BuildModel202Response | BuildModelLogicalResponse | BuildModelDefaultResponse,\n): response is BuildModelDefaultResponse;\nexport function isUnexpected(\n response: ComposeModel202Response | ComposeModelLogicalResponse | ComposeModelDefaultResponse,\n): response is ComposeModelDefaultResponse;\nexport function isUnexpected(\n response: AuthorizeModelCopy200Response | AuthorizeModelCopyDefaultResponse,\n): response is AuthorizeModelCopyDefaultResponse;\nexport function isUnexpected(\n response: CopyModelTo202Response | CopyModelToLogicalResponse | CopyModelToDefaultResponse,\n): response is CopyModelToDefaultResponse;\nexport function isUnexpected(\n response: ListModels200Response | ListModelsDefaultResponse,\n): response is ListModelsDefaultResponse;\nexport function isUnexpected(\n response:\n | BuildClassifier202Response\n | BuildClassifierLogicalResponse\n | BuildClassifierDefaultResponse,\n): response is BuildClassifierDefaultResponse;\nexport function isUnexpected(\n response: ListClassifiers200Response | ListClassifiersDefaultResponse,\n): response is ListClassifiersDefaultResponse;\nexport function isUnexpected(\n response: GetClassifier200Response | GetClassifierDefaultResponse,\n): response is GetClassifierDefaultResponse;\nexport function isUnexpected(\n response: DeleteClassifier204Response | DeleteClassifierDefaultResponse,\n): response is DeleteClassifierDefaultResponse;\nexport function isUnexpected(\n response:\n | ClassifyDocumentFromStream202Response\n | ClassifyDocument202Response\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse,\n): response is ClassifyDocumentFromStreamDefaultResponse;\nexport function isUnexpected(\n response: GetClassifyResult200Response | GetClassifyResultDefaultResponse,\n): response is GetClassifyResultDefaultResponse;\nexport function isUnexpected(\n response:\n | ListOperations200Response\n | ListOperationsDefaultResponse\n | GetDocumentModelBuildOperation200Response\n | GetDocumentModelComposeOperation200Response\n | GetDocumentModelCopyToOperation200Response\n | GetDocumentClassifierBuildOperation200Response\n | GetOperation200Response\n | GetDocumentModelBuildOperationDefaultResponse\n | GetResourceInfo200Response\n | GetResourceInfoDefaultResponse\n | GetAnalyzeResult200Response\n | GetAnalyzeResultDefaultResponse\n | AnalyzeDocumentFromStream202Response\n | AnalyzeDocument202Response\n | AnalyzeDocumentFromStreamLogicalResponse\n | AnalyzeDocumentLogicalResponse\n | AnalyzeDocumentFromStreamDefaultResponse\n | GetModel200Response\n | GetModelDefaultResponse\n | DeleteModel204Response\n | DeleteModelDefaultResponse\n | BuildModel202Response\n | BuildModelLogicalResponse\n | BuildModelDefaultResponse\n | ComposeModel202Response\n | ComposeModelLogicalResponse\n | ComposeModelDefaultResponse\n | AuthorizeModelCopy200Response\n | AuthorizeModelCopyDefaultResponse\n | CopyModelTo202Response\n | CopyModelToLogicalResponse\n | CopyModelToDefaultResponse\n | ListModels200Response\n | ListModelsDefaultResponse\n | BuildClassifier202Response\n | BuildClassifierLogicalResponse\n | BuildClassifierDefaultResponse\n | ListClassifiers200Response\n | ListClassifiersDefaultResponse\n | GetClassifier200Response\n | GetClassifierDefaultResponse\n | DeleteClassifier204Response\n | DeleteClassifierDefaultResponse\n | ClassifyDocumentFromStream202Response\n | ClassifyDocument202Response\n | ClassifyDocumentFromStreamLogicalResponse\n | ClassifyDocumentLogicalResponse\n | ClassifyDocumentFromStreamDefaultResponse\n | GetClassifyResult200Response\n | GetClassifyResultDefaultResponse,\n): response is\n | ListOperationsDefaultResponse\n | GetDocumentModelBuildOperationDefaultResponse\n | GetResourceInfoDefaultResponse\n | GetAnalyzeResultDefaultResponse\n | AnalyzeDocumentFromStreamDefaultResponse\n | GetModelDefaultResponse\n | DeleteModelDefaultResponse\n | BuildModelDefaultResponse\n | ComposeModelDefaultResponse\n | AuthorizeModelCopyDefaultResponse\n | CopyModelToDefaultResponse\n | ListModelsDefaultResponse\n | BuildClassifierDefaultResponse\n | ListClassifiersDefaultResponse\n | GetClassifierDefaultResponse\n | DeleteClassifierDefaultResponse\n | ClassifyDocumentFromStreamDefaultResponse\n | GetClassifyResultDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
package/dist-esm/src/models.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** Azure Blob Storage content. */\nexport interface AzureBlobContentSource {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Blob name prefix. */\n prefix?: string;\n}\n\n/** File list in Azure Blob Storage. */\nexport interface AzureBlobFileListContentSource {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Path to a JSONL file within the container specifying a subset of documents. */\n fileList: string;\n}\n\n/** Classifier document type info. */\nexport interface ClassifierDocumentTypeDetails {\n /**\n * Type of training data source.\n *\n * Possible values: \"url\", \"base64\", \"azureBlob\", \"azureBlobFileList\"\n */\n sourceKind?: string;\n /**\n * Azure Blob Storage location containing the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobSource?: AzureBlobContentSource;\n /**\n * Azure Blob Storage file list specifying the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSource;\n}\n\n/** Document analysis parameters. */\nexport interface AnalyzeDocumentRequest {\n /** Document URL to analyze. Either urlSource or base64Source must be specified. */\n urlSource?: string;\n /**\n * Base64 encoding of the document to analyze. Either urlSource or base64Source\n * must be specified.\n */\n base64Source?: string;\n}\n\n/** Request body to build a new custom document model. */\nexport interface BuildDocumentModelRequest {\n /** Unique document model name. */\n modelId: string;\n /** Document model description. */\n description?: string;\n /**\n * Custom document model build mode.\n *\n * Possible values: \"template\", \"neural\"\n */\n buildMode: string;\n /**\n * Azure Blob Storage location containing the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobSource?: AzureBlobContentSource;\n /**\n * Azure Blob Storage file list specifying the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSource;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n}\n\n/** Request body to create a composed document model from component document models. */\nexport interface ComposeDocumentModelRequest {\n /** Unique document model name. */\n modelId: string;\n /** Document model description. */\n description?: string;\n /** List of component document models to compose. */\n componentModels: Array<ComponentDocumentModelDetails>;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n}\n\n/** A component of a composed document model. */\nexport interface ComponentDocumentModelDetails {\n /** Unique document model name. */\n modelId: string;\n}\n\n/** Request body to authorize document model copy. */\nexport interface AuthorizeCopyRequest {\n /** Unique document model name. */\n modelId: string;\n /** Document model description. */\n description?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n}\n\n/**\n * Authorization to copy a document model to the specified target resource and\n * modelId.\n */\nexport interface CopyAuthorization {\n /** ID of the target Azure resource where the document model should be copied to. */\n targetResourceId: string;\n /**\n * Location of the target Azure resource where the document model should be copied\n * to.\n */\n targetResourceRegion: string;\n /** Identifier of the target document model. */\n targetModelId: string;\n /** URL of the copied document model in the target account. */\n targetModelLocation: string;\n /** Token used to authorize the request. */\n accessToken: string;\n /** Date/time when the access token expires. */\n expirationDateTime: Date | string;\n}\n\n/** Request body to build a new custom document classifier. */\nexport interface BuildDocumentClassifierRequest {\n /** Unique document classifier name. */\n classifierId: string;\n /** Document classifier description. */\n description?: string;\n /** Base classifierId on top of which to train the classifier. */\n baseClassifierId?: string;\n /** List of document types to classify against. */\n docTypes: Record<string, ClassifierDocumentTypeDetails>;\n}\n\n/** Document classification parameters. */\nexport interface ClassifyDocumentRequest {\n /** Document URL to classify. Either urlSource or base64Source must be specified. */\n urlSource?: string;\n /**\n * Base64 encoding of the document to classify. Either urlSource or base64Source\n * must be specified.\n */\n base64Source?: string;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Paged } from \"@azure/core-paging\";\n\n/** Operation info. */\nexport interface OperationDetailsOutputParent {\n /** Operation ID */\n operationId: string;\n /**\n * Operation status. notStarted, running, completed, or failed\n *\n * Possible values: \"notStarted\", \"running\", \"failed\", \"succeeded\", \"completed\", \"canceled\"\n */\n status: string;\n /** Operation progress (0-100). */\n percentCompleted?: number;\n /** Date and time (UTC) when the operation was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the status was last updated. */\n lastUpdatedDateTime: string;\n /** URL of the resource targeted by this operation. */\n resourceLocation: string;\n /** API version used to create this operation. */\n apiVersion?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n /** Encountered error. */\n error?: ErrorModelOutput;\n kind: string;\n}\n\n/** The error object. */\nexport interface ErrorModelOutput {\n /** One of a server-defined set of error codes. */\n code: string;\n /** A human-readable representation of the error. */\n message: string;\n /** The target of the error. */\n target?: string;\n /** An array of details about specific errors that led to this reported error. */\n details?: Array<ErrorModelOutput>;\n /** An object containing more specific information than the current object about the error. */\n innererror?: InnerErrorOutput;\n}\n\n/** An object containing more specific information about the error. */\nexport interface InnerErrorOutput {\n /** One of a server-defined set of error codes. */\n code?: string;\n /** A human-readable representation of the error. */\n message?: string;\n /** Inner error. */\n innererror?: InnerErrorOutput;\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelBuildOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelBuild\";\n}\n\n/** Document model info. */\nexport interface DocumentModelDetailsOutput {\n /** Unique document model name. */\n modelId: string;\n /** Document model description. */\n description?: string;\n /** Date and time (UTC) when the document model was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the document model will expire. */\n expirationDateTime?: string;\n /** API version used to create this document model. */\n apiVersion?: string;\n /** List of key-value tag attributes associated with the document model. */\n tags?: Record<string, string>;\n /**\n * Custom document model build mode.\n *\n * Possible values: \"template\", \"neural\"\n */\n buildMode?: string;\n /**\n * Azure Blob Storage location containing the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobSource?: AzureBlobContentSourceOutput;\n /**\n * Azure Blob Storage file list specifying the training data. Either\n * azureBlobSource or azureBlobFileListSource must be specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSourceOutput;\n /** Supported document types. */\n docTypes?: Record<string, DocumentTypeDetailsOutput>;\n /** List of warnings encountered while building the model. */\n warnings?: Array<WarningOutput>;\n}\n\n/** Azure Blob Storage content. */\nexport interface AzureBlobContentSourceOutput {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Blob name prefix. */\n prefix?: string;\n}\n\n/** File list in Azure Blob Storage. */\nexport interface AzureBlobFileListContentSourceOutput {\n /** Azure Blob Storage container URL. */\n containerUrl: string;\n /** Path to a JSONL file within the container specifying a subset of documents. */\n fileList: string;\n}\n\n/** Document type info. */\nexport interface DocumentTypeDetailsOutput {\n /** Document model description. */\n description?: string;\n /**\n * Custom document model build mode.\n *\n * Possible values: \"template\", \"neural\"\n */\n buildMode?: string;\n /** Description of the document semantic schema using a JSON Schema style syntax. */\n fieldSchema: Record<string, DocumentFieldSchemaOutput>;\n /** Estimated confidence for each field. */\n fieldConfidence?: Record<string, number>;\n}\n\n/** Description of the field semantic schema using a JSON Schema style syntax. */\nexport interface DocumentFieldSchemaOutput {\n /**\n * Semantic data type of the field value.\n *\n * Possible values: \"string\", \"date\", \"time\", \"phoneNumber\", \"number\", \"integer\", \"selectionMark\", \"countryRegion\", \"signature\", \"array\", \"object\", \"currency\", \"address\", \"boolean\", \"selectionGroup\"\n */\n type: string;\n /** Field description. */\n description?: string;\n /** Example field content. */\n example?: string;\n /** Field type schema of each array element. */\n items?: DocumentFieldSchemaOutput;\n /** Named sub-fields of the object field. */\n properties?: Record<string, DocumentFieldSchemaOutput>;\n}\n\n/** The error object. */\nexport interface WarningOutput {\n /** One of a server-defined set of warning codes. */\n code: string;\n /** A human-readable representation of the warning. */\n message: string;\n /** The target of the error. */\n target?: string;\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelComposeOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelCompose\";\n}\n\n/** Get Operation response object. */\nexport interface DocumentModelCopyToOperationDetailsOutput extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentModelDetailsOutput;\n /** Type of operation. */\n kind: \"documentModelCopyTo\";\n}\n\n/** Get Operation response object. */\nexport interface DocumentClassifierBuildOperationDetailsOutput\n extends OperationDetailsOutputParent {\n /** Operation result upon success. */\n result?: DocumentClassifierDetailsOutput;\n /** Type of operation. */\n kind: \"documentClassifierBuild\";\n}\n\n/** Document classifier info. */\nexport interface DocumentClassifierDetailsOutput {\n /** Unique document classifier name. */\n classifierId: string;\n /** Document classifier description. */\n description?: string;\n /** Date and time (UTC) when the document classifier was created. */\n createdDateTime: string;\n /** Date and time (UTC) when the document classifier will expire. */\n expirationDateTime?: string;\n /** API version used to create this document classifier. */\n apiVersion: string;\n /** Base classifierId on top of which the classifier was trained. */\n baseClassifierId?: string;\n /** List of document types to classify against. */\n docTypes: Record<string, ClassifierDocumentTypeDetailsOutput>;\n /** List of warnings encountered while building the classifier. */\n warnings?: Array<WarningOutput>;\n}\n\n/** Classifier document type info. */\nexport interface ClassifierDocumentTypeDetailsOutput {\n /**\n * Type of training data source.\n *\n * Possible values: \"url\", \"base64\", \"azureBlob\", \"azureBlobFileList\"\n */\n sourceKind?: string;\n /**\n * Azure Blob Storage location containing the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobSource?: AzureBlobContentSourceOutput;\n /**\n * Azure Blob Storage file list specifying the training data for a classifier\n * document type. Either azureBlobSource or azureBlobFileListSource must be\n * specified.\n */\n azureBlobFileListSource?: AzureBlobFileListContentSourceOutput;\n}\n\n/** Error response object. */\nexport interface ErrorResponseOutput {\n /** Error info. */\n error: ErrorModelOutput;\n}\n\n/** Provides the 'x-ms-client-request-id' header to enable request correlation in requests and responses. */\nexport interface ClientRequestIdHeaderOutput {}\n\n/** General information regarding the current resource. */\nexport interface ResourceDetailsOutput {\n /** Details regarding custom document models. */\n customDocumentModels: CustomDocumentModelsDetailsOutput;\n /** Quota used, limit, and next reset date/time. */\n customNeuralDocumentModelBuilds: QuotaDetailsOutput;\n}\n\n/** Details regarding custom document models. */\nexport interface CustomDocumentModelsDetailsOutput {\n /** Number of custom document models in the current resource. */\n count: number;\n /** Maximum number of custom document models supported in the current resource. */\n limit: number;\n}\n\n/** Quota used, limit, and next reset date/time. */\nexport interface QuotaDetailsOutput {\n /** Amount of the resource quota used. */\n used: number;\n /** Resource quota limit. */\n quota: number;\n /** Date/time when the resource quota usage will be reset. */\n quotaResetDateTime: string;\n}\n\n/** Status and result of the analyze operation. */\nexport interface AnalyzeResultOperationOutput {\n /**\n * Operation status. notStarted, running, succeeded, or failed\n *\n * Possible values: \"notStarted\", \"running\", \"failed\", \"succeeded\", \"completed\", \"canceled\"\n */\n status: string;\n /** Date and time (UTC) when the analyze operation was submitted. */\n createdDateTime: string;\n /** Date and time (UTC) when the status was last updated. */\n lastUpdatedDateTime: string;\n /** Encountered error during document analysis. */\n error?: ErrorModelOutput;\n /** Document analysis result. */\n analyzeResult?: AnalyzeResultOutput;\n}\n\n/** Document analysis result. */\nexport interface AnalyzeResultOutput {\n /** API version used to produce this result. */\n apiVersion: string;\n /** Document model ID used to produce this result. */\n modelId: string;\n /**\n * Method used to compute string offset and length.\n *\n * Possible values: \"textElements\", \"unicodeCodePoint\", \"utf16CodeUnit\"\n */\n stringIndexType: string;\n /**\n * Format of the analyze result top-level content.\n *\n * Possible values: \"text\", \"markdown\"\n */\n contentFormat?: string;\n /**\n * Concatenate string representation of all textual and visual elements in reading\n * order.\n */\n content: string;\n /** Analyzed pages. */\n pages: Array<DocumentPageOutput>;\n /** Extracted paragraphs. */\n paragraphs?: Array<DocumentParagraphOutput>;\n /** Extracted tables. */\n tables?: Array<DocumentTableOutput>;\n /** Extracted figures. */\n figures?: Array<DocumentFigureOutput>;\n /** Extracted lists. */\n lists?: Array<DocumentListOutput>;\n /** Extracted sections. */\n sections?: Array<DocumentSectionOutput>;\n /** Extracted key-value pairs. */\n keyValuePairs?: Array<DocumentKeyValuePairOutput>;\n /** Extracted font styles. */\n styles?: Array<DocumentStyleOutput>;\n /** Detected languages. */\n languages?: Array<DocumentLanguageOutput>;\n /** Extracted documents. */\n documents?: Array<DocumentOutput>;\n}\n\n/** Content and layout elements extracted from a page from the input. */\nexport interface DocumentPageOutput {\n /** 1-based page number in the input document. */\n pageNumber: number;\n /**\n * The general orientation of the content in clockwise direction, measured in\n * degrees between (-180, 180].\n */\n angle?: number;\n /** The width of the image/PDF in pixels/inches, respectively. */\n width?: number;\n /** The height of the image/PDF in pixels/inches, respectively. */\n height?: number;\n /**\n * The unit used by the width, height, and polygon properties. For images, the\n * unit is \"pixel\". For PDF, the unit is \"inch\".\n *\n * Possible values: \"pixel\", \"inch\"\n */\n unit?: string;\n /** Location of the page in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Extracted words from the page. */\n words?: Array<DocumentWordOutput>;\n /** Extracted selection marks from the page. */\n selectionMarks?: Array<DocumentSelectionMarkOutput>;\n /**\n * Extracted lines from the page, potentially containing both textual and visual\n * elements.\n */\n lines?: Array<DocumentLineOutput>;\n /** Extracted barcodes from the page. */\n barcodes?: Array<DocumentBarcodeOutput>;\n /** Extracted formulas from the page. */\n formulas?: Array<DocumentFormulaOutput>;\n}\n\n/**\n * Contiguous region of the concatenated content property, specified as an offset\n * and length.\n */\nexport interface DocumentSpanOutput {\n /** Zero-based index of the content represented by the span. */\n offset: number;\n /** Number of characters in the content represented by the span. */\n length: number;\n}\n\n/**\n * A word object consisting of a contiguous sequence of characters. For non-space\n * delimited languages, such as Chinese, Japanese, and Korean, each character is\n * represented as its own word.\n */\nexport interface DocumentWordOutput {\n /** Text content of the word. */\n content: string;\n /**\n * Bounding polygon of the word, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the word in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the word. */\n confidence: number;\n}\n\n/**\n * A selection mark object representing check boxes, radio buttons, and other\n * elements indicating a selection.\n */\nexport interface DocumentSelectionMarkOutput {\n /**\n * State of the selection mark.\n *\n * Possible values: \"selected\", \"unselected\"\n */\n state: string;\n /**\n * Bounding polygon of the selection mark, with coordinates specified relative\n * to the top-left of the page. The numbers represent the x, y values of the\n * polygon vertices, clockwise from the left (-180 degrees inclusive) relative\n * to the element orientation.\n */\n polygon?: number[];\n /** Location of the selection mark in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the selection mark. */\n confidence: number;\n}\n\n/**\n * A content line object consisting of an adjacent sequence of content elements,\n * such as words and selection marks.\n */\nexport interface DocumentLineOutput {\n /** Concatenated content of the contained elements in reading order. */\n content: string;\n /**\n * Bounding polygon of the line, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the line in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** A barcode object. */\nexport interface DocumentBarcodeOutput {\n /**\n * Barcode kind.\n *\n * Possible values: \"QRCode\", \"PDF417\", \"UPCA\", \"UPCE\", \"Code39\", \"Code128\", \"EAN8\", \"EAN13\", \"DataBar\", \"Code93\", \"Codabar\", \"DataBarExpanded\", \"ITF\", \"MicroQRCode\", \"Aztec\", \"DataMatrix\", \"MaxiCode\"\n */\n kind: string;\n /** Barcode value. */\n value: string;\n /**\n * Bounding polygon of the barcode, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the barcode in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the barcode. */\n confidence: number;\n}\n\n/** A formula object. */\nexport interface DocumentFormulaOutput {\n /**\n * Formula kind.\n *\n * Possible values: \"inline\", \"display\"\n */\n kind: string;\n /** LaTex expression describing the formula. */\n value: string;\n /**\n * Bounding polygon of the formula, with coordinates specified relative to the\n * top-left of the page. The numbers represent the x, y values of the polygon\n * vertices, clockwise from the left (-180 degrees inclusive) relative to the\n * element orientation.\n */\n polygon?: number[];\n /** Location of the formula in the reading order concatenated content. */\n span: DocumentSpanOutput;\n /** Confidence of correctly extracting the formula. */\n confidence: number;\n}\n\n/**\n * A paragraph object consisting with contiguous lines generally with common\n * alignment and spacing.\n */\nexport interface DocumentParagraphOutput {\n /**\n * Semantic role of the paragraph.\n *\n * Possible values: \"pageHeader\", \"pageFooter\", \"pageNumber\", \"title\", \"sectionHeading\", \"footnote\", \"formulaBlock\"\n */\n role?: string;\n /** Concatenated content of the paragraph in reading order. */\n content: string;\n /** Bounding regions covering the paragraph. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the paragraph in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** Bounding polygon on a specific page of the input. */\nexport interface BoundingRegionOutput {\n /** 1-based page number of page containing the bounding region. */\n pageNumber: number;\n /**\n * Bounding polygon on the page, or the entire page if not specified.\n * Coordinates specified relative to the top-left of the page. The numbers\n * represent the x, y values of the polygon vertices, clockwise from the left\n * (-180 degrees inclusive) relative to the element orientation.\n */\n polygon: number[];\n}\n\n/** A table object consisting table cells arranged in a rectangular layout. */\nexport interface DocumentTableOutput {\n /** Number of rows in the table. */\n rowCount: number;\n /** Number of columns in the table. */\n columnCount: number;\n /** Cells contained within the table. */\n cells: Array<DocumentTableCellOutput>;\n /** Bounding regions covering the table. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the table in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Caption associated with the table. */\n caption?: DocumentCaptionOutput;\n /** List of footnotes associated with the table. */\n footnotes?: Array<DocumentFootnoteOutput>;\n}\n\n/** An object representing the location and content of a table cell. */\nexport interface DocumentTableCellOutput {\n /**\n * Table cell kind.\n *\n * Possible values: \"content\", \"rowHeader\", \"columnHeader\", \"stubHead\", \"description\"\n */\n kind?: string;\n /** Row index of the cell. */\n rowIndex: number;\n /** Column index of the cell. */\n columnIndex: number;\n /** Number of rows spanned by this cell. */\n rowSpan?: number;\n /** Number of columns spanned by this cell. */\n columnSpan?: number;\n /** Concatenated content of the table cell in reading order. */\n content: string;\n /** Bounding regions covering the table cell. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the table cell in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the table cell. */\n elements?: string[];\n}\n\n/** A caption object describing a table or figure. */\nexport interface DocumentCaptionOutput {\n /** Content of the caption. */\n content: string;\n /** Bounding regions covering the caption. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the caption in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the caption. */\n elements?: string[];\n}\n\n/** A footnote object describing a table or figure. */\nexport interface DocumentFootnoteOutput {\n /** Content of the footnote. */\n content: string;\n /** Bounding regions covering the footnote. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the footnote in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the footnote. */\n elements?: string[];\n}\n\n/** An object representing a figure in the document. */\nexport interface DocumentFigureOutput {\n /** Bounding regions covering the figure. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the figure in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the figure, excluding any caption or footnotes. */\n elements?: string[];\n /** Caption associated with the figure. */\n caption?: DocumentCaptionOutput;\n /** List of footnotes associated with the figure. */\n footnotes?: Array<DocumentFootnoteOutput>;\n}\n\n/** An object representing a list in the document. */\nexport interface DocumentListOutput {\n /** Location of the list in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Items in the list. */\n items: Array<DocumentListItemOutput>;\n}\n\n/** An object representing a list item in the document. */\nexport interface DocumentListItemOutput {\n /** Level of the list item (1-indexed). */\n level: number;\n /** Content of the list item. */\n content: string;\n /** Bounding regions covering the list item. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the list item in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the list item. */\n elements?: string[];\n}\n\n/** An object representing a section in the document. */\nexport interface DocumentSectionOutput {\n /** Location of the section in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Child elements of the section. */\n elements?: string[];\n}\n\n/**\n * An object representing a form field with distinct field label (key) and field\n * value (may be empty).\n */\nexport interface DocumentKeyValuePairOutput {\n /** Field label of the key-value pair. */\n key: DocumentKeyValueElementOutput;\n /** Field value of the key-value pair. */\n value?: DocumentKeyValueElementOutput;\n /** Confidence of correctly extracting the key-value pair. */\n confidence: number;\n}\n\n/** An object representing the field key or value in a key-value pair. */\nexport interface DocumentKeyValueElementOutput {\n /** Concatenated content of the key-value element in reading order. */\n content: string;\n /** Bounding regions covering the key-value element. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the key-value element in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n}\n\n/** An object representing observed text styles. */\nexport interface DocumentStyleOutput {\n /** Is content handwritten? */\n isHandwritten?: boolean;\n /**\n * Visually most similar font from among the set of supported font families, with\n * fallback fonts following CSS convention (ex. 'Arial, sans-serif').\n */\n similarFontFamily?: string;\n /**\n * Font style.\n *\n * Possible values: \"normal\", \"italic\"\n */\n fontStyle?: string;\n /**\n * Font weight.\n *\n * Possible values: \"normal\", \"bold\"\n */\n fontWeight?: string;\n /** Foreground color in #rrggbb hexadecimal format. */\n color?: string;\n /** Background color in #rrggbb hexadecimal format.. */\n backgroundColor?: string;\n /** Location of the text elements in the concatenated content the style applies to. */\n spans: Array<DocumentSpanOutput>;\n /** Confidence of correctly identifying the style. */\n confidence: number;\n}\n\n/** An object representing the detected language for a given text span. */\nexport interface DocumentLanguageOutput {\n /**\n * Detected language. Value may an ISO 639-1 language code (ex. \"en\", \"fr\")\n * or BCP 47 language tag (ex. \"zh-Hans\").\n */\n locale: string;\n /**\n * Location of the text elements in the concatenated content the language applies\n * to.\n */\n spans: Array<DocumentSpanOutput>;\n /** Confidence of correctly identifying the language. */\n confidence: number;\n}\n\n/** An object describing the location and semantic content of a document. */\nexport interface DocumentOutput {\n /** Document type. */\n docType: string;\n /** Bounding regions covering the document. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the document in the reading order concatenated content. */\n spans: Array<DocumentSpanOutput>;\n /** Dictionary of named field values. */\n fields?: Record<string, DocumentFieldOutput>;\n /** Confidence of correctly extracting the document. */\n confidence: number;\n}\n\n/** An object representing the content and location of a field value. */\nexport interface DocumentFieldOutput {\n /**\n * Data type of the field value.\n *\n * Possible values: \"string\", \"date\", \"time\", \"phoneNumber\", \"number\", \"integer\", \"selectionMark\", \"countryRegion\", \"signature\", \"array\", \"object\", \"currency\", \"address\", \"boolean\", \"selectionGroup\"\n */\n type: string;\n /** String value. */\n valueString?: string;\n /** Date value in YYYY-MM-DD format (ISO 8601). */\n valueDate?: string;\n /** Time value in hh:mm:ss format (ISO 8601). */\n valueTime?: string;\n /** Phone number value in E.164 format (ex. +19876543210). */\n valuePhoneNumber?: string;\n /** Floating point value. */\n valueNumber?: number;\n /** Integer value. */\n valueInteger?: number;\n /**\n * Selection mark value.\n *\n * Possible values: \"selected\", \"unselected\"\n */\n valueSelectionMark?: string;\n /**\n * Presence of signature.\n *\n * Possible values: \"signed\", \"unsigned\"\n */\n valueSignature?: string;\n /** 3-letter country code value (ISO 3166-1 alpha-3). */\n valueCountryRegion?: string;\n /** Array of field values. */\n valueArray?: Array<DocumentFieldOutput>;\n /** Dictionary of named field values. */\n valueObject?: Record<string, DocumentFieldOutput>;\n /** Currency value. */\n valueCurrency?: CurrencyValueOutput;\n /** Address value. */\n valueAddress?: AddressValueOutput;\n /** Boolean value. */\n valueBoolean?: boolean;\n /** Selection group value. */\n valueSelectionGroup?: string[];\n /** Field content. */\n content?: string;\n /** Bounding regions covering the field. */\n boundingRegions?: Array<BoundingRegionOutput>;\n /** Location of the field in the reading order concatenated content. */\n spans?: Array<DocumentSpanOutput>;\n /** Confidence of correctly extracting the field. */\n confidence?: number;\n}\n\n/** Currency field value. */\nexport interface CurrencyValueOutput {\n /** Currency amount. */\n amount: number;\n /** Currency symbol label, if any. */\n currencySymbol?: string;\n /** Resolved currency code (ISO 4217), if any. */\n currencyCode?: string;\n}\n\n/** Address field value. */\nexport interface AddressValueOutput {\n /** House or building number. */\n houseNumber?: string;\n /** Post office box number. */\n poBox?: string;\n /** Street name. */\n road?: string;\n /** Name of city, town, village, etc. */\n city?: string;\n /** First-level administrative division. */\n state?: string;\n /** Postal code used for mail sorting. */\n postalCode?: string;\n /** Country/region. */\n countryRegion?: string;\n /** Street-level address, excluding city, state, countryRegion, and postalCode. */\n streetAddress?: string;\n /** Apartment or office number */\n unit?: string;\n /**\n * Districts or boroughs within a city, such as Brooklyn in New York City or City\n * of Westminster in London.\n */\n cityDistrict?: string;\n /** Second-level administrative division used in certain locales. */\n stateDistrict?: string;\n /** Unofficial neighborhood name, like Chinatown. */\n suburb?: string;\n /** Build name, such as World Trade Center. */\n house?: string;\n /** Floor number, such as 3F. */\n level?: string;\n}\n\n/**\n * Authorization to copy a document model to the specified target resource and\n * modelId.\n */\nexport interface CopyAuthorizationOutput {\n /** ID of the target Azure resource where the document model should be copied to. */\n targetResourceId: string;\n /**\n * Location of the target Azure resource where the document model should be copied\n * to.\n */\n targetResourceRegion: string;\n /** Identifier of the target document model. */\n targetModelId: string;\n /** URL of the copied document model in the target account. */\n targetModelLocation: string;\n /** Token used to authorize the request. */\n accessToken: string;\n /** Date/time when the access token expires. */\n expirationDateTime: string;\n}\n\n/** Operation info. */\nexport type OperationDetailsOutput =\n | OperationDetailsOutputParent\n | DocumentModelBuildOperationDetailsOutput\n | DocumentModelComposeOperationDetailsOutput\n | DocumentModelCopyToOperationDetailsOutput\n | DocumentClassifierBuildOperationDetailsOutput;\n/** Paged collection of OperationDetails items */\nexport type PagedOperationDetailsOutput = Paged<OperationDetailsOutput>;\n/** Paged collection of DocumentModelDetails items */\nexport type PagedDocumentModelDetailsOutput = Paged<DocumentModelDetailsOutput>;\n/** Paged collection of DocumentClassifierDetails items */\nexport type PagedDocumentClassifierDetailsOutput = Paged<DocumentClassifierDetailsOutput>;\n"]}
|