@aws-sdk/client-textract 3.131.0 → 3.142.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist-cjs/commands/AnalyzeDocumentCommand.js +2 -2
  4. package/dist-cjs/commands/AnalyzeExpenseCommand.js +2 -2
  5. package/dist-cjs/commands/AnalyzeIDCommand.js +2 -2
  6. package/dist-cjs/commands/DetectDocumentTextCommand.js +2 -2
  7. package/dist-cjs/commands/GetDocumentAnalysisCommand.js +2 -2
  8. package/dist-cjs/commands/GetDocumentTextDetectionCommand.js +2 -2
  9. package/dist-cjs/commands/GetExpenseAnalysisCommand.js +2 -2
  10. package/dist-cjs/commands/StartDocumentAnalysisCommand.js +2 -2
  11. package/dist-cjs/commands/StartDocumentTextDetectionCommand.js +2 -2
  12. package/dist-cjs/commands/StartExpenseAnalysisCommand.js +2 -2
  13. package/dist-cjs/models/models_0.js +190 -284
  14. package/dist-cjs/protocols/Aws_json1_1.js +50 -95
  15. package/dist-es/commands/AnalyzeDocumentCommand.js +3 -3
  16. package/dist-es/commands/AnalyzeExpenseCommand.js +3 -3
  17. package/dist-es/commands/AnalyzeIDCommand.js +3 -3
  18. package/dist-es/commands/DetectDocumentTextCommand.js +3 -3
  19. package/dist-es/commands/GetDocumentAnalysisCommand.js +3 -3
  20. package/dist-es/commands/GetDocumentTextDetectionCommand.js +3 -3
  21. package/dist-es/commands/GetExpenseAnalysisCommand.js +3 -3
  22. package/dist-es/commands/StartDocumentAnalysisCommand.js +3 -3
  23. package/dist-es/commands/StartDocumentTextDetectionCommand.js +3 -3
  24. package/dist-es/commands/StartExpenseAnalysisCommand.js +3 -3
  25. package/dist-es/models/models_0.js +47 -188
  26. package/dist-es/protocols/Aws_json1_1.js +81 -96
  27. package/dist-types/models/models_0.d.ts +188 -282
  28. package/dist-types/ts3.4/models/models_0.d.ts +94 -188
  29. package/package.json +6 -6
@@ -14,14 +14,6 @@ var AccessDeniedException = (function (_super) {
14
14
  return AccessDeniedException;
15
15
  }(__BaseException));
16
16
  export { AccessDeniedException };
17
- export var S3Object;
18
- (function (S3Object) {
19
- S3Object.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
20
- })(S3Object || (S3Object = {}));
21
- export var Document;
22
- (function (Document) {
23
- Document.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
24
- })(Document || (Document = {}));
25
17
  export var FeatureType;
26
18
  (function (FeatureType) {
27
19
  FeatureType["FORMS"] = "FORMS";
@@ -33,26 +25,6 @@ export var ContentClassifier;
33
25
  ContentClassifier["FREE_OF_ADULT_CONTENT"] = "FreeOfAdultContent";
34
26
  ContentClassifier["FREE_OF_PERSONALLY_IDENTIFIABLE_INFORMATION"] = "FreeOfPersonallyIdentifiableInformation";
35
27
  })(ContentClassifier || (ContentClassifier = {}));
36
- export var HumanLoopDataAttributes;
37
- (function (HumanLoopDataAttributes) {
38
- HumanLoopDataAttributes.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
39
- })(HumanLoopDataAttributes || (HumanLoopDataAttributes = {}));
40
- export var HumanLoopConfig;
41
- (function (HumanLoopConfig) {
42
- HumanLoopConfig.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
43
- })(HumanLoopConfig || (HumanLoopConfig = {}));
44
- export var Query;
45
- (function (Query) {
46
- Query.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
47
- })(Query || (Query = {}));
48
- export var QueriesConfig;
49
- (function (QueriesConfig) {
50
- QueriesConfig.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
51
- })(QueriesConfig || (QueriesConfig = {}));
52
- export var AnalyzeDocumentRequest;
53
- (function (AnalyzeDocumentRequest) {
54
- AnalyzeDocumentRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
55
- })(AnalyzeDocumentRequest || (AnalyzeDocumentRequest = {}));
56
28
  export var BlockType;
57
29
  (function (BlockType) {
58
30
  BlockType["CELL"] = "CELL";
@@ -73,18 +45,6 @@ export var EntityType;
73
45
  EntityType["KEY"] = "KEY";
74
46
  EntityType["VALUE"] = "VALUE";
75
47
  })(EntityType || (EntityType = {}));
76
- export var BoundingBox;
77
- (function (BoundingBox) {
78
- BoundingBox.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
79
- })(BoundingBox || (BoundingBox = {}));
80
- export var Point;
81
- (function (Point) {
82
- Point.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
83
- })(Point || (Point = {}));
84
- export var Geometry;
85
- (function (Geometry) {
86
- Geometry.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
87
- })(Geometry || (Geometry = {}));
88
48
  export var RelationshipType;
89
49
  (function (RelationshipType) {
90
50
  RelationshipType["ANSWER"] = "ANSWER";
@@ -94,10 +54,6 @@ export var RelationshipType;
94
54
  RelationshipType["TITLE"] = "TITLE";
95
55
  RelationshipType["VALUE"] = "VALUE";
96
56
  })(RelationshipType || (RelationshipType = {}));
97
- export var Relationship;
98
- (function (Relationship) {
99
- Relationship.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
100
- })(Relationship || (Relationship = {}));
101
57
  export var SelectionStatus;
102
58
  (function (SelectionStatus) {
103
59
  SelectionStatus["NOT_SELECTED"] = "NOT_SELECTED";
@@ -108,22 +64,6 @@ export var TextType;
108
64
  TextType["HANDWRITING"] = "HANDWRITING";
109
65
  TextType["PRINTED"] = "PRINTED";
110
66
  })(TextType || (TextType = {}));
111
- export var Block;
112
- (function (Block) {
113
- Block.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
114
- })(Block || (Block = {}));
115
- export var DocumentMetadata;
116
- (function (DocumentMetadata) {
117
- DocumentMetadata.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
118
- })(DocumentMetadata || (DocumentMetadata = {}));
119
- export var HumanLoopActivationOutput;
120
- (function (HumanLoopActivationOutput) {
121
- HumanLoopActivationOutput.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
122
- })(HumanLoopActivationOutput || (HumanLoopActivationOutput = {}));
123
- export var AnalyzeDocumentResponse;
124
- (function (AnalyzeDocumentResponse) {
125
- AnalyzeDocumentResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
126
- })(AnalyzeDocumentResponse || (AnalyzeDocumentResponse = {}));
127
67
  var BadDocumentException = (function (_super) {
128
68
  __extends(BadDocumentException, _super);
129
69
  function BadDocumentException(opts) {
@@ -253,82 +193,10 @@ var UnsupportedDocumentException = (function (_super) {
253
193
  return UnsupportedDocumentException;
254
194
  }(__BaseException));
255
195
  export { UnsupportedDocumentException };
256
- export var AnalyzeExpenseRequest;
257
- (function (AnalyzeExpenseRequest) {
258
- AnalyzeExpenseRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
259
- })(AnalyzeExpenseRequest || (AnalyzeExpenseRequest = {}));
260
- export var ExpenseDetection;
261
- (function (ExpenseDetection) {
262
- ExpenseDetection.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
263
- })(ExpenseDetection || (ExpenseDetection = {}));
264
- export var ExpenseType;
265
- (function (ExpenseType) {
266
- ExpenseType.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
267
- })(ExpenseType || (ExpenseType = {}));
268
- export var ExpenseField;
269
- (function (ExpenseField) {
270
- ExpenseField.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
271
- })(ExpenseField || (ExpenseField = {}));
272
- export var LineItemFields;
273
- (function (LineItemFields) {
274
- LineItemFields.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
275
- })(LineItemFields || (LineItemFields = {}));
276
- export var LineItemGroup;
277
- (function (LineItemGroup) {
278
- LineItemGroup.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
279
- })(LineItemGroup || (LineItemGroup = {}));
280
- export var ExpenseDocument;
281
- (function (ExpenseDocument) {
282
- ExpenseDocument.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
283
- })(ExpenseDocument || (ExpenseDocument = {}));
284
- export var AnalyzeExpenseResponse;
285
- (function (AnalyzeExpenseResponse) {
286
- AnalyzeExpenseResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
287
- })(AnalyzeExpenseResponse || (AnalyzeExpenseResponse = {}));
288
- export var AnalyzeIDRequest;
289
- (function (AnalyzeIDRequest) {
290
- AnalyzeIDRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
291
- })(AnalyzeIDRequest || (AnalyzeIDRequest = {}));
292
196
  export var ValueType;
293
197
  (function (ValueType) {
294
198
  ValueType["DATE"] = "DATE";
295
199
  })(ValueType || (ValueType = {}));
296
- export var NormalizedValue;
297
- (function (NormalizedValue) {
298
- NormalizedValue.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
299
- })(NormalizedValue || (NormalizedValue = {}));
300
- export var AnalyzeIDDetections;
301
- (function (AnalyzeIDDetections) {
302
- AnalyzeIDDetections.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
303
- })(AnalyzeIDDetections || (AnalyzeIDDetections = {}));
304
- export var IdentityDocumentField;
305
- (function (IdentityDocumentField) {
306
- IdentityDocumentField.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
307
- })(IdentityDocumentField || (IdentityDocumentField = {}));
308
- export var IdentityDocument;
309
- (function (IdentityDocument) {
310
- IdentityDocument.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
311
- })(IdentityDocument || (IdentityDocument = {}));
312
- export var AnalyzeIDResponse;
313
- (function (AnalyzeIDResponse) {
314
- AnalyzeIDResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
315
- })(AnalyzeIDResponse || (AnalyzeIDResponse = {}));
316
- export var DetectDocumentTextRequest;
317
- (function (DetectDocumentTextRequest) {
318
- DetectDocumentTextRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
319
- })(DetectDocumentTextRequest || (DetectDocumentTextRequest = {}));
320
- export var DetectDocumentTextResponse;
321
- (function (DetectDocumentTextResponse) {
322
- DetectDocumentTextResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
323
- })(DetectDocumentTextResponse || (DetectDocumentTextResponse = {}));
324
- export var DocumentLocation;
325
- (function (DocumentLocation) {
326
- DocumentLocation.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
327
- })(DocumentLocation || (DocumentLocation = {}));
328
- export var GetDocumentAnalysisRequest;
329
- (function (GetDocumentAnalysisRequest) {
330
- GetDocumentAnalysisRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
331
- })(GetDocumentAnalysisRequest || (GetDocumentAnalysisRequest = {}));
332
200
  export var JobStatus;
333
201
  (function (JobStatus) {
334
202
  JobStatus["FAILED"] = "FAILED";
@@ -336,14 +204,6 @@ export var JobStatus;
336
204
  JobStatus["PARTIAL_SUCCESS"] = "PARTIAL_SUCCESS";
337
205
  JobStatus["SUCCEEDED"] = "SUCCEEDED";
338
206
  })(JobStatus || (JobStatus = {}));
339
- export var Warning;
340
- (function (Warning) {
341
- Warning.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
342
- })(Warning || (Warning = {}));
343
- export var GetDocumentAnalysisResponse;
344
- (function (GetDocumentAnalysisResponse) {
345
- GetDocumentAnalysisResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
346
- })(GetDocumentAnalysisResponse || (GetDocumentAnalysisResponse = {}));
347
207
  var InvalidJobIdException = (function (_super) {
348
208
  __extends(InvalidJobIdException, _super);
349
209
  function InvalidJobIdException(opts) {
@@ -372,22 +232,6 @@ var InvalidKMSKeyException = (function (_super) {
372
232
  return InvalidKMSKeyException;
373
233
  }(__BaseException));
374
234
  export { InvalidKMSKeyException };
375
- export var GetDocumentTextDetectionRequest;
376
- (function (GetDocumentTextDetectionRequest) {
377
- GetDocumentTextDetectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
378
- })(GetDocumentTextDetectionRequest || (GetDocumentTextDetectionRequest = {}));
379
- export var GetDocumentTextDetectionResponse;
380
- (function (GetDocumentTextDetectionResponse) {
381
- GetDocumentTextDetectionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
382
- })(GetDocumentTextDetectionResponse || (GetDocumentTextDetectionResponse = {}));
383
- export var GetExpenseAnalysisRequest;
384
- (function (GetExpenseAnalysisRequest) {
385
- GetExpenseAnalysisRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
386
- })(GetExpenseAnalysisRequest || (GetExpenseAnalysisRequest = {}));
387
- export var GetExpenseAnalysisResponse;
388
- (function (GetExpenseAnalysisResponse) {
389
- GetExpenseAnalysisResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
390
- })(GetExpenseAnalysisResponse || (GetExpenseAnalysisResponse = {}));
391
235
  var IdempotentParameterMismatchException = (function (_super) {
392
236
  __extends(IdempotentParameterMismatchException, _super);
393
237
  function IdempotentParameterMismatchException(opts) {
@@ -416,35 +260,50 @@ var LimitExceededException = (function (_super) {
416
260
  return LimitExceededException;
417
261
  }(__BaseException));
418
262
  export { LimitExceededException };
419
- export var NotificationChannel;
420
- (function (NotificationChannel) {
421
- NotificationChannel.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
422
- })(NotificationChannel || (NotificationChannel = {}));
423
- export var OutputConfig;
424
- (function (OutputConfig) {
425
- OutputConfig.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
426
- })(OutputConfig || (OutputConfig = {}));
427
- export var StartDocumentAnalysisRequest;
428
- (function (StartDocumentAnalysisRequest) {
429
- StartDocumentAnalysisRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
430
- })(StartDocumentAnalysisRequest || (StartDocumentAnalysisRequest = {}));
431
- export var StartDocumentAnalysisResponse;
432
- (function (StartDocumentAnalysisResponse) {
433
- StartDocumentAnalysisResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
434
- })(StartDocumentAnalysisResponse || (StartDocumentAnalysisResponse = {}));
435
- export var StartDocumentTextDetectionRequest;
436
- (function (StartDocumentTextDetectionRequest) {
437
- StartDocumentTextDetectionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
438
- })(StartDocumentTextDetectionRequest || (StartDocumentTextDetectionRequest = {}));
439
- export var StartDocumentTextDetectionResponse;
440
- (function (StartDocumentTextDetectionResponse) {
441
- StartDocumentTextDetectionResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
442
- })(StartDocumentTextDetectionResponse || (StartDocumentTextDetectionResponse = {}));
443
- export var StartExpenseAnalysisRequest;
444
- (function (StartExpenseAnalysisRequest) {
445
- StartExpenseAnalysisRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
446
- })(StartExpenseAnalysisRequest || (StartExpenseAnalysisRequest = {}));
447
- export var StartExpenseAnalysisResponse;
448
- (function (StartExpenseAnalysisResponse) {
449
- StartExpenseAnalysisResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
450
- })(StartExpenseAnalysisResponse || (StartExpenseAnalysisResponse = {}));
263
+ export var S3ObjectFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
264
+ export var DocumentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
265
+ export var HumanLoopDataAttributesFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
266
+ export var HumanLoopConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
267
+ export var QueryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
268
+ export var QueriesConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
269
+ export var AnalyzeDocumentRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
270
+ export var BoundingBoxFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
271
+ export var PointFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
272
+ export var GeometryFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
273
+ export var RelationshipFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
274
+ export var BlockFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
275
+ export var DocumentMetadataFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
276
+ export var HumanLoopActivationOutputFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
277
+ export var AnalyzeDocumentResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
278
+ export var AnalyzeExpenseRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
279
+ export var ExpenseDetectionFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
280
+ export var ExpenseTypeFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
281
+ export var ExpenseFieldFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
282
+ export var LineItemFieldsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
283
+ export var LineItemGroupFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
284
+ export var ExpenseDocumentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
285
+ export var AnalyzeExpenseResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
286
+ export var AnalyzeIDRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
287
+ export var NormalizedValueFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
288
+ export var AnalyzeIDDetectionsFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
289
+ export var IdentityDocumentFieldFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
290
+ export var IdentityDocumentFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
291
+ export var AnalyzeIDResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
292
+ export var DetectDocumentTextRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
293
+ export var DetectDocumentTextResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
294
+ export var DocumentLocationFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
295
+ export var GetDocumentAnalysisRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
296
+ export var WarningFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
297
+ export var GetDocumentAnalysisResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
298
+ export var GetDocumentTextDetectionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
299
+ export var GetDocumentTextDetectionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
300
+ export var GetExpenseAnalysisRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
301
+ export var GetExpenseAnalysisResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
302
+ export var NotificationChannelFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
303
+ export var OutputConfigFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
304
+ export var StartDocumentAnalysisRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
305
+ export var StartDocumentAnalysisResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
306
+ export var StartDocumentTextDetectionRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
307
+ export var StartDocumentTextDetectionResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
308
+ export var StartExpenseAnalysisRequestFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
309
+ export var StartExpenseAnalysisResponseFilterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -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 { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, } from "@aws-sdk/smithy-client";
3
+ import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, throwDefaultError, } from "@aws-sdk/smithy-client";
4
4
  import { AccessDeniedException, BadDocumentException, DocumentTooLargeException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, InternalServerError, InvalidJobIdException, InvalidKMSKeyException, InvalidParameterException, InvalidS3ObjectException, LimitExceededException, ProvisionedThroughputExceededException, ThrottlingException, UnsupportedDocumentException, } from "../models/models_0";
5
5
  import { TextractServiceException as __BaseException } from "../models/TextractServiceException";
6
6
  export var serializeAws_json1_1AnalyzeDocumentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
@@ -132,7 +132,7 @@ export var deserializeAws_json1_1AnalyzeDocumentCommand = function (output, cont
132
132
  });
133
133
  }); };
134
134
  var deserializeAws_json1_1AnalyzeDocumentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
135
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
135
+ var parsedOutput, _a, errorCode, _b, parsedBody;
136
136
  var _c;
137
137
  return __generator(this, function (_d) {
138
138
  switch (_d.label) {
@@ -189,14 +189,14 @@ var deserializeAws_json1_1AnalyzeDocumentCommandError = function (output, contex
189
189
  case 21: throw _d.sent();
190
190
  case 22:
191
191
  parsedBody = parsedOutput.body;
192
- $metadata = deserializeMetadata(output);
193
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
194
- response = new __BaseException({
195
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
196
- $fault: "client",
197
- $metadata: $metadata,
192
+ throwDefaultError({
193
+ output: output,
194
+ parsedBody: parsedBody,
195
+ exceptionCtor: __BaseException,
196
+ errorCode: errorCode,
198
197
  });
199
- throw __decorateServiceException(response, parsedBody);
198
+ _d.label = 23;
199
+ case 23: return [2];
200
200
  }
201
201
  });
202
202
  }); };
@@ -219,7 +219,7 @@ export var deserializeAws_json1_1AnalyzeExpenseCommand = function (output, conte
219
219
  });
220
220
  }); };
221
221
  var deserializeAws_json1_1AnalyzeExpenseCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
222
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
222
+ var parsedOutput, _a, errorCode, _b, parsedBody;
223
223
  var _c;
224
224
  return __generator(this, function (_d) {
225
225
  switch (_d.label) {
@@ -272,14 +272,14 @@ var deserializeAws_json1_1AnalyzeExpenseCommandError = function (output, context
272
272
  case 19: throw _d.sent();
273
273
  case 20:
274
274
  parsedBody = parsedOutput.body;
275
- $metadata = deserializeMetadata(output);
276
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
277
- response = new __BaseException({
278
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
279
- $fault: "client",
280
- $metadata: $metadata,
275
+ throwDefaultError({
276
+ output: output,
277
+ parsedBody: parsedBody,
278
+ exceptionCtor: __BaseException,
279
+ errorCode: errorCode,
281
280
  });
282
- throw __decorateServiceException(response, parsedBody);
281
+ _d.label = 21;
282
+ case 21: return [2];
283
283
  }
284
284
  });
285
285
  }); };
@@ -302,7 +302,7 @@ export var deserializeAws_json1_1AnalyzeIDCommand = function (output, context) {
302
302
  });
303
303
  }); };
304
304
  var deserializeAws_json1_1AnalyzeIDCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
305
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
305
+ var parsedOutput, _a, errorCode, _b, parsedBody;
306
306
  var _c;
307
307
  return __generator(this, function (_d) {
308
308
  switch (_d.label) {
@@ -355,14 +355,14 @@ var deserializeAws_json1_1AnalyzeIDCommandError = function (output, context) { r
355
355
  case 19: throw _d.sent();
356
356
  case 20:
357
357
  parsedBody = parsedOutput.body;
358
- $metadata = deserializeMetadata(output);
359
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
360
- response = new __BaseException({
361
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
362
- $fault: "client",
363
- $metadata: $metadata,
358
+ throwDefaultError({
359
+ output: output,
360
+ parsedBody: parsedBody,
361
+ exceptionCtor: __BaseException,
362
+ errorCode: errorCode,
364
363
  });
365
- throw __decorateServiceException(response, parsedBody);
364
+ _d.label = 21;
365
+ case 21: return [2];
366
366
  }
367
367
  });
368
368
  }); };
@@ -385,7 +385,7 @@ export var deserializeAws_json1_1DetectDocumentTextCommand = function (output, c
385
385
  });
386
386
  }); };
387
387
  var deserializeAws_json1_1DetectDocumentTextCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
388
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
388
+ var parsedOutput, _a, errorCode, _b, parsedBody;
389
389
  var _c;
390
390
  return __generator(this, function (_d) {
391
391
  switch (_d.label) {
@@ -438,14 +438,14 @@ var deserializeAws_json1_1DetectDocumentTextCommandError = function (output, con
438
438
  case 19: throw _d.sent();
439
439
  case 20:
440
440
  parsedBody = parsedOutput.body;
441
- $metadata = deserializeMetadata(output);
442
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
443
- response = new __BaseException({
444
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
445
- $fault: "client",
446
- $metadata: $metadata,
441
+ throwDefaultError({
442
+ output: output,
443
+ parsedBody: parsedBody,
444
+ exceptionCtor: __BaseException,
445
+ errorCode: errorCode,
447
446
  });
448
- throw __decorateServiceException(response, parsedBody);
447
+ _d.label = 21;
448
+ case 21: return [2];
449
449
  }
450
450
  });
451
451
  }); };
@@ -468,7 +468,7 @@ export var deserializeAws_json1_1GetDocumentAnalysisCommand = function (output,
468
468
  });
469
469
  }); };
470
470
  var deserializeAws_json1_1GetDocumentAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
471
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
471
+ var parsedOutput, _a, errorCode, _b, parsedBody;
472
472
  var _c;
473
473
  return __generator(this, function (_d) {
474
474
  switch (_d.label) {
@@ -517,14 +517,14 @@ var deserializeAws_json1_1GetDocumentAnalysisCommandError = function (output, co
517
517
  case 17: throw _d.sent();
518
518
  case 18:
519
519
  parsedBody = parsedOutput.body;
520
- $metadata = deserializeMetadata(output);
521
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
522
- response = new __BaseException({
523
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
524
- $fault: "client",
525
- $metadata: $metadata,
520
+ throwDefaultError({
521
+ output: output,
522
+ parsedBody: parsedBody,
523
+ exceptionCtor: __BaseException,
524
+ errorCode: errorCode,
526
525
  });
527
- throw __decorateServiceException(response, parsedBody);
526
+ _d.label = 19;
527
+ case 19: return [2];
528
528
  }
529
529
  });
530
530
  }); };
@@ -547,7 +547,7 @@ export var deserializeAws_json1_1GetDocumentTextDetectionCommand = function (out
547
547
  });
548
548
  }); };
549
549
  var deserializeAws_json1_1GetDocumentTextDetectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
550
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
550
+ var parsedOutput, _a, errorCode, _b, parsedBody;
551
551
  var _c;
552
552
  return __generator(this, function (_d) {
553
553
  switch (_d.label) {
@@ -596,14 +596,14 @@ var deserializeAws_json1_1GetDocumentTextDetectionCommandError = function (outpu
596
596
  case 17: throw _d.sent();
597
597
  case 18:
598
598
  parsedBody = parsedOutput.body;
599
- $metadata = deserializeMetadata(output);
600
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
601
- response = new __BaseException({
602
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
603
- $fault: "client",
604
- $metadata: $metadata,
599
+ throwDefaultError({
600
+ output: output,
601
+ parsedBody: parsedBody,
602
+ exceptionCtor: __BaseException,
603
+ errorCode: errorCode,
605
604
  });
606
- throw __decorateServiceException(response, parsedBody);
605
+ _d.label = 19;
606
+ case 19: return [2];
607
607
  }
608
608
  });
609
609
  }); };
@@ -626,7 +626,7 @@ export var deserializeAws_json1_1GetExpenseAnalysisCommand = function (output, c
626
626
  });
627
627
  }); };
628
628
  var deserializeAws_json1_1GetExpenseAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
629
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
629
+ var parsedOutput, _a, errorCode, _b, parsedBody;
630
630
  var _c;
631
631
  return __generator(this, function (_d) {
632
632
  switch (_d.label) {
@@ -675,14 +675,14 @@ var deserializeAws_json1_1GetExpenseAnalysisCommandError = function (output, con
675
675
  case 17: throw _d.sent();
676
676
  case 18:
677
677
  parsedBody = parsedOutput.body;
678
- $metadata = deserializeMetadata(output);
679
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
680
- response = new __BaseException({
681
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
682
- $fault: "client",
683
- $metadata: $metadata,
678
+ throwDefaultError({
679
+ output: output,
680
+ parsedBody: parsedBody,
681
+ exceptionCtor: __BaseException,
682
+ errorCode: errorCode,
684
683
  });
685
- throw __decorateServiceException(response, parsedBody);
684
+ _d.label = 19;
685
+ case 19: return [2];
686
686
  }
687
687
  });
688
688
  }); };
@@ -705,7 +705,7 @@ export var deserializeAws_json1_1StartDocumentAnalysisCommand = function (output
705
705
  });
706
706
  }); };
707
707
  var deserializeAws_json1_1StartDocumentAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
708
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
708
+ var parsedOutput, _a, errorCode, _b, parsedBody;
709
709
  var _c;
710
710
  return __generator(this, function (_d) {
711
711
  switch (_d.label) {
@@ -770,14 +770,14 @@ var deserializeAws_json1_1StartDocumentAnalysisCommandError = function (output,
770
770
  case 25: throw _d.sent();
771
771
  case 26:
772
772
  parsedBody = parsedOutput.body;
773
- $metadata = deserializeMetadata(output);
774
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
775
- response = new __BaseException({
776
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
777
- $fault: "client",
778
- $metadata: $metadata,
773
+ throwDefaultError({
774
+ output: output,
775
+ parsedBody: parsedBody,
776
+ exceptionCtor: __BaseException,
777
+ errorCode: errorCode,
779
778
  });
780
- throw __decorateServiceException(response, parsedBody);
779
+ _d.label = 27;
780
+ case 27: return [2];
781
781
  }
782
782
  });
783
783
  }); };
@@ -800,7 +800,7 @@ export var deserializeAws_json1_1StartDocumentTextDetectionCommand = function (o
800
800
  });
801
801
  }); };
802
802
  var deserializeAws_json1_1StartDocumentTextDetectionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
803
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
803
+ var parsedOutput, _a, errorCode, _b, parsedBody;
804
804
  var _c;
805
805
  return __generator(this, function (_d) {
806
806
  switch (_d.label) {
@@ -865,14 +865,14 @@ var deserializeAws_json1_1StartDocumentTextDetectionCommandError = function (out
865
865
  case 25: throw _d.sent();
866
866
  case 26:
867
867
  parsedBody = parsedOutput.body;
868
- $metadata = deserializeMetadata(output);
869
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
870
- response = new __BaseException({
871
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
872
- $fault: "client",
873
- $metadata: $metadata,
868
+ throwDefaultError({
869
+ output: output,
870
+ parsedBody: parsedBody,
871
+ exceptionCtor: __BaseException,
872
+ errorCode: errorCode,
874
873
  });
875
- throw __decorateServiceException(response, parsedBody);
874
+ _d.label = 27;
875
+ case 27: return [2];
876
876
  }
877
877
  });
878
878
  }); };
@@ -895,7 +895,7 @@ export var deserializeAws_json1_1StartExpenseAnalysisCommand = function (output,
895
895
  });
896
896
  }); };
897
897
  var deserializeAws_json1_1StartExpenseAnalysisCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
898
- var parsedOutput, _a, response, errorCode, _b, parsedBody, $metadata, statusCode;
898
+ var parsedOutput, _a, errorCode, _b, parsedBody;
899
899
  var _c;
900
900
  return __generator(this, function (_d) {
901
901
  switch (_d.label) {
@@ -960,14 +960,14 @@ var deserializeAws_json1_1StartExpenseAnalysisCommandError = function (output, c
960
960
  case 25: throw _d.sent();
961
961
  case 26:
962
962
  parsedBody = parsedOutput.body;
963
- $metadata = deserializeMetadata(output);
964
- statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
965
- response = new __BaseException({
966
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
967
- $fault: "client",
968
- $metadata: $metadata,
963
+ throwDefaultError({
964
+ output: output,
965
+ parsedBody: parsedBody,
966
+ exceptionCtor: __BaseException,
967
+ errorCode: errorCode,
969
968
  });
970
- throw __decorateServiceException(response, parsedBody);
969
+ _d.label = 27;
970
+ case 27: return [2];
971
971
  }
972
972
  });
973
973
  }); };
@@ -1116,9 +1116,6 @@ var serializeAws_json1_1ContentClassifiers = function (input, context) {
1116
1116
  return input
1117
1117
  .filter(function (e) { return e != null; })
1118
1118
  .map(function (entry) {
1119
- if (entry === null) {
1120
- return null;
1121
- }
1122
1119
  return entry;
1123
1120
  });
1124
1121
  };
@@ -1135,9 +1132,6 @@ var serializeAws_json1_1DocumentPages = function (input, context) {
1135
1132
  return input
1136
1133
  .filter(function (e) { return e != null; })
1137
1134
  .map(function (entry) {
1138
- if (entry === null) {
1139
- return null;
1140
- }
1141
1135
  return serializeAws_json1_1Document(entry, context);
1142
1136
  });
1143
1137
  };
@@ -1145,9 +1139,6 @@ var serializeAws_json1_1FeatureTypes = function (input, context) {
1145
1139
  return input
1146
1140
  .filter(function (e) { return e != null; })
1147
1141
  .map(function (entry) {
1148
- if (entry === null) {
1149
- return null;
1150
- }
1151
1142
  return entry;
1152
1143
  });
1153
1144
  };
@@ -1180,9 +1171,6 @@ var serializeAws_json1_1Queries = function (input, context) {
1180
1171
  return input
1181
1172
  .filter(function (e) { return e != null; })
1182
1173
  .map(function (entry) {
1183
- if (entry === null) {
1184
- return null;
1185
- }
1186
1174
  return serializeAws_json1_1Query(entry, context);
1187
1175
  });
1188
1176
  };
@@ -1196,9 +1184,6 @@ var serializeAws_json1_1QueryPages = function (input, context) {
1196
1184
  return input
1197
1185
  .filter(function (e) { return e != null; })
1198
1186
  .map(function (entry) {
1199
- if (entry === null) {
1200
- return null;
1201
- }
1202
1187
  return entry;
1203
1188
  });
1204
1189
  };