@azure/ai-form-recognizer 5.0.0-alpha.20250507.1 → 5.1.0-alpha.20250512.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/dist/browser/constants.d.ts +20 -2
- package/dist/browser/constants.d.ts.map +1 -1
- package/dist/browser/constants.js +22 -3
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/generated/generatedClient.js +1 -1
- package/dist/browser/generated/generatedClient.js.map +1 -1
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/options/FormRecognizerClientOptions.d.ts +24 -0
- package/dist/browser/options/FormRecognizerClientOptions.d.ts.map +1 -1
- package/dist/browser/options/FormRecognizerClientOptions.js.map +1 -1
- package/dist/browser/util.d.ts +2 -1
- package/dist/browser/util.d.ts.map +1 -1
- package/dist/browser/util.js +7 -2
- package/dist/browser/util.js.map +1 -1
- package/dist/commonjs/constants.d.ts +20 -2
- package/dist/commonjs/constants.d.ts.map +1 -1
- package/dist/commonjs/constants.js +23 -4
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/generated/generatedClient.js +1 -1
- package/dist/commonjs/generated/generatedClient.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +3 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/options/FormRecognizerClientOptions.d.ts +24 -0
- package/dist/commonjs/options/FormRecognizerClientOptions.d.ts.map +1 -1
- package/dist/commonjs/options/FormRecognizerClientOptions.js.map +1 -1
- package/dist/commonjs/util.d.ts +2 -1
- package/dist/commonjs/util.d.ts.map +1 -1
- package/dist/commonjs/util.js +6 -1
- package/dist/commonjs/util.js.map +1 -1
- package/dist/esm/constants.d.ts +20 -2
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +22 -3
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/generated/generatedClient.js +1 -1
- package/dist/esm/generated/generatedClient.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/options/FormRecognizerClientOptions.d.ts +24 -0
- package/dist/esm/options/FormRecognizerClientOptions.d.ts.map +1 -1
- package/dist/esm/options/FormRecognizerClientOptions.js.map +1 -1
- package/dist/esm/util.d.ts +2 -1
- package/dist/esm/util.d.ts.map +1 -1
- package/dist/esm/util.js +7 -2
- package/dist/esm/util.js.map +1 -1
- package/dist/react-native/constants.d.ts +20 -2
- package/dist/react-native/constants.d.ts.map +1 -1
- package/dist/react-native/constants.js +22 -3
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/generated/generatedClient.js +1 -1
- package/dist/react-native/generated/generatedClient.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -0
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -0
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/options/FormRecognizerClientOptions.d.ts +24 -0
- package/dist/react-native/options/FormRecognizerClientOptions.d.ts.map +1 -1
- package/dist/react-native/options/FormRecognizerClientOptions.js.map +1 -1
- package/dist/react-native/util.d.ts +2 -1
- package/dist/react-native/util.d.ts.map +1 -1
- package/dist/react-native/util.js +7 -2
- package/dist/react-native/util.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -140,6 +140,26 @@ const client = new DocumentAnalysisClient(
|
|
|
140
140
|
);
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
+
#### Sovereign Clouds
|
|
144
|
+
|
|
145
|
+
Connect to alternative Azure cloud environments (such as Azure China or Azure Government) by specifying the `audience` option when creating your client. Use the `KnownFormRecognizerAudience` enum to select the correct value for your environment.
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
import { DefaultAzureCredential } from "@azure/identity";
|
|
149
|
+
import { DocumentAnalysisClient, KnownFormRecognizerAudience } from "@azure/ai-form-recognizer";
|
|
150
|
+
|
|
151
|
+
const credential = new DefaultAzureCredential();
|
|
152
|
+
const client = new DocumentAnalysisClient(
|
|
153
|
+
"https://<resource name>.cognitiveservices.azure.com", // endpoint
|
|
154
|
+
credential,
|
|
155
|
+
{
|
|
156
|
+
audience: KnownFormRecognizerAudience.AzureGovernment,
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
If you do not specify the `audience` option, the default is suitable for the Azure Public Cloud (`https://cognitiveservices.azure.com`).
|
|
162
|
+
|
|
143
163
|
## Key concepts
|
|
144
164
|
|
|
145
165
|
### `DocumentAnalysisClient`
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Defines the known cloud audiences for Form Recognizer.
|
|
3
|
+
*
|
|
4
|
+
* To authenticate with Entra Id (using a `TokenCredential`) in a [Sovereign Cloud](https://learn.microsoft.com/entra/identity-platform/authentication-national-cloud)
|
|
5
|
+
* environment, provide the appropriate value below as the `audience` option when creating a
|
|
6
|
+
* `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.
|
|
7
|
+
*
|
|
8
|
+
* The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value
|
|
9
|
+
* is only required to use Form Recognizer in a different cloud environment.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum KnownFormRecognizerAudience {
|
|
12
|
+
/** Azure China */
|
|
13
|
+
AzureChina = "https://cognitiveservices.azure.cn",
|
|
14
|
+
/** Azure Government */
|
|
15
|
+
AzureGovernment = "https://cognitiveservices.azure.us",
|
|
16
|
+
/** Azure Public Cloud */
|
|
17
|
+
AzurePublicCloud = "https://cognitiveservices.azure.com"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The default Entra Id permissions scope for Cognitive Services.
|
|
3
21
|
* @internal
|
|
4
22
|
*/
|
|
5
23
|
export declare const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
|
|
6
24
|
/**
|
|
7
25
|
* @internal
|
|
8
26
|
*/
|
|
9
|
-
export declare const SDK_VERSION = "5.
|
|
27
|
+
export declare const SDK_VERSION = "5.1.0";
|
|
10
28
|
export declare const FORM_RECOGNIZER_API_VERSION = "2023-07-31";
|
|
11
29
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,oBAAY,2BAA2B;IACrC,kBAAkB;IAClB,UAAU,uCAAuC;IACjD,uBAAuB;IACvB,eAAe,uCAAuC;IACtD,yBAAyB;IACzB,gBAAgB,wCAAwC;CACzD;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAA6D,CAAC;AAElG;;GAEG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,2BAA2B,eAAe,CAAC"}
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Defines the known cloud audiences for Form Recognizer.
|
|
5
|
+
*
|
|
6
|
+
* To authenticate with Entra Id (using a `TokenCredential`) in a [Sovereign Cloud](https://learn.microsoft.com/entra/identity-platform/authentication-national-cloud)
|
|
7
|
+
* environment, provide the appropriate value below as the `audience` option when creating a
|
|
8
|
+
* `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.
|
|
9
|
+
*
|
|
10
|
+
* The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value
|
|
11
|
+
* is only required to use Form Recognizer in a different cloud environment.
|
|
12
|
+
*/
|
|
13
|
+
export var KnownFormRecognizerAudience;
|
|
14
|
+
(function (KnownFormRecognizerAudience) {
|
|
15
|
+
/** Azure China */
|
|
16
|
+
KnownFormRecognizerAudience["AzureChina"] = "https://cognitiveservices.azure.cn";
|
|
17
|
+
/** Azure Government */
|
|
18
|
+
KnownFormRecognizerAudience["AzureGovernment"] = "https://cognitiveservices.azure.us";
|
|
19
|
+
/** Azure Public Cloud */
|
|
20
|
+
KnownFormRecognizerAudience["AzurePublicCloud"] = "https://cognitiveservices.azure.com";
|
|
21
|
+
})(KnownFormRecognizerAudience || (KnownFormRecognizerAudience = {}));
|
|
22
|
+
/**
|
|
23
|
+
* The default Entra Id permissions scope for Cognitive Services.
|
|
5
24
|
* @internal
|
|
6
25
|
*/
|
|
7
|
-
export const DEFAULT_COGNITIVE_SCOPE =
|
|
26
|
+
export const DEFAULT_COGNITIVE_SCOPE = `${KnownFormRecognizerAudience.AzurePublicCloud}/.default`;
|
|
8
27
|
/**
|
|
9
28
|
* @internal
|
|
10
29
|
*/
|
|
11
|
-
export const SDK_VERSION = "5.
|
|
30
|
+
export const SDK_VERSION = "5.1.0";
|
|
12
31
|
export const FORM_RECOGNIZER_API_VERSION = "2023-07-31";
|
|
13
32
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,2BAOX;AAPD,WAAY,2BAA2B;IACrC,kBAAkB;IAClB,gFAAiD,CAAA;IACjD,uBAAuB;IACvB,qFAAsD,CAAA;IACtD,yBAAyB;IACzB,uFAAwD,CAAA;AAC1D,CAAC,EAPW,2BAA2B,KAA3B,2BAA2B,QAOtC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,2BAA2B,CAAC,gBAAgB,WAAW,CAAC;AAElG;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AAEnC,MAAM,CAAC,MAAM,2BAA2B,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Defines the known cloud audiences for Form Recognizer.\n *\n * To authenticate with Entra Id (using a `TokenCredential`) in a [Sovereign Cloud](https://learn.microsoft.com/entra/identity-platform/authentication-national-cloud)\n * environment, provide the appropriate value below as the `audience` option when creating a\n * `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.\n *\n * The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value\n * is only required to use Form Recognizer in a different cloud environment.\n */\nexport enum KnownFormRecognizerAudience {\n /** Azure China */\n AzureChina = \"https://cognitiveservices.azure.cn\",\n /** Azure Government */\n AzureGovernment = \"https://cognitiveservices.azure.us\",\n /** Azure Public Cloud */\n AzurePublicCloud = \"https://cognitiveservices.azure.com\",\n}\n\n/**\n * The default Entra Id permissions scope for Cognitive Services.\n * @internal\n */\nexport const DEFAULT_COGNITIVE_SCOPE = `${KnownFormRecognizerAudience.AzurePublicCloud}/.default`;\n\n/**\n * @internal\n */\nexport const SDK_VERSION = \"5.1.0\";\n\nexport const FORM_RECOGNIZER_API_VERSION = \"2023-07-31\";\n"]}
|
|
@@ -27,7 +27,7 @@ export class GeneratedClient extends coreClient.ServiceClient {
|
|
|
27
27
|
const defaults = {
|
|
28
28
|
requestContentType: "application/json; charset=utf-8"
|
|
29
29
|
};
|
|
30
|
-
const packageDetails = `azsdk-js-ai-form-recognizer/5.
|
|
30
|
+
const packageDetails = `azsdk-js-ai-form-recognizer/5.1.0`;
|
|
31
31
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
32
32
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
33
33
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAM9D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,OAAO,eAAgB,SAAQ,UAAU,CAAC,aAAa;IAK3D;;;;;OAKG;IACH,YAAY,QAAgB,EAAE,OAAuC;;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mCAAmC,CAAC;QAC3D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,2BAA2B,GACrE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G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAKF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n DocumentModelsImpl,\n MiscellaneousImpl,\n DocumentClassifiersImpl\n} from \"./operations/index.js\";\nimport {\n DocumentModels,\n Miscellaneous,\n DocumentClassifiers\n} from \"./operationsInterfaces/index.js\";\nimport { StringIndexType, GeneratedClientOptionalParams } from \"./models/index.js\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n endpoint: string;\n stringIndexType?: StringIndexType;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for\n * example: https://westus2.api.cognitive.microsoft.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-ai-form-recognizer/5.
|
|
1
|
+
{"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAM9D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAQ/B,MAAM,OAAO,eAAgB,SAAQ,UAAU,CAAC,aAAa;IAK3D;;;;;OAKG;IACH,YAAY,QAAgB,EAAE,OAAuC;;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mCAAmC,C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,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAKF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n DocumentModelsImpl,\n MiscellaneousImpl,\n DocumentClassifiersImpl\n} from \"./operations/index.js\";\nimport {\n DocumentModels,\n Miscellaneous,\n DocumentClassifiers\n} from \"./operationsInterfaces/index.js\";\nimport { StringIndexType, GeneratedClientOptionalParams } from \"./models/index.js\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n endpoint: string;\n stringIndexType?: StringIndexType;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for\n * example: https://westus2.api.cognitive.microsoft.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-ai-form-recognizer/5.1.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri:\n options.endpoint ?? options.baseUri ?? \"{endpoint}/formrecognizer\"\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-07-31\";\n this.documentModels = new DocumentModelsImpl(this);\n this.miscellaneous = new MiscellaneousImpl(this);\n this.documentClassifiers = new DocumentClassifiersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n documentModels: DocumentModels;\n miscellaneous: Miscellaneous;\n documentClassifiers: DocumentClassifiers;\n}\n"]}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export * from "./models/index.js";
|
|
|
14
14
|
export * from "./options/index.js";
|
|
15
15
|
export * from "./documentModel.js";
|
|
16
16
|
export { Point2D } from "./transforms/polygon.js";
|
|
17
|
+
export { KnownFormRecognizerAudience } from "./constants.js";
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAEL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,kCAAkC,EAClC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,yBAAyB,EACzB,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EAEZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,kCAAkC,EAClC,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,gCAAgC,EAChC,uCAAuC,GACxC,MAAM,yBAAyB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAEL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,kCAAkC,EAClC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,yBAAyB,EACzB,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EAEZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,kCAAkC,EAClC,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,gCAAgC,EAChC,uCAAuC,GACxC,MAAM,yBAAyB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/browser/index.js
CHANGED
|
@@ -15,4 +15,5 @@ KnownDocumentBuildMode, KnownDocumentFieldType, KnownDocumentBarcodeKind, KnownD
|
|
|
15
15
|
export * from "./models/index.js";
|
|
16
16
|
export * from "./options/index.js";
|
|
17
17
|
export * from "./documentModel.js";
|
|
18
|
+
export { KnownFormRecognizerAudience } from "./constants.js";
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO;AAwCL,iBAAiB;AACjB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAgB9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)\n * uses cloud-based machine learning to extract structured data from form documents.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { DocumentAnalysisClient } from \"./documentAnalysisClient.js\";\nexport { DocumentModelAdministrationClient } from \"./documentModelAdministrationClient.js\";\nexport {\n // Generated types used verbatim\n AddressValue,\n CopyAuthorization,\n CurrencyValue,\n DocumentTypeDetails,\n DocumentBuildMode,\n DocumentFieldSchema,\n DocumentFieldType,\n DocumentSignatureType,\n DocumentSpan,\n DocumentLanguage,\n DocumentStyle,\n FontStyle,\n FontWeight,\n DocumentTableCellKind,\n LengthUnit,\n DocumentModelDetails,\n DocumentModelSummary,\n OperationSummary,\n OperationKind,\n OperationStatus,\n ResourceDetails,\n CustomDocumentModelsDetails,\n AnalyzeResultOperationStatus,\n SelectionMarkState,\n ParagraphRole,\n OperationDetails,\n ErrorModel,\n InnerError,\n OperationDetailsUnion,\n DocumentModelBuildOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentClassifierBuildOperationDetails,\n DocumentClassifierDetails,\n ClassifierDocumentTypeDetails,\n DocumentBarcodeKind,\n DocumentFormulaKind,\n QuotaDetails,\n // KnownXYZ enums\n KnownDocumentBuildMode,\n KnownDocumentFieldType,\n KnownDocumentBarcodeKind,\n KnownDocumentFormulaKind,\n KnownDocumentSignatureType,\n KnownDocumentTableCellKind,\n KnownFontStyle,\n KnownFontWeight,\n KnownLengthUnit,\n KnownOperationKind,\n KnownParagraphRole,\n KnownSelectionMarkState,\n} from \"./generated/index.js\";\nexport {\n AnalysisPoller,\n AnalyzeResult,\n AnalyzeResultCommon,\n DocumentAnalysisPollOperationState,\n AnalyzedDocument,\n FormRecognizerRequestBody,\n} from \"./lro/analysis.js\";\nexport {\n DocumentModelPoller,\n DocumentClassifierPoller,\n DocumentModelOperationState,\n DocumentClassifierOperationState,\n ModelAdministrationOperationStateCommon,\n} from \"./lro/administration.js\";\nexport * from \"./models/index.js\";\nexport * from \"./options/index.js\";\nexport * from \"./documentModel.js\";\nexport { Point2D } from \"./transforms/polygon.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO;AAwCL,iBAAiB;AACjB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAgB9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAEnC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)\n * uses cloud-based machine learning to extract structured data from form documents.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { DocumentAnalysisClient } from \"./documentAnalysisClient.js\";\nexport { DocumentModelAdministrationClient } from \"./documentModelAdministrationClient.js\";\nexport {\n // Generated types used verbatim\n AddressValue,\n CopyAuthorization,\n CurrencyValue,\n DocumentTypeDetails,\n DocumentBuildMode,\n DocumentFieldSchema,\n DocumentFieldType,\n DocumentSignatureType,\n DocumentSpan,\n DocumentLanguage,\n DocumentStyle,\n FontStyle,\n FontWeight,\n DocumentTableCellKind,\n LengthUnit,\n DocumentModelDetails,\n DocumentModelSummary,\n OperationSummary,\n OperationKind,\n OperationStatus,\n ResourceDetails,\n CustomDocumentModelsDetails,\n AnalyzeResultOperationStatus,\n SelectionMarkState,\n ParagraphRole,\n OperationDetails,\n ErrorModel,\n InnerError,\n OperationDetailsUnion,\n DocumentModelBuildOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentClassifierBuildOperationDetails,\n DocumentClassifierDetails,\n ClassifierDocumentTypeDetails,\n DocumentBarcodeKind,\n DocumentFormulaKind,\n QuotaDetails,\n // KnownXYZ enums\n KnownDocumentBuildMode,\n KnownDocumentFieldType,\n KnownDocumentBarcodeKind,\n KnownDocumentFormulaKind,\n KnownDocumentSignatureType,\n KnownDocumentTableCellKind,\n KnownFontStyle,\n KnownFontWeight,\n KnownLengthUnit,\n KnownOperationKind,\n KnownParagraphRole,\n KnownSelectionMarkState,\n} from \"./generated/index.js\";\nexport {\n AnalysisPoller,\n AnalyzeResult,\n AnalyzeResultCommon,\n DocumentAnalysisPollOperationState,\n AnalyzedDocument,\n FormRecognizerRequestBody,\n} from \"./lro/analysis.js\";\nexport {\n DocumentModelPoller,\n DocumentClassifierPoller,\n DocumentModelOperationState,\n DocumentClassifierOperationState,\n ModelAdministrationOperationStateCommon,\n} from \"./lro/administration.js\";\nexport * from \"./models/index.js\";\nexport * from \"./options/index.js\";\nexport * from \"./documentModel.js\";\nexport { Point2D } from \"./transforms/polygon.js\";\nexport { KnownFormRecognizerAudience } from \"./constants.js\";\n"]}
|
|
@@ -37,10 +37,34 @@ export interface DocumentAnalysisClientOptions extends CommonClientOptions {
|
|
|
37
37
|
* Default: "utf16CodeUnit"
|
|
38
38
|
*/
|
|
39
39
|
stringIndexType?: StringIndexType;
|
|
40
|
+
/**
|
|
41
|
+
* The audience (scope) to use for authentication with Azure Active Directory.
|
|
42
|
+
*
|
|
43
|
+
* Setting this option is only necessary
|
|
44
|
+
* - if you are using Entra Id
|
|
45
|
+
* (and)
|
|
46
|
+
* - if you are using a cloud other than the `AzurePublicCloud` ("https://cognitiveservices.azure.com")
|
|
47
|
+
*
|
|
48
|
+
* The authentication scope will be set from this audience.
|
|
49
|
+
* See {@link KnownFormRecognizerAudience} for known audience values.
|
|
50
|
+
*/
|
|
51
|
+
audience?: string;
|
|
40
52
|
}
|
|
41
53
|
/**
|
|
42
54
|
* Configurable options for DocumentModelAdministrationClient.
|
|
43
55
|
*/
|
|
44
56
|
export interface DocumentModelAdministrationClientOptions extends CommonClientOptions {
|
|
57
|
+
/**
|
|
58
|
+
* The audience (scope) to use for authentication with Azure Active Directory.
|
|
59
|
+
*
|
|
60
|
+
* Setting this option is only necessary
|
|
61
|
+
* - if you are using Entra Id
|
|
62
|
+
* (and)
|
|
63
|
+
* - if you are using a cloud other than the `AzurePublicCloud` ("https://cognitiveservices.azure.com")
|
|
64
|
+
*
|
|
65
|
+
* The authentication scope will be set from this audience.
|
|
66
|
+
* See {@link KnownFormRecognizerAudience} for known audience values.
|
|
67
|
+
*/
|
|
68
|
+
audience?: string;
|
|
45
69
|
}
|
|
46
70
|
//# sourceMappingURL=FormRecognizerClientOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRecognizerClientOptions.d.ts","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;GAEG;AAEH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;CAEnC,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"FormRecognizerClientOptions.d.ts","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;GAEG;AAEH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;CAEnC,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,wCAAyC,SAAQ,mBAAmB;IACnF;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRecognizerClientOptions.js","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,aAAa,EAAE,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,eAAe,EAAE,eAAe,CAAC,aAAa;CACtC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions } from \"@azure/core-client\";\n\n/**\n * Valid string index types supported by the Form Recognizer service and SDK clients.\n */\nexport type StringIndexType = (typeof StringIndexType)[keyof typeof StringIndexType];\n\n/**\n * Supported values of StringIndexType.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const StringIndexType = {\n /**\n * UTF-16 code units\n */\n Utf16CodeUnit: \"utf16CodeUnit\",\n /**\n * Unicode code points\n */\n UnicodeCodePoint: \"unicodeCodePoint\",\n} as const;\n\n/**\n * Default settings for Form Recognizer clients.\n *\n * @internal\n */\nexport const DEFAULT_GENERATED_CLIENT_OPTIONS = {\n stringIndexType: StringIndexType.Utf16CodeUnit,\n} as const;\n\n/**\n * Configurable options for DocumentAnalysisClient.\n */\nexport interface DocumentAnalysisClientOptions extends CommonClientOptions {\n /**\n * The unit of string offset/length values that the service returns.\n *\n * In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need\n * Unicode code-point units instead.\n *\n * Default: \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Configurable options for DocumentModelAdministrationClient.\n */\nexport interface DocumentModelAdministrationClientOptions extends CommonClientOptions {}\n"]}
|
|
1
|
+
{"version":3,"file":"FormRecognizerClientOptions.js","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC;;GAEG;AACH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,aAAa,EAAE,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAEX;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,eAAe,EAAE,eAAe,CAAC,aAAa;CACtC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions } from \"@azure/core-client\";\n\n/**\n * Valid string index types supported by the Form Recognizer service and SDK clients.\n */\nexport type StringIndexType = (typeof StringIndexType)[keyof typeof StringIndexType];\n\n/**\n * Supported values of StringIndexType.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const StringIndexType = {\n /**\n * UTF-16 code units\n */\n Utf16CodeUnit: \"utf16CodeUnit\",\n /**\n * Unicode code points\n */\n UnicodeCodePoint: \"unicodeCodePoint\",\n} as const;\n\n/**\n * Default settings for Form Recognizer clients.\n *\n * @internal\n */\nexport const DEFAULT_GENERATED_CLIENT_OPTIONS = {\n stringIndexType: StringIndexType.Utf16CodeUnit,\n} as const;\n\n/**\n * Configurable options for DocumentAnalysisClient.\n */\nexport interface DocumentAnalysisClientOptions extends CommonClientOptions {\n /**\n * The unit of string offset/length values that the service returns.\n *\n * In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need\n * Unicode code-point units instead.\n *\n * Default: \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /**\n * The audience (scope) to use for authentication with Azure Active Directory.\n *\n * Setting this option is only necessary\n * - if you are using Entra Id\n * (and)\n * - if you are using a cloud other than the `AzurePublicCloud` (\"https://cognitiveservices.azure.com\")\n *\n * The authentication scope will be set from this audience.\n * See {@link KnownFormRecognizerAudience} for known audience values.\n */\n audience?: string;\n}\n\n/**\n * Configurable options for DocumentModelAdministrationClient.\n */\nexport interface DocumentModelAdministrationClientOptions extends CommonClientOptions {\n /**\n * The audience (scope) to use for authentication with Azure Active Directory.\n *\n * Setting this option is only necessary\n * - if you are using Entra Id\n * (and)\n * - if you are using a cloud other than the `AzurePublicCloud` (\"https://cognitiveservices.azure.com\")\n *\n * The authentication scope will be set from this audience.\n * See {@link KnownFormRecognizerAudience} for known audience values.\n */\n audience?: string;\n}\n"]}
|
package/dist/browser/util.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { KeyCredential, TokenCredential } from "@azure/core-auth";
|
|
2
2
|
import type { GeneratedClientOptionalParams } from "./generated/index.js";
|
|
3
3
|
import { GeneratedClient } from "./generated/index.js";
|
|
4
|
+
import { type DocumentAnalysisClientOptions } from "./options/FormRecognizerClientOptions.js";
|
|
4
5
|
import * as Mappers from "./generated/models/mappers.js";
|
|
5
6
|
export { Mappers };
|
|
6
7
|
export declare const SERIALIZER: import("@azure/core-client").Serializer;
|
|
@@ -28,5 +29,5 @@ export declare const maybemap: <T1, T2>(value: T1 | undefined, f: (v: T1) => T2)
|
|
|
28
29
|
* Create a GeneratedClient.
|
|
29
30
|
* @internal
|
|
30
31
|
*/
|
|
31
|
-
export declare function makeServiceClient(endpoint: string, credential: KeyCredential | TokenCredential, options: GeneratedClientOptionalParams): GeneratedClient;
|
|
32
|
+
export declare function makeServiceClient(endpoint: string, credential: KeyCredential | TokenCredential, options: GeneratedClientOptionalParams & Pick<DocumentAnalysisClientOptions, "audience">): GeneratedClient;
|
|
32
33
|
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKvE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAKvE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,OAAO,MAAM,+BAA+B,CAAC;AAEzD,OAAO,EAAE,OAAO,EAAE,CAAC;AAGnB,eAAO,MAAM,UAAU,yCAAmC,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,YAAY,CAAC,CAAC,CACX,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,KAAG,UAAU,CAAC,CAAC,CACJ,CAAC;AAEtE;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,MAAM,KAAG,OAEvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,KAAG,EAAE,GAAG,SACpC,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,aAAa,GAAG,eAAe,EAC3C,OAAO,EAAE,6BAA6B,GAAG,IAAI,CAAC,6BAA6B,EAAE,UAAU,CAAC,GACvF,eAAe,CAoBjB"}
|
package/dist/browser/util.js
CHANGED
|
@@ -5,7 +5,7 @@ import { bearerTokenAuthenticationPolicy } from "@azure/core-rest-pipeline";
|
|
|
5
5
|
import { createFormRecognizerAzureKeyCredentialPolicy } from "./azureKeyCredentialPolicy.js";
|
|
6
6
|
import { DEFAULT_COGNITIVE_SCOPE, FORM_RECOGNIZER_API_VERSION } from "./constants.js";
|
|
7
7
|
import { GeneratedClient } from "./generated/index.js";
|
|
8
|
-
import { DEFAULT_GENERATED_CLIENT_OPTIONS } from "./options/FormRecognizerClientOptions.js";
|
|
8
|
+
import { DEFAULT_GENERATED_CLIENT_OPTIONS, } from "./options/FormRecognizerClientOptions.js";
|
|
9
9
|
import * as Mappers from "./generated/models/mappers.js";
|
|
10
10
|
import { createSerializer } from "@azure/core-client";
|
|
11
11
|
export { Mappers };
|
|
@@ -38,11 +38,16 @@ export const maybemap = (value, f) => value === undefined ? undefined : f(value)
|
|
|
38
38
|
* @internal
|
|
39
39
|
*/
|
|
40
40
|
export function makeServiceClient(endpoint, credential, options) {
|
|
41
|
+
var _a;
|
|
41
42
|
const client = new GeneratedClient(endpoint === null || endpoint === void 0 ? void 0 : endpoint.replace(/\/$/, ""), Object.assign(Object.assign(Object.assign({}, DEFAULT_GENERATED_CLIENT_OPTIONS), options), { apiVersion: FORM_RECOGNIZER_API_VERSION }));
|
|
42
43
|
const authPolicy = isTokenCredential(credential)
|
|
43
44
|
? bearerTokenAuthenticationPolicy({
|
|
44
45
|
credential,
|
|
45
|
-
scopes: DEFAULT_COGNITIVE_SCOPE
|
|
46
|
+
scopes: [(_a = options.audience) !== null && _a !== void 0 ? _a : DEFAULT_COGNITIVE_SCOPE].map((scope) => {
|
|
47
|
+
if (scope.endsWith("/.default"))
|
|
48
|
+
return scope;
|
|
49
|
+
return `${scope}/.default`;
|
|
50
|
+
}),
|
|
46
51
|
})
|
|
47
52
|
: createFormRecognizerAzureKeyCredentialPolicy(credential);
|
|
48
53
|
client.pipeline.addPolicy(authPolicy);
|
package/dist/browser/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,4CAA4C,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC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CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAS,KAAqB,EAAE,CAAgB,EAAkB,EAAE,CAC1F,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAE7C;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,QAAgB,EAChB,UAA2C,EAC3C,OAAwF;;IAExF,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,gDAC1D,gCAAgC,GAChC,OAAO,KACV,UAAU,EAAE,2BAA2B,IACvC,CAAC;IAEH,MAAM,UAAU,GAAG,iBAAiB,CAAC,UAAU,CAAC;QAC9C,CAAC,CAAC,+BAA+B,CAAC;YAC9B,UAAU;YACV,MAAM,EAAE,CAAC,MAAA,OAAO,CAAC,QAAQ,mCAAI,uBAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBAClE,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC;oBAAE,OAAO,KAAK,CAAC;gBAC9C,OAAO,GAAG,KAAK,WAAW,CAAC;YAC7B,CAAC,CAAC;SACH,CAAC;QACJ,CAAC,CAAC,4CAA4C,CAAC,UAAU,CAAC,CAAC;IAE7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { createFormRecognizerAzureKeyCredentialPolicy } from \"./azureKeyCredentialPolicy.js\";\nimport { DEFAULT_COGNITIVE_SCOPE, FORM_RECOGNIZER_API_VERSION } from \"./constants.js\";\nimport type { GeneratedClientOptionalParams } from \"./generated/index.js\";\nimport { GeneratedClient } from \"./generated/index.js\";\nimport {\n DEFAULT_GENERATED_CLIENT_OPTIONS,\n type DocumentAnalysisClientOptions,\n} from \"./options/FormRecognizerClientOptions.js\";\n\nimport * as Mappers from \"./generated/models/mappers.js\";\nimport { createSerializer } from \"@azure/core-client\";\nexport { Mappers };\n\n// This is used for URL request processing.\nexport const SERIALIZER = createSerializer(Mappers, false);\n\n/**\n * Type-strong uncapitalization.\n * @internal\n */\nexport const uncapitalize = <S extends string = string>(s: string): Uncapitalize<S> =>\n (s.substring(0, 1).toLowerCase() + s.substring(1)) as Uncapitalize<S>;\n\n/**\n * Type-strong capitalization\n * @internal\n */\nexport const capitalize = <S extends string = string>(s: S): Capitalize<S> =>\n (s.substring(0, 1).toUpperCase() + s.substring(1)) as Capitalize<S>;\n\n/**\n * Tests if a string looks like it begins with an acronym, i.e. it starts with two capital letters.\n * @internal\n */\nexport const isAcronymic = (s: string): boolean => {\n return /^[A-Z][A-Z]/.test(s);\n};\n\n/**\n * Map an optional value through a function\n * @internal\n */\nexport const maybemap = <T1, T2>(value: T1 | undefined, f: (v: T1) => T2): T2 | undefined =>\n value === undefined ? undefined : f(value);\n\n/**\n * Create a GeneratedClient.\n * @internal\n */\nexport function makeServiceClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options: GeneratedClientOptionalParams & Pick<DocumentAnalysisClientOptions, \"audience\">,\n): GeneratedClient {\n const client = new GeneratedClient(endpoint?.replace(/\\/$/, \"\"), {\n ...DEFAULT_GENERATED_CLIENT_OPTIONS,\n ...options,\n apiVersion: FORM_RECOGNIZER_API_VERSION,\n });\n\n const authPolicy = isTokenCredential(credential)\n ? bearerTokenAuthenticationPolicy({\n credential,\n scopes: [options.audience ?? DEFAULT_COGNITIVE_SCOPE].map((scope) => {\n if (scope.endsWith(\"/.default\")) return scope;\n return `${scope}/.default`;\n }),\n })\n : createFormRecognizerAzureKeyCredentialPolicy(credential);\n\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Defines the known cloud audiences for Form Recognizer.
|
|
3
|
+
*
|
|
4
|
+
* To authenticate with Entra Id (using a `TokenCredential`) in a [Sovereign Cloud](https://learn.microsoft.com/entra/identity-platform/authentication-national-cloud)
|
|
5
|
+
* environment, provide the appropriate value below as the `audience` option when creating a
|
|
6
|
+
* `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.
|
|
7
|
+
*
|
|
8
|
+
* The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value
|
|
9
|
+
* is only required to use Form Recognizer in a different cloud environment.
|
|
10
|
+
*/
|
|
11
|
+
export declare enum KnownFormRecognizerAudience {
|
|
12
|
+
/** Azure China */
|
|
13
|
+
AzureChina = "https://cognitiveservices.azure.cn",
|
|
14
|
+
/** Azure Government */
|
|
15
|
+
AzureGovernment = "https://cognitiveservices.azure.us",
|
|
16
|
+
/** Azure Public Cloud */
|
|
17
|
+
AzurePublicCloud = "https://cognitiveservices.azure.com"
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The default Entra Id permissions scope for Cognitive Services.
|
|
3
21
|
* @internal
|
|
4
22
|
*/
|
|
5
23
|
export declare const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
|
|
6
24
|
/**
|
|
7
25
|
* @internal
|
|
8
26
|
*/
|
|
9
|
-
export declare const SDK_VERSION = "5.
|
|
27
|
+
export declare const SDK_VERSION = "5.1.0";
|
|
10
28
|
export declare const FORM_RECOGNIZER_API_VERSION = "2023-07-31";
|
|
11
29
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,oBAAY,2BAA2B;IACrC,kBAAkB;IAClB,UAAU,uCAAuC;IACjD,uBAAuB;IACvB,eAAe,uCAAuC;IACtD,yBAAyB;IACzB,gBAAgB,wCAAwC;CACzD;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iDAA6D,CAAC;AAElG;;GAEG;AACH,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,eAAO,MAAM,2BAA2B,eAAe,CAAC"}
|
|
@@ -2,15 +2,34 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.FORM_RECOGNIZER_API_VERSION = exports.SDK_VERSION = exports.DEFAULT_COGNITIVE_SCOPE = void 0;
|
|
5
|
+
exports.FORM_RECOGNIZER_API_VERSION = exports.SDK_VERSION = exports.DEFAULT_COGNITIVE_SCOPE = exports.KnownFormRecognizerAudience = void 0;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Defines the known cloud audiences for Form Recognizer.
|
|
8
|
+
*
|
|
9
|
+
* To authenticate with Entra Id (using a `TokenCredential`) in a [Sovereign Cloud](https://learn.microsoft.com/entra/identity-platform/authentication-national-cloud)
|
|
10
|
+
* environment, provide the appropriate value below as the `audience` option when creating a
|
|
11
|
+
* `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.
|
|
12
|
+
*
|
|
13
|
+
* The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value
|
|
14
|
+
* is only required to use Form Recognizer in a different cloud environment.
|
|
15
|
+
*/
|
|
16
|
+
var KnownFormRecognizerAudience;
|
|
17
|
+
(function (KnownFormRecognizerAudience) {
|
|
18
|
+
/** Azure China */
|
|
19
|
+
KnownFormRecognizerAudience["AzureChina"] = "https://cognitiveservices.azure.cn";
|
|
20
|
+
/** Azure Government */
|
|
21
|
+
KnownFormRecognizerAudience["AzureGovernment"] = "https://cognitiveservices.azure.us";
|
|
22
|
+
/** Azure Public Cloud */
|
|
23
|
+
KnownFormRecognizerAudience["AzurePublicCloud"] = "https://cognitiveservices.azure.com";
|
|
24
|
+
})(KnownFormRecognizerAudience || (exports.KnownFormRecognizerAudience = KnownFormRecognizerAudience = {}));
|
|
25
|
+
/**
|
|
26
|
+
* The default Entra Id permissions scope for Cognitive Services.
|
|
8
27
|
* @internal
|
|
9
28
|
*/
|
|
10
|
-
exports.DEFAULT_COGNITIVE_SCOPE =
|
|
29
|
+
exports.DEFAULT_COGNITIVE_SCOPE = `${KnownFormRecognizerAudience.AzurePublicCloud}/.default`;
|
|
11
30
|
/**
|
|
12
31
|
* @internal
|
|
13
32
|
*/
|
|
14
|
-
exports.SDK_VERSION = "5.
|
|
33
|
+
exports.SDK_VERSION = "5.1.0";
|
|
15
34
|
exports.FORM_RECOGNIZER_API_VERSION = "2023-07-31";
|
|
16
35
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;GAGG;AACU,QAAA,uBAAuB,GAAG,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;;;;;;;GASG;AACH,IAAY,2BAOX;AAPD,WAAY,2BAA2B;IACrC,kBAAkB;IAClB,gFAAiD,CAAA;IACjD,uBAAuB;IACvB,qFAAsD,CAAA;IACtD,yBAAyB;IACzB,uFAAwD,CAAA;AAC1D,CAAC,EAPW,2BAA2B,2CAA3B,2BAA2B,QAOtC;AAED;;;GAGG;AACU,QAAA,uBAAuB,GAAG,GAAG,2BAA2B,CAAC,gBAAgB,WAAW,CAAC;AAElG;;GAEG;AACU,QAAA,WAAW,GAAG,OAAO,CAAC;AAEtB,QAAA,2BAA2B,GAAG,YAAY,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Defines the known cloud audiences for Form Recognizer.\n *\n * To authenticate with Entra Id (using a `TokenCredential`) in a [Sovereign Cloud](https://learn.microsoft.com/entra/identity-platform/authentication-national-cloud)\n * environment, provide the appropriate value below as the `audience` option when creating a\n * `DocumentAnalysisClient` or `DocumentModelAdministrationClient`.\n *\n * The default value is suitable for Form Recognizer resources created in the Azure Public Cloud, so this value\n * is only required to use Form Recognizer in a different cloud environment.\n */\nexport enum KnownFormRecognizerAudience {\n /** Azure China */\n AzureChina = \"https://cognitiveservices.azure.cn\",\n /** Azure Government */\n AzureGovernment = \"https://cognitiveservices.azure.us\",\n /** Azure Public Cloud */\n AzurePublicCloud = \"https://cognitiveservices.azure.com\",\n}\n\n/**\n * The default Entra Id permissions scope for Cognitive Services.\n * @internal\n */\nexport const DEFAULT_COGNITIVE_SCOPE = `${KnownFormRecognizerAudience.AzurePublicCloud}/.default`;\n\n/**\n * @internal\n */\nexport const SDK_VERSION = \"5.1.0\";\n\nexport const FORM_RECOGNIZER_API_VERSION = \"2023-07-31\";\n"]}
|
|
@@ -31,7 +31,7 @@ class GeneratedClient extends coreClient.ServiceClient {
|
|
|
31
31
|
const defaults = {
|
|
32
32
|
requestContentType: "application/json; charset=utf-8"
|
|
33
33
|
};
|
|
34
|
-
const packageDetails = `azsdk-js-ai-form-recognizer/5.
|
|
34
|
+
const packageDetails = `azsdk-js-ai-form-recognizer/5.1.0`;
|
|
35
35
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
36
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
37
|
: `${packageDetails}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClient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rB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAKF;AAzGD,0CAyGC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n DocumentModelsImpl,\n MiscellaneousImpl,\n DocumentClassifiersImpl\n} from \"./operations/index.js\";\nimport {\n DocumentModels,\n Miscellaneous,\n DocumentClassifiers\n} from \"./operationsInterfaces/index.js\";\nimport { StringIndexType, GeneratedClientOptionalParams } from \"./models/index.js\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n endpoint: string;\n stringIndexType?: StringIndexType;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for\n * example: https://westus2.api.cognitive.microsoft.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-ai-form-recognizer/5.
|
|
1
|
+
{"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAM9D,oDAI+B;AAQ/B,MAAa,eAAgB,SAAQ,UAAU,CAAC,aAAa;IAK3D;;;;;OAKG;IACH,YAAY,QAAgB,EAAE,OAAuC;;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mCAAmC,CAAC;QAC3D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EACL,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,2BAA2B,GACrE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,CAAA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AC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAKF;AAzGD,0CAyGC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport {\n DocumentModelsImpl,\n MiscellaneousImpl,\n DocumentClassifiersImpl\n} from \"./operations/index.js\";\nimport {\n DocumentModels,\n Miscellaneous,\n DocumentClassifiers\n} from \"./operationsInterfaces/index.js\";\nimport { StringIndexType, GeneratedClientOptionalParams } from \"./models/index.js\";\n\nexport class GeneratedClient extends coreClient.ServiceClient {\n endpoint: string;\n stringIndexType?: StringIndexType;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for\n * example: https://westus2.api.cognitive.microsoft.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-ai-form-recognizer/5.1.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri:\n options.endpoint ?? options.baseUri ?? \"{endpoint}/formrecognizer\"\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-07-31\";\n this.documentModels = new DocumentModelsImpl(this);\n this.miscellaneous = new MiscellaneousImpl(this);\n this.documentClassifiers = new DocumentClassifiersImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n documentModels: DocumentModels;\n miscellaneous: Miscellaneous;\n documentClassifiers: DocumentClassifiers;\n}\n"]}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ export * from "./models/index.js";
|
|
|
14
14
|
export * from "./options/index.js";
|
|
15
15
|
export * from "./documentModel.js";
|
|
16
16
|
export { Point2D } from "./transforms/polygon.js";
|
|
17
|
+
export { KnownFormRecognizerAudience } from "./constants.js";
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAEL,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,qBAAqB,EACrB,kCAAkC,EAClC,oCAAoC,EACpC,mCAAmC,EACnC,uCAAuC,EACvC,yBAAyB,EACzB,6BAA6B,EAC7B,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EAEZ,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,cAAc,EACd,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,kCAAkC,EAClC,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,gCAAgC,EAChC,uCAAuC,GACxC,MAAM,yBAAyB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,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@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT License.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.KnownSelectionMarkState = exports.KnownParagraphRole = exports.KnownOperationKind = exports.KnownLengthUnit = exports.KnownFontWeight = exports.KnownFontStyle = exports.KnownDocumentTableCellKind = exports.KnownDocumentSignatureType = exports.KnownDocumentFormulaKind = exports.KnownDocumentBarcodeKind = exports.KnownDocumentFieldType = exports.KnownDocumentBuildMode = exports.DocumentModelAdministrationClient = exports.DocumentAnalysisClient = exports.AzureKeyCredential = void 0;
|
|
5
|
+
exports.KnownFormRecognizerAudience = exports.KnownSelectionMarkState = exports.KnownParagraphRole = exports.KnownOperationKind = exports.KnownLengthUnit = exports.KnownFontWeight = exports.KnownFontStyle = exports.KnownDocumentTableCellKind = exports.KnownDocumentSignatureType = exports.KnownDocumentFormulaKind = exports.KnownDocumentBarcodeKind = exports.KnownDocumentFieldType = exports.KnownDocumentBuildMode = exports.DocumentModelAdministrationClient = exports.DocumentAnalysisClient = exports.AzureKeyCredential = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
/**
|
|
8
8
|
* Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)
|
|
@@ -33,4 +33,6 @@ Object.defineProperty(exports, "KnownSelectionMarkState", { enumerable: true, ge
|
|
|
33
33
|
tslib_1.__exportStar(require("./models/index.js"), exports);
|
|
34
34
|
tslib_1.__exportStar(require("./options/index.js"), exports);
|
|
35
35
|
tslib_1.__exportStar(require("./documentModel.js"), exports);
|
|
36
|
+
var constants_js_1 = require("./constants.js");
|
|
37
|
+
Object.defineProperty(exports, "KnownFormRecognizerAudience", { enumerable: true, get: function () { return constants_js_1.KnownFormRecognizerAudience; } });
|
|
36
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;;;;GAKG;AAEH,8CAAsD;AAA7C,+GAAA,kBAAkB,OAAA;AAC3B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,+FAA2F;AAAlF,yJAAA,iCAAiC,OAAA;AAC1C,iDAqD8B;AAb5B,iBAAiB;AACjB,kHAAA,sBAAsB,OAAA;AACtB,kHAAA,sBAAsB,OAAA;AACtB,oHAAA,wBAAwB,OAAA;AACxB,oHAAA,wBAAwB,OAAA;AACxB,sHAAA,0BAA0B,OAAA;AAC1B,sHAAA,0BAA0B,OAAA;AAC1B,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,mHAAA,uBAAuB,OAAA;AAiBzB,4DAAkC;AAClC,6DAAmC;AACnC,6DAAmC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)\n * uses cloud-based machine learning to extract structured data from form documents.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { DocumentAnalysisClient } from \"./documentAnalysisClient.js\";\nexport { DocumentModelAdministrationClient } from \"./documentModelAdministrationClient.js\";\nexport {\n // Generated types used verbatim\n AddressValue,\n CopyAuthorization,\n CurrencyValue,\n DocumentTypeDetails,\n DocumentBuildMode,\n DocumentFieldSchema,\n DocumentFieldType,\n DocumentSignatureType,\n DocumentSpan,\n DocumentLanguage,\n DocumentStyle,\n FontStyle,\n FontWeight,\n DocumentTableCellKind,\n LengthUnit,\n DocumentModelDetails,\n DocumentModelSummary,\n OperationSummary,\n OperationKind,\n OperationStatus,\n ResourceDetails,\n CustomDocumentModelsDetails,\n AnalyzeResultOperationStatus,\n SelectionMarkState,\n ParagraphRole,\n OperationDetails,\n ErrorModel,\n InnerError,\n OperationDetailsUnion,\n DocumentModelBuildOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentClassifierBuildOperationDetails,\n DocumentClassifierDetails,\n ClassifierDocumentTypeDetails,\n DocumentBarcodeKind,\n DocumentFormulaKind,\n QuotaDetails,\n // KnownXYZ enums\n KnownDocumentBuildMode,\n KnownDocumentFieldType,\n KnownDocumentBarcodeKind,\n KnownDocumentFormulaKind,\n KnownDocumentSignatureType,\n KnownDocumentTableCellKind,\n KnownFontStyle,\n KnownFontWeight,\n KnownLengthUnit,\n KnownOperationKind,\n KnownParagraphRole,\n KnownSelectionMarkState,\n} from \"./generated/index.js\";\nexport {\n AnalysisPoller,\n AnalyzeResult,\n AnalyzeResultCommon,\n DocumentAnalysisPollOperationState,\n AnalyzedDocument,\n FormRecognizerRequestBody,\n} from \"./lro/analysis.js\";\nexport {\n DocumentModelPoller,\n DocumentClassifierPoller,\n DocumentModelOperationState,\n DocumentClassifierOperationState,\n ModelAdministrationOperationStateCommon,\n} from \"./lro/administration.js\";\nexport * from \"./models/index.js\";\nexport * from \"./options/index.js\";\nexport * from \"./documentModel.js\";\nexport { Point2D } from \"./transforms/polygon.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;;;;GAKG;AAEH,8CAAsD;AAA7C,+GAAA,kBAAkB,OAAA;AAC3B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,+FAA2F;AAAlF,yJAAA,iCAAiC,OAAA;AAC1C,iDAqD8B;AAb5B,iBAAiB;AACjB,kHAAA,sBAAsB,OAAA;AACtB,kHAAA,sBAAsB,OAAA;AACtB,oHAAA,wBAAwB,OAAA;AACxB,oHAAA,wBAAwB,OAAA;AACxB,sHAAA,0BAA0B,OAAA;AAC1B,sHAAA,0BAA0B,OAAA;AAC1B,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,mHAAA,uBAAuB,OAAA;AAiBzB,4DAAkC;AAClC,6DAAmC;AACnC,6DAAmC;AAEnC,+CAA6D;AAApD,2HAAA,2BAA2B,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Azure Cognitive Services [Form Recognizer](https://azure.microsoft.com/services/cognitive-services/form-recognizer/)\n * uses cloud-based machine learning to extract structured data from form documents.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\nexport { DocumentAnalysisClient } from \"./documentAnalysisClient.js\";\nexport { DocumentModelAdministrationClient } from \"./documentModelAdministrationClient.js\";\nexport {\n // Generated types used verbatim\n AddressValue,\n CopyAuthorization,\n CurrencyValue,\n DocumentTypeDetails,\n DocumentBuildMode,\n DocumentFieldSchema,\n DocumentFieldType,\n DocumentSignatureType,\n DocumentSpan,\n DocumentLanguage,\n DocumentStyle,\n FontStyle,\n FontWeight,\n DocumentTableCellKind,\n LengthUnit,\n DocumentModelDetails,\n DocumentModelSummary,\n OperationSummary,\n OperationKind,\n OperationStatus,\n ResourceDetails,\n CustomDocumentModelsDetails,\n AnalyzeResultOperationStatus,\n SelectionMarkState,\n ParagraphRole,\n OperationDetails,\n ErrorModel,\n InnerError,\n OperationDetailsUnion,\n DocumentModelBuildOperationDetails,\n DocumentModelComposeOperationDetails,\n DocumentModelCopyToOperationDetails,\n DocumentClassifierBuildOperationDetails,\n DocumentClassifierDetails,\n ClassifierDocumentTypeDetails,\n DocumentBarcodeKind,\n DocumentFormulaKind,\n QuotaDetails,\n // KnownXYZ enums\n KnownDocumentBuildMode,\n KnownDocumentFieldType,\n KnownDocumentBarcodeKind,\n KnownDocumentFormulaKind,\n KnownDocumentSignatureType,\n KnownDocumentTableCellKind,\n KnownFontStyle,\n KnownFontWeight,\n KnownLengthUnit,\n KnownOperationKind,\n KnownParagraphRole,\n KnownSelectionMarkState,\n} from \"./generated/index.js\";\nexport {\n AnalysisPoller,\n AnalyzeResult,\n AnalyzeResultCommon,\n DocumentAnalysisPollOperationState,\n AnalyzedDocument,\n FormRecognizerRequestBody,\n} from \"./lro/analysis.js\";\nexport {\n DocumentModelPoller,\n DocumentClassifierPoller,\n DocumentModelOperationState,\n DocumentClassifierOperationState,\n ModelAdministrationOperationStateCommon,\n} from \"./lro/administration.js\";\nexport * from \"./models/index.js\";\nexport * from \"./options/index.js\";\nexport * from \"./documentModel.js\";\nexport { Point2D } from \"./transforms/polygon.js\";\nexport { KnownFormRecognizerAudience } from \"./constants.js\";\n"]}
|
|
@@ -37,10 +37,34 @@ export interface DocumentAnalysisClientOptions extends CommonClientOptions {
|
|
|
37
37
|
* Default: "utf16CodeUnit"
|
|
38
38
|
*/
|
|
39
39
|
stringIndexType?: StringIndexType;
|
|
40
|
+
/**
|
|
41
|
+
* The audience (scope) to use for authentication with Azure Active Directory.
|
|
42
|
+
*
|
|
43
|
+
* Setting this option is only necessary
|
|
44
|
+
* - if you are using Entra Id
|
|
45
|
+
* (and)
|
|
46
|
+
* - if you are using a cloud other than the `AzurePublicCloud` ("https://cognitiveservices.azure.com")
|
|
47
|
+
*
|
|
48
|
+
* The authentication scope will be set from this audience.
|
|
49
|
+
* See {@link KnownFormRecognizerAudience} for known audience values.
|
|
50
|
+
*/
|
|
51
|
+
audience?: string;
|
|
40
52
|
}
|
|
41
53
|
/**
|
|
42
54
|
* Configurable options for DocumentModelAdministrationClient.
|
|
43
55
|
*/
|
|
44
56
|
export interface DocumentModelAdministrationClientOptions extends CommonClientOptions {
|
|
57
|
+
/**
|
|
58
|
+
* The audience (scope) to use for authentication with Azure Active Directory.
|
|
59
|
+
*
|
|
60
|
+
* Setting this option is only necessary
|
|
61
|
+
* - if you are using Entra Id
|
|
62
|
+
* (and)
|
|
63
|
+
* - if you are using a cloud other than the `AzurePublicCloud` ("https://cognitiveservices.azure.com")
|
|
64
|
+
*
|
|
65
|
+
* The authentication scope will be set from this audience.
|
|
66
|
+
* See {@link KnownFormRecognizerAudience} for known audience values.
|
|
67
|
+
*/
|
|
68
|
+
audience?: string;
|
|
45
69
|
}
|
|
46
70
|
//# sourceMappingURL=FormRecognizerClientOptions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRecognizerClientOptions.d.ts","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;GAEG;AAEH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;CAEnC,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"FormRecognizerClientOptions.d.ts","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAErF;;GAEG;AAEH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,gCAAgC;;CAEnC,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,wCAAyC,SAAQ,mBAAmB;IACnF;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRecognizerClientOptions.js","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AASlC;;GAEG;AACH,2DAA2D;AAC9C,QAAA,eAAe,GAAG;IAC7B;;OAEG;IACH,aAAa,EAAE,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAEX;;;;GAIG;AACU,QAAA,gCAAgC,GAAG;IAC9C,eAAe,EAAE,uBAAe,CAAC,aAAa;CACtC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions } from \"@azure/core-client\";\n\n/**\n * Valid string index types supported by the Form Recognizer service and SDK clients.\n */\nexport type StringIndexType = (typeof StringIndexType)[keyof typeof StringIndexType];\n\n/**\n * Supported values of StringIndexType.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const StringIndexType = {\n /**\n * UTF-16 code units\n */\n Utf16CodeUnit: \"utf16CodeUnit\",\n /**\n * Unicode code points\n */\n UnicodeCodePoint: \"unicodeCodePoint\",\n} as const;\n\n/**\n * Default settings for Form Recognizer clients.\n *\n * @internal\n */\nexport const DEFAULT_GENERATED_CLIENT_OPTIONS = {\n stringIndexType: StringIndexType.Utf16CodeUnit,\n} as const;\n\n/**\n * Configurable options for DocumentAnalysisClient.\n */\nexport interface DocumentAnalysisClientOptions extends CommonClientOptions {\n /**\n * The unit of string offset/length values that the service returns.\n *\n * In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need\n * Unicode code-point units instead.\n *\n * Default: \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Configurable options for DocumentModelAdministrationClient.\n */\nexport interface DocumentModelAdministrationClientOptions extends CommonClientOptions {}\n"]}
|
|
1
|
+
{"version":3,"file":"FormRecognizerClientOptions.js","sourceRoot":"","sources":["../../../src/options/FormRecognizerClientOptions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AASlC;;GAEG;AACH,2DAA2D;AAC9C,QAAA,eAAe,GAAG;IAC7B;;OAEG;IACH,aAAa,EAAE,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC5B,CAAC;AAEX;;;;GAIG;AACU,QAAA,gCAAgC,GAAG;IAC9C,eAAe,EAAE,uBAAe,CAAC,aAAa;CACtC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions } from \"@azure/core-client\";\n\n/**\n * Valid string index types supported by the Form Recognizer service and SDK clients.\n */\nexport type StringIndexType = (typeof StringIndexType)[keyof typeof StringIndexType];\n\n/**\n * Supported values of StringIndexType.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport const StringIndexType = {\n /**\n * UTF-16 code units\n */\n Utf16CodeUnit: \"utf16CodeUnit\",\n /**\n * Unicode code points\n */\n UnicodeCodePoint: \"unicodeCodePoint\",\n} as const;\n\n/**\n * Default settings for Form Recognizer clients.\n *\n * @internal\n */\nexport const DEFAULT_GENERATED_CLIENT_OPTIONS = {\n stringIndexType: StringIndexType.Utf16CodeUnit,\n} as const;\n\n/**\n * Configurable options for DocumentAnalysisClient.\n */\nexport interface DocumentAnalysisClientOptions extends CommonClientOptions {\n /**\n * The unit of string offset/length values that the service returns.\n *\n * In JavaScript, strings are indexed by UTF-16 code units. Do _NOT_ set this value unless you are certain you need\n * Unicode code-point units instead.\n *\n * Default: \"utf16CodeUnit\"\n */\n stringIndexType?: StringIndexType;\n /**\n * The audience (scope) to use for authentication with Azure Active Directory.\n *\n * Setting this option is only necessary\n * - if you are using Entra Id\n * (and)\n * - if you are using a cloud other than the `AzurePublicCloud` (\"https://cognitiveservices.azure.com\")\n *\n * The authentication scope will be set from this audience.\n * See {@link KnownFormRecognizerAudience} for known audience values.\n */\n audience?: string;\n}\n\n/**\n * Configurable options for DocumentModelAdministrationClient.\n */\nexport interface DocumentModelAdministrationClientOptions extends CommonClientOptions {\n /**\n * The audience (scope) to use for authentication with Azure Active Directory.\n *\n * Setting this option is only necessary\n * - if you are using Entra Id\n * (and)\n * - if you are using a cloud other than the `AzurePublicCloud` (\"https://cognitiveservices.azure.com\")\n *\n * The authentication scope will be set from this audience.\n * See {@link KnownFormRecognizerAudience} for known audience values.\n */\n audience?: string;\n}\n"]}
|