@aws-sdk/client-textract 3.42.0 → 3.47.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 +50 -0
- package/dist-cjs/Textract.js +15 -0
- package/dist-cjs/commands/AnalyzeIDCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/endpoints.js +1 -28
- package/dist-cjs/models/models_0.js +42 -86
- package/dist-cjs/protocols/Aws_json1_1.js +204 -1
- package/dist-cjs/runtimeConfig.browser.js +7 -2
- package/dist-cjs/runtimeConfig.js +9 -3
- package/dist-es/Textract.js +15 -0
- package/dist-es/commands/AnalyzeIDCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoints.js +1 -28
- package/dist-es/models/models_0.js +28 -56
- package/dist-es/protocols/Aws_json1_1.js +211 -0
- package/dist-es/runtimeConfig.browser.js +12 -3
- package/dist-es/runtimeConfig.js +13 -6
- package/dist-types/Textract.d.ts +11 -1
- package/dist-types/TextractClient.d.ts +8 -3
- package/dist-types/commands/AnalyzeExpenseCommand.d.ts +2 -1
- package/dist-types/commands/AnalyzeIDCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +123 -86
- package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
- package/dist-types/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/runtimeConfig.d.ts +4 -3
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/ts3.4/Textract.d.ts +5 -0
- package/dist-types/ts3.4/TextractClient.d.ts +6 -3
- package/dist-types/ts3.4/commands/AnalyzeIDCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +69 -56
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
- package/package.json +38 -45
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,56 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.47.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.46.0...v3.47.0) (2022-01-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update clients to use default values inferred from defaults mode ([#3192](https://github.com/aws/aws-sdk-js-v3/issues/3192)) ([9152e21](https://github.com/aws/aws-sdk-js-v3/commit/9152e210c6ec29f34bb070eaf2874039022e6ab7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.46.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.45.0...v3.46.0) (2022-01-07)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **clients:** update clean:dist script to delete dist-* folder ([#3155](https://github.com/aws/aws-sdk-js-v3/issues/3155)) ([cdb1709](https://github.com/aws/aws-sdk-js-v3/commit/cdb17090f82d1fc8755811c82cbed5976ec7e60b))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **clients:** extend typedoc.json from root ([#3136](https://github.com/aws/aws-sdk-js-v3/issues/3136)) ([f6a3ef5](https://github.com/aws/aws-sdk-js-v3/commit/f6a3ef541ae2d92872d09d8cab6727911287ebb2))
|
|
28
|
+
* end support for Node.js 10.x ([#3122](https://github.com/aws/aws-sdk-js-v3/issues/3122)) ([7acf18a](https://github.com/aws/aws-sdk-js-v3/commit/7acf18abd3fb1cc461f809110cdb0d7968c2070e))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# [3.45.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.44.0...v3.45.0) (2021-12-23)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* **clients:** update clients as of 2021/12/23 ([#3110](https://github.com/aws/aws-sdk-js-v3/issues/3110)) ([5d638e1](https://github.com/aws/aws-sdk-js-v3/commit/5d638e188ce64fa80fe36b8cba79ba63b80b50b7))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* **clients:** update clients as of 11/28/2021 ([#3072](https://github.com/aws/aws-sdk-js-v3/issues/3072)) ([2ad1622](https://github.com/aws/aws-sdk-js-v3/commit/2ad1622ba8586b926fe508055211803bb29e3976))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
6
56
|
# [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
|
|
7
57
|
|
|
8
58
|
**Note:** Version bump only for package @aws-sdk/client-textract
|
package/dist-cjs/Textract.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Textract = void 0;
|
|
4
4
|
const AnalyzeDocumentCommand_1 = require("./commands/AnalyzeDocumentCommand");
|
|
5
5
|
const AnalyzeExpenseCommand_1 = require("./commands/AnalyzeExpenseCommand");
|
|
6
|
+
const AnalyzeIDCommand_1 = require("./commands/AnalyzeIDCommand");
|
|
6
7
|
const DetectDocumentTextCommand_1 = require("./commands/DetectDocumentTextCommand");
|
|
7
8
|
const GetDocumentAnalysisCommand_1 = require("./commands/GetDocumentAnalysisCommand");
|
|
8
9
|
const GetDocumentTextDetectionCommand_1 = require("./commands/GetDocumentTextDetectionCommand");
|
|
@@ -40,6 +41,20 @@ class Textract extends TextractClient_1.TextractClient {
|
|
|
40
41
|
return this.send(command, optionsOrCb);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
44
|
+
analyzeID(args, optionsOrCb, cb) {
|
|
45
|
+
const command = new AnalyzeIDCommand_1.AnalyzeIDCommand(args);
|
|
46
|
+
if (typeof optionsOrCb === "function") {
|
|
47
|
+
this.send(command, optionsOrCb);
|
|
48
|
+
}
|
|
49
|
+
else if (typeof cb === "function") {
|
|
50
|
+
if (typeof optionsOrCb !== "object")
|
|
51
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
52
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return this.send(command, optionsOrCb);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
43
58
|
detectDocumentText(args, optionsOrCb, cb) {
|
|
44
59
|
const command = new DetectDocumentTextCommand_1.DetectDocumentTextCommand(args);
|
|
45
60
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnalyzeIDCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
+
class AnalyzeIDCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "TextractClient";
|
|
18
|
+
const commandName = "AnalyzeIDCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.AnalyzeIDRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.AnalyzeIDResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return Aws_json1_1_1.serializeAws_json1_1AnalyzeIDCommand(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return Aws_json1_1_1.deserializeAws_json1_1AnalyzeIDCommand(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.AnalyzeIDCommand = AnalyzeIDCommand;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./AnalyzeDocumentCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./AnalyzeExpenseCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./AnalyzeIDCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./DetectDocumentTextCommand"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./GetDocumentAnalysisCommand"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./GetDocumentTextDetectionCommand"), exports);
|
package/dist-cjs/endpoints.js
CHANGED
|
@@ -5,10 +5,6 @@ const config_resolver_1 = require("@aws-sdk/config-resolver");
|
|
|
5
5
|
const regionHash = {
|
|
6
6
|
"ca-central-1": {
|
|
7
7
|
variants: [
|
|
8
|
-
{
|
|
9
|
-
hostname: "textract.ca-central-1.amazonaws.com",
|
|
10
|
-
tags: [],
|
|
11
|
-
},
|
|
12
8
|
{
|
|
13
9
|
hostname: "textract-fips.ca-central-1.amazonaws.com",
|
|
14
10
|
tags: ["fips"],
|
|
@@ -17,10 +13,6 @@ const regionHash = {
|
|
|
17
13
|
},
|
|
18
14
|
"us-east-1": {
|
|
19
15
|
variants: [
|
|
20
|
-
{
|
|
21
|
-
hostname: "textract.us-east-1.amazonaws.com",
|
|
22
|
-
tags: [],
|
|
23
|
-
},
|
|
24
16
|
{
|
|
25
17
|
hostname: "textract-fips.us-east-1.amazonaws.com",
|
|
26
18
|
tags: ["fips"],
|
|
@@ -29,10 +21,6 @@ const regionHash = {
|
|
|
29
21
|
},
|
|
30
22
|
"us-east-2": {
|
|
31
23
|
variants: [
|
|
32
|
-
{
|
|
33
|
-
hostname: "textract.us-east-2.amazonaws.com",
|
|
34
|
-
tags: [],
|
|
35
|
-
},
|
|
36
24
|
{
|
|
37
25
|
hostname: "textract-fips.us-east-2.amazonaws.com",
|
|
38
26
|
tags: ["fips"],
|
|
@@ -41,10 +29,6 @@ const regionHash = {
|
|
|
41
29
|
},
|
|
42
30
|
"us-gov-east-1": {
|
|
43
31
|
variants: [
|
|
44
|
-
{
|
|
45
|
-
hostname: "textract.us-gov-east-1.amazonaws.com",
|
|
46
|
-
tags: [],
|
|
47
|
-
},
|
|
48
32
|
{
|
|
49
33
|
hostname: "textract-fips.us-gov-east-1.amazonaws.com",
|
|
50
34
|
tags: ["fips"],
|
|
@@ -53,10 +37,6 @@ const regionHash = {
|
|
|
53
37
|
},
|
|
54
38
|
"us-gov-west-1": {
|
|
55
39
|
variants: [
|
|
56
|
-
{
|
|
57
|
-
hostname: "textract.us-gov-west-1.amazonaws.com",
|
|
58
|
-
tags: [],
|
|
59
|
-
},
|
|
60
40
|
{
|
|
61
41
|
hostname: "textract-fips.us-gov-west-1.amazonaws.com",
|
|
62
42
|
tags: ["fips"],
|
|
@@ -65,10 +45,6 @@ const regionHash = {
|
|
|
65
45
|
},
|
|
66
46
|
"us-west-1": {
|
|
67
47
|
variants: [
|
|
68
|
-
{
|
|
69
|
-
hostname: "textract.us-west-1.amazonaws.com",
|
|
70
|
-
tags: [],
|
|
71
|
-
},
|
|
72
48
|
{
|
|
73
49
|
hostname: "textract-fips.us-west-1.amazonaws.com",
|
|
74
50
|
tags: ["fips"],
|
|
@@ -77,10 +53,6 @@ const regionHash = {
|
|
|
77
53
|
},
|
|
78
54
|
"us-west-2": {
|
|
79
55
|
variants: [
|
|
80
|
-
{
|
|
81
|
-
hostname: "textract.us-west-2.amazonaws.com",
|
|
82
|
-
tags: [],
|
|
83
|
-
},
|
|
84
56
|
{
|
|
85
57
|
hostname: "textract-fips.us-west-2.amazonaws.com",
|
|
86
58
|
tags: ["fips"],
|
|
@@ -99,6 +71,7 @@ const partitionHash = {
|
|
|
99
71
|
"ap-south-1",
|
|
100
72
|
"ap-southeast-1",
|
|
101
73
|
"ap-southeast-2",
|
|
74
|
+
"ap-southeast-3",
|
|
102
75
|
"ca-central-1",
|
|
103
76
|
"eu-central-1",
|
|
104
77
|
"eu-north-1",
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.StartExpenseAnalysisResponse = exports.StartExpenseAnalysisRequest = exports.StartDocumentTextDetectionResponse = exports.StartDocumentTextDetectionRequest =
|
|
5
|
-
var AccessDeniedException;
|
|
6
|
-
(function (AccessDeniedException) {
|
|
7
|
-
AccessDeniedException.filterSensitiveLog = (obj) => ({
|
|
8
|
-
...obj,
|
|
9
|
-
});
|
|
10
|
-
})(AccessDeniedException = exports.AccessDeniedException || (exports.AccessDeniedException = {}));
|
|
3
|
+
exports.StartDocumentAnalysisResponse = exports.StartDocumentAnalysisRequest = exports.OutputConfig = exports.NotificationChannel = exports.GetExpenseAnalysisResponse = exports.GetExpenseAnalysisRequest = exports.GetDocumentTextDetectionResponse = exports.GetDocumentTextDetectionRequest = exports.GetDocumentAnalysisResponse = exports.Warning = exports.JobStatus = exports.GetDocumentAnalysisRequest = exports.DocumentLocation = exports.DetectDocumentTextResponse = exports.DetectDocumentTextRequest = exports.AnalyzeIDResponse = exports.IdentityDocument = exports.IdentityDocumentField = exports.AnalyzeIDDetections = exports.NormalizedValue = exports.ValueType = exports.AnalyzeIDRequest = exports.AnalyzeExpenseResponse = exports.ExpenseDocument = exports.LineItemGroup = exports.LineItemFields = exports.ExpenseField = exports.ExpenseType = exports.ExpenseDetection = exports.AnalyzeExpenseRequest = exports.AnalyzeDocumentResponse = exports.HumanLoopActivationOutput = exports.DocumentMetadata = exports.Block = exports.TextType = exports.SelectionStatus = exports.Relationship = exports.RelationshipType = exports.Geometry = exports.Point = exports.BoundingBox = exports.EntityType = exports.BlockType = exports.AnalyzeDocumentRequest = exports.HumanLoopConfig = exports.HumanLoopDataAttributes = exports.ContentClassifier = exports.FeatureType = exports.Document = exports.S3Object = void 0;
|
|
4
|
+
exports.StartExpenseAnalysisResponse = exports.StartExpenseAnalysisRequest = exports.StartDocumentTextDetectionResponse = exports.StartDocumentTextDetectionRequest = void 0;
|
|
11
5
|
var S3Object;
|
|
12
6
|
(function (S3Object) {
|
|
13
7
|
S3Object.filterSensitiveLog = (obj) => ({
|
|
@@ -127,60 +121,6 @@ var AnalyzeDocumentResponse;
|
|
|
127
121
|
...obj,
|
|
128
122
|
});
|
|
129
123
|
})(AnalyzeDocumentResponse = exports.AnalyzeDocumentResponse || (exports.AnalyzeDocumentResponse = {}));
|
|
130
|
-
var BadDocumentException;
|
|
131
|
-
(function (BadDocumentException) {
|
|
132
|
-
BadDocumentException.filterSensitiveLog = (obj) => ({
|
|
133
|
-
...obj,
|
|
134
|
-
});
|
|
135
|
-
})(BadDocumentException = exports.BadDocumentException || (exports.BadDocumentException = {}));
|
|
136
|
-
var DocumentTooLargeException;
|
|
137
|
-
(function (DocumentTooLargeException) {
|
|
138
|
-
DocumentTooLargeException.filterSensitiveLog = (obj) => ({
|
|
139
|
-
...obj,
|
|
140
|
-
});
|
|
141
|
-
})(DocumentTooLargeException = exports.DocumentTooLargeException || (exports.DocumentTooLargeException = {}));
|
|
142
|
-
var HumanLoopQuotaExceededException;
|
|
143
|
-
(function (HumanLoopQuotaExceededException) {
|
|
144
|
-
HumanLoopQuotaExceededException.filterSensitiveLog = (obj) => ({
|
|
145
|
-
...obj,
|
|
146
|
-
});
|
|
147
|
-
})(HumanLoopQuotaExceededException = exports.HumanLoopQuotaExceededException || (exports.HumanLoopQuotaExceededException = {}));
|
|
148
|
-
var InternalServerError;
|
|
149
|
-
(function (InternalServerError) {
|
|
150
|
-
InternalServerError.filterSensitiveLog = (obj) => ({
|
|
151
|
-
...obj,
|
|
152
|
-
});
|
|
153
|
-
})(InternalServerError = exports.InternalServerError || (exports.InternalServerError = {}));
|
|
154
|
-
var InvalidParameterException;
|
|
155
|
-
(function (InvalidParameterException) {
|
|
156
|
-
InvalidParameterException.filterSensitiveLog = (obj) => ({
|
|
157
|
-
...obj,
|
|
158
|
-
});
|
|
159
|
-
})(InvalidParameterException = exports.InvalidParameterException || (exports.InvalidParameterException = {}));
|
|
160
|
-
var InvalidS3ObjectException;
|
|
161
|
-
(function (InvalidS3ObjectException) {
|
|
162
|
-
InvalidS3ObjectException.filterSensitiveLog = (obj) => ({
|
|
163
|
-
...obj,
|
|
164
|
-
});
|
|
165
|
-
})(InvalidS3ObjectException = exports.InvalidS3ObjectException || (exports.InvalidS3ObjectException = {}));
|
|
166
|
-
var ProvisionedThroughputExceededException;
|
|
167
|
-
(function (ProvisionedThroughputExceededException) {
|
|
168
|
-
ProvisionedThroughputExceededException.filterSensitiveLog = (obj) => ({
|
|
169
|
-
...obj,
|
|
170
|
-
});
|
|
171
|
-
})(ProvisionedThroughputExceededException = exports.ProvisionedThroughputExceededException || (exports.ProvisionedThroughputExceededException = {}));
|
|
172
|
-
var ThrottlingException;
|
|
173
|
-
(function (ThrottlingException) {
|
|
174
|
-
ThrottlingException.filterSensitiveLog = (obj) => ({
|
|
175
|
-
...obj,
|
|
176
|
-
});
|
|
177
|
-
})(ThrottlingException = exports.ThrottlingException || (exports.ThrottlingException = {}));
|
|
178
|
-
var UnsupportedDocumentException;
|
|
179
|
-
(function (UnsupportedDocumentException) {
|
|
180
|
-
UnsupportedDocumentException.filterSensitiveLog = (obj) => ({
|
|
181
|
-
...obj,
|
|
182
|
-
});
|
|
183
|
-
})(UnsupportedDocumentException = exports.UnsupportedDocumentException || (exports.UnsupportedDocumentException = {}));
|
|
184
124
|
var AnalyzeExpenseRequest;
|
|
185
125
|
(function (AnalyzeExpenseRequest) {
|
|
186
126
|
AnalyzeExpenseRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -229,6 +169,46 @@ var AnalyzeExpenseResponse;
|
|
|
229
169
|
...obj,
|
|
230
170
|
});
|
|
231
171
|
})(AnalyzeExpenseResponse = exports.AnalyzeExpenseResponse || (exports.AnalyzeExpenseResponse = {}));
|
|
172
|
+
var AnalyzeIDRequest;
|
|
173
|
+
(function (AnalyzeIDRequest) {
|
|
174
|
+
AnalyzeIDRequest.filterSensitiveLog = (obj) => ({
|
|
175
|
+
...obj,
|
|
176
|
+
});
|
|
177
|
+
})(AnalyzeIDRequest = exports.AnalyzeIDRequest || (exports.AnalyzeIDRequest = {}));
|
|
178
|
+
var ValueType;
|
|
179
|
+
(function (ValueType) {
|
|
180
|
+
ValueType["DATE"] = "DATE";
|
|
181
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
182
|
+
var NormalizedValue;
|
|
183
|
+
(function (NormalizedValue) {
|
|
184
|
+
NormalizedValue.filterSensitiveLog = (obj) => ({
|
|
185
|
+
...obj,
|
|
186
|
+
});
|
|
187
|
+
})(NormalizedValue = exports.NormalizedValue || (exports.NormalizedValue = {}));
|
|
188
|
+
var AnalyzeIDDetections;
|
|
189
|
+
(function (AnalyzeIDDetections) {
|
|
190
|
+
AnalyzeIDDetections.filterSensitiveLog = (obj) => ({
|
|
191
|
+
...obj,
|
|
192
|
+
});
|
|
193
|
+
})(AnalyzeIDDetections = exports.AnalyzeIDDetections || (exports.AnalyzeIDDetections = {}));
|
|
194
|
+
var IdentityDocumentField;
|
|
195
|
+
(function (IdentityDocumentField) {
|
|
196
|
+
IdentityDocumentField.filterSensitiveLog = (obj) => ({
|
|
197
|
+
...obj,
|
|
198
|
+
});
|
|
199
|
+
})(IdentityDocumentField = exports.IdentityDocumentField || (exports.IdentityDocumentField = {}));
|
|
200
|
+
var IdentityDocument;
|
|
201
|
+
(function (IdentityDocument) {
|
|
202
|
+
IdentityDocument.filterSensitiveLog = (obj) => ({
|
|
203
|
+
...obj,
|
|
204
|
+
});
|
|
205
|
+
})(IdentityDocument = exports.IdentityDocument || (exports.IdentityDocument = {}));
|
|
206
|
+
var AnalyzeIDResponse;
|
|
207
|
+
(function (AnalyzeIDResponse) {
|
|
208
|
+
AnalyzeIDResponse.filterSensitiveLog = (obj) => ({
|
|
209
|
+
...obj,
|
|
210
|
+
});
|
|
211
|
+
})(AnalyzeIDResponse = exports.AnalyzeIDResponse || (exports.AnalyzeIDResponse = {}));
|
|
232
212
|
var DetectDocumentTextRequest;
|
|
233
213
|
(function (DetectDocumentTextRequest) {
|
|
234
214
|
DetectDocumentTextRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -272,18 +252,6 @@ var GetDocumentAnalysisResponse;
|
|
|
272
252
|
...obj,
|
|
273
253
|
});
|
|
274
254
|
})(GetDocumentAnalysisResponse = exports.GetDocumentAnalysisResponse || (exports.GetDocumentAnalysisResponse = {}));
|
|
275
|
-
var InvalidJobIdException;
|
|
276
|
-
(function (InvalidJobIdException) {
|
|
277
|
-
InvalidJobIdException.filterSensitiveLog = (obj) => ({
|
|
278
|
-
...obj,
|
|
279
|
-
});
|
|
280
|
-
})(InvalidJobIdException = exports.InvalidJobIdException || (exports.InvalidJobIdException = {}));
|
|
281
|
-
var InvalidKMSKeyException;
|
|
282
|
-
(function (InvalidKMSKeyException) {
|
|
283
|
-
InvalidKMSKeyException.filterSensitiveLog = (obj) => ({
|
|
284
|
-
...obj,
|
|
285
|
-
});
|
|
286
|
-
})(InvalidKMSKeyException = exports.InvalidKMSKeyException || (exports.InvalidKMSKeyException = {}));
|
|
287
255
|
var GetDocumentTextDetectionRequest;
|
|
288
256
|
(function (GetDocumentTextDetectionRequest) {
|
|
289
257
|
GetDocumentTextDetectionRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -308,18 +276,6 @@ var GetExpenseAnalysisResponse;
|
|
|
308
276
|
...obj,
|
|
309
277
|
});
|
|
310
278
|
})(GetExpenseAnalysisResponse = exports.GetExpenseAnalysisResponse || (exports.GetExpenseAnalysisResponse = {}));
|
|
311
|
-
var IdempotentParameterMismatchException;
|
|
312
|
-
(function (IdempotentParameterMismatchException) {
|
|
313
|
-
IdempotentParameterMismatchException.filterSensitiveLog = (obj) => ({
|
|
314
|
-
...obj,
|
|
315
|
-
});
|
|
316
|
-
})(IdempotentParameterMismatchException = exports.IdempotentParameterMismatchException || (exports.IdempotentParameterMismatchException = {}));
|
|
317
|
-
var LimitExceededException;
|
|
318
|
-
(function (LimitExceededException) {
|
|
319
|
-
LimitExceededException.filterSensitiveLog = (obj) => ({
|
|
320
|
-
...obj,
|
|
321
|
-
});
|
|
322
|
-
})(LimitExceededException = exports.LimitExceededException || (exports.LimitExceededException = {}));
|
|
323
279
|
var NotificationChannel;
|
|
324
280
|
(function (NotificationChannel) {
|
|
325
281
|
NotificationChannel.filterSensitiveLog = (obj) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_1StartExpenseAnalysisCommand = exports.deserializeAws_json1_1StartDocumentTextDetectionCommand = exports.deserializeAws_json1_1StartDocumentAnalysisCommand = exports.deserializeAws_json1_1GetExpenseAnalysisCommand = exports.deserializeAws_json1_1GetDocumentTextDetectionCommand = exports.deserializeAws_json1_1GetDocumentAnalysisCommand = exports.deserializeAws_json1_1DetectDocumentTextCommand = exports.deserializeAws_json1_1AnalyzeExpenseCommand = exports.deserializeAws_json1_1AnalyzeDocumentCommand = exports.serializeAws_json1_1StartExpenseAnalysisCommand = exports.serializeAws_json1_1StartDocumentTextDetectionCommand = exports.serializeAws_json1_1StartDocumentAnalysisCommand = exports.serializeAws_json1_1GetExpenseAnalysisCommand = exports.serializeAws_json1_1GetDocumentTextDetectionCommand = exports.serializeAws_json1_1GetDocumentAnalysisCommand = exports.serializeAws_json1_1DetectDocumentTextCommand = exports.serializeAws_json1_1AnalyzeExpenseCommand = exports.serializeAws_json1_1AnalyzeDocumentCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_1StartExpenseAnalysisCommand = exports.deserializeAws_json1_1StartDocumentTextDetectionCommand = exports.deserializeAws_json1_1StartDocumentAnalysisCommand = exports.deserializeAws_json1_1GetExpenseAnalysisCommand = exports.deserializeAws_json1_1GetDocumentTextDetectionCommand = exports.deserializeAws_json1_1GetDocumentAnalysisCommand = exports.deserializeAws_json1_1DetectDocumentTextCommand = exports.deserializeAws_json1_1AnalyzeIDCommand = exports.deserializeAws_json1_1AnalyzeExpenseCommand = exports.deserializeAws_json1_1AnalyzeDocumentCommand = exports.serializeAws_json1_1StartExpenseAnalysisCommand = exports.serializeAws_json1_1StartDocumentTextDetectionCommand = exports.serializeAws_json1_1StartDocumentAnalysisCommand = exports.serializeAws_json1_1GetExpenseAnalysisCommand = exports.serializeAws_json1_1GetDocumentTextDetectionCommand = exports.serializeAws_json1_1GetDocumentAnalysisCommand = exports.serializeAws_json1_1DetectDocumentTextCommand = exports.serializeAws_json1_1AnalyzeIDCommand = exports.serializeAws_json1_1AnalyzeExpenseCommand = exports.serializeAws_json1_1AnalyzeDocumentCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const serializeAws_json1_1AnalyzeDocumentCommand = async (input, context) => {
|
|
@@ -23,6 +23,16 @@ const serializeAws_json1_1AnalyzeExpenseCommand = async (input, context) => {
|
|
|
23
23
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
24
|
};
|
|
25
25
|
exports.serializeAws_json1_1AnalyzeExpenseCommand = serializeAws_json1_1AnalyzeExpenseCommand;
|
|
26
|
+
const serializeAws_json1_1AnalyzeIDCommand = async (input, context) => {
|
|
27
|
+
const headers = {
|
|
28
|
+
"content-type": "application/x-amz-json-1.1",
|
|
29
|
+
"x-amz-target": "Textract.AnalyzeID",
|
|
30
|
+
};
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(serializeAws_json1_1AnalyzeIDRequest(input, context));
|
|
33
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
+
};
|
|
35
|
+
exports.serializeAws_json1_1AnalyzeIDCommand = serializeAws_json1_1AnalyzeIDCommand;
|
|
26
36
|
const serializeAws_json1_1DetectDocumentTextCommand = async (input, context) => {
|
|
27
37
|
const headers = {
|
|
28
38
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -323,6 +333,117 @@ const deserializeAws_json1_1AnalyzeExpenseCommandError = async (output, context)
|
|
|
323
333
|
delete response.Message;
|
|
324
334
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
325
335
|
};
|
|
336
|
+
const deserializeAws_json1_1AnalyzeIDCommand = async (output, context) => {
|
|
337
|
+
if (output.statusCode >= 300) {
|
|
338
|
+
return deserializeAws_json1_1AnalyzeIDCommandError(output, context);
|
|
339
|
+
}
|
|
340
|
+
const data = await parseBody(output.body, context);
|
|
341
|
+
let contents = {};
|
|
342
|
+
contents = deserializeAws_json1_1AnalyzeIDResponse(data, context);
|
|
343
|
+
const response = {
|
|
344
|
+
$metadata: deserializeMetadata(output),
|
|
345
|
+
...contents,
|
|
346
|
+
};
|
|
347
|
+
return Promise.resolve(response);
|
|
348
|
+
};
|
|
349
|
+
exports.deserializeAws_json1_1AnalyzeIDCommand = deserializeAws_json1_1AnalyzeIDCommand;
|
|
350
|
+
const deserializeAws_json1_1AnalyzeIDCommandError = async (output, context) => {
|
|
351
|
+
const parsedOutput = {
|
|
352
|
+
...output,
|
|
353
|
+
body: await parseBody(output.body, context),
|
|
354
|
+
};
|
|
355
|
+
let response;
|
|
356
|
+
let errorCode = "UnknownError";
|
|
357
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
358
|
+
switch (errorCode) {
|
|
359
|
+
case "AccessDeniedException":
|
|
360
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
361
|
+
response = {
|
|
362
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
363
|
+
name: errorCode,
|
|
364
|
+
$metadata: deserializeMetadata(output),
|
|
365
|
+
};
|
|
366
|
+
break;
|
|
367
|
+
case "BadDocumentException":
|
|
368
|
+
case "com.amazonaws.textract#BadDocumentException":
|
|
369
|
+
response = {
|
|
370
|
+
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
371
|
+
name: errorCode,
|
|
372
|
+
$metadata: deserializeMetadata(output),
|
|
373
|
+
};
|
|
374
|
+
break;
|
|
375
|
+
case "DocumentTooLargeException":
|
|
376
|
+
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
377
|
+
response = {
|
|
378
|
+
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
379
|
+
name: errorCode,
|
|
380
|
+
$metadata: deserializeMetadata(output),
|
|
381
|
+
};
|
|
382
|
+
break;
|
|
383
|
+
case "InternalServerError":
|
|
384
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
385
|
+
response = {
|
|
386
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
387
|
+
name: errorCode,
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
};
|
|
390
|
+
break;
|
|
391
|
+
case "InvalidParameterException":
|
|
392
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
393
|
+
response = {
|
|
394
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
395
|
+
name: errorCode,
|
|
396
|
+
$metadata: deserializeMetadata(output),
|
|
397
|
+
};
|
|
398
|
+
break;
|
|
399
|
+
case "InvalidS3ObjectException":
|
|
400
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
401
|
+
response = {
|
|
402
|
+
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
403
|
+
name: errorCode,
|
|
404
|
+
$metadata: deserializeMetadata(output),
|
|
405
|
+
};
|
|
406
|
+
break;
|
|
407
|
+
case "ProvisionedThroughputExceededException":
|
|
408
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
409
|
+
response = {
|
|
410
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
411
|
+
name: errorCode,
|
|
412
|
+
$metadata: deserializeMetadata(output),
|
|
413
|
+
};
|
|
414
|
+
break;
|
|
415
|
+
case "ThrottlingException":
|
|
416
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
417
|
+
response = {
|
|
418
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
419
|
+
name: errorCode,
|
|
420
|
+
$metadata: deserializeMetadata(output),
|
|
421
|
+
};
|
|
422
|
+
break;
|
|
423
|
+
case "UnsupportedDocumentException":
|
|
424
|
+
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
425
|
+
response = {
|
|
426
|
+
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
427
|
+
name: errorCode,
|
|
428
|
+
$metadata: deserializeMetadata(output),
|
|
429
|
+
};
|
|
430
|
+
break;
|
|
431
|
+
default:
|
|
432
|
+
const parsedBody = parsedOutput.body;
|
|
433
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
434
|
+
response = {
|
|
435
|
+
...parsedBody,
|
|
436
|
+
name: `${errorCode}`,
|
|
437
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
438
|
+
$fault: "client",
|
|
439
|
+
$metadata: deserializeMetadata(output),
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
const message = response.message || response.Message || errorCode;
|
|
443
|
+
response.message = message;
|
|
444
|
+
delete response.Message;
|
|
445
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
446
|
+
};
|
|
326
447
|
const deserializeAws_json1_1DetectDocumentTextCommand = async (output, context) => {
|
|
327
448
|
if (output.statusCode >= 300) {
|
|
328
449
|
return deserializeAws_json1_1DetectDocumentTextCommandError(output, context);
|
|
@@ -1320,6 +1441,14 @@ const serializeAws_json1_1AnalyzeExpenseRequest = (input, context) => {
|
|
|
1320
1441
|
input.Document !== null && { Document: serializeAws_json1_1Document(input.Document, context) }),
|
|
1321
1442
|
};
|
|
1322
1443
|
};
|
|
1444
|
+
const serializeAws_json1_1AnalyzeIDRequest = (input, context) => {
|
|
1445
|
+
return {
|
|
1446
|
+
...(input.DocumentPages !== undefined &&
|
|
1447
|
+
input.DocumentPages !== null && {
|
|
1448
|
+
DocumentPages: serializeAws_json1_1DocumentPages(input.DocumentPages, context),
|
|
1449
|
+
}),
|
|
1450
|
+
};
|
|
1451
|
+
};
|
|
1323
1452
|
const serializeAws_json1_1ContentClassifiers = (input, context) => {
|
|
1324
1453
|
return input
|
|
1325
1454
|
.filter((e) => e != null)
|
|
@@ -1349,6 +1478,16 @@ const serializeAws_json1_1DocumentLocation = (input, context) => {
|
|
|
1349
1478
|
input.S3Object !== null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
|
|
1350
1479
|
};
|
|
1351
1480
|
};
|
|
1481
|
+
const serializeAws_json1_1DocumentPages = (input, context) => {
|
|
1482
|
+
return input
|
|
1483
|
+
.filter((e) => e != null)
|
|
1484
|
+
.map((entry) => {
|
|
1485
|
+
if (entry === null) {
|
|
1486
|
+
return null;
|
|
1487
|
+
}
|
|
1488
|
+
return serializeAws_json1_1Document(entry, context);
|
|
1489
|
+
});
|
|
1490
|
+
};
|
|
1352
1491
|
const serializeAws_json1_1FeatureTypes = (input, context) => {
|
|
1353
1492
|
return input
|
|
1354
1493
|
.filter((e) => e != null)
|
|
@@ -1504,6 +1643,26 @@ const deserializeAws_json1_1AnalyzeExpenseResponse = (output, context) => {
|
|
|
1504
1643
|
: undefined,
|
|
1505
1644
|
};
|
|
1506
1645
|
};
|
|
1646
|
+
const deserializeAws_json1_1AnalyzeIDDetections = (output, context) => {
|
|
1647
|
+
return {
|
|
1648
|
+
Confidence: smithy_client_1.limitedParseFloat32(output.Confidence),
|
|
1649
|
+
NormalizedValue: output.NormalizedValue !== undefined && output.NormalizedValue !== null
|
|
1650
|
+
? deserializeAws_json1_1NormalizedValue(output.NormalizedValue, context)
|
|
1651
|
+
: undefined,
|
|
1652
|
+
Text: smithy_client_1.expectString(output.Text),
|
|
1653
|
+
};
|
|
1654
|
+
};
|
|
1655
|
+
const deserializeAws_json1_1AnalyzeIDResponse = (output, context) => {
|
|
1656
|
+
return {
|
|
1657
|
+
AnalyzeIDModelVersion: smithy_client_1.expectString(output.AnalyzeIDModelVersion),
|
|
1658
|
+
DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
|
|
1659
|
+
? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
|
|
1660
|
+
: undefined,
|
|
1661
|
+
IdentityDocuments: output.IdentityDocuments !== undefined && output.IdentityDocuments !== null
|
|
1662
|
+
? deserializeAws_json1_1IdentityDocumentList(output.IdentityDocuments, context)
|
|
1663
|
+
: undefined,
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1507
1666
|
const deserializeAws_json1_1BadDocumentException = (output, context) => {
|
|
1508
1667
|
return {
|
|
1509
1668
|
Code: smithy_client_1.expectString(output.Code),
|
|
@@ -1742,6 +1901,44 @@ const deserializeAws_json1_1IdempotentParameterMismatchException = (output, cont
|
|
|
1742
1901
|
Message: smithy_client_1.expectString(output.Message),
|
|
1743
1902
|
};
|
|
1744
1903
|
};
|
|
1904
|
+
const deserializeAws_json1_1IdentityDocument = (output, context) => {
|
|
1905
|
+
return {
|
|
1906
|
+
DocumentIndex: smithy_client_1.expectInt32(output.DocumentIndex),
|
|
1907
|
+
IdentityDocumentFields: output.IdentityDocumentFields !== undefined && output.IdentityDocumentFields !== null
|
|
1908
|
+
? deserializeAws_json1_1IdentityDocumentFieldList(output.IdentityDocumentFields, context)
|
|
1909
|
+
: undefined,
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
const deserializeAws_json1_1IdentityDocumentField = (output, context) => {
|
|
1913
|
+
return {
|
|
1914
|
+
Type: output.Type !== undefined && output.Type !== null
|
|
1915
|
+
? deserializeAws_json1_1AnalyzeIDDetections(output.Type, context)
|
|
1916
|
+
: undefined,
|
|
1917
|
+
ValueDetection: output.ValueDetection !== undefined && output.ValueDetection !== null
|
|
1918
|
+
? deserializeAws_json1_1AnalyzeIDDetections(output.ValueDetection, context)
|
|
1919
|
+
: undefined,
|
|
1920
|
+
};
|
|
1921
|
+
};
|
|
1922
|
+
const deserializeAws_json1_1IdentityDocumentFieldList = (output, context) => {
|
|
1923
|
+
return (output || [])
|
|
1924
|
+
.filter((e) => e != null)
|
|
1925
|
+
.map((entry) => {
|
|
1926
|
+
if (entry === null) {
|
|
1927
|
+
return null;
|
|
1928
|
+
}
|
|
1929
|
+
return deserializeAws_json1_1IdentityDocumentField(entry, context);
|
|
1930
|
+
});
|
|
1931
|
+
};
|
|
1932
|
+
const deserializeAws_json1_1IdentityDocumentList = (output, context) => {
|
|
1933
|
+
return (output || [])
|
|
1934
|
+
.filter((e) => e != null)
|
|
1935
|
+
.map((entry) => {
|
|
1936
|
+
if (entry === null) {
|
|
1937
|
+
return null;
|
|
1938
|
+
}
|
|
1939
|
+
return deserializeAws_json1_1IdentityDocument(entry, context);
|
|
1940
|
+
});
|
|
1941
|
+
};
|
|
1745
1942
|
const deserializeAws_json1_1IdList = (output, context) => {
|
|
1746
1943
|
return (output || [])
|
|
1747
1944
|
.filter((e) => e != null)
|
|
@@ -1823,6 +2020,12 @@ const deserializeAws_json1_1LineItemList = (output, context) => {
|
|
|
1823
2020
|
return deserializeAws_json1_1LineItemFields(entry, context);
|
|
1824
2021
|
});
|
|
1825
2022
|
};
|
|
2023
|
+
const deserializeAws_json1_1NormalizedValue = (output, context) => {
|
|
2024
|
+
return {
|
|
2025
|
+
Value: smithy_client_1.expectString(output.Value),
|
|
2026
|
+
ValueType: smithy_client_1.expectString(output.ValueType),
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
1826
2029
|
const deserializeAws_json1_1Pages = (output, context) => {
|
|
1827
2030
|
return (output || [])
|
|
1828
2031
|
.filter((e) => e != null)
|
|
@@ -13,13 +13,18 @@ const util_body_length_browser_1 = require("@aws-sdk/util-body-length-browser");
|
|
|
13
13
|
const util_user_agent_browser_1 = require("@aws-sdk/util-user-agent-browser");
|
|
14
14
|
const util_utf8_browser_1 = require("@aws-sdk/util-utf8-browser");
|
|
15
15
|
const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
|
|
16
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
17
|
+
const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
|
|
16
18
|
const getRuntimeConfig = (config) => {
|
|
17
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
20
|
+
const defaultsMode = util_defaults_mode_browser_1.resolveDefaultsModeConfig(config);
|
|
21
|
+
const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
|
|
18
22
|
const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
|
|
19
23
|
return {
|
|
20
24
|
...clientSharedValues,
|
|
21
25
|
...config,
|
|
22
26
|
runtime: "browser",
|
|
27
|
+
defaultsMode,
|
|
23
28
|
base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
|
|
24
29
|
base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
|
|
25
30
|
bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
|
|
@@ -27,8 +32,8 @@ const getRuntimeConfig = (config) => {
|
|
|
27
32
|
defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_browser_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
|
|
28
33
|
maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
|
|
29
34
|
region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalid_dependency_1.invalidProvider("Region is missing"),
|
|
30
|
-
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(),
|
|
31
|
-
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (() =>
|
|
35
|
+
requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
|
|
32
37
|
sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
|
|
33
38
|
streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
|
|
34
39
|
useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
|