@aws-sdk/client-textract 3.33.0 → 3.36.1
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 +47 -0
- package/{dist/cjs → dist-cjs}/Textract.js +1 -7
- package/{dist/cjs → dist-cjs}/TextractClient.js +8 -19
- package/dist-cjs/commands/AnalyzeDocumentCommand.js +36 -0
- package/dist-cjs/commands/AnalyzeExpenseCommand.js +36 -0
- package/dist-cjs/commands/DetectDocumentTextCommand.js +36 -0
- package/dist-cjs/commands/GetDocumentAnalysisCommand.js +36 -0
- package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +36 -0
- package/dist-cjs/commands/StartDocumentAnalysisCommand.js +36 -0
- package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +36 -0
- package/{dist/cjs → dist-cjs}/endpoints.js +0 -1
- package/{dist/cjs → dist-cjs}/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/index.js +0 -1
- package/{dist/cjs → dist-cjs}/models/models_0.js +0 -148
- package/{dist/cjs → dist-cjs}/protocols/Aws_json1_1.js +0 -6
- package/{dist/cjs → dist-cjs}/runtimeConfig.browser.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.js +1 -5
- package/{dist/cjs → dist-cjs}/runtimeConfig.native.js +0 -4
- package/{dist/cjs → dist-cjs}/runtimeConfig.shared.js +1 -5
- package/{dist/es → dist-es}/Textract.js +2 -8
- package/{dist/es → dist-es}/TextractClient.js +2 -13
- package/dist-es/commands/AnalyzeDocumentCommand.js +39 -0
- package/{dist/es → dist-es}/commands/AnalyzeExpenseCommand.js +4 -43
- package/dist-es/commands/DetectDocumentTextCommand.js +39 -0
- package/dist-es/commands/GetDocumentAnalysisCommand.js +39 -0
- package/dist-es/commands/GetDocumentTextDetectionCommand.js +39 -0
- package/dist-es/commands/StartDocumentAnalysisCommand.js +39 -0
- package/dist-es/commands/StartDocumentTextDetectionCommand.js +39 -0
- package/{dist/es → dist-es}/endpoints.js +1 -2
- package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
- package/{dist/types/models/index.d.ts → dist-es/models/index.js} +0 -0
- package/{dist/es → dist-es}/models/models_0.js +0 -148
- package/{dist/es → dist-es}/protocols/Aws_json1_1.js +338 -344
- package/{dist/es → dist-es}/runtimeConfig.browser.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.js +1 -5
- package/{dist/es → dist-es}/runtimeConfig.native.js +0 -4
- package/{dist/es → dist-es}/runtimeConfig.shared.js +1 -5
- package/{dist/types → dist-types}/Textract.d.ts +2 -2
- package/{dist/types → dist-types}/TextractClient.d.ts +8 -8
- package/{dist/types → dist-types}/commands/AnalyzeDocumentCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/AnalyzeExpenseCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/DetectDocumentTextCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetDocumentAnalysisCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/GetDocumentTextDetectionCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StartDocumentAnalysisCommand.d.ts +3 -3
- package/{dist/types → dist-types}/commands/StartDocumentTextDetectionCommand.d.ts +3 -3
- package/{dist/types → dist-types}/endpoints.d.ts +0 -0
- package/{index.ts → dist-types/index.d.ts} +0 -0
- package/{models/index.ts → dist-types/models/index.d.ts} +0 -0
- package/{dist/types → dist-types}/models/models_0.d.ts +0 -0
- package/{dist/types → dist-types}/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/runtimeConfig.browser.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.d.ts +1 -1
- package/{dist/types → dist-types}/runtimeConfig.native.d.ts +0 -0
- package/{dist/types → dist-types}/runtimeConfig.shared.d.ts +0 -0
- package/dist-types/ts3.4/Textract.d.ts +40 -0
- package/{dist/types → dist-types}/ts3.4/TextractClient.d.ts +32 -99
- package/dist-types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DetectDocumentTextCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/endpoints.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
- package/{dist/types → dist-types}/ts3.4/models/index.d.ts +0 -0
- package/dist-types/ts3.4/models/models_0.d.ts +649 -0
- package/{dist/types → dist-types}/ts3.4/protocols/Aws_json1_1.d.ts +2 -2
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.browser.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.d.ts +2 -4
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.native.d.ts +1 -3
- package/{dist/types → dist-types}/ts3.4/runtimeConfig.shared.d.ts +1 -3
- package/package.json +52 -49
- package/Textract.ts +0 -422
- package/TextractClient.ts +0 -270
- package/commands/AnalyzeDocumentCommand.ts +0 -124
- package/commands/AnalyzeExpenseCommand.ts +0 -107
- package/commands/DetectDocumentTextCommand.ts +0 -104
- package/commands/GetDocumentAnalysisCommand.ts +0 -138
- package/commands/GetDocumentTextDetectionCommand.ts +0 -118
- package/commands/StartDocumentAnalysisCommand.ts +0 -111
- package/commands/StartDocumentTextDetectionCommand.ts +0 -113
- package/dist/cjs/Textract.js.map +0 -1
- package/dist/cjs/TextractClient.js.map +0 -1
- package/dist/cjs/commands/AnalyzeDocumentCommand.js +0 -91
- package/dist/cjs/commands/AnalyzeDocumentCommand.js.map +0 -1
- package/dist/cjs/commands/AnalyzeExpenseCommand.js +0 -74
- package/dist/cjs/commands/AnalyzeExpenseCommand.js.map +0 -1
- package/dist/cjs/commands/DetectDocumentTextCommand.js +0 -71
- package/dist/cjs/commands/DetectDocumentTextCommand.js.map +0 -1
- package/dist/cjs/commands/GetDocumentAnalysisCommand.js +0 -105
- package/dist/cjs/commands/GetDocumentAnalysisCommand.js.map +0 -1
- package/dist/cjs/commands/GetDocumentTextDetectionCommand.js +0 -85
- package/dist/cjs/commands/GetDocumentTextDetectionCommand.js.map +0 -1
- package/dist/cjs/commands/StartDocumentAnalysisCommand.js +0 -78
- package/dist/cjs/commands/StartDocumentAnalysisCommand.js.map +0 -1
- package/dist/cjs/commands/StartDocumentTextDetectionCommand.js +0 -77
- package/dist/cjs/commands/StartDocumentTextDetectionCommand.js.map +0 -1
- package/dist/cjs/endpoints.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/models/index.js.map +0 -1
- package/dist/cjs/models/models_0.js.map +0 -1
- package/dist/cjs/package.json +0 -91
- package/dist/cjs/protocols/Aws_json1_1.js.map +0 -1
- package/dist/cjs/runtimeConfig.browser.js.map +0 -1
- package/dist/cjs/runtimeConfig.js.map +0 -1
- package/dist/cjs/runtimeConfig.native.js.map +0 -1
- package/dist/cjs/runtimeConfig.shared.js.map +0 -1
- package/dist/es/Textract.js.map +0 -1
- package/dist/es/TextractClient.js.map +0 -1
- package/dist/es/commands/AnalyzeDocumentCommand.js +0 -95
- package/dist/es/commands/AnalyzeDocumentCommand.js.map +0 -1
- package/dist/es/commands/AnalyzeExpenseCommand.js.map +0 -1
- package/dist/es/commands/DetectDocumentTextCommand.js +0 -75
- package/dist/es/commands/DetectDocumentTextCommand.js.map +0 -1
- package/dist/es/commands/GetDocumentAnalysisCommand.js +0 -109
- package/dist/es/commands/GetDocumentAnalysisCommand.js.map +0 -1
- package/dist/es/commands/GetDocumentTextDetectionCommand.js +0 -89
- package/dist/es/commands/GetDocumentTextDetectionCommand.js.map +0 -1
- package/dist/es/commands/StartDocumentAnalysisCommand.js +0 -82
- package/dist/es/commands/StartDocumentAnalysisCommand.js.map +0 -1
- package/dist/es/commands/StartDocumentTextDetectionCommand.js +0 -81
- package/dist/es/commands/StartDocumentTextDetectionCommand.js.map +0 -1
- package/dist/es/endpoints.js.map +0 -1
- package/dist/es/index.js +0 -11
- package/dist/es/index.js.map +0 -1
- package/dist/es/models/index.js +0 -2
- package/dist/es/models/index.js.map +0 -1
- package/dist/es/models/models_0.js.map +0 -1
- package/dist/es/package.json +0 -91
- package/dist/es/protocols/Aws_json1_1.js.map +0 -1
- package/dist/es/runtimeConfig.browser.js.map +0 -1
- package/dist/es/runtimeConfig.js.map +0 -1
- package/dist/es/runtimeConfig.native.js.map +0 -1
- package/dist/es/runtimeConfig.shared.js.map +0 -1
- package/dist/types/ts3.4/Textract.d.ts +0 -212
- package/dist/types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +0 -65
- package/dist/types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +0 -48
- package/dist/types/ts3.4/commands/DetectDocumentTextCommand.d.ts +0 -45
- package/dist/types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +0 -79
- package/dist/types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +0 -59
- package/dist/types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +0 -52
- package/dist/types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +0 -51
- package/dist/types/ts3.4/models/models_0.d.ts +0 -1347
- package/endpoints.ts +0 -57
- package/jest.config.js +0 -4
- package/models/models_0.ts +0 -1627
- package/protocols/Aws_json1_1.ts +0 -2060
- package/runtimeConfig.browser.ts +0 -40
- package/runtimeConfig.native.ts +0 -16
- package/runtimeConfig.shared.ts +0 -16
- package/runtimeConfig.ts +0 -45
- package/tsconfig.es.json +0 -12
- package/tsconfig.json +0 -32
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
|
-
import {
|
|
3
|
+
import { expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, } from "@aws-sdk/smithy-client";
|
|
4
4
|
export var serializeAws_json1_1AnalyzeDocumentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
5
5
|
var headers, body;
|
|
6
6
|
return __generator(this, function (_a) {
|
|
@@ -9,7 +9,7 @@ export var serializeAws_json1_1AnalyzeDocumentCommand = function (input, context
|
|
|
9
9
|
"x-amz-target": "Textract.AnalyzeDocument",
|
|
10
10
|
};
|
|
11
11
|
body = JSON.stringify(serializeAws_json1_1AnalyzeDocumentRequest(input, context));
|
|
12
|
-
return [2
|
|
12
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
13
13
|
});
|
|
14
14
|
}); };
|
|
15
15
|
export var serializeAws_json1_1AnalyzeExpenseCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -20,7 +20,7 @@ export var serializeAws_json1_1AnalyzeExpenseCommand = function (input, context)
|
|
|
20
20
|
"x-amz-target": "Textract.AnalyzeExpense",
|
|
21
21
|
};
|
|
22
22
|
body = JSON.stringify(serializeAws_json1_1AnalyzeExpenseRequest(input, context));
|
|
23
|
-
return [2
|
|
23
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
24
24
|
});
|
|
25
25
|
}); };
|
|
26
26
|
export var serializeAws_json1_1DetectDocumentTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -31,7 +31,7 @@ export var serializeAws_json1_1DetectDocumentTextCommand = function (input, cont
|
|
|
31
31
|
"x-amz-target": "Textract.DetectDocumentText",
|
|
32
32
|
};
|
|
33
33
|
body = JSON.stringify(serializeAws_json1_1DetectDocumentTextRequest(input, context));
|
|
34
|
-
return [2
|
|
34
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
35
35
|
});
|
|
36
36
|
}); };
|
|
37
37
|
export var serializeAws_json1_1GetDocumentAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -42,7 +42,7 @@ export var serializeAws_json1_1GetDocumentAnalysisCommand = function (input, con
|
|
|
42
42
|
"x-amz-target": "Textract.GetDocumentAnalysis",
|
|
43
43
|
};
|
|
44
44
|
body = JSON.stringify(serializeAws_json1_1GetDocumentAnalysisRequest(input, context));
|
|
45
|
-
return [2
|
|
45
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
46
46
|
});
|
|
47
47
|
}); };
|
|
48
48
|
export var serializeAws_json1_1GetDocumentTextDetectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -53,7 +53,7 @@ export var serializeAws_json1_1GetDocumentTextDetectionCommand = function (input
|
|
|
53
53
|
"x-amz-target": "Textract.GetDocumentTextDetection",
|
|
54
54
|
};
|
|
55
55
|
body = JSON.stringify(serializeAws_json1_1GetDocumentTextDetectionRequest(input, context));
|
|
56
|
-
return [2
|
|
56
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
57
57
|
});
|
|
58
58
|
}); };
|
|
59
59
|
export var serializeAws_json1_1StartDocumentAnalysisCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -64,7 +64,7 @@ export var serializeAws_json1_1StartDocumentAnalysisCommand = function (input, c
|
|
|
64
64
|
"x-amz-target": "Textract.StartDocumentAnalysis",
|
|
65
65
|
};
|
|
66
66
|
body = JSON.stringify(serializeAws_json1_1StartDocumentAnalysisRequest(input, context));
|
|
67
|
-
return [2
|
|
67
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
68
68
|
});
|
|
69
69
|
}); };
|
|
70
70
|
export var serializeAws_json1_1StartDocumentTextDetectionCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -75,7 +75,7 @@ export var serializeAws_json1_1StartDocumentTextDetectionCommand = function (inp
|
|
|
75
75
|
"x-amz-target": "Textract.StartDocumentTextDetection",
|
|
76
76
|
};
|
|
77
77
|
body = JSON.stringify(serializeAws_json1_1StartDocumentTextDetectionRequest(input, context));
|
|
78
|
-
return [2
|
|
78
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
79
79
|
});
|
|
80
80
|
}); };
|
|
81
81
|
export var deserializeAws_json1_1AnalyzeDocumentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -84,15 +84,15 @@ export var deserializeAws_json1_1AnalyzeDocumentCommand = function (output, cont
|
|
|
84
84
|
switch (_a.label) {
|
|
85
85
|
case 0:
|
|
86
86
|
if (output.statusCode >= 300) {
|
|
87
|
-
return [2
|
|
87
|
+
return [2, deserializeAws_json1_1AnalyzeDocumentCommandError(output, context)];
|
|
88
88
|
}
|
|
89
|
-
return [4
|
|
89
|
+
return [4, parseBody(output.body, context)];
|
|
90
90
|
case 1:
|
|
91
91
|
data = _a.sent();
|
|
92
92
|
contents = {};
|
|
93
93
|
contents = deserializeAws_json1_1AnalyzeDocumentResponse(data, context);
|
|
94
94
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
95
|
-
return [2
|
|
95
|
+
return [2, Promise.resolve(response)];
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
}); };
|
|
@@ -104,95 +104,95 @@ var deserializeAws_json1_1AnalyzeDocumentCommandError = function (output, contex
|
|
|
104
104
|
case 0:
|
|
105
105
|
_a = [__assign({}, output)];
|
|
106
106
|
_o = {};
|
|
107
|
-
return [4
|
|
107
|
+
return [4, parseBody(output.body, context)];
|
|
108
108
|
case 1:
|
|
109
109
|
parsedOutput = __assign.apply(void 0, _a.concat([(_o.body = _p.sent(), _o)]));
|
|
110
110
|
errorCode = "UnknownError";
|
|
111
111
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
112
112
|
_b = errorCode;
|
|
113
113
|
switch (_b) {
|
|
114
|
-
case "AccessDeniedException": return [3
|
|
115
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
116
|
-
case "BadDocumentException": return [3
|
|
117
|
-
case "com.amazonaws.textract#BadDocumentException": return [3
|
|
118
|
-
case "DocumentTooLargeException": return [3
|
|
119
|
-
case "com.amazonaws.textract#DocumentTooLargeException": return [3
|
|
120
|
-
case "HumanLoopQuotaExceededException": return [3
|
|
121
|
-
case "com.amazonaws.textract#HumanLoopQuotaExceededException": return [3
|
|
122
|
-
case "InternalServerError": return [3
|
|
123
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
124
|
-
case "InvalidParameterException": return [3
|
|
125
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
126
|
-
case "InvalidS3ObjectException": return [3
|
|
127
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
128
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
129
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
130
|
-
case "ThrottlingException": return [3
|
|
131
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
132
|
-
case "UnsupportedDocumentException": return [3
|
|
133
|
-
case "com.amazonaws.textract#UnsupportedDocumentException": return [3
|
|
114
|
+
case "AccessDeniedException": return [3, 2];
|
|
115
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
116
|
+
case "BadDocumentException": return [3, 4];
|
|
117
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
118
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
119
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
120
|
+
case "HumanLoopQuotaExceededException": return [3, 8];
|
|
121
|
+
case "com.amazonaws.textract#HumanLoopQuotaExceededException": return [3, 8];
|
|
122
|
+
case "InternalServerError": return [3, 10];
|
|
123
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
124
|
+
case "InvalidParameterException": return [3, 12];
|
|
125
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 12];
|
|
126
|
+
case "InvalidS3ObjectException": return [3, 14];
|
|
127
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 14];
|
|
128
|
+
case "ProvisionedThroughputExceededException": return [3, 16];
|
|
129
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 16];
|
|
130
|
+
case "ThrottlingException": return [3, 18];
|
|
131
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 18];
|
|
132
|
+
case "UnsupportedDocumentException": return [3, 20];
|
|
133
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 20];
|
|
134
134
|
}
|
|
135
|
-
return [3
|
|
135
|
+
return [3, 22];
|
|
136
136
|
case 2:
|
|
137
137
|
_c = [{}];
|
|
138
|
-
return [4
|
|
138
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
139
139
|
case 3:
|
|
140
140
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
141
|
-
return [3
|
|
141
|
+
return [3, 23];
|
|
142
142
|
case 4:
|
|
143
143
|
_d = [{}];
|
|
144
|
-
return [4
|
|
144
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
145
145
|
case 5:
|
|
146
146
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
147
|
-
return [3
|
|
147
|
+
return [3, 23];
|
|
148
148
|
case 6:
|
|
149
149
|
_e = [{}];
|
|
150
|
-
return [4
|
|
150
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
151
151
|
case 7:
|
|
152
152
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
153
|
-
return [3
|
|
153
|
+
return [3, 23];
|
|
154
154
|
case 8:
|
|
155
155
|
_f = [{}];
|
|
156
|
-
return [4
|
|
156
|
+
return [4, deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
157
157
|
case 9:
|
|
158
158
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
159
|
-
return [3
|
|
159
|
+
return [3, 23];
|
|
160
160
|
case 10:
|
|
161
161
|
_g = [{}];
|
|
162
|
-
return [4
|
|
162
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
163
163
|
case 11:
|
|
164
164
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
165
|
-
return [3
|
|
165
|
+
return [3, 23];
|
|
166
166
|
case 12:
|
|
167
167
|
_h = [{}];
|
|
168
|
-
return [4
|
|
168
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
169
169
|
case 13:
|
|
170
170
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
171
|
-
return [3
|
|
171
|
+
return [3, 23];
|
|
172
172
|
case 14:
|
|
173
173
|
_j = [{}];
|
|
174
|
-
return [4
|
|
174
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
175
175
|
case 15:
|
|
176
176
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
177
|
-
return [3
|
|
177
|
+
return [3, 23];
|
|
178
178
|
case 16:
|
|
179
179
|
_k = [{}];
|
|
180
|
-
return [4
|
|
180
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
181
181
|
case 17:
|
|
182
182
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
183
|
-
return [3
|
|
183
|
+
return [3, 23];
|
|
184
184
|
case 18:
|
|
185
185
|
_l = [{}];
|
|
186
|
-
return [4
|
|
186
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
187
187
|
case 19:
|
|
188
188
|
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
189
|
-
return [3
|
|
189
|
+
return [3, 23];
|
|
190
190
|
case 20:
|
|
191
191
|
_m = [{}];
|
|
192
|
-
return [4
|
|
192
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
193
193
|
case 21:
|
|
194
194
|
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_p.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
195
|
-
return [3
|
|
195
|
+
return [3, 23];
|
|
196
196
|
case 22:
|
|
197
197
|
parsedBody = parsedOutput.body;
|
|
198
198
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -202,7 +202,7 @@ var deserializeAws_json1_1AnalyzeDocumentCommandError = function (output, contex
|
|
|
202
202
|
message = response.message || response.Message || errorCode;
|
|
203
203
|
response.message = message;
|
|
204
204
|
delete response.Message;
|
|
205
|
-
return [2
|
|
205
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
206
206
|
}
|
|
207
207
|
});
|
|
208
208
|
}); };
|
|
@@ -212,15 +212,15 @@ export var deserializeAws_json1_1AnalyzeExpenseCommand = function (output, conte
|
|
|
212
212
|
switch (_a.label) {
|
|
213
213
|
case 0:
|
|
214
214
|
if (output.statusCode >= 300) {
|
|
215
|
-
return [2
|
|
215
|
+
return [2, deserializeAws_json1_1AnalyzeExpenseCommandError(output, context)];
|
|
216
216
|
}
|
|
217
|
-
return [4
|
|
217
|
+
return [4, parseBody(output.body, context)];
|
|
218
218
|
case 1:
|
|
219
219
|
data = _a.sent();
|
|
220
220
|
contents = {};
|
|
221
221
|
contents = deserializeAws_json1_1AnalyzeExpenseResponse(data, context);
|
|
222
222
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
223
|
-
return [2
|
|
223
|
+
return [2, Promise.resolve(response)];
|
|
224
224
|
}
|
|
225
225
|
});
|
|
226
226
|
}); };
|
|
@@ -232,87 +232,87 @@ var deserializeAws_json1_1AnalyzeExpenseCommandError = function (output, context
|
|
|
232
232
|
case 0:
|
|
233
233
|
_a = [__assign({}, output)];
|
|
234
234
|
_m = {};
|
|
235
|
-
return [4
|
|
235
|
+
return [4, parseBody(output.body, context)];
|
|
236
236
|
case 1:
|
|
237
237
|
parsedOutput = __assign.apply(void 0, _a.concat([(_m.body = _o.sent(), _m)]));
|
|
238
238
|
errorCode = "UnknownError";
|
|
239
239
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
240
240
|
_b = errorCode;
|
|
241
241
|
switch (_b) {
|
|
242
|
-
case "AccessDeniedException": return [3
|
|
243
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
244
|
-
case "BadDocumentException": return [3
|
|
245
|
-
case "com.amazonaws.textract#BadDocumentException": return [3
|
|
246
|
-
case "DocumentTooLargeException": return [3
|
|
247
|
-
case "com.amazonaws.textract#DocumentTooLargeException": return [3
|
|
248
|
-
case "InternalServerError": return [3
|
|
249
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
250
|
-
case "InvalidParameterException": return [3
|
|
251
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
252
|
-
case "InvalidS3ObjectException": return [3
|
|
253
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
254
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
255
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
256
|
-
case "ThrottlingException": return [3
|
|
257
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
258
|
-
case "UnsupportedDocumentException": return [3
|
|
259
|
-
case "com.amazonaws.textract#UnsupportedDocumentException": return [3
|
|
242
|
+
case "AccessDeniedException": return [3, 2];
|
|
243
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
244
|
+
case "BadDocumentException": return [3, 4];
|
|
245
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
246
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
247
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
248
|
+
case "InternalServerError": return [3, 8];
|
|
249
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 8];
|
|
250
|
+
case "InvalidParameterException": return [3, 10];
|
|
251
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
252
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
253
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
254
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
255
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
256
|
+
case "ThrottlingException": return [3, 16];
|
|
257
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
258
|
+
case "UnsupportedDocumentException": return [3, 18];
|
|
259
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 18];
|
|
260
260
|
}
|
|
261
|
-
return [3
|
|
261
|
+
return [3, 20];
|
|
262
262
|
case 2:
|
|
263
263
|
_c = [{}];
|
|
264
|
-
return [4
|
|
264
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
265
265
|
case 3:
|
|
266
266
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
267
|
-
return [3
|
|
267
|
+
return [3, 21];
|
|
268
268
|
case 4:
|
|
269
269
|
_d = [{}];
|
|
270
|
-
return [4
|
|
270
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
271
271
|
case 5:
|
|
272
272
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
273
|
-
return [3
|
|
273
|
+
return [3, 21];
|
|
274
274
|
case 6:
|
|
275
275
|
_e = [{}];
|
|
276
|
-
return [4
|
|
276
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
277
277
|
case 7:
|
|
278
278
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
279
|
-
return [3
|
|
279
|
+
return [3, 21];
|
|
280
280
|
case 8:
|
|
281
281
|
_f = [{}];
|
|
282
|
-
return [4
|
|
282
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
283
283
|
case 9:
|
|
284
284
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
285
|
-
return [3
|
|
285
|
+
return [3, 21];
|
|
286
286
|
case 10:
|
|
287
287
|
_g = [{}];
|
|
288
|
-
return [4
|
|
288
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
289
289
|
case 11:
|
|
290
290
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
291
|
-
return [3
|
|
291
|
+
return [3, 21];
|
|
292
292
|
case 12:
|
|
293
293
|
_h = [{}];
|
|
294
|
-
return [4
|
|
294
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
295
295
|
case 13:
|
|
296
296
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
297
|
-
return [3
|
|
297
|
+
return [3, 21];
|
|
298
298
|
case 14:
|
|
299
299
|
_j = [{}];
|
|
300
|
-
return [4
|
|
300
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
301
301
|
case 15:
|
|
302
302
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
303
|
-
return [3
|
|
303
|
+
return [3, 21];
|
|
304
304
|
case 16:
|
|
305
305
|
_k = [{}];
|
|
306
|
-
return [4
|
|
306
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
307
307
|
case 17:
|
|
308
308
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
309
|
-
return [3
|
|
309
|
+
return [3, 21];
|
|
310
310
|
case 18:
|
|
311
311
|
_l = [{}];
|
|
312
|
-
return [4
|
|
312
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
313
313
|
case 19:
|
|
314
314
|
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
315
|
-
return [3
|
|
315
|
+
return [3, 21];
|
|
316
316
|
case 20:
|
|
317
317
|
parsedBody = parsedOutput.body;
|
|
318
318
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -322,7 +322,7 @@ var deserializeAws_json1_1AnalyzeExpenseCommandError = function (output, context
|
|
|
322
322
|
message = response.message || response.Message || errorCode;
|
|
323
323
|
response.message = message;
|
|
324
324
|
delete response.Message;
|
|
325
|
-
return [2
|
|
325
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
326
326
|
}
|
|
327
327
|
});
|
|
328
328
|
}); };
|
|
@@ -332,15 +332,15 @@ export var deserializeAws_json1_1DetectDocumentTextCommand = function (output, c
|
|
|
332
332
|
switch (_a.label) {
|
|
333
333
|
case 0:
|
|
334
334
|
if (output.statusCode >= 300) {
|
|
335
|
-
return [2
|
|
335
|
+
return [2, deserializeAws_json1_1DetectDocumentTextCommandError(output, context)];
|
|
336
336
|
}
|
|
337
|
-
return [4
|
|
337
|
+
return [4, parseBody(output.body, context)];
|
|
338
338
|
case 1:
|
|
339
339
|
data = _a.sent();
|
|
340
340
|
contents = {};
|
|
341
341
|
contents = deserializeAws_json1_1DetectDocumentTextResponse(data, context);
|
|
342
342
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
343
|
-
return [2
|
|
343
|
+
return [2, Promise.resolve(response)];
|
|
344
344
|
}
|
|
345
345
|
});
|
|
346
346
|
}); };
|
|
@@ -352,87 +352,87 @@ var deserializeAws_json1_1DetectDocumentTextCommandError = function (output, con
|
|
|
352
352
|
case 0:
|
|
353
353
|
_a = [__assign({}, output)];
|
|
354
354
|
_m = {};
|
|
355
|
-
return [4
|
|
355
|
+
return [4, parseBody(output.body, context)];
|
|
356
356
|
case 1:
|
|
357
357
|
parsedOutput = __assign.apply(void 0, _a.concat([(_m.body = _o.sent(), _m)]));
|
|
358
358
|
errorCode = "UnknownError";
|
|
359
359
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
360
360
|
_b = errorCode;
|
|
361
361
|
switch (_b) {
|
|
362
|
-
case "AccessDeniedException": return [3
|
|
363
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
364
|
-
case "BadDocumentException": return [3
|
|
365
|
-
case "com.amazonaws.textract#BadDocumentException": return [3
|
|
366
|
-
case "DocumentTooLargeException": return [3
|
|
367
|
-
case "com.amazonaws.textract#DocumentTooLargeException": return [3
|
|
368
|
-
case "InternalServerError": return [3
|
|
369
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
370
|
-
case "InvalidParameterException": return [3
|
|
371
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
372
|
-
case "InvalidS3ObjectException": return [3
|
|
373
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
374
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
375
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
376
|
-
case "ThrottlingException": return [3
|
|
377
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
378
|
-
case "UnsupportedDocumentException": return [3
|
|
379
|
-
case "com.amazonaws.textract#UnsupportedDocumentException": return [3
|
|
362
|
+
case "AccessDeniedException": return [3, 2];
|
|
363
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
364
|
+
case "BadDocumentException": return [3, 4];
|
|
365
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
366
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
367
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
368
|
+
case "InternalServerError": return [3, 8];
|
|
369
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 8];
|
|
370
|
+
case "InvalidParameterException": return [3, 10];
|
|
371
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
372
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
373
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
374
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
375
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
376
|
+
case "ThrottlingException": return [3, 16];
|
|
377
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
378
|
+
case "UnsupportedDocumentException": return [3, 18];
|
|
379
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 18];
|
|
380
380
|
}
|
|
381
|
-
return [3
|
|
381
|
+
return [3, 20];
|
|
382
382
|
case 2:
|
|
383
383
|
_c = [{}];
|
|
384
|
-
return [4
|
|
384
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
385
385
|
case 3:
|
|
386
386
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
387
|
-
return [3
|
|
387
|
+
return [3, 21];
|
|
388
388
|
case 4:
|
|
389
389
|
_d = [{}];
|
|
390
|
-
return [4
|
|
390
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
391
391
|
case 5:
|
|
392
392
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
393
|
-
return [3
|
|
393
|
+
return [3, 21];
|
|
394
394
|
case 6:
|
|
395
395
|
_e = [{}];
|
|
396
|
-
return [4
|
|
396
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
397
397
|
case 7:
|
|
398
398
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
399
|
-
return [3
|
|
399
|
+
return [3, 21];
|
|
400
400
|
case 8:
|
|
401
401
|
_f = [{}];
|
|
402
|
-
return [4
|
|
402
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
403
403
|
case 9:
|
|
404
404
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
405
|
-
return [3
|
|
405
|
+
return [3, 21];
|
|
406
406
|
case 10:
|
|
407
407
|
_g = [{}];
|
|
408
|
-
return [4
|
|
408
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
409
409
|
case 11:
|
|
410
410
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
411
|
-
return [3
|
|
411
|
+
return [3, 21];
|
|
412
412
|
case 12:
|
|
413
413
|
_h = [{}];
|
|
414
|
-
return [4
|
|
414
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
415
415
|
case 13:
|
|
416
416
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
417
|
-
return [3
|
|
417
|
+
return [3, 21];
|
|
418
418
|
case 14:
|
|
419
419
|
_j = [{}];
|
|
420
|
-
return [4
|
|
420
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
421
421
|
case 15:
|
|
422
422
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
423
|
-
return [3
|
|
423
|
+
return [3, 21];
|
|
424
424
|
case 16:
|
|
425
425
|
_k = [{}];
|
|
426
|
-
return [4
|
|
426
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
427
427
|
case 17:
|
|
428
428
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
429
|
-
return [3
|
|
429
|
+
return [3, 21];
|
|
430
430
|
case 18:
|
|
431
431
|
_l = [{}];
|
|
432
|
-
return [4
|
|
432
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
433
433
|
case 19:
|
|
434
434
|
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
435
|
-
return [3
|
|
435
|
+
return [3, 21];
|
|
436
436
|
case 20:
|
|
437
437
|
parsedBody = parsedOutput.body;
|
|
438
438
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -442,7 +442,7 @@ var deserializeAws_json1_1DetectDocumentTextCommandError = function (output, con
|
|
|
442
442
|
message = response.message || response.Message || errorCode;
|
|
443
443
|
response.message = message;
|
|
444
444
|
delete response.Message;
|
|
445
|
-
return [2
|
|
445
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
446
446
|
}
|
|
447
447
|
});
|
|
448
448
|
}); };
|
|
@@ -452,15 +452,15 @@ export var deserializeAws_json1_1GetDocumentAnalysisCommand = function (output,
|
|
|
452
452
|
switch (_a.label) {
|
|
453
453
|
case 0:
|
|
454
454
|
if (output.statusCode >= 300) {
|
|
455
|
-
return [2
|
|
455
|
+
return [2, deserializeAws_json1_1GetDocumentAnalysisCommandError(output, context)];
|
|
456
456
|
}
|
|
457
|
-
return [4
|
|
457
|
+
return [4, parseBody(output.body, context)];
|
|
458
458
|
case 1:
|
|
459
459
|
data = _a.sent();
|
|
460
460
|
contents = {};
|
|
461
461
|
contents = deserializeAws_json1_1GetDocumentAnalysisResponse(data, context);
|
|
462
462
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
463
|
-
return [2
|
|
463
|
+
return [2, Promise.resolve(response)];
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
466
|
}); };
|
|
@@ -472,79 +472,79 @@ var deserializeAws_json1_1GetDocumentAnalysisCommandError = function (output, co
|
|
|
472
472
|
case 0:
|
|
473
473
|
_a = [__assign({}, output)];
|
|
474
474
|
_l = {};
|
|
475
|
-
return [4
|
|
475
|
+
return [4, parseBody(output.body, context)];
|
|
476
476
|
case 1:
|
|
477
477
|
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
478
478
|
errorCode = "UnknownError";
|
|
479
479
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
480
480
|
_b = errorCode;
|
|
481
481
|
switch (_b) {
|
|
482
|
-
case "AccessDeniedException": return [3
|
|
483
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
484
|
-
case "InternalServerError": return [3
|
|
485
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
486
|
-
case "InvalidJobIdException": return [3
|
|
487
|
-
case "com.amazonaws.textract#InvalidJobIdException": return [3
|
|
488
|
-
case "InvalidKMSKeyException": return [3
|
|
489
|
-
case "com.amazonaws.textract#InvalidKMSKeyException": return [3
|
|
490
|
-
case "InvalidParameterException": return [3
|
|
491
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
492
|
-
case "InvalidS3ObjectException": return [3
|
|
493
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
494
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
495
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
496
|
-
case "ThrottlingException": return [3
|
|
497
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
482
|
+
case "AccessDeniedException": return [3, 2];
|
|
483
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
484
|
+
case "InternalServerError": return [3, 4];
|
|
485
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 4];
|
|
486
|
+
case "InvalidJobIdException": return [3, 6];
|
|
487
|
+
case "com.amazonaws.textract#InvalidJobIdException": return [3, 6];
|
|
488
|
+
case "InvalidKMSKeyException": return [3, 8];
|
|
489
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 8];
|
|
490
|
+
case "InvalidParameterException": return [3, 10];
|
|
491
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
492
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
493
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
494
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
495
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
496
|
+
case "ThrottlingException": return [3, 16];
|
|
497
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
498
498
|
}
|
|
499
|
-
return [3
|
|
499
|
+
return [3, 18];
|
|
500
500
|
case 2:
|
|
501
501
|
_c = [{}];
|
|
502
|
-
return [4
|
|
502
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
503
503
|
case 3:
|
|
504
504
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
505
|
-
return [3
|
|
505
|
+
return [3, 19];
|
|
506
506
|
case 4:
|
|
507
507
|
_d = [{}];
|
|
508
|
-
return [4
|
|
508
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
509
509
|
case 5:
|
|
510
510
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
511
|
-
return [3
|
|
511
|
+
return [3, 19];
|
|
512
512
|
case 6:
|
|
513
513
|
_e = [{}];
|
|
514
|
-
return [4
|
|
514
|
+
return [4, deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)];
|
|
515
515
|
case 7:
|
|
516
516
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
517
|
-
return [3
|
|
517
|
+
return [3, 19];
|
|
518
518
|
case 8:
|
|
519
519
|
_f = [{}];
|
|
520
|
-
return [4
|
|
520
|
+
return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
521
521
|
case 9:
|
|
522
522
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
523
|
-
return [3
|
|
523
|
+
return [3, 19];
|
|
524
524
|
case 10:
|
|
525
525
|
_g = [{}];
|
|
526
|
-
return [4
|
|
526
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
527
527
|
case 11:
|
|
528
528
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
529
|
-
return [3
|
|
529
|
+
return [3, 19];
|
|
530
530
|
case 12:
|
|
531
531
|
_h = [{}];
|
|
532
|
-
return [4
|
|
532
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
533
533
|
case 13:
|
|
534
534
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
535
|
-
return [3
|
|
535
|
+
return [3, 19];
|
|
536
536
|
case 14:
|
|
537
537
|
_j = [{}];
|
|
538
|
-
return [4
|
|
538
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
539
539
|
case 15:
|
|
540
540
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
541
|
-
return [3
|
|
541
|
+
return [3, 19];
|
|
542
542
|
case 16:
|
|
543
543
|
_k = [{}];
|
|
544
|
-
return [4
|
|
544
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
545
545
|
case 17:
|
|
546
546
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
547
|
-
return [3
|
|
547
|
+
return [3, 19];
|
|
548
548
|
case 18:
|
|
549
549
|
parsedBody = parsedOutput.body;
|
|
550
550
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -554,7 +554,7 @@ var deserializeAws_json1_1GetDocumentAnalysisCommandError = function (output, co
|
|
|
554
554
|
message = response.message || response.Message || errorCode;
|
|
555
555
|
response.message = message;
|
|
556
556
|
delete response.Message;
|
|
557
|
-
return [2
|
|
557
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
558
558
|
}
|
|
559
559
|
});
|
|
560
560
|
}); };
|
|
@@ -564,15 +564,15 @@ export var deserializeAws_json1_1GetDocumentTextDetectionCommand = function (out
|
|
|
564
564
|
switch (_a.label) {
|
|
565
565
|
case 0:
|
|
566
566
|
if (output.statusCode >= 300) {
|
|
567
|
-
return [2
|
|
567
|
+
return [2, deserializeAws_json1_1GetDocumentTextDetectionCommandError(output, context)];
|
|
568
568
|
}
|
|
569
|
-
return [4
|
|
569
|
+
return [4, parseBody(output.body, context)];
|
|
570
570
|
case 1:
|
|
571
571
|
data = _a.sent();
|
|
572
572
|
contents = {};
|
|
573
573
|
contents = deserializeAws_json1_1GetDocumentTextDetectionResponse(data, context);
|
|
574
574
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
575
|
-
return [2
|
|
575
|
+
return [2, Promise.resolve(response)];
|
|
576
576
|
}
|
|
577
577
|
});
|
|
578
578
|
}); };
|
|
@@ -584,79 +584,79 @@ var deserializeAws_json1_1GetDocumentTextDetectionCommandError = function (outpu
|
|
|
584
584
|
case 0:
|
|
585
585
|
_a = [__assign({}, output)];
|
|
586
586
|
_l = {};
|
|
587
|
-
return [4
|
|
587
|
+
return [4, parseBody(output.body, context)];
|
|
588
588
|
case 1:
|
|
589
589
|
parsedOutput = __assign.apply(void 0, _a.concat([(_l.body = _m.sent(), _l)]));
|
|
590
590
|
errorCode = "UnknownError";
|
|
591
591
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
592
592
|
_b = errorCode;
|
|
593
593
|
switch (_b) {
|
|
594
|
-
case "AccessDeniedException": return [3
|
|
595
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
596
|
-
case "InternalServerError": return [3
|
|
597
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
598
|
-
case "InvalidJobIdException": return [3
|
|
599
|
-
case "com.amazonaws.textract#InvalidJobIdException": return [3
|
|
600
|
-
case "InvalidKMSKeyException": return [3
|
|
601
|
-
case "com.amazonaws.textract#InvalidKMSKeyException": return [3
|
|
602
|
-
case "InvalidParameterException": return [3
|
|
603
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
604
|
-
case "InvalidS3ObjectException": return [3
|
|
605
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
606
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
607
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
608
|
-
case "ThrottlingException": return [3
|
|
609
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
594
|
+
case "AccessDeniedException": return [3, 2];
|
|
595
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
596
|
+
case "InternalServerError": return [3, 4];
|
|
597
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 4];
|
|
598
|
+
case "InvalidJobIdException": return [3, 6];
|
|
599
|
+
case "com.amazonaws.textract#InvalidJobIdException": return [3, 6];
|
|
600
|
+
case "InvalidKMSKeyException": return [3, 8];
|
|
601
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 8];
|
|
602
|
+
case "InvalidParameterException": return [3, 10];
|
|
603
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
604
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
605
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
606
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
607
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
608
|
+
case "ThrottlingException": return [3, 16];
|
|
609
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
610
610
|
}
|
|
611
|
-
return [3
|
|
611
|
+
return [3, 18];
|
|
612
612
|
case 2:
|
|
613
613
|
_c = [{}];
|
|
614
|
-
return [4
|
|
614
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
615
615
|
case 3:
|
|
616
616
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
617
|
-
return [3
|
|
617
|
+
return [3, 19];
|
|
618
618
|
case 4:
|
|
619
619
|
_d = [{}];
|
|
620
|
-
return [4
|
|
620
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
621
621
|
case 5:
|
|
622
622
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
623
|
-
return [3
|
|
623
|
+
return [3, 19];
|
|
624
624
|
case 6:
|
|
625
625
|
_e = [{}];
|
|
626
|
-
return [4
|
|
626
|
+
return [4, deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)];
|
|
627
627
|
case 7:
|
|
628
628
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
629
|
-
return [3
|
|
629
|
+
return [3, 19];
|
|
630
630
|
case 8:
|
|
631
631
|
_f = [{}];
|
|
632
|
-
return [4
|
|
632
|
+
return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
633
633
|
case 9:
|
|
634
634
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
635
|
-
return [3
|
|
635
|
+
return [3, 19];
|
|
636
636
|
case 10:
|
|
637
637
|
_g = [{}];
|
|
638
|
-
return [4
|
|
638
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
639
639
|
case 11:
|
|
640
640
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
641
|
-
return [3
|
|
641
|
+
return [3, 19];
|
|
642
642
|
case 12:
|
|
643
643
|
_h = [{}];
|
|
644
|
-
return [4
|
|
644
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
645
645
|
case 13:
|
|
646
646
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
647
|
-
return [3
|
|
647
|
+
return [3, 19];
|
|
648
648
|
case 14:
|
|
649
649
|
_j = [{}];
|
|
650
|
-
return [4
|
|
650
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
651
651
|
case 15:
|
|
652
652
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
653
|
-
return [3
|
|
653
|
+
return [3, 19];
|
|
654
654
|
case 16:
|
|
655
655
|
_k = [{}];
|
|
656
|
-
return [4
|
|
656
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
657
657
|
case 17:
|
|
658
658
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_m.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
659
|
-
return [3
|
|
659
|
+
return [3, 19];
|
|
660
660
|
case 18:
|
|
661
661
|
parsedBody = parsedOutput.body;
|
|
662
662
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -666,7 +666,7 @@ var deserializeAws_json1_1GetDocumentTextDetectionCommandError = function (outpu
|
|
|
666
666
|
message = response.message || response.Message || errorCode;
|
|
667
667
|
response.message = message;
|
|
668
668
|
delete response.Message;
|
|
669
|
-
return [2
|
|
669
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
670
670
|
}
|
|
671
671
|
});
|
|
672
672
|
}); };
|
|
@@ -676,15 +676,15 @@ export var deserializeAws_json1_1StartDocumentAnalysisCommand = function (output
|
|
|
676
676
|
switch (_a.label) {
|
|
677
677
|
case 0:
|
|
678
678
|
if (output.statusCode >= 300) {
|
|
679
|
-
return [2
|
|
679
|
+
return [2, deserializeAws_json1_1StartDocumentAnalysisCommandError(output, context)];
|
|
680
680
|
}
|
|
681
|
-
return [4
|
|
681
|
+
return [4, parseBody(output.body, context)];
|
|
682
682
|
case 1:
|
|
683
683
|
data = _a.sent();
|
|
684
684
|
contents = {};
|
|
685
685
|
contents = deserializeAws_json1_1StartDocumentAnalysisResponse(data, context);
|
|
686
686
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
687
|
-
return [2
|
|
687
|
+
return [2, Promise.resolve(response)];
|
|
688
688
|
}
|
|
689
689
|
});
|
|
690
690
|
}); };
|
|
@@ -696,111 +696,111 @@ var deserializeAws_json1_1StartDocumentAnalysisCommandError = function (output,
|
|
|
696
696
|
case 0:
|
|
697
697
|
_a = [__assign({}, output)];
|
|
698
698
|
_q = {};
|
|
699
|
-
return [4
|
|
699
|
+
return [4, parseBody(output.body, context)];
|
|
700
700
|
case 1:
|
|
701
701
|
parsedOutput = __assign.apply(void 0, _a.concat([(_q.body = _r.sent(), _q)]));
|
|
702
702
|
errorCode = "UnknownError";
|
|
703
703
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
704
704
|
_b = errorCode;
|
|
705
705
|
switch (_b) {
|
|
706
|
-
case "AccessDeniedException": return [3
|
|
707
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
708
|
-
case "BadDocumentException": return [3
|
|
709
|
-
case "com.amazonaws.textract#BadDocumentException": return [3
|
|
710
|
-
case "DocumentTooLargeException": return [3
|
|
711
|
-
case "com.amazonaws.textract#DocumentTooLargeException": return [3
|
|
712
|
-
case "IdempotentParameterMismatchException": return [3
|
|
713
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3
|
|
714
|
-
case "InternalServerError": return [3
|
|
715
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
716
|
-
case "InvalidKMSKeyException": return [3
|
|
717
|
-
case "com.amazonaws.textract#InvalidKMSKeyException": return [3
|
|
718
|
-
case "InvalidParameterException": return [3
|
|
719
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
720
|
-
case "InvalidS3ObjectException": return [3
|
|
721
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
722
|
-
case "LimitExceededException": return [3
|
|
723
|
-
case "com.amazonaws.textract#LimitExceededException": return [3
|
|
724
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
725
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
726
|
-
case "ThrottlingException": return [3
|
|
727
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
728
|
-
case "UnsupportedDocumentException": return [3
|
|
729
|
-
case "com.amazonaws.textract#UnsupportedDocumentException": return [3
|
|
706
|
+
case "AccessDeniedException": return [3, 2];
|
|
707
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
708
|
+
case "BadDocumentException": return [3, 4];
|
|
709
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
710
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
711
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
712
|
+
case "IdempotentParameterMismatchException": return [3, 8];
|
|
713
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3, 8];
|
|
714
|
+
case "InternalServerError": return [3, 10];
|
|
715
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
716
|
+
case "InvalidKMSKeyException": return [3, 12];
|
|
717
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 12];
|
|
718
|
+
case "InvalidParameterException": return [3, 14];
|
|
719
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 14];
|
|
720
|
+
case "InvalidS3ObjectException": return [3, 16];
|
|
721
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 16];
|
|
722
|
+
case "LimitExceededException": return [3, 18];
|
|
723
|
+
case "com.amazonaws.textract#LimitExceededException": return [3, 18];
|
|
724
|
+
case "ProvisionedThroughputExceededException": return [3, 20];
|
|
725
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 20];
|
|
726
|
+
case "ThrottlingException": return [3, 22];
|
|
727
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 22];
|
|
728
|
+
case "UnsupportedDocumentException": return [3, 24];
|
|
729
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 24];
|
|
730
730
|
}
|
|
731
|
-
return [3
|
|
731
|
+
return [3, 26];
|
|
732
732
|
case 2:
|
|
733
733
|
_c = [{}];
|
|
734
|
-
return [4
|
|
734
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
735
735
|
case 3:
|
|
736
736
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
737
|
-
return [3
|
|
737
|
+
return [3, 27];
|
|
738
738
|
case 4:
|
|
739
739
|
_d = [{}];
|
|
740
|
-
return [4
|
|
740
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
741
741
|
case 5:
|
|
742
742
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
743
|
-
return [3
|
|
743
|
+
return [3, 27];
|
|
744
744
|
case 6:
|
|
745
745
|
_e = [{}];
|
|
746
|
-
return [4
|
|
746
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
747
747
|
case 7:
|
|
748
748
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
749
|
-
return [3
|
|
749
|
+
return [3, 27];
|
|
750
750
|
case 8:
|
|
751
751
|
_f = [{}];
|
|
752
|
-
return [4
|
|
752
|
+
return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
|
|
753
753
|
case 9:
|
|
754
754
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
755
|
-
return [3
|
|
755
|
+
return [3, 27];
|
|
756
756
|
case 10:
|
|
757
757
|
_g = [{}];
|
|
758
|
-
return [4
|
|
758
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
759
759
|
case 11:
|
|
760
760
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
761
|
-
return [3
|
|
761
|
+
return [3, 27];
|
|
762
762
|
case 12:
|
|
763
763
|
_h = [{}];
|
|
764
|
-
return [4
|
|
764
|
+
return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
765
765
|
case 13:
|
|
766
766
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
767
|
-
return [3
|
|
767
|
+
return [3, 27];
|
|
768
768
|
case 14:
|
|
769
769
|
_j = [{}];
|
|
770
|
-
return [4
|
|
770
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
771
771
|
case 15:
|
|
772
772
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
773
|
-
return [3
|
|
773
|
+
return [3, 27];
|
|
774
774
|
case 16:
|
|
775
775
|
_k = [{}];
|
|
776
|
-
return [4
|
|
776
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
777
777
|
case 17:
|
|
778
778
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
779
|
-
return [3
|
|
779
|
+
return [3, 27];
|
|
780
780
|
case 18:
|
|
781
781
|
_l = [{}];
|
|
782
|
-
return [4
|
|
782
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
783
783
|
case 19:
|
|
784
784
|
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
785
|
-
return [3
|
|
785
|
+
return [3, 27];
|
|
786
786
|
case 20:
|
|
787
787
|
_m = [{}];
|
|
788
|
-
return [4
|
|
788
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
789
789
|
case 21:
|
|
790
790
|
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
791
|
-
return [3
|
|
791
|
+
return [3, 27];
|
|
792
792
|
case 22:
|
|
793
793
|
_o = [{}];
|
|
794
|
-
return [4
|
|
794
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
795
795
|
case 23:
|
|
796
796
|
response = __assign.apply(void 0, [__assign.apply(void 0, _o.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
797
|
-
return [3
|
|
797
|
+
return [3, 27];
|
|
798
798
|
case 24:
|
|
799
799
|
_p = [{}];
|
|
800
|
-
return [4
|
|
800
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
801
801
|
case 25:
|
|
802
802
|
response = __assign.apply(void 0, [__assign.apply(void 0, _p.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
803
|
-
return [3
|
|
803
|
+
return [3, 27];
|
|
804
804
|
case 26:
|
|
805
805
|
parsedBody = parsedOutput.body;
|
|
806
806
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -810,7 +810,7 @@ var deserializeAws_json1_1StartDocumentAnalysisCommandError = function (output,
|
|
|
810
810
|
message = response.message || response.Message || errorCode;
|
|
811
811
|
response.message = message;
|
|
812
812
|
delete response.Message;
|
|
813
|
-
return [2
|
|
813
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
814
814
|
}
|
|
815
815
|
});
|
|
816
816
|
}); };
|
|
@@ -820,15 +820,15 @@ export var deserializeAws_json1_1StartDocumentTextDetectionCommand = function (o
|
|
|
820
820
|
switch (_a.label) {
|
|
821
821
|
case 0:
|
|
822
822
|
if (output.statusCode >= 300) {
|
|
823
|
-
return [2
|
|
823
|
+
return [2, deserializeAws_json1_1StartDocumentTextDetectionCommandError(output, context)];
|
|
824
824
|
}
|
|
825
|
-
return [4
|
|
825
|
+
return [4, parseBody(output.body, context)];
|
|
826
826
|
case 1:
|
|
827
827
|
data = _a.sent();
|
|
828
828
|
contents = {};
|
|
829
829
|
contents = deserializeAws_json1_1StartDocumentTextDetectionResponse(data, context);
|
|
830
830
|
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
831
|
-
return [2
|
|
831
|
+
return [2, Promise.resolve(response)];
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
}); };
|
|
@@ -840,111 +840,111 @@ var deserializeAws_json1_1StartDocumentTextDetectionCommandError = function (out
|
|
|
840
840
|
case 0:
|
|
841
841
|
_a = [__assign({}, output)];
|
|
842
842
|
_q = {};
|
|
843
|
-
return [4
|
|
843
|
+
return [4, parseBody(output.body, context)];
|
|
844
844
|
case 1:
|
|
845
845
|
parsedOutput = __assign.apply(void 0, _a.concat([(_q.body = _r.sent(), _q)]));
|
|
846
846
|
errorCode = "UnknownError";
|
|
847
847
|
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
848
848
|
_b = errorCode;
|
|
849
849
|
switch (_b) {
|
|
850
|
-
case "AccessDeniedException": return [3
|
|
851
|
-
case "com.amazonaws.textract#AccessDeniedException": return [3
|
|
852
|
-
case "BadDocumentException": return [3
|
|
853
|
-
case "com.amazonaws.textract#BadDocumentException": return [3
|
|
854
|
-
case "DocumentTooLargeException": return [3
|
|
855
|
-
case "com.amazonaws.textract#DocumentTooLargeException": return [3
|
|
856
|
-
case "IdempotentParameterMismatchException": return [3
|
|
857
|
-
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3
|
|
858
|
-
case "InternalServerError": return [3
|
|
859
|
-
case "com.amazonaws.textract#InternalServerError": return [3
|
|
860
|
-
case "InvalidKMSKeyException": return [3
|
|
861
|
-
case "com.amazonaws.textract#InvalidKMSKeyException": return [3
|
|
862
|
-
case "InvalidParameterException": return [3
|
|
863
|
-
case "com.amazonaws.textract#InvalidParameterException": return [3
|
|
864
|
-
case "InvalidS3ObjectException": return [3
|
|
865
|
-
case "com.amazonaws.textract#InvalidS3ObjectException": return [3
|
|
866
|
-
case "LimitExceededException": return [3
|
|
867
|
-
case "com.amazonaws.textract#LimitExceededException": return [3
|
|
868
|
-
case "ProvisionedThroughputExceededException": return [3
|
|
869
|
-
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3
|
|
870
|
-
case "ThrottlingException": return [3
|
|
871
|
-
case "com.amazonaws.textract#ThrottlingException": return [3
|
|
872
|
-
case "UnsupportedDocumentException": return [3
|
|
873
|
-
case "com.amazonaws.textract#UnsupportedDocumentException": return [3
|
|
850
|
+
case "AccessDeniedException": return [3, 2];
|
|
851
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
852
|
+
case "BadDocumentException": return [3, 4];
|
|
853
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
854
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
855
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
856
|
+
case "IdempotentParameterMismatchException": return [3, 8];
|
|
857
|
+
case "com.amazonaws.textract#IdempotentParameterMismatchException": return [3, 8];
|
|
858
|
+
case "InternalServerError": return [3, 10];
|
|
859
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 10];
|
|
860
|
+
case "InvalidKMSKeyException": return [3, 12];
|
|
861
|
+
case "com.amazonaws.textract#InvalidKMSKeyException": return [3, 12];
|
|
862
|
+
case "InvalidParameterException": return [3, 14];
|
|
863
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 14];
|
|
864
|
+
case "InvalidS3ObjectException": return [3, 16];
|
|
865
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 16];
|
|
866
|
+
case "LimitExceededException": return [3, 18];
|
|
867
|
+
case "com.amazonaws.textract#LimitExceededException": return [3, 18];
|
|
868
|
+
case "ProvisionedThroughputExceededException": return [3, 20];
|
|
869
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 20];
|
|
870
|
+
case "ThrottlingException": return [3, 22];
|
|
871
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 22];
|
|
872
|
+
case "UnsupportedDocumentException": return [3, 24];
|
|
873
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 24];
|
|
874
874
|
}
|
|
875
|
-
return [3
|
|
875
|
+
return [3, 26];
|
|
876
876
|
case 2:
|
|
877
877
|
_c = [{}];
|
|
878
|
-
return [4
|
|
878
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
879
879
|
case 3:
|
|
880
880
|
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
881
|
-
return [3
|
|
881
|
+
return [3, 27];
|
|
882
882
|
case 4:
|
|
883
883
|
_d = [{}];
|
|
884
|
-
return [4
|
|
884
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
885
885
|
case 5:
|
|
886
886
|
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
887
|
-
return [3
|
|
887
|
+
return [3, 27];
|
|
888
888
|
case 6:
|
|
889
889
|
_e = [{}];
|
|
890
|
-
return [4
|
|
890
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
891
891
|
case 7:
|
|
892
892
|
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
893
|
-
return [3
|
|
893
|
+
return [3, 27];
|
|
894
894
|
case 8:
|
|
895
895
|
_f = [{}];
|
|
896
|
-
return [4
|
|
896
|
+
return [4, deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)];
|
|
897
897
|
case 9:
|
|
898
898
|
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
899
|
-
return [3
|
|
899
|
+
return [3, 27];
|
|
900
900
|
case 10:
|
|
901
901
|
_g = [{}];
|
|
902
|
-
return [4
|
|
902
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
903
903
|
case 11:
|
|
904
904
|
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
905
|
-
return [3
|
|
905
|
+
return [3, 27];
|
|
906
906
|
case 12:
|
|
907
907
|
_h = [{}];
|
|
908
|
-
return [4
|
|
908
|
+
return [4, deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)];
|
|
909
909
|
case 13:
|
|
910
910
|
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
911
|
-
return [3
|
|
911
|
+
return [3, 27];
|
|
912
912
|
case 14:
|
|
913
913
|
_j = [{}];
|
|
914
|
-
return [4
|
|
914
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
915
915
|
case 15:
|
|
916
916
|
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
917
|
-
return [3
|
|
917
|
+
return [3, 27];
|
|
918
918
|
case 16:
|
|
919
919
|
_k = [{}];
|
|
920
|
-
return [4
|
|
920
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
921
921
|
case 17:
|
|
922
922
|
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
923
|
-
return [3
|
|
923
|
+
return [3, 27];
|
|
924
924
|
case 18:
|
|
925
925
|
_l = [{}];
|
|
926
|
-
return [4
|
|
926
|
+
return [4, deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)];
|
|
927
927
|
case 19:
|
|
928
928
|
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
929
|
-
return [3
|
|
929
|
+
return [3, 27];
|
|
930
930
|
case 20:
|
|
931
931
|
_m = [{}];
|
|
932
|
-
return [4
|
|
932
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
933
933
|
case 21:
|
|
934
934
|
response = __assign.apply(void 0, [__assign.apply(void 0, _m.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
935
|
-
return [3
|
|
935
|
+
return [3, 27];
|
|
936
936
|
case 22:
|
|
937
937
|
_o = [{}];
|
|
938
|
-
return [4
|
|
938
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
939
939
|
case 23:
|
|
940
940
|
response = __assign.apply(void 0, [__assign.apply(void 0, _o.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
941
|
-
return [3
|
|
941
|
+
return [3, 27];
|
|
942
942
|
case 24:
|
|
943
943
|
_p = [{}];
|
|
944
|
-
return [4
|
|
944
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
945
945
|
case 25:
|
|
946
946
|
response = __assign.apply(void 0, [__assign.apply(void 0, _p.concat([(_r.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
947
|
-
return [3
|
|
947
|
+
return [3, 27];
|
|
948
948
|
case 26:
|
|
949
949
|
parsedBody = parsedOutput.body;
|
|
950
950
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -954,7 +954,7 @@ var deserializeAws_json1_1StartDocumentTextDetectionCommandError = function (out
|
|
|
954
954
|
message = response.message || response.Message || errorCode;
|
|
955
955
|
response.message = message;
|
|
956
956
|
delete response.Message;
|
|
957
|
-
return [2
|
|
957
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
958
958
|
}
|
|
959
959
|
});
|
|
960
960
|
}); };
|
|
@@ -964,7 +964,7 @@ var deserializeAws_json1_1AccessDeniedExceptionResponse = function (parsedOutput
|
|
|
964
964
|
body = parsedOutput.body;
|
|
965
965
|
deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
966
966
|
contents = __assign({ name: "AccessDeniedException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
967
|
-
return [2
|
|
967
|
+
return [2, contents];
|
|
968
968
|
});
|
|
969
969
|
}); };
|
|
970
970
|
var deserializeAws_json1_1BadDocumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -973,7 +973,7 @@ var deserializeAws_json1_1BadDocumentExceptionResponse = function (parsedOutput,
|
|
|
973
973
|
body = parsedOutput.body;
|
|
974
974
|
deserialized = deserializeAws_json1_1BadDocumentException(body, context);
|
|
975
975
|
contents = __assign({ name: "BadDocumentException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
976
|
-
return [2
|
|
976
|
+
return [2, contents];
|
|
977
977
|
});
|
|
978
978
|
}); };
|
|
979
979
|
var deserializeAws_json1_1DocumentTooLargeExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -982,7 +982,7 @@ var deserializeAws_json1_1DocumentTooLargeExceptionResponse = function (parsedOu
|
|
|
982
982
|
body = parsedOutput.body;
|
|
983
983
|
deserialized = deserializeAws_json1_1DocumentTooLargeException(body, context);
|
|
984
984
|
contents = __assign({ name: "DocumentTooLargeException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
985
|
-
return [2
|
|
985
|
+
return [2, contents];
|
|
986
986
|
});
|
|
987
987
|
}); };
|
|
988
988
|
var deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -991,7 +991,7 @@ var deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse = function (pa
|
|
|
991
991
|
body = parsedOutput.body;
|
|
992
992
|
deserialized = deserializeAws_json1_1HumanLoopQuotaExceededException(body, context);
|
|
993
993
|
contents = __assign({ name: "HumanLoopQuotaExceededException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
994
|
-
return [2
|
|
994
|
+
return [2, contents];
|
|
995
995
|
});
|
|
996
996
|
}); };
|
|
997
997
|
var deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1000,7 +1000,7 @@ var deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse = functio
|
|
|
1000
1000
|
body = parsedOutput.body;
|
|
1001
1001
|
deserialized = deserializeAws_json1_1IdempotentParameterMismatchException(body, context);
|
|
1002
1002
|
contents = __assign({ name: "IdempotentParameterMismatchException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1003
|
-
return [2
|
|
1003
|
+
return [2, contents];
|
|
1004
1004
|
});
|
|
1005
1005
|
}); };
|
|
1006
1006
|
var deserializeAws_json1_1InternalServerErrorResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1009,7 +1009,7 @@ var deserializeAws_json1_1InternalServerErrorResponse = function (parsedOutput,
|
|
|
1009
1009
|
body = parsedOutput.body;
|
|
1010
1010
|
deserialized = deserializeAws_json1_1InternalServerError(body, context);
|
|
1011
1011
|
contents = __assign({ name: "InternalServerError", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1012
|
-
return [2
|
|
1012
|
+
return [2, contents];
|
|
1013
1013
|
});
|
|
1014
1014
|
}); };
|
|
1015
1015
|
var deserializeAws_json1_1InvalidJobIdExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1018,7 +1018,7 @@ var deserializeAws_json1_1InvalidJobIdExceptionResponse = function (parsedOutput
|
|
|
1018
1018
|
body = parsedOutput.body;
|
|
1019
1019
|
deserialized = deserializeAws_json1_1InvalidJobIdException(body, context);
|
|
1020
1020
|
contents = __assign({ name: "InvalidJobIdException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1021
|
-
return [2
|
|
1021
|
+
return [2, contents];
|
|
1022
1022
|
});
|
|
1023
1023
|
}); };
|
|
1024
1024
|
var deserializeAws_json1_1InvalidKMSKeyExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1027,7 +1027,7 @@ var deserializeAws_json1_1InvalidKMSKeyExceptionResponse = function (parsedOutpu
|
|
|
1027
1027
|
body = parsedOutput.body;
|
|
1028
1028
|
deserialized = deserializeAws_json1_1InvalidKMSKeyException(body, context);
|
|
1029
1029
|
contents = __assign({ name: "InvalidKMSKeyException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1030
|
-
return [2
|
|
1030
|
+
return [2, contents];
|
|
1031
1031
|
});
|
|
1032
1032
|
}); };
|
|
1033
1033
|
var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1036,7 +1036,7 @@ var deserializeAws_json1_1InvalidParameterExceptionResponse = function (parsedOu
|
|
|
1036
1036
|
body = parsedOutput.body;
|
|
1037
1037
|
deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
|
|
1038
1038
|
contents = __assign({ name: "InvalidParameterException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1039
|
-
return [2
|
|
1039
|
+
return [2, contents];
|
|
1040
1040
|
});
|
|
1041
1041
|
}); };
|
|
1042
1042
|
var deserializeAws_json1_1InvalidS3ObjectExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1045,7 +1045,7 @@ var deserializeAws_json1_1InvalidS3ObjectExceptionResponse = function (parsedOut
|
|
|
1045
1045
|
body = parsedOutput.body;
|
|
1046
1046
|
deserialized = deserializeAws_json1_1InvalidS3ObjectException(body, context);
|
|
1047
1047
|
contents = __assign({ name: "InvalidS3ObjectException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1048
|
-
return [2
|
|
1048
|
+
return [2, contents];
|
|
1049
1049
|
});
|
|
1050
1050
|
}); };
|
|
1051
1051
|
var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1054,7 +1054,7 @@ var deserializeAws_json1_1LimitExceededExceptionResponse = function (parsedOutpu
|
|
|
1054
1054
|
body = parsedOutput.body;
|
|
1055
1055
|
deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
1056
1056
|
contents = __assign({ name: "LimitExceededException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1057
|
-
return [2
|
|
1057
|
+
return [2, contents];
|
|
1058
1058
|
});
|
|
1059
1059
|
}); };
|
|
1060
1060
|
var deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1063,7 +1063,7 @@ var deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse = funct
|
|
|
1063
1063
|
body = parsedOutput.body;
|
|
1064
1064
|
deserialized = deserializeAws_json1_1ProvisionedThroughputExceededException(body, context);
|
|
1065
1065
|
contents = __assign({ name: "ProvisionedThroughputExceededException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1066
|
-
return [2
|
|
1066
|
+
return [2, contents];
|
|
1067
1067
|
});
|
|
1068
1068
|
}); };
|
|
1069
1069
|
var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1072,7 +1072,7 @@ var deserializeAws_json1_1ThrottlingExceptionResponse = function (parsedOutput,
|
|
|
1072
1072
|
body = parsedOutput.body;
|
|
1073
1073
|
deserialized = deserializeAws_json1_1ThrottlingException(body, context);
|
|
1074
1074
|
contents = __assign({ name: "ThrottlingException", $fault: "server", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1075
|
-
return [2
|
|
1075
|
+
return [2, contents];
|
|
1076
1076
|
});
|
|
1077
1077
|
}); };
|
|
1078
1078
|
var deserializeAws_json1_1UnsupportedDocumentExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -1081,7 +1081,7 @@ var deserializeAws_json1_1UnsupportedDocumentExceptionResponse = function (parse
|
|
|
1081
1081
|
body = parsedOutput.body;
|
|
1082
1082
|
deserialized = deserializeAws_json1_1UnsupportedDocumentException(body, context);
|
|
1083
1083
|
contents = __assign({ name: "UnsupportedDocumentException", $fault: "client", $metadata: deserializeMetadata(parsedOutput) }, deserialized);
|
|
1084
|
-
return [2
|
|
1084
|
+
return [2, contents];
|
|
1085
1085
|
});
|
|
1086
1086
|
}); };
|
|
1087
1087
|
var serializeAws_json1_1AnalyzeDocumentRequest = function (input, context) {
|
|
@@ -1608,7 +1608,6 @@ var deserializeMetadata = function (output) {
|
|
|
1608
1608
|
cfId: output.headers["x-amz-cf-id"],
|
|
1609
1609
|
});
|
|
1610
1610
|
};
|
|
1611
|
-
// Collect low-level response body stream to Uint8Array.
|
|
1612
1611
|
var collectBody = function (streamBody, context) {
|
|
1613
1612
|
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1614
1613
|
if (streamBody instanceof Uint8Array) {
|
|
@@ -1616,7 +1615,6 @@ var collectBody = function (streamBody, context) {
|
|
|
1616
1615
|
}
|
|
1617
1616
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1618
1617
|
};
|
|
1619
|
-
// Encode Uint8Array data into string with utf-8.
|
|
1620
1618
|
var collectBodyString = function (streamBody, context) {
|
|
1621
1619
|
return collectBody(streamBody, context).then(function (body) { return context.utf8Encoder(body); });
|
|
1622
1620
|
};
|
|
@@ -1624,7 +1622,7 @@ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, bo
|
|
|
1624
1622
|
var _a, hostname, _b, protocol, port, basePath, contents;
|
|
1625
1623
|
return __generator(this, function (_c) {
|
|
1626
1624
|
switch (_c.label) {
|
|
1627
|
-
case 0: return [4
|
|
1625
|
+
case 0: return [4, context.endpoint()];
|
|
1628
1626
|
case 1:
|
|
1629
1627
|
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
1630
1628
|
contents = {
|
|
@@ -1641,7 +1639,7 @@ var buildHttpRpcRequest = function (context, headers, path, resolvedHostname, bo
|
|
|
1641
1639
|
if (body !== undefined) {
|
|
1642
1640
|
contents.body = body;
|
|
1643
1641
|
}
|
|
1644
|
-
return [2
|
|
1642
|
+
return [2, new __HttpRequest(contents)];
|
|
1645
1643
|
}
|
|
1646
1644
|
});
|
|
1647
1645
|
}); };
|
|
@@ -1653,9 +1651,6 @@ var parseBody = function (streamBody, context) {
|
|
|
1653
1651
|
return {};
|
|
1654
1652
|
});
|
|
1655
1653
|
};
|
|
1656
|
-
/**
|
|
1657
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
1658
|
-
*/
|
|
1659
1654
|
var loadRestJsonErrorCode = function (output, data) {
|
|
1660
1655
|
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1661
1656
|
var sanitizeErrorCode = function (rawValue) {
|
|
@@ -1680,4 +1675,3 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1680
1675
|
}
|
|
1681
1676
|
return "";
|
|
1682
1677
|
};
|
|
1683
|
-
//# sourceMappingURL=Aws_json1_1.js.map
|