@aws-sdk/client-textract 3.38.0 → 3.42.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 +41 -0
- package/dist-cjs/Textract.js +30 -0
- package/dist-cjs/commands/GetExpenseAnalysisCommand.js +36 -0
- package/dist-cjs/commands/StartExpenseAnalysisCommand.js +36 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/endpoints.js +156 -26
- package/dist-cjs/models/models_0.js +26 -2
- package/dist-cjs/protocols/Aws_json1_1.js +306 -1
- package/dist-cjs/runtimeConfig.browser.js +6 -3
- package/dist-cjs/runtimeConfig.js +5 -3
- package/dist-es/Textract.js +30 -0
- package/dist-es/commands/GetExpenseAnalysisCommand.js +39 -0
- package/dist-es/commands/StartExpenseAnalysisCommand.js +39 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoints.js +156 -26
- package/dist-es/models/models_0.js +16 -0
- package/dist-es/protocols/Aws_json1_1.js +314 -0
- package/dist-es/runtimeConfig.browser.js +3 -2
- package/dist-es/runtimeConfig.js +3 -3
- package/dist-types/Textract.d.ts +47 -2
- package/dist-types/TextractClient.d.ts +12 -2
- package/dist-types/commands/AnalyzeDocumentCommand.d.ts +1 -1
- package/dist-types/commands/AnalyzeExpenseCommand.d.ts +1 -1
- package/dist-types/commands/DetectDocumentTextCommand.d.ts +1 -1
- package/dist-types/commands/GetDocumentAnalysisCommand.d.ts +1 -1
- package/dist-types/commands/GetDocumentTextDetectionCommand.d.ts +1 -1
- package/dist-types/commands/GetExpenseAnalysisCommand.d.ts +51 -0
- package/dist-types/commands/StartDocumentAnalysisCommand.d.ts +2 -2
- package/dist-types/commands/StartDocumentTextDetectionCommand.d.ts +2 -2
- package/dist-types/commands/StartExpenseAnalysisCommand.d.ts +50 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +123 -2
- package/dist-types/protocols/Aws_json1_1.d.ts +6 -0
- package/dist-types/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/runtimeConfig.d.ts +2 -0
- package/dist-types/runtimeConfig.native.d.ts +2 -0
- package/dist-types/ts3.4/Textract.d.ts +10 -0
- package/dist-types/ts3.4/TextractClient.d.ts +8 -2
- package/dist-types/ts3.4/commands/GetExpenseAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartExpenseAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +58 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +6 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
- package/package.json +25 -25
package/dist-es/endpoints.js
CHANGED
|
@@ -1,33 +1,89 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { getRegionInfo } from "@aws-sdk/config-resolver";
|
|
3
3
|
var regionHash = {
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
"ca-central-1": {
|
|
5
|
+
variants: [
|
|
6
|
+
{
|
|
7
|
+
hostname: "textract.ca-central-1.amazonaws.com",
|
|
8
|
+
tags: [],
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
hostname: "textract-fips.ca-central-1.amazonaws.com",
|
|
12
|
+
tags: ["fips"],
|
|
13
|
+
},
|
|
14
|
+
],
|
|
7
15
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
16
|
+
"us-east-1": {
|
|
17
|
+
variants: [
|
|
18
|
+
{
|
|
19
|
+
hostname: "textract.us-east-1.amazonaws.com",
|
|
20
|
+
tags: [],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
hostname: "textract-fips.us-east-1.amazonaws.com",
|
|
24
|
+
tags: ["fips"],
|
|
25
|
+
},
|
|
26
|
+
],
|
|
11
27
|
},
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
28
|
+
"us-east-2": {
|
|
29
|
+
variants: [
|
|
30
|
+
{
|
|
31
|
+
hostname: "textract.us-east-2.amazonaws.com",
|
|
32
|
+
tags: [],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
hostname: "textract-fips.us-east-2.amazonaws.com",
|
|
36
|
+
tags: ["fips"],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
15
39
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
"us-gov-east-1": {
|
|
41
|
+
variants: [
|
|
42
|
+
{
|
|
43
|
+
hostname: "textract.us-gov-east-1.amazonaws.com",
|
|
44
|
+
tags: [],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
hostname: "textract-fips.us-gov-east-1.amazonaws.com",
|
|
48
|
+
tags: ["fips"],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
19
51
|
},
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
52
|
+
"us-gov-west-1": {
|
|
53
|
+
variants: [
|
|
54
|
+
{
|
|
55
|
+
hostname: "textract.us-gov-west-1.amazonaws.com",
|
|
56
|
+
tags: [],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
hostname: "textract-fips.us-gov-west-1.amazonaws.com",
|
|
60
|
+
tags: ["fips"],
|
|
61
|
+
},
|
|
62
|
+
],
|
|
23
63
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
64
|
+
"us-west-1": {
|
|
65
|
+
variants: [
|
|
66
|
+
{
|
|
67
|
+
hostname: "textract.us-west-1.amazonaws.com",
|
|
68
|
+
tags: [],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
hostname: "textract-fips.us-west-1.amazonaws.com",
|
|
72
|
+
tags: ["fips"],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
27
75
|
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
76
|
+
"us-west-2": {
|
|
77
|
+
variants: [
|
|
78
|
+
{
|
|
79
|
+
hostname: "textract.us-west-2.amazonaws.com",
|
|
80
|
+
tags: [],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
hostname: "textract-fips.us-west-2.amazonaws.com",
|
|
84
|
+
tags: ["fips"],
|
|
85
|
+
},
|
|
86
|
+
],
|
|
31
87
|
},
|
|
32
88
|
};
|
|
33
89
|
var partitionHash = {
|
|
@@ -60,23 +116,97 @@ var partitionHash = {
|
|
|
60
116
|
"us-west-1",
|
|
61
117
|
"us-west-2",
|
|
62
118
|
],
|
|
63
|
-
|
|
119
|
+
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
|
|
120
|
+
variants: [
|
|
121
|
+
{
|
|
122
|
+
hostname: "textract.{region}.amazonaws.com",
|
|
123
|
+
tags: [],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
hostname: "textract-fips.{region}.amazonaws.com",
|
|
127
|
+
tags: ["fips"],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
hostname: "textract-fips.{region}.api.aws",
|
|
131
|
+
tags: ["dualstack", "fips"],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
hostname: "textract.{region}.api.aws",
|
|
135
|
+
tags: ["dualstack"],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
64
138
|
},
|
|
65
139
|
"aws-cn": {
|
|
66
140
|
regions: ["cn-north-1", "cn-northwest-1"],
|
|
67
|
-
|
|
141
|
+
regionRegex: "^cn\\-\\w+\\-\\d+$",
|
|
142
|
+
variants: [
|
|
143
|
+
{
|
|
144
|
+
hostname: "textract.{region}.amazonaws.com.cn",
|
|
145
|
+
tags: [],
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
hostname: "textract-fips.{region}.amazonaws.com.cn",
|
|
149
|
+
tags: ["fips"],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
hostname: "textract-fips.{region}.api.amazonwebservices.com.cn",
|
|
153
|
+
tags: ["dualstack", "fips"],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
hostname: "textract.{region}.api.amazonwebservices.com.cn",
|
|
157
|
+
tags: ["dualstack"],
|
|
158
|
+
},
|
|
159
|
+
],
|
|
68
160
|
},
|
|
69
161
|
"aws-iso": {
|
|
70
162
|
regions: ["us-iso-east-1", "us-iso-west-1"],
|
|
71
|
-
|
|
163
|
+
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
|
|
164
|
+
variants: [
|
|
165
|
+
{
|
|
166
|
+
hostname: "textract.{region}.c2s.ic.gov",
|
|
167
|
+
tags: [],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
hostname: "textract-fips.{region}.c2s.ic.gov",
|
|
171
|
+
tags: ["fips"],
|
|
172
|
+
},
|
|
173
|
+
],
|
|
72
174
|
},
|
|
73
175
|
"aws-iso-b": {
|
|
74
176
|
regions: ["us-isob-east-1"],
|
|
75
|
-
|
|
177
|
+
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
|
|
178
|
+
variants: [
|
|
179
|
+
{
|
|
180
|
+
hostname: "textract.{region}.sc2s.sgov.gov",
|
|
181
|
+
tags: [],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
hostname: "textract-fips.{region}.sc2s.sgov.gov",
|
|
185
|
+
tags: ["fips"],
|
|
186
|
+
},
|
|
187
|
+
],
|
|
76
188
|
},
|
|
77
189
|
"aws-us-gov": {
|
|
78
190
|
regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
|
|
79
|
-
|
|
191
|
+
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
|
|
192
|
+
variants: [
|
|
193
|
+
{
|
|
194
|
+
hostname: "textract.{region}.amazonaws.com",
|
|
195
|
+
tags: [],
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
hostname: "textract-fips.{region}.amazonaws.com",
|
|
199
|
+
tags: ["fips"],
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
hostname: "textract-fips.{region}.api.aws",
|
|
203
|
+
tags: ["dualstack", "fips"],
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
hostname: "textract.{region}.api.aws",
|
|
207
|
+
tags: ["dualstack"],
|
|
208
|
+
},
|
|
209
|
+
],
|
|
80
210
|
},
|
|
81
211
|
};
|
|
82
212
|
export var defaultRegionInfoProvider = function (region, options) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -211,6 +211,14 @@ export var GetDocumentTextDetectionResponse;
|
|
|
211
211
|
(function (GetDocumentTextDetectionResponse) {
|
|
212
212
|
GetDocumentTextDetectionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
213
213
|
})(GetDocumentTextDetectionResponse || (GetDocumentTextDetectionResponse = {}));
|
|
214
|
+
export var GetExpenseAnalysisRequest;
|
|
215
|
+
(function (GetExpenseAnalysisRequest) {
|
|
216
|
+
GetExpenseAnalysisRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
217
|
+
})(GetExpenseAnalysisRequest || (GetExpenseAnalysisRequest = {}));
|
|
218
|
+
export var GetExpenseAnalysisResponse;
|
|
219
|
+
(function (GetExpenseAnalysisResponse) {
|
|
220
|
+
GetExpenseAnalysisResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
221
|
+
})(GetExpenseAnalysisResponse || (GetExpenseAnalysisResponse = {}));
|
|
214
222
|
export var IdempotentParameterMismatchException;
|
|
215
223
|
(function (IdempotentParameterMismatchException) {
|
|
216
224
|
IdempotentParameterMismatchException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -243,3 +251,11 @@ export var StartDocumentTextDetectionResponse;
|
|
|
243
251
|
(function (StartDocumentTextDetectionResponse) {
|
|
244
252
|
StartDocumentTextDetectionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
245
253
|
})(StartDocumentTextDetectionResponse || (StartDocumentTextDetectionResponse = {}));
|
|
254
|
+
export var StartExpenseAnalysisRequest;
|
|
255
|
+
(function (StartExpenseAnalysisRequest) {
|
|
256
|
+
StartExpenseAnalysisRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
257
|
+
})(StartExpenseAnalysisRequest || (StartExpenseAnalysisRequest = {}));
|
|
258
|
+
export var StartExpenseAnalysisResponse;
|
|
259
|
+
(function (StartExpenseAnalysisResponse) {
|
|
260
|
+
StartExpenseAnalysisResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
261
|
+
})(StartExpenseAnalysisResponse || (StartExpenseAnalysisResponse = {}));
|
|
@@ -56,6 +56,17 @@ export var serializeAws_json1_1GetDocumentTextDetectionCommand = function (input
|
|
|
56
56
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
57
57
|
});
|
|
58
58
|
}); };
|
|
59
|
+
export var serializeAws_json1_1GetExpenseAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
|
+
var headers, body;
|
|
61
|
+
return __generator(this, function (_a) {
|
|
62
|
+
headers = {
|
|
63
|
+
"content-type": "application/x-amz-json-1.1",
|
|
64
|
+
"x-amz-target": "Textract.GetExpenseAnalysis",
|
|
65
|
+
};
|
|
66
|
+
body = JSON.stringify(serializeAws_json1_1GetExpenseAnalysisRequest(input, context));
|
|
67
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
68
|
+
});
|
|
69
|
+
}); };
|
|
59
70
|
export var serializeAws_json1_1StartDocumentAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
60
71
|
var headers, body;
|
|
61
72
|
return __generator(this, function (_a) {
|
|
@@ -78,6 +89,17 @@ export var serializeAws_json1_1StartDocumentTextDetectionCommand = function (inp
|
|
|
78
89
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
79
90
|
});
|
|
80
91
|
}); };
|
|
92
|
+
export var serializeAws_json1_1StartExpenseAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
93
|
+
var headers, body;
|
|
94
|
+
return __generator(this, function (_a) {
|
|
95
|
+
headers = {
|
|
96
|
+
"content-type": "application/x-amz-json-1.1",
|
|
97
|
+
"x-amz-target": "Textract.StartExpenseAnalysis",
|
|
98
|
+
};
|
|
99
|
+
body = JSON.stringify(serializeAws_json1_1StartExpenseAnalysisRequest(input, context));
|
|
100
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
101
|
+
});
|
|
102
|
+
}); };
|
|
81
103
|
export var deserializeAws_json1_1AnalyzeDocumentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
104
|
var data, contents, response;
|
|
83
105
|
return __generator(this, function (_a) {
|
|
@@ -670,6 +692,118 @@ var deserializeAws_json1_1GetDocumentTextDetectionCommandError = function (outpu
|
|
|
670
692
|
}
|
|
671
693
|
});
|
|
672
694
|
}); };
|
|
695
|
+
export var deserializeAws_json1_1GetExpenseAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
696
|
+
var data, contents, response;
|
|
697
|
+
return __generator(this, function (_a) {
|
|
698
|
+
switch (_a.label) {
|
|
699
|
+
case 0:
|
|
700
|
+
if (output.statusCode >= 300) {
|
|
701
|
+
return [2, deserializeAws_json1_1GetExpenseAnalysisCommandError(output, context)];
|
|
702
|
+
}
|
|
703
|
+
return [4, parseBody(output.body, context)];
|
|
704
|
+
case 1:
|
|
705
|
+
data = _a.sent();
|
|
706
|
+
contents = {};
|
|
707
|
+
contents = deserializeAws_json1_1GetExpenseAnalysisResponse(data, context);
|
|
708
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
709
|
+
return [2, Promise.resolve(response)];
|
|
710
|
+
}
|
|
711
|
+
});
|
|
712
|
+
}); };
|
|
713
|
+
var deserializeAws_json1_1GetExpenseAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
714
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, parsedBody, message;
|
|
715
|
+
var _l;
|
|
716
|
+
return __generator(this, function (_m) {
|
|
717
|
+
switch (_m.label) {
|
|
718
|
+
case 0:
|
|
719
|
+
_a = [__assign({}, output)];
|
|
720
|
+
_l = {};
|
|
721
|
+
return [4, parseBody(output.body, context)];
|
|
722
|
+
case 1:
|
|
723
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
724
|
+
errorCode = "UnknownError";
|
|
725
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
726
|
+
_b = errorCode;
|
|
727
|
+
switch (_b) {
|
|
728
|
+
case "AccessDeniedException": return [3, 2];
|
|
729
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
730
|
+
case "InternalServerError": return [3, 4];
|
|
731
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 4];
|
|
732
|
+
case "InvalidJobIdException": return [3, 6];
|
|
733
|
+
case "com.amazonaws.textract#InvalidJobIdException": return [3, 6];
|
|
734
|
+
case "InvalidKMSKeyException": return [3, 8];
|
|
735
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 8];
|
|
736
|
+
case "InvalidParameterException": return [3, 10];
|
|
737
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
738
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
739
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
740
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
741
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
742
|
+
case "ThrottlingException": return [3, 16];
|
|
743
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
744
|
+
}
|
|
745
|
+
return [3, 18];
|
|
746
|
+
case 2:
|
|
747
|
+
_c = [{}];
|
|
748
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
749
|
+
case 3:
|
|
750
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
751
|
+
return [3, 19];
|
|
752
|
+
case 4:
|
|
753
|
+
_d = [{}];
|
|
754
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
755
|
+
case 5:
|
|
756
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
757
|
+
return [3, 19];
|
|
758
|
+
case 6:
|
|
759
|
+
_e = [{}];
|
|
760
|
+
return [4, deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)];
|
|
761
|
+
case 7:
|
|
762
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
763
|
+
return [3, 19];
|
|
764
|
+
case 8:
|
|
765
|
+
_f = [{}];
|
|
766
|
+
return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
767
|
+
case 9:
|
|
768
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
769
|
+
return [3, 19];
|
|
770
|
+
case 10:
|
|
771
|
+
_g = [{}];
|
|
772
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
773
|
+
case 11:
|
|
774
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
775
|
+
return [3, 19];
|
|
776
|
+
case 12:
|
|
777
|
+
_h = [{}];
|
|
778
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
779
|
+
case 13:
|
|
780
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
781
|
+
return [3, 19];
|
|
782
|
+
case 14:
|
|
783
|
+
_j = [{}];
|
|
784
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
785
|
+
case 15:
|
|
786
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
787
|
+
return [3, 19];
|
|
788
|
+
case 16:
|
|
789
|
+
_k = [{}];
|
|
790
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
791
|
+
case 17:
|
|
792
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
793
|
+
return [3, 19];
|
|
794
|
+
case 18:
|
|
795
|
+
parsedBody = parsedOutput.body;
|
|
796
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
797
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
798
|
+
_m.label = 19;
|
|
799
|
+
case 19:
|
|
800
|
+
message = response.message || response.Message || errorCode;
|
|
801
|
+
response.message = message;
|
|
802
|
+
delete response.Message;
|
|
803
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
}); };
|
|
673
807
|
export var deserializeAws_json1_1StartDocumentAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
674
808
|
var data, contents, response;
|
|
675
809
|
return __generator(this, function (_a) {
|
|
@@ -958,6 +1092,150 @@ var deserializeAws_json1_1StartDocumentTextDetectionCommandError = function (out
|
|
|
958
1092
|
}
|
|
959
1093
|
});
|
|
960
1094
|
}); };
|
|
1095
|
+
export var deserializeAws_json1_1StartExpenseAnalysisCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1096
|
+
var data, contents, response;
|
|
1097
|
+
return __generator(this, function (_a) {
|
|
1098
|
+
switch (_a.label) {
|
|
1099
|
+
case 0:
|
|
1100
|
+
if (output.statusCode >= 300) {
|
|
1101
|
+
return [2, deserializeAws_json1_1StartExpenseAnalysisCommandError(output, context)];
|
|
1102
|
+
}
|
|
1103
|
+
return [4, parseBody(output.body, context)];
|
|
1104
|
+
case 1:
|
|
1105
|
+
data = _a.sent();
|
|
1106
|
+
contents = {};
|
|
1107
|
+
contents = deserializeAws_json1_1StartExpenseAnalysisResponse(data, context);
|
|
1108
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1109
|
+
return [2, Promise.resolve(response)];
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
}); };
|
|
1113
|
+
var deserializeAws_json1_1StartExpenseAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1114
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, parsedBody, message;
|
|
1115
|
+
var _q;
|
|
1116
|
+
return __generator(this, function (_r) {
|
|
1117
|
+
switch (_r.label) {
|
|
1118
|
+
case 0:
|
|
1119
|
+
_a = [__assign({}, output)];
|
|
1120
|
+
_q = {};
|
|
1121
|
+
return [4, parseBody(output.body, context)];
|
|
1122
|
+
case 1:
|
|
1123
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_q.body = _r.sent(), _q)]));
|
|
1124
|
+
errorCode = "UnknownError";
|
|
1125
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1126
|
+
_b = errorCode;
|
|
1127
|
+
switch (_b) {
|
|
1128
|
+
case "AccessDeniedException": return [3, 2];
|
|
1129
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
1130
|
+
case "BadDocumentException": return [3, 4];
|
|
1131
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
1132
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
1133
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
1134
|
+
case "IdempotentParameterMismatchException": return [3, 8];
|
|
1135
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3, 8];
|
|
1136
|
+
case "InternalServerError": return [3, 10];
|
|
1137
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
1138
|
+
case "InvalidKMSKeyException": return [3, 12];
|
|
1139
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 12];
|
|
1140
|
+
case "InvalidParameterException": return [3, 14];
|
|
1141
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 14];
|
|
1142
|
+
case "InvalidS3ObjectException": return [3, 16];
|
|
1143
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 16];
|
|
1144
|
+
case "LimitExceededException": return [3, 18];
|
|
1145
|
+
case "com.amazonaws.textract#LimitExceededException": return [3, 18];
|
|
1146
|
+
case "ProvisionedThroughputExceededException": return [3, 20];
|
|
1147
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 20];
|
|
1148
|
+
case "ThrottlingException": return [3, 22];
|
|
1149
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 22];
|
|
1150
|
+
case "UnsupportedDocumentException": return [3, 24];
|
|
1151
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 24];
|
|
1152
|
+
}
|
|
1153
|
+
return [3, 26];
|
|
1154
|
+
case 2:
|
|
1155
|
+
_c = [{}];
|
|
1156
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1157
|
+
case 3:
|
|
1158
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1159
|
+
return [3, 27];
|
|
1160
|
+
case 4:
|
|
1161
|
+
_d = [{}];
|
|
1162
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
1163
|
+
case 5:
|
|
1164
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1165
|
+
return [3, 27];
|
|
1166
|
+
case 6:
|
|
1167
|
+
_e = [{}];
|
|
1168
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
1169
|
+
case 7:
|
|
1170
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1171
|
+
return [3, 27];
|
|
1172
|
+
case 8:
|
|
1173
|
+
_f = [{}];
|
|
1174
|
+
return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
|
|
1175
|
+
case 9:
|
|
1176
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1177
|
+
return [3, 27];
|
|
1178
|
+
case 10:
|
|
1179
|
+
_g = [{}];
|
|
1180
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
1181
|
+
case 11:
|
|
1182
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1183
|
+
return [3, 27];
|
|
1184
|
+
case 12:
|
|
1185
|
+
_h = [{}];
|
|
1186
|
+
return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
1187
|
+
case 13:
|
|
1188
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1189
|
+
return [3, 27];
|
|
1190
|
+
case 14:
|
|
1191
|
+
_j = [{}];
|
|
1192
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
1193
|
+
case 15:
|
|
1194
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1195
|
+
return [3, 27];
|
|
1196
|
+
case 16:
|
|
1197
|
+
_k = [{}];
|
|
1198
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
1199
|
+
case 17:
|
|
1200
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1201
|
+
return [3, 27];
|
|
1202
|
+
case 18:
|
|
1203
|
+
_l = [{}];
|
|
1204
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
1205
|
+
case 19:
|
|
1206
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1207
|
+
return [3, 27];
|
|
1208
|
+
case 20:
|
|
1209
|
+
_m = [{}];
|
|
1210
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
1211
|
+
case 21:
|
|
1212
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1213
|
+
return [3, 27];
|
|
1214
|
+
case 22:
|
|
1215
|
+
_o = [{}];
|
|
1216
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
1217
|
+
case 23:
|
|
1218
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _o.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1219
|
+
return [3, 27];
|
|
1220
|
+
case 24:
|
|
1221
|
+
_p = [{}];
|
|
1222
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
1223
|
+
case 25:
|
|
1224
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _p.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
1225
|
+
return [3, 27];
|
|
1226
|
+
case 26:
|
|
1227
|
+
parsedBody = parsedOutput.body;
|
|
1228
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1229
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
1230
|
+
_r.label = 27;
|
|
1231
|
+
case 27:
|
|
1232
|
+
message = response.message || response.Message || errorCode;
|
|
1233
|
+
response.message = message;
|
|
1234
|
+
delete response.Message;
|
|
1235
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
1236
|
+
}
|
|
1237
|
+
});
|
|
1238
|
+
}); };
|
|
961
1239
|
var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
962
1240
|
var body, deserialized, contents;
|
|
963
1241
|
return __generator(this, function (_a) {
|
|
@@ -1134,6 +1412,9 @@ var serializeAws_json1_1GetDocumentAnalysisRequest = function (input, context) {
|
|
|
1134
1412
|
var serializeAws_json1_1GetDocumentTextDetectionRequest = function (input, context) {
|
|
1135
1413
|
return __assign(__assign(__assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
|
|
1136
1414
|
};
|
|
1415
|
+
var serializeAws_json1_1GetExpenseAnalysisRequest = function (input, context) {
|
|
1416
|
+
return __assign(__assign(__assign({}, (input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId })), (input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults })), (input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }));
|
|
1417
|
+
};
|
|
1137
1418
|
var serializeAws_json1_1HumanLoopConfig = function (input, context) {
|
|
1138
1419
|
return __assign(__assign(__assign({}, (input.DataAttributes !== undefined &&
|
|
1139
1420
|
input.DataAttributes !== null && {
|
|
@@ -1179,6 +1460,17 @@ var serializeAws_json1_1StartDocumentTextDetectionRequest = function (input, con
|
|
|
1179
1460
|
})), (input.OutputConfig !== undefined &&
|
|
1180
1461
|
input.OutputConfig !== null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }));
|
|
1181
1462
|
};
|
|
1463
|
+
var serializeAws_json1_1StartExpenseAnalysisRequest = function (input, context) {
|
|
1464
|
+
return __assign(__assign(__assign(__assign(__assign(__assign({}, (input.ClientRequestToken !== undefined &&
|
|
1465
|
+
input.ClientRequestToken !== null && { ClientRequestToken: input.ClientRequestToken })), (input.DocumentLocation !== undefined &&
|
|
1466
|
+
input.DocumentLocation !== null && {
|
|
1467
|
+
DocumentLocation: serializeAws_json1_1DocumentLocation(input.DocumentLocation, context),
|
|
1468
|
+
})), (input.JobTag !== undefined && input.JobTag !== null && { JobTag: input.JobTag })), (input.KMSKeyId !== undefined && input.KMSKeyId !== null && { KMSKeyId: input.KMSKeyId })), (input.NotificationChannel !== undefined &&
|
|
1469
|
+
input.NotificationChannel !== null && {
|
|
1470
|
+
NotificationChannel: serializeAws_json1_1NotificationChannel(input.NotificationChannel, context),
|
|
1471
|
+
})), (input.OutputConfig !== undefined &&
|
|
1472
|
+
input.OutputConfig !== null && { OutputConfig: serializeAws_json1_1OutputConfig(input.OutputConfig, context) }));
|
|
1473
|
+
};
|
|
1182
1474
|
var deserializeAws_json1_1AccessDeniedException = function (output, context) {
|
|
1183
1475
|
return {
|
|
1184
1476
|
Code: __expectString(output.Code),
|
|
@@ -1393,6 +1685,23 @@ var deserializeAws_json1_1GetDocumentTextDetectionResponse = function (output, c
|
|
|
1393
1685
|
: undefined,
|
|
1394
1686
|
};
|
|
1395
1687
|
};
|
|
1688
|
+
var deserializeAws_json1_1GetExpenseAnalysisResponse = function (output, context) {
|
|
1689
|
+
return {
|
|
1690
|
+
AnalyzeExpenseModelVersion: __expectString(output.AnalyzeExpenseModelVersion),
|
|
1691
|
+
DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
|
|
1692
|
+
? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
|
|
1693
|
+
: undefined,
|
|
1694
|
+
ExpenseDocuments: output.ExpenseDocuments !== undefined && output.ExpenseDocuments !== null
|
|
1695
|
+
? deserializeAws_json1_1ExpenseDocumentList(output.ExpenseDocuments, context)
|
|
1696
|
+
: undefined,
|
|
1697
|
+
JobStatus: __expectString(output.JobStatus),
|
|
1698
|
+
NextToken: __expectString(output.NextToken),
|
|
1699
|
+
StatusMessage: __expectString(output.StatusMessage),
|
|
1700
|
+
Warnings: output.Warnings !== undefined && output.Warnings !== null
|
|
1701
|
+
? deserializeAws_json1_1Warnings(output.Warnings, context)
|
|
1702
|
+
: undefined,
|
|
1703
|
+
};
|
|
1704
|
+
};
|
|
1396
1705
|
var deserializeAws_json1_1HumanLoopActivationOutput = function (output, context) {
|
|
1397
1706
|
return {
|
|
1398
1707
|
HumanLoopActivationConditionsEvaluationResults: output.HumanLoopActivationConditionsEvaluationResults !== undefined &&
|
|
@@ -1569,6 +1878,11 @@ var deserializeAws_json1_1StartDocumentTextDetectionResponse = function (output,
|
|
|
1569
1878
|
JobId: __expectString(output.JobId),
|
|
1570
1879
|
};
|
|
1571
1880
|
};
|
|
1881
|
+
var deserializeAws_json1_1StartExpenseAnalysisResponse = function (output, context) {
|
|
1882
|
+
return {
|
|
1883
|
+
JobId: __expectString(output.JobId),
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1572
1886
|
var deserializeAws_json1_1ThrottlingException = function (output, context) {
|
|
1573
1887
|
return {
|
|
1574
1888
|
Code: __expectString(output.Code),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
2
|
import packageInfo from "../package.json";
|
|
3
3
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
4
5
|
import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
|
|
5
6
|
import { invalidProvider } from "@aws-sdk/invalid-dependency";
|
|
6
7
|
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
|
|
@@ -10,7 +11,7 @@ import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
|
|
|
10
11
|
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
11
12
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
12
13
|
export var getRuntimeConfig = function (config) {
|
|
13
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
14
15
|
var clientSharedValues = getSharedRuntimeConfig(config);
|
|
15
|
-
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector,
|
|
16
|
+
return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
|
|
16
17
|
};
|