@aws-sdk/client-textract 3.42.0 → 3.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/Textract.js +15 -0
- package/dist-cjs/commands/AnalyzeIDCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +42 -2
- package/dist-cjs/protocols/Aws_json1_1.js +204 -1
- package/dist-es/Textract.js +15 -0
- package/dist-es/commands/AnalyzeIDCommand.js +39 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +28 -0
- package/dist-es/protocols/Aws_json1_1.js +211 -0
- package/dist-types/Textract.d.ts +11 -1
- package/dist-types/TextractClient.d.ts +3 -2
- package/dist-types/commands/AnalyzeExpenseCommand.d.ts +2 -1
- package/dist-types/commands/AnalyzeIDCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +123 -2
- package/dist-types/protocols/Aws_json1_1.d.ts +3 -0
- package/dist-types/ts3.4/Textract.d.ts +5 -0
- package/dist-types/ts3.4/TextractClient.d.ts +3 -2
- package/dist-types/ts3.4/commands/AnalyzeIDCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +69 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.43.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.42.0...v3.43.0) (2021-11-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **clients:** update clients as of 11/28/2021 ([#3072](https://github.com/aws/aws-sdk-js-v3/issues/3072)) ([2ad1622](https://github.com/aws/aws-sdk-js-v3/commit/2ad1622ba8586b926fe508055211803bb29e3976))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.42.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.41.0...v3.42.0) (2021-11-19)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-sdk/client-textract
|
package/dist-cjs/Textract.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Textract = void 0;
|
|
4
4
|
const AnalyzeDocumentCommand_1 = require("./commands/AnalyzeDocumentCommand");
|
|
5
5
|
const AnalyzeExpenseCommand_1 = require("./commands/AnalyzeExpenseCommand");
|
|
6
|
+
const AnalyzeIDCommand_1 = require("./commands/AnalyzeIDCommand");
|
|
6
7
|
const DetectDocumentTextCommand_1 = require("./commands/DetectDocumentTextCommand");
|
|
7
8
|
const GetDocumentAnalysisCommand_1 = require("./commands/GetDocumentAnalysisCommand");
|
|
8
9
|
const GetDocumentTextDetectionCommand_1 = require("./commands/GetDocumentTextDetectionCommand");
|
|
@@ -40,6 +41,20 @@ class Textract extends TextractClient_1.TextractClient {
|
|
|
40
41
|
return this.send(command, optionsOrCb);
|
|
41
42
|
}
|
|
42
43
|
}
|
|
44
|
+
analyzeID(args, optionsOrCb, cb) {
|
|
45
|
+
const command = new AnalyzeIDCommand_1.AnalyzeIDCommand(args);
|
|
46
|
+
if (typeof optionsOrCb === "function") {
|
|
47
|
+
this.send(command, optionsOrCb);
|
|
48
|
+
}
|
|
49
|
+
else if (typeof cb === "function") {
|
|
50
|
+
if (typeof optionsOrCb !== "object")
|
|
51
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
52
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return this.send(command, optionsOrCb);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
43
58
|
detectDocumentText(args, optionsOrCb, cb) {
|
|
44
59
|
const command = new DetectDocumentTextCommand_1.DetectDocumentTextCommand(args);
|
|
45
60
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnalyzeIDCommand = void 0;
|
|
4
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
5
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
|
|
8
|
+
class AnalyzeIDCommand extends smithy_client_1.Command {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super();
|
|
11
|
+
this.input = input;
|
|
12
|
+
}
|
|
13
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(middleware_serde_1.getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
const { logger } = configuration;
|
|
17
|
+
const clientName = "TextractClient";
|
|
18
|
+
const commandName = "AnalyzeIDCommand";
|
|
19
|
+
const handlerExecutionContext = {
|
|
20
|
+
logger,
|
|
21
|
+
clientName,
|
|
22
|
+
commandName,
|
|
23
|
+
inputFilterSensitiveLog: models_0_1.AnalyzeIDRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: models_0_1.AnalyzeIDResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
const { requestHandler } = configuration;
|
|
27
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
28
|
+
}
|
|
29
|
+
serialize(input, context) {
|
|
30
|
+
return Aws_json1_1_1.serializeAws_json1_1AnalyzeIDCommand(input, context);
|
|
31
|
+
}
|
|
32
|
+
deserialize(output, context) {
|
|
33
|
+
return Aws_json1_1_1.deserializeAws_json1_1AnalyzeIDCommand(output, context);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.AnalyzeIDCommand = AnalyzeIDCommand;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./AnalyzeDocumentCommand"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./AnalyzeExpenseCommand"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./AnalyzeIDCommand"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./DetectDocumentTextCommand"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./GetDocumentAnalysisCommand"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./GetDocumentTextDetectionCommand"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.StartExpenseAnalysisResponse = exports.StartExpenseAnalysisRequest = exports.StartDocumentTextDetectionResponse = exports.StartDocumentTextDetectionRequest = exports.StartDocumentAnalysisResponse = exports.StartDocumentAnalysisRequest = exports.OutputConfig = exports.NotificationChannel = exports.LimitExceededException = exports.IdempotentParameterMismatchException = exports.GetExpenseAnalysisResponse = void 0;
|
|
3
|
+
exports.JobStatus = exports.GetDocumentAnalysisRequest = exports.DocumentLocation = exports.DetectDocumentTextResponse = exports.DetectDocumentTextRequest = exports.AnalyzeIDResponse = exports.IdentityDocument = exports.IdentityDocumentField = exports.AnalyzeIDDetections = exports.NormalizedValue = exports.ValueType = exports.AnalyzeIDRequest = exports.AnalyzeExpenseResponse = exports.ExpenseDocument = exports.LineItemGroup = exports.LineItemFields = exports.ExpenseField = exports.ExpenseType = exports.ExpenseDetection = exports.AnalyzeExpenseRequest = exports.UnsupportedDocumentException = exports.ThrottlingException = exports.ProvisionedThroughputExceededException = exports.InvalidS3ObjectException = exports.InvalidParameterException = exports.InternalServerError = exports.HumanLoopQuotaExceededException = exports.DocumentTooLargeException = exports.BadDocumentException = exports.AnalyzeDocumentResponse = exports.HumanLoopActivationOutput = exports.DocumentMetadata = exports.Block = exports.TextType = exports.SelectionStatus = exports.Relationship = exports.RelationshipType = exports.Geometry = exports.Point = exports.BoundingBox = exports.EntityType = exports.BlockType = exports.AnalyzeDocumentRequest = exports.HumanLoopConfig = exports.HumanLoopDataAttributes = exports.ContentClassifier = exports.FeatureType = exports.Document = exports.S3Object = exports.AccessDeniedException = void 0;
|
|
4
|
+
exports.StartExpenseAnalysisResponse = exports.StartExpenseAnalysisRequest = exports.StartDocumentTextDetectionResponse = exports.StartDocumentTextDetectionRequest = exports.StartDocumentAnalysisResponse = exports.StartDocumentAnalysisRequest = exports.OutputConfig = exports.NotificationChannel = exports.LimitExceededException = exports.IdempotentParameterMismatchException = exports.GetExpenseAnalysisResponse = exports.GetExpenseAnalysisRequest = exports.GetDocumentTextDetectionResponse = exports.GetDocumentTextDetectionRequest = exports.InvalidKMSKeyException = exports.InvalidJobIdException = exports.GetDocumentAnalysisResponse = exports.Warning = void 0;
|
|
5
5
|
var AccessDeniedException;
|
|
6
6
|
(function (AccessDeniedException) {
|
|
7
7
|
AccessDeniedException.filterSensitiveLog = (obj) => ({
|
|
@@ -229,6 +229,46 @@ var AnalyzeExpenseResponse;
|
|
|
229
229
|
...obj,
|
|
230
230
|
});
|
|
231
231
|
})(AnalyzeExpenseResponse = exports.AnalyzeExpenseResponse || (exports.AnalyzeExpenseResponse = {}));
|
|
232
|
+
var AnalyzeIDRequest;
|
|
233
|
+
(function (AnalyzeIDRequest) {
|
|
234
|
+
AnalyzeIDRequest.filterSensitiveLog = (obj) => ({
|
|
235
|
+
...obj,
|
|
236
|
+
});
|
|
237
|
+
})(AnalyzeIDRequest = exports.AnalyzeIDRequest || (exports.AnalyzeIDRequest = {}));
|
|
238
|
+
var ValueType;
|
|
239
|
+
(function (ValueType) {
|
|
240
|
+
ValueType["DATE"] = "DATE";
|
|
241
|
+
})(ValueType = exports.ValueType || (exports.ValueType = {}));
|
|
242
|
+
var NormalizedValue;
|
|
243
|
+
(function (NormalizedValue) {
|
|
244
|
+
NormalizedValue.filterSensitiveLog = (obj) => ({
|
|
245
|
+
...obj,
|
|
246
|
+
});
|
|
247
|
+
})(NormalizedValue = exports.NormalizedValue || (exports.NormalizedValue = {}));
|
|
248
|
+
var AnalyzeIDDetections;
|
|
249
|
+
(function (AnalyzeIDDetections) {
|
|
250
|
+
AnalyzeIDDetections.filterSensitiveLog = (obj) => ({
|
|
251
|
+
...obj,
|
|
252
|
+
});
|
|
253
|
+
})(AnalyzeIDDetections = exports.AnalyzeIDDetections || (exports.AnalyzeIDDetections = {}));
|
|
254
|
+
var IdentityDocumentField;
|
|
255
|
+
(function (IdentityDocumentField) {
|
|
256
|
+
IdentityDocumentField.filterSensitiveLog = (obj) => ({
|
|
257
|
+
...obj,
|
|
258
|
+
});
|
|
259
|
+
})(IdentityDocumentField = exports.IdentityDocumentField || (exports.IdentityDocumentField = {}));
|
|
260
|
+
var IdentityDocument;
|
|
261
|
+
(function (IdentityDocument) {
|
|
262
|
+
IdentityDocument.filterSensitiveLog = (obj) => ({
|
|
263
|
+
...obj,
|
|
264
|
+
});
|
|
265
|
+
})(IdentityDocument = exports.IdentityDocument || (exports.IdentityDocument = {}));
|
|
266
|
+
var AnalyzeIDResponse;
|
|
267
|
+
(function (AnalyzeIDResponse) {
|
|
268
|
+
AnalyzeIDResponse.filterSensitiveLog = (obj) => ({
|
|
269
|
+
...obj,
|
|
270
|
+
});
|
|
271
|
+
})(AnalyzeIDResponse = exports.AnalyzeIDResponse || (exports.AnalyzeIDResponse = {}));
|
|
232
272
|
var DetectDocumentTextRequest;
|
|
233
273
|
(function (DetectDocumentTextRequest) {
|
|
234
274
|
DetectDocumentTextRequest.filterSensitiveLog = (obj) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_json1_1StartExpenseAnalysisCommand = exports.deserializeAws_json1_1StartDocumentTextDetectionCommand = exports.deserializeAws_json1_1StartDocumentAnalysisCommand = exports.deserializeAws_json1_1GetExpenseAnalysisCommand = exports.deserializeAws_json1_1GetDocumentTextDetectionCommand = exports.deserializeAws_json1_1GetDocumentAnalysisCommand = exports.deserializeAws_json1_1DetectDocumentTextCommand = exports.deserializeAws_json1_1AnalyzeExpenseCommand = exports.deserializeAws_json1_1AnalyzeDocumentCommand = exports.serializeAws_json1_1StartExpenseAnalysisCommand = exports.serializeAws_json1_1StartDocumentTextDetectionCommand = exports.serializeAws_json1_1StartDocumentAnalysisCommand = exports.serializeAws_json1_1GetExpenseAnalysisCommand = exports.serializeAws_json1_1GetDocumentTextDetectionCommand = exports.serializeAws_json1_1GetDocumentAnalysisCommand = exports.serializeAws_json1_1DetectDocumentTextCommand = exports.serializeAws_json1_1AnalyzeExpenseCommand = exports.serializeAws_json1_1AnalyzeDocumentCommand = void 0;
|
|
3
|
+
exports.deserializeAws_json1_1StartExpenseAnalysisCommand = exports.deserializeAws_json1_1StartDocumentTextDetectionCommand = exports.deserializeAws_json1_1StartDocumentAnalysisCommand = exports.deserializeAws_json1_1GetExpenseAnalysisCommand = exports.deserializeAws_json1_1GetDocumentTextDetectionCommand = exports.deserializeAws_json1_1GetDocumentAnalysisCommand = exports.deserializeAws_json1_1DetectDocumentTextCommand = exports.deserializeAws_json1_1AnalyzeIDCommand = exports.deserializeAws_json1_1AnalyzeExpenseCommand = exports.deserializeAws_json1_1AnalyzeDocumentCommand = exports.serializeAws_json1_1StartExpenseAnalysisCommand = exports.serializeAws_json1_1StartDocumentTextDetectionCommand = exports.serializeAws_json1_1StartDocumentAnalysisCommand = exports.serializeAws_json1_1GetExpenseAnalysisCommand = exports.serializeAws_json1_1GetDocumentTextDetectionCommand = exports.serializeAws_json1_1GetDocumentAnalysisCommand = exports.serializeAws_json1_1DetectDocumentTextCommand = exports.serializeAws_json1_1AnalyzeIDCommand = exports.serializeAws_json1_1AnalyzeExpenseCommand = exports.serializeAws_json1_1AnalyzeDocumentCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const serializeAws_json1_1AnalyzeDocumentCommand = async (input, context) => {
|
|
@@ -23,6 +23,16 @@ const serializeAws_json1_1AnalyzeExpenseCommand = async (input, context) => {
|
|
|
23
23
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
24
|
};
|
|
25
25
|
exports.serializeAws_json1_1AnalyzeExpenseCommand = serializeAws_json1_1AnalyzeExpenseCommand;
|
|
26
|
+
const serializeAws_json1_1AnalyzeIDCommand = async (input, context) => {
|
|
27
|
+
const headers = {
|
|
28
|
+
"content-type": "application/x-amz-json-1.1",
|
|
29
|
+
"x-amz-target": "Textract.AnalyzeID",
|
|
30
|
+
};
|
|
31
|
+
let body;
|
|
32
|
+
body = JSON.stringify(serializeAws_json1_1AnalyzeIDRequest(input, context));
|
|
33
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
34
|
+
};
|
|
35
|
+
exports.serializeAws_json1_1AnalyzeIDCommand = serializeAws_json1_1AnalyzeIDCommand;
|
|
26
36
|
const serializeAws_json1_1DetectDocumentTextCommand = async (input, context) => {
|
|
27
37
|
const headers = {
|
|
28
38
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -323,6 +333,117 @@ const deserializeAws_json1_1AnalyzeExpenseCommandError = async (output, context)
|
|
|
323
333
|
delete response.Message;
|
|
324
334
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
325
335
|
};
|
|
336
|
+
const deserializeAws_json1_1AnalyzeIDCommand = async (output, context) => {
|
|
337
|
+
if (output.statusCode >= 300) {
|
|
338
|
+
return deserializeAws_json1_1AnalyzeIDCommandError(output, context);
|
|
339
|
+
}
|
|
340
|
+
const data = await parseBody(output.body, context);
|
|
341
|
+
let contents = {};
|
|
342
|
+
contents = deserializeAws_json1_1AnalyzeIDResponse(data, context);
|
|
343
|
+
const response = {
|
|
344
|
+
$metadata: deserializeMetadata(output),
|
|
345
|
+
...contents,
|
|
346
|
+
};
|
|
347
|
+
return Promise.resolve(response);
|
|
348
|
+
};
|
|
349
|
+
exports.deserializeAws_json1_1AnalyzeIDCommand = deserializeAws_json1_1AnalyzeIDCommand;
|
|
350
|
+
const deserializeAws_json1_1AnalyzeIDCommandError = async (output, context) => {
|
|
351
|
+
const parsedOutput = {
|
|
352
|
+
...output,
|
|
353
|
+
body: await parseBody(output.body, context),
|
|
354
|
+
};
|
|
355
|
+
let response;
|
|
356
|
+
let errorCode = "UnknownError";
|
|
357
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
358
|
+
switch (errorCode) {
|
|
359
|
+
case "AccessDeniedException":
|
|
360
|
+
case "com.amazonaws.textract#AccessDeniedException":
|
|
361
|
+
response = {
|
|
362
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
363
|
+
name: errorCode,
|
|
364
|
+
$metadata: deserializeMetadata(output),
|
|
365
|
+
};
|
|
366
|
+
break;
|
|
367
|
+
case "BadDocumentException":
|
|
368
|
+
case "com.amazonaws.textract#BadDocumentException":
|
|
369
|
+
response = {
|
|
370
|
+
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
371
|
+
name: errorCode,
|
|
372
|
+
$metadata: deserializeMetadata(output),
|
|
373
|
+
};
|
|
374
|
+
break;
|
|
375
|
+
case "DocumentTooLargeException":
|
|
376
|
+
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
377
|
+
response = {
|
|
378
|
+
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
379
|
+
name: errorCode,
|
|
380
|
+
$metadata: deserializeMetadata(output),
|
|
381
|
+
};
|
|
382
|
+
break;
|
|
383
|
+
case "InternalServerError":
|
|
384
|
+
case "com.amazonaws.textract#InternalServerError":
|
|
385
|
+
response = {
|
|
386
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
387
|
+
name: errorCode,
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
};
|
|
390
|
+
break;
|
|
391
|
+
case "InvalidParameterException":
|
|
392
|
+
case "com.amazonaws.textract#InvalidParameterException":
|
|
393
|
+
response = {
|
|
394
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
395
|
+
name: errorCode,
|
|
396
|
+
$metadata: deserializeMetadata(output),
|
|
397
|
+
};
|
|
398
|
+
break;
|
|
399
|
+
case "InvalidS3ObjectException":
|
|
400
|
+
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
401
|
+
response = {
|
|
402
|
+
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
403
|
+
name: errorCode,
|
|
404
|
+
$metadata: deserializeMetadata(output),
|
|
405
|
+
};
|
|
406
|
+
break;
|
|
407
|
+
case "ProvisionedThroughputExceededException":
|
|
408
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
409
|
+
response = {
|
|
410
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
411
|
+
name: errorCode,
|
|
412
|
+
$metadata: deserializeMetadata(output),
|
|
413
|
+
};
|
|
414
|
+
break;
|
|
415
|
+
case "ThrottlingException":
|
|
416
|
+
case "com.amazonaws.textract#ThrottlingException":
|
|
417
|
+
response = {
|
|
418
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
419
|
+
name: errorCode,
|
|
420
|
+
$metadata: deserializeMetadata(output),
|
|
421
|
+
};
|
|
422
|
+
break;
|
|
423
|
+
case "UnsupportedDocumentException":
|
|
424
|
+
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
425
|
+
response = {
|
|
426
|
+
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
427
|
+
name: errorCode,
|
|
428
|
+
$metadata: deserializeMetadata(output),
|
|
429
|
+
};
|
|
430
|
+
break;
|
|
431
|
+
default:
|
|
432
|
+
const parsedBody = parsedOutput.body;
|
|
433
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
434
|
+
response = {
|
|
435
|
+
...parsedBody,
|
|
436
|
+
name: `${errorCode}`,
|
|
437
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
438
|
+
$fault: "client",
|
|
439
|
+
$metadata: deserializeMetadata(output),
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
const message = response.message || response.Message || errorCode;
|
|
443
|
+
response.message = message;
|
|
444
|
+
delete response.Message;
|
|
445
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
446
|
+
};
|
|
326
447
|
const deserializeAws_json1_1DetectDocumentTextCommand = async (output, context) => {
|
|
327
448
|
if (output.statusCode >= 300) {
|
|
328
449
|
return deserializeAws_json1_1DetectDocumentTextCommandError(output, context);
|
|
@@ -1320,6 +1441,14 @@ const serializeAws_json1_1AnalyzeExpenseRequest = (input, context) => {
|
|
|
1320
1441
|
input.Document !== null && { Document: serializeAws_json1_1Document(input.Document, context) }),
|
|
1321
1442
|
};
|
|
1322
1443
|
};
|
|
1444
|
+
const serializeAws_json1_1AnalyzeIDRequest = (input, context) => {
|
|
1445
|
+
return {
|
|
1446
|
+
...(input.DocumentPages !== undefined &&
|
|
1447
|
+
input.DocumentPages !== null && {
|
|
1448
|
+
DocumentPages: serializeAws_json1_1DocumentPages(input.DocumentPages, context),
|
|
1449
|
+
}),
|
|
1450
|
+
};
|
|
1451
|
+
};
|
|
1323
1452
|
const serializeAws_json1_1ContentClassifiers = (input, context) => {
|
|
1324
1453
|
return input
|
|
1325
1454
|
.filter((e) => e != null)
|
|
@@ -1349,6 +1478,16 @@ const serializeAws_json1_1DocumentLocation = (input, context) => {
|
|
|
1349
1478
|
input.S3Object !== null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }),
|
|
1350
1479
|
};
|
|
1351
1480
|
};
|
|
1481
|
+
const serializeAws_json1_1DocumentPages = (input, context) => {
|
|
1482
|
+
return input
|
|
1483
|
+
.filter((e) => e != null)
|
|
1484
|
+
.map((entry) => {
|
|
1485
|
+
if (entry === null) {
|
|
1486
|
+
return null;
|
|
1487
|
+
}
|
|
1488
|
+
return serializeAws_json1_1Document(entry, context);
|
|
1489
|
+
});
|
|
1490
|
+
};
|
|
1352
1491
|
const serializeAws_json1_1FeatureTypes = (input, context) => {
|
|
1353
1492
|
return input
|
|
1354
1493
|
.filter((e) => e != null)
|
|
@@ -1504,6 +1643,26 @@ const deserializeAws_json1_1AnalyzeExpenseResponse = (output, context) => {
|
|
|
1504
1643
|
: undefined,
|
|
1505
1644
|
};
|
|
1506
1645
|
};
|
|
1646
|
+
const deserializeAws_json1_1AnalyzeIDDetections = (output, context) => {
|
|
1647
|
+
return {
|
|
1648
|
+
Confidence: smithy_client_1.limitedParseFloat32(output.Confidence),
|
|
1649
|
+
NormalizedValue: output.NormalizedValue !== undefined && output.NormalizedValue !== null
|
|
1650
|
+
? deserializeAws_json1_1NormalizedValue(output.NormalizedValue, context)
|
|
1651
|
+
: undefined,
|
|
1652
|
+
Text: smithy_client_1.expectString(output.Text),
|
|
1653
|
+
};
|
|
1654
|
+
};
|
|
1655
|
+
const deserializeAws_json1_1AnalyzeIDResponse = (output, context) => {
|
|
1656
|
+
return {
|
|
1657
|
+
AnalyzeIDModelVersion: smithy_client_1.expectString(output.AnalyzeIDModelVersion),
|
|
1658
|
+
DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
|
|
1659
|
+
? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
|
|
1660
|
+
: undefined,
|
|
1661
|
+
IdentityDocuments: output.IdentityDocuments !== undefined && output.IdentityDocuments !== null
|
|
1662
|
+
? deserializeAws_json1_1IdentityDocumentList(output.IdentityDocuments, context)
|
|
1663
|
+
: undefined,
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1507
1666
|
const deserializeAws_json1_1BadDocumentException = (output, context) => {
|
|
1508
1667
|
return {
|
|
1509
1668
|
Code: smithy_client_1.expectString(output.Code),
|
|
@@ -1742,6 +1901,44 @@ const deserializeAws_json1_1IdempotentParameterMismatchException = (output, cont
|
|
|
1742
1901
|
Message: smithy_client_1.expectString(output.Message),
|
|
1743
1902
|
};
|
|
1744
1903
|
};
|
|
1904
|
+
const deserializeAws_json1_1IdentityDocument = (output, context) => {
|
|
1905
|
+
return {
|
|
1906
|
+
DocumentIndex: smithy_client_1.expectInt32(output.DocumentIndex),
|
|
1907
|
+
IdentityDocumentFields: output.IdentityDocumentFields !== undefined && output.IdentityDocumentFields !== null
|
|
1908
|
+
? deserializeAws_json1_1IdentityDocumentFieldList(output.IdentityDocumentFields, context)
|
|
1909
|
+
: undefined,
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
const deserializeAws_json1_1IdentityDocumentField = (output, context) => {
|
|
1913
|
+
return {
|
|
1914
|
+
Type: output.Type !== undefined && output.Type !== null
|
|
1915
|
+
? deserializeAws_json1_1AnalyzeIDDetections(output.Type, context)
|
|
1916
|
+
: undefined,
|
|
1917
|
+
ValueDetection: output.ValueDetection !== undefined && output.ValueDetection !== null
|
|
1918
|
+
? deserializeAws_json1_1AnalyzeIDDetections(output.ValueDetection, context)
|
|
1919
|
+
: undefined,
|
|
1920
|
+
};
|
|
1921
|
+
};
|
|
1922
|
+
const deserializeAws_json1_1IdentityDocumentFieldList = (output, context) => {
|
|
1923
|
+
return (output || [])
|
|
1924
|
+
.filter((e) => e != null)
|
|
1925
|
+
.map((entry) => {
|
|
1926
|
+
if (entry === null) {
|
|
1927
|
+
return null;
|
|
1928
|
+
}
|
|
1929
|
+
return deserializeAws_json1_1IdentityDocumentField(entry, context);
|
|
1930
|
+
});
|
|
1931
|
+
};
|
|
1932
|
+
const deserializeAws_json1_1IdentityDocumentList = (output, context) => {
|
|
1933
|
+
return (output || [])
|
|
1934
|
+
.filter((e) => e != null)
|
|
1935
|
+
.map((entry) => {
|
|
1936
|
+
if (entry === null) {
|
|
1937
|
+
return null;
|
|
1938
|
+
}
|
|
1939
|
+
return deserializeAws_json1_1IdentityDocument(entry, context);
|
|
1940
|
+
});
|
|
1941
|
+
};
|
|
1745
1942
|
const deserializeAws_json1_1IdList = (output, context) => {
|
|
1746
1943
|
return (output || [])
|
|
1747
1944
|
.filter((e) => e != null)
|
|
@@ -1823,6 +2020,12 @@ const deserializeAws_json1_1LineItemList = (output, context) => {
|
|
|
1823
2020
|
return deserializeAws_json1_1LineItemFields(entry, context);
|
|
1824
2021
|
});
|
|
1825
2022
|
};
|
|
2023
|
+
const deserializeAws_json1_1NormalizedValue = (output, context) => {
|
|
2024
|
+
return {
|
|
2025
|
+
Value: smithy_client_1.expectString(output.Value),
|
|
2026
|
+
ValueType: smithy_client_1.expectString(output.ValueType),
|
|
2027
|
+
};
|
|
2028
|
+
};
|
|
1826
2029
|
const deserializeAws_json1_1Pages = (output, context) => {
|
|
1827
2030
|
return (output || [])
|
|
1828
2031
|
.filter((e) => e != null)
|
package/dist-es/Textract.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __extends } from "tslib";
|
|
2
2
|
import { AnalyzeDocumentCommand, } from "./commands/AnalyzeDocumentCommand";
|
|
3
3
|
import { AnalyzeExpenseCommand, } from "./commands/AnalyzeExpenseCommand";
|
|
4
|
+
import { AnalyzeIDCommand } from "./commands/AnalyzeIDCommand";
|
|
4
5
|
import { DetectDocumentTextCommand, } from "./commands/DetectDocumentTextCommand";
|
|
5
6
|
import { GetDocumentAnalysisCommand, } from "./commands/GetDocumentAnalysisCommand";
|
|
6
7
|
import { GetDocumentTextDetectionCommand, } from "./commands/GetDocumentTextDetectionCommand";
|
|
@@ -42,6 +43,20 @@ var Textract = (function (_super) {
|
|
|
42
43
|
return this.send(command, optionsOrCb);
|
|
43
44
|
}
|
|
44
45
|
};
|
|
46
|
+
Textract.prototype.analyzeID = function (args, optionsOrCb, cb) {
|
|
47
|
+
var command = new AnalyzeIDCommand(args);
|
|
48
|
+
if (typeof optionsOrCb === "function") {
|
|
49
|
+
this.send(command, optionsOrCb);
|
|
50
|
+
}
|
|
51
|
+
else if (typeof cb === "function") {
|
|
52
|
+
if (typeof optionsOrCb !== "object")
|
|
53
|
+
throw new Error("Expect http options but get " + typeof optionsOrCb);
|
|
54
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return this.send(command, optionsOrCb);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
45
60
|
Textract.prototype.detectDocumentText = function (args, optionsOrCb, cb) {
|
|
46
61
|
var command = new DetectDocumentTextCommand(args);
|
|
47
62
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __extends } from "tslib";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { AnalyzeIDRequest, AnalyzeIDResponse } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_json1_1AnalyzeIDCommand, serializeAws_json1_1AnalyzeIDCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
var AnalyzeIDCommand = (function (_super) {
|
|
7
|
+
__extends(AnalyzeIDCommand, _super);
|
|
8
|
+
function AnalyzeIDCommand(input) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this.input = input;
|
|
11
|
+
return _this;
|
|
12
|
+
}
|
|
13
|
+
AnalyzeIDCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
|
|
14
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
+
var stack = clientStack.concat(this.middlewareStack);
|
|
16
|
+
var logger = configuration.logger;
|
|
17
|
+
var clientName = "TextractClient";
|
|
18
|
+
var commandName = "AnalyzeIDCommand";
|
|
19
|
+
var handlerExecutionContext = {
|
|
20
|
+
logger: logger,
|
|
21
|
+
clientName: clientName,
|
|
22
|
+
commandName: commandName,
|
|
23
|
+
inputFilterSensitiveLog: AnalyzeIDRequest.filterSensitiveLog,
|
|
24
|
+
outputFilterSensitiveLog: AnalyzeIDResponse.filterSensitiveLog,
|
|
25
|
+
};
|
|
26
|
+
var requestHandler = configuration.requestHandler;
|
|
27
|
+
return stack.resolve(function (request) {
|
|
28
|
+
return requestHandler.handle(request.request, options || {});
|
|
29
|
+
}, handlerExecutionContext);
|
|
30
|
+
};
|
|
31
|
+
AnalyzeIDCommand.prototype.serialize = function (input, context) {
|
|
32
|
+
return serializeAws_json1_1AnalyzeIDCommand(input, context);
|
|
33
|
+
};
|
|
34
|
+
AnalyzeIDCommand.prototype.deserialize = function (output, context) {
|
|
35
|
+
return deserializeAws_json1_1AnalyzeIDCommand(output, context);
|
|
36
|
+
};
|
|
37
|
+
return AnalyzeIDCommand;
|
|
38
|
+
}($Command));
|
|
39
|
+
export { AnalyzeIDCommand };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./AnalyzeDocumentCommand";
|
|
2
2
|
export * from "./AnalyzeExpenseCommand";
|
|
3
|
+
export * from "./AnalyzeIDCommand";
|
|
3
4
|
export * from "./DetectDocumentTextCommand";
|
|
4
5
|
export * from "./GetDocumentAnalysisCommand";
|
|
5
6
|
export * from "./GetDocumentTextDetectionCommand";
|
|
@@ -164,6 +164,34 @@ export var AnalyzeExpenseResponse;
|
|
|
164
164
|
(function (AnalyzeExpenseResponse) {
|
|
165
165
|
AnalyzeExpenseResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
166
166
|
})(AnalyzeExpenseResponse || (AnalyzeExpenseResponse = {}));
|
|
167
|
+
export var AnalyzeIDRequest;
|
|
168
|
+
(function (AnalyzeIDRequest) {
|
|
169
|
+
AnalyzeIDRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
170
|
+
})(AnalyzeIDRequest || (AnalyzeIDRequest = {}));
|
|
171
|
+
export var ValueType;
|
|
172
|
+
(function (ValueType) {
|
|
173
|
+
ValueType["DATE"] = "DATE";
|
|
174
|
+
})(ValueType || (ValueType = {}));
|
|
175
|
+
export var NormalizedValue;
|
|
176
|
+
(function (NormalizedValue) {
|
|
177
|
+
NormalizedValue.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
178
|
+
})(NormalizedValue || (NormalizedValue = {}));
|
|
179
|
+
export var AnalyzeIDDetections;
|
|
180
|
+
(function (AnalyzeIDDetections) {
|
|
181
|
+
AnalyzeIDDetections.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
182
|
+
})(AnalyzeIDDetections || (AnalyzeIDDetections = {}));
|
|
183
|
+
export var IdentityDocumentField;
|
|
184
|
+
(function (IdentityDocumentField) {
|
|
185
|
+
IdentityDocumentField.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
186
|
+
})(IdentityDocumentField || (IdentityDocumentField = {}));
|
|
187
|
+
export var IdentityDocument;
|
|
188
|
+
(function (IdentityDocument) {
|
|
189
|
+
IdentityDocument.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
190
|
+
})(IdentityDocument || (IdentityDocument = {}));
|
|
191
|
+
export var AnalyzeIDResponse;
|
|
192
|
+
(function (AnalyzeIDResponse) {
|
|
193
|
+
AnalyzeIDResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
194
|
+
})(AnalyzeIDResponse || (AnalyzeIDResponse = {}));
|
|
167
195
|
export var DetectDocumentTextRequest;
|
|
168
196
|
(function (DetectDocumentTextRequest) {
|
|
169
197
|
DetectDocumentTextRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
|
|
@@ -23,6 +23,17 @@ export var serializeAws_json1_1AnalyzeExpenseCommand = function (input, context)
|
|
|
23
23
|
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
24
24
|
});
|
|
25
25
|
}); };
|
|
26
|
+
export var serializeAws_json1_1AnalyzeIDCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
27
|
+
var headers, body;
|
|
28
|
+
return __generator(this, function (_a) {
|
|
29
|
+
headers = {
|
|
30
|
+
"content-type": "application/x-amz-json-1.1",
|
|
31
|
+
"x-amz-target": "Textract.AnalyzeID",
|
|
32
|
+
};
|
|
33
|
+
body = JSON.stringify(serializeAws_json1_1AnalyzeIDRequest(input, context));
|
|
34
|
+
return [2, buildHttpRpcRequest(context, headers, "/", undefined, body)];
|
|
35
|
+
});
|
|
36
|
+
}); };
|
|
26
37
|
export var serializeAws_json1_1DetectDocumentTextCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
27
38
|
var headers, body;
|
|
28
39
|
return __generator(this, function (_a) {
|
|
@@ -348,6 +359,126 @@ var deserializeAws_json1_1AnalyzeExpenseCommandError = function (output, context
|
|
|
348
359
|
}
|
|
349
360
|
});
|
|
350
361
|
}); };
|
|
362
|
+
export var deserializeAws_json1_1AnalyzeIDCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
363
|
+
var data, contents, response;
|
|
364
|
+
return __generator(this, function (_a) {
|
|
365
|
+
switch (_a.label) {
|
|
366
|
+
case 0:
|
|
367
|
+
if (output.statusCode >= 300) {
|
|
368
|
+
return [2, deserializeAws_json1_1AnalyzeIDCommandError(output, context)];
|
|
369
|
+
}
|
|
370
|
+
return [4, parseBody(output.body, context)];
|
|
371
|
+
case 1:
|
|
372
|
+
data = _a.sent();
|
|
373
|
+
contents = {};
|
|
374
|
+
contents = deserializeAws_json1_1AnalyzeIDResponse(data, context);
|
|
375
|
+
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
376
|
+
return [2, Promise.resolve(response)];
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
}); };
|
|
380
|
+
var deserializeAws_json1_1AnalyzeIDCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
381
|
+
var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, parsedBody, message;
|
|
382
|
+
var _m;
|
|
383
|
+
return __generator(this, function (_o) {
|
|
384
|
+
switch (_o.label) {
|
|
385
|
+
case 0:
|
|
386
|
+
_a = [__assign({}, output)];
|
|
387
|
+
_m = {};
|
|
388
|
+
return [4, parseBody(output.body, context)];
|
|
389
|
+
case 1:
|
|
390
|
+
parsedOutput = __assign.apply(void 0, _a.concat([(_m.body = _o.sent(), _m)]));
|
|
391
|
+
errorCode = "UnknownError";
|
|
392
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
393
|
+
_b = errorCode;
|
|
394
|
+
switch (_b) {
|
|
395
|
+
case "AccessDeniedException": return [3, 2];
|
|
396
|
+
case "com.amazonaws.textract#AccessDeniedException": return [3, 2];
|
|
397
|
+
case "BadDocumentException": return [3, 4];
|
|
398
|
+
case "com.amazonaws.textract#BadDocumentException": return [3, 4];
|
|
399
|
+
case "DocumentTooLargeException": return [3, 6];
|
|
400
|
+
case "com.amazonaws.textract#DocumentTooLargeException": return [3, 6];
|
|
401
|
+
case "InternalServerError": return [3, 8];
|
|
402
|
+
case "com.amazonaws.textract#InternalServerError": return [3, 8];
|
|
403
|
+
case "InvalidParameterException": return [3, 10];
|
|
404
|
+
case "com.amazonaws.textract#InvalidParameterException": return [3, 10];
|
|
405
|
+
case "InvalidS3ObjectException": return [3, 12];
|
|
406
|
+
case "com.amazonaws.textract#InvalidS3ObjectException": return [3, 12];
|
|
407
|
+
case "ProvisionedThroughputExceededException": return [3, 14];
|
|
408
|
+
case "com.amazonaws.textract#ProvisionedThroughputExceededException": return [3, 14];
|
|
409
|
+
case "ThrottlingException": return [3, 16];
|
|
410
|
+
case "com.amazonaws.textract#ThrottlingException": return [3, 16];
|
|
411
|
+
case "UnsupportedDocumentException": return [3, 18];
|
|
412
|
+
case "com.amazonaws.textract#UnsupportedDocumentException": return [3, 18];
|
|
413
|
+
}
|
|
414
|
+
return [3, 20];
|
|
415
|
+
case 2:
|
|
416
|
+
_c = [{}];
|
|
417
|
+
return [4, deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
418
|
+
case 3:
|
|
419
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
420
|
+
return [3, 21];
|
|
421
|
+
case 4:
|
|
422
|
+
_d = [{}];
|
|
423
|
+
return [4, deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)];
|
|
424
|
+
case 5:
|
|
425
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
426
|
+
return [3, 21];
|
|
427
|
+
case 6:
|
|
428
|
+
_e = [{}];
|
|
429
|
+
return [4, deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)];
|
|
430
|
+
case 7:
|
|
431
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
432
|
+
return [3, 21];
|
|
433
|
+
case 8:
|
|
434
|
+
_f = [{}];
|
|
435
|
+
return [4, deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)];
|
|
436
|
+
case 9:
|
|
437
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
438
|
+
return [3, 21];
|
|
439
|
+
case 10:
|
|
440
|
+
_g = [{}];
|
|
441
|
+
return [4, deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)];
|
|
442
|
+
case 11:
|
|
443
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
444
|
+
return [3, 21];
|
|
445
|
+
case 12:
|
|
446
|
+
_h = [{}];
|
|
447
|
+
return [4, deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)];
|
|
448
|
+
case 13:
|
|
449
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
450
|
+
return [3, 21];
|
|
451
|
+
case 14:
|
|
452
|
+
_j = [{}];
|
|
453
|
+
return [4, deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)];
|
|
454
|
+
case 15:
|
|
455
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
456
|
+
return [3, 21];
|
|
457
|
+
case 16:
|
|
458
|
+
_k = [{}];
|
|
459
|
+
return [4, deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)];
|
|
460
|
+
case 17:
|
|
461
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _k.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
462
|
+
return [3, 21];
|
|
463
|
+
case 18:
|
|
464
|
+
_l = [{}];
|
|
465
|
+
return [4, deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)];
|
|
466
|
+
case 19:
|
|
467
|
+
response = __assign.apply(void 0, [__assign.apply(void 0, _l.concat([(_o.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
|
|
468
|
+
return [3, 21];
|
|
469
|
+
case 20:
|
|
470
|
+
parsedBody = parsedOutput.body;
|
|
471
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
472
|
+
response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
|
|
473
|
+
_o.label = 21;
|
|
474
|
+
case 21:
|
|
475
|
+
message = response.message || response.Message || errorCode;
|
|
476
|
+
response.message = message;
|
|
477
|
+
delete response.Message;
|
|
478
|
+
return [2, Promise.reject(Object.assign(new Error(message), response))];
|
|
479
|
+
}
|
|
480
|
+
});
|
|
481
|
+
}); };
|
|
351
482
|
export var deserializeAws_json1_1DetectDocumentTextCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
352
483
|
var data, contents, response;
|
|
353
484
|
return __generator(this, function (_a) {
|
|
@@ -1374,6 +1505,12 @@ var serializeAws_json1_1AnalyzeExpenseRequest = function (input, context) {
|
|
|
1374
1505
|
return __assign({}, (input.Document !== undefined &&
|
|
1375
1506
|
input.Document !== null && { Document: serializeAws_json1_1Document(input.Document, context) }));
|
|
1376
1507
|
};
|
|
1508
|
+
var serializeAws_json1_1AnalyzeIDRequest = function (input, context) {
|
|
1509
|
+
return __assign({}, (input.DocumentPages !== undefined &&
|
|
1510
|
+
input.DocumentPages !== null && {
|
|
1511
|
+
DocumentPages: serializeAws_json1_1DocumentPages(input.DocumentPages, context),
|
|
1512
|
+
}));
|
|
1513
|
+
};
|
|
1377
1514
|
var serializeAws_json1_1ContentClassifiers = function (input, context) {
|
|
1378
1515
|
return input
|
|
1379
1516
|
.filter(function (e) { return e != null; })
|
|
@@ -1396,6 +1533,16 @@ var serializeAws_json1_1DocumentLocation = function (input, context) {
|
|
|
1396
1533
|
return __assign({}, (input.S3Object !== undefined &&
|
|
1397
1534
|
input.S3Object !== null && { S3Object: serializeAws_json1_1S3Object(input.S3Object, context) }));
|
|
1398
1535
|
};
|
|
1536
|
+
var serializeAws_json1_1DocumentPages = function (input, context) {
|
|
1537
|
+
return input
|
|
1538
|
+
.filter(function (e) { return e != null; })
|
|
1539
|
+
.map(function (entry) {
|
|
1540
|
+
if (entry === null) {
|
|
1541
|
+
return null;
|
|
1542
|
+
}
|
|
1543
|
+
return serializeAws_json1_1Document(entry, context);
|
|
1544
|
+
});
|
|
1545
|
+
};
|
|
1399
1546
|
var serializeAws_json1_1FeatureTypes = function (input, context) {
|
|
1400
1547
|
return input
|
|
1401
1548
|
.filter(function (e) { return e != null; })
|
|
@@ -1501,6 +1648,26 @@ var deserializeAws_json1_1AnalyzeExpenseResponse = function (output, context) {
|
|
|
1501
1648
|
: undefined,
|
|
1502
1649
|
};
|
|
1503
1650
|
};
|
|
1651
|
+
var deserializeAws_json1_1AnalyzeIDDetections = function (output, context) {
|
|
1652
|
+
return {
|
|
1653
|
+
Confidence: __limitedParseFloat32(output.Confidence),
|
|
1654
|
+
NormalizedValue: output.NormalizedValue !== undefined && output.NormalizedValue !== null
|
|
1655
|
+
? deserializeAws_json1_1NormalizedValue(output.NormalizedValue, context)
|
|
1656
|
+
: undefined,
|
|
1657
|
+
Text: __expectString(output.Text),
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1660
|
+
var deserializeAws_json1_1AnalyzeIDResponse = function (output, context) {
|
|
1661
|
+
return {
|
|
1662
|
+
AnalyzeIDModelVersion: __expectString(output.AnalyzeIDModelVersion),
|
|
1663
|
+
DocumentMetadata: output.DocumentMetadata !== undefined && output.DocumentMetadata !== null
|
|
1664
|
+
? deserializeAws_json1_1DocumentMetadata(output.DocumentMetadata, context)
|
|
1665
|
+
: undefined,
|
|
1666
|
+
IdentityDocuments: output.IdentityDocuments !== undefined && output.IdentityDocuments !== null
|
|
1667
|
+
? deserializeAws_json1_1IdentityDocumentList(output.IdentityDocuments, context)
|
|
1668
|
+
: undefined,
|
|
1669
|
+
};
|
|
1670
|
+
};
|
|
1504
1671
|
var deserializeAws_json1_1BadDocumentException = function (output, context) {
|
|
1505
1672
|
return {
|
|
1506
1673
|
Code: __expectString(output.Code),
|
|
@@ -1739,6 +1906,44 @@ var deserializeAws_json1_1IdempotentParameterMismatchException = function (outpu
|
|
|
1739
1906
|
Message: __expectString(output.Message),
|
|
1740
1907
|
};
|
|
1741
1908
|
};
|
|
1909
|
+
var deserializeAws_json1_1IdentityDocument = function (output, context) {
|
|
1910
|
+
return {
|
|
1911
|
+
DocumentIndex: __expectInt32(output.DocumentIndex),
|
|
1912
|
+
IdentityDocumentFields: output.IdentityDocumentFields !== undefined && output.IdentityDocumentFields !== null
|
|
1913
|
+
? deserializeAws_json1_1IdentityDocumentFieldList(output.IdentityDocumentFields, context)
|
|
1914
|
+
: undefined,
|
|
1915
|
+
};
|
|
1916
|
+
};
|
|
1917
|
+
var deserializeAws_json1_1IdentityDocumentField = function (output, context) {
|
|
1918
|
+
return {
|
|
1919
|
+
Type: output.Type !== undefined && output.Type !== null
|
|
1920
|
+
? deserializeAws_json1_1AnalyzeIDDetections(output.Type, context)
|
|
1921
|
+
: undefined,
|
|
1922
|
+
ValueDetection: output.ValueDetection !== undefined && output.ValueDetection !== null
|
|
1923
|
+
? deserializeAws_json1_1AnalyzeIDDetections(output.ValueDetection, context)
|
|
1924
|
+
: undefined,
|
|
1925
|
+
};
|
|
1926
|
+
};
|
|
1927
|
+
var deserializeAws_json1_1IdentityDocumentFieldList = function (output, context) {
|
|
1928
|
+
return (output || [])
|
|
1929
|
+
.filter(function (e) { return e != null; })
|
|
1930
|
+
.map(function (entry) {
|
|
1931
|
+
if (entry === null) {
|
|
1932
|
+
return null;
|
|
1933
|
+
}
|
|
1934
|
+
return deserializeAws_json1_1IdentityDocumentField(entry, context);
|
|
1935
|
+
});
|
|
1936
|
+
};
|
|
1937
|
+
var deserializeAws_json1_1IdentityDocumentList = function (output, context) {
|
|
1938
|
+
return (output || [])
|
|
1939
|
+
.filter(function (e) { return e != null; })
|
|
1940
|
+
.map(function (entry) {
|
|
1941
|
+
if (entry === null) {
|
|
1942
|
+
return null;
|
|
1943
|
+
}
|
|
1944
|
+
return deserializeAws_json1_1IdentityDocument(entry, context);
|
|
1945
|
+
});
|
|
1946
|
+
};
|
|
1742
1947
|
var deserializeAws_json1_1IdList = function (output, context) {
|
|
1743
1948
|
return (output || [])
|
|
1744
1949
|
.filter(function (e) { return e != null; })
|
|
@@ -1820,6 +2025,12 @@ var deserializeAws_json1_1LineItemList = function (output, context) {
|
|
|
1820
2025
|
return deserializeAws_json1_1LineItemFields(entry, context);
|
|
1821
2026
|
});
|
|
1822
2027
|
};
|
|
2028
|
+
var deserializeAws_json1_1NormalizedValue = function (output, context) {
|
|
2029
|
+
return {
|
|
2030
|
+
Value: __expectString(output.Value),
|
|
2031
|
+
ValueType: __expectString(output.ValueType),
|
|
2032
|
+
};
|
|
2033
|
+
};
|
|
1823
2034
|
var deserializeAws_json1_1Pages = function (output, context) {
|
|
1824
2035
|
return (output || [])
|
|
1825
2036
|
.filter(function (e) { return e != null; })
|
package/dist-types/Textract.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
2
|
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "./commands/AnalyzeDocumentCommand";
|
|
3
3
|
import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "./commands/AnalyzeExpenseCommand";
|
|
4
|
+
import { AnalyzeIDCommandInput, AnalyzeIDCommandOutput } from "./commands/AnalyzeIDCommand";
|
|
4
5
|
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "./commands/DetectDocumentTextCommand";
|
|
5
6
|
import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "./commands/GetDocumentAnalysisCommand";
|
|
6
7
|
import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "./commands/GetDocumentTextDetectionCommand";
|
|
@@ -52,7 +53,8 @@ export declare class Textract extends TextractClient {
|
|
|
52
53
|
analyzeDocument(args: AnalyzeDocumentCommandInput, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
53
54
|
analyzeDocument(args: AnalyzeDocumentCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeDocumentCommandOutput) => void): void;
|
|
54
55
|
/**
|
|
55
|
-
* <p>
|
|
56
|
+
* <p>
|
|
57
|
+
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially related relationships between text.</p>
|
|
56
58
|
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as follows.</p>
|
|
57
59
|
* <ul>
|
|
58
60
|
* <li>
|
|
@@ -70,6 +72,14 @@ export declare class Textract extends TextractClient {
|
|
|
70
72
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeExpenseCommandOutput>;
|
|
71
73
|
analyzeExpense(args: AnalyzeExpenseCommandInput, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
72
74
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
75
|
+
/**
|
|
76
|
+
* <p>Analyzes identity documents for relevant information. This information is extracted
|
|
77
|
+
* and returned as <code>IdentityDocumentFields</code>, which records both the normalized
|
|
78
|
+
* field and value of the extracted text.</p>
|
|
79
|
+
*/
|
|
80
|
+
analyzeID(args: AnalyzeIDCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeIDCommandOutput>;
|
|
81
|
+
analyzeID(args: AnalyzeIDCommandInput, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
82
|
+
analyzeID(args: AnalyzeIDCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
73
83
|
/**
|
|
74
84
|
* <p>Detects text in the input document. Amazon Textract can detect lines of text and the
|
|
75
85
|
* words that make up a line of text. The input document must be an image in JPEG or PNG
|
|
@@ -8,6 +8,7 @@ import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, Smith
|
|
|
8
8
|
import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "./commands/AnalyzeDocumentCommand";
|
|
10
10
|
import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "./commands/AnalyzeExpenseCommand";
|
|
11
|
+
import { AnalyzeIDCommandInput, AnalyzeIDCommandOutput } from "./commands/AnalyzeIDCommand";
|
|
11
12
|
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "./commands/DetectDocumentTextCommand";
|
|
12
13
|
import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "./commands/GetDocumentAnalysisCommand";
|
|
13
14
|
import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "./commands/GetDocumentTextDetectionCommand";
|
|
@@ -15,8 +16,8 @@ import { GetExpenseAnalysisCommandInput, GetExpenseAnalysisCommandOutput } from
|
|
|
15
16
|
import { StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput } from "./commands/StartDocumentAnalysisCommand";
|
|
16
17
|
import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput } from "./commands/StartDocumentTextDetectionCommand";
|
|
17
18
|
import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "./commands/StartExpenseAnalysisCommand";
|
|
18
|
-
export declare type ServiceInputTypes = AnalyzeDocumentCommandInput | AnalyzeExpenseCommandInput | DetectDocumentTextCommandInput | GetDocumentAnalysisCommandInput | GetDocumentTextDetectionCommandInput | GetExpenseAnalysisCommandInput | StartDocumentAnalysisCommandInput | StartDocumentTextDetectionCommandInput | StartExpenseAnalysisCommandInput;
|
|
19
|
-
export declare type ServiceOutputTypes = AnalyzeDocumentCommandOutput | AnalyzeExpenseCommandOutput | DetectDocumentTextCommandOutput | GetDocumentAnalysisCommandOutput | GetDocumentTextDetectionCommandOutput | GetExpenseAnalysisCommandOutput | StartDocumentAnalysisCommandOutput | StartDocumentTextDetectionCommandOutput | StartExpenseAnalysisCommandOutput;
|
|
19
|
+
export declare type ServiceInputTypes = AnalyzeDocumentCommandInput | AnalyzeExpenseCommandInput | AnalyzeIDCommandInput | DetectDocumentTextCommandInput | GetDocumentAnalysisCommandInput | GetDocumentTextDetectionCommandInput | GetExpenseAnalysisCommandInput | StartDocumentAnalysisCommandInput | StartDocumentTextDetectionCommandInput | StartExpenseAnalysisCommandInput;
|
|
20
|
+
export declare type ServiceOutputTypes = AnalyzeDocumentCommandOutput | AnalyzeExpenseCommandOutput | AnalyzeIDCommandOutput | DetectDocumentTextCommandOutput | GetDocumentAnalysisCommandOutput | GetDocumentTextDetectionCommandOutput | GetExpenseAnalysisCommandOutput | StartDocumentAnalysisCommandOutput | StartDocumentTextDetectionCommandOutput | StartExpenseAnalysisCommandOutput;
|
|
20
21
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
21
22
|
/**
|
|
22
23
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -7,7 +7,8 @@ export interface AnalyzeExpenseCommandInput extends AnalyzeExpenseRequest {
|
|
|
7
7
|
export interface AnalyzeExpenseCommandOutput extends AnalyzeExpenseResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* <p>
|
|
10
|
+
* <p>
|
|
11
|
+
* <code>AnalyzeExpense</code> synchronously analyzes an input document for financially related relationships between text.</p>
|
|
11
12
|
* <p>Information is returned as <code>ExpenseDocuments</code> and seperated as follows.</p>
|
|
12
13
|
* <ul>
|
|
13
14
|
* <li>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { AnalyzeIDRequest, AnalyzeIDResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
|
|
5
|
+
export interface AnalyzeIDCommandInput extends AnalyzeIDRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface AnalyzeIDCommandOutput extends AnalyzeIDResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Analyzes identity documents for relevant information. This information is extracted
|
|
11
|
+
* and returned as <code>IdentityDocumentFields</code>, which records both the normalized
|
|
12
|
+
* field and value of the extracted text.</p>
|
|
13
|
+
* @example
|
|
14
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
15
|
+
* ```javascript
|
|
16
|
+
* import { TextractClient, AnalyzeIDCommand } from "@aws-sdk/client-textract"; // ES Modules import
|
|
17
|
+
* // const { TextractClient, AnalyzeIDCommand } = require("@aws-sdk/client-textract"); // CommonJS import
|
|
18
|
+
* const client = new TextractClient(config);
|
|
19
|
+
* const command = new AnalyzeIDCommand(input);
|
|
20
|
+
* const response = await client.send(command);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link AnalyzeIDCommandInput} for command's `input` shape.
|
|
24
|
+
* @see {@link AnalyzeIDCommandOutput} for command's `response` shape.
|
|
25
|
+
* @see {@link TextractClientResolvedConfig | config} for TextractClient's `config` shape.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare class AnalyzeIDCommand extends $Command<AnalyzeIDCommandInput, AnalyzeIDCommandOutput, TextractClientResolvedConfig> {
|
|
29
|
+
readonly input: AnalyzeIDCommandInput;
|
|
30
|
+
constructor(input: AnalyzeIDCommandInput);
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TextractClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AnalyzeIDCommandInput, AnalyzeIDCommandOutput>;
|
|
35
|
+
private serialize;
|
|
36
|
+
private deserialize;
|
|
37
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./AnalyzeDocumentCommand";
|
|
2
2
|
export * from "./AnalyzeExpenseCommand";
|
|
3
|
+
export * from "./AnalyzeIDCommand";
|
|
3
4
|
export * from "./DetectDocumentTextCommand";
|
|
4
5
|
export * from "./GetDocumentAnalysisCommand";
|
|
5
6
|
export * from "./GetDocumentTextDetectionCommand";
|
|
@@ -702,7 +702,7 @@ export declare namespace ThrottlingException {
|
|
|
702
702
|
}
|
|
703
703
|
/**
|
|
704
704
|
* <p>The format of the input document isn't supported. Documents for synchronous operations can be in
|
|
705
|
-
* PNG or JPEG format. Documents for asynchronous operations can
|
|
705
|
+
* PNG or JPEG format only. Documents for asynchronous operations can be in PDF format.</p>
|
|
706
706
|
*/
|
|
707
707
|
export interface UnsupportedDocumentException extends __SmithyException, $MetadataBearer {
|
|
708
708
|
name: "UnsupportedDocumentException";
|
|
@@ -789,7 +789,7 @@ export declare namespace ExpenseType {
|
|
|
789
789
|
}
|
|
790
790
|
/**
|
|
791
791
|
* <p>Breakdown of detected information, seperated into
|
|
792
|
-
* the catagories Type,
|
|
792
|
+
* the catagories Type, LabelDetection, and ValueDetection</p>
|
|
793
793
|
*/
|
|
794
794
|
export interface ExpenseField {
|
|
795
795
|
/**
|
|
@@ -889,6 +889,127 @@ export declare namespace AnalyzeExpenseResponse {
|
|
|
889
889
|
*/
|
|
890
890
|
const filterSensitiveLog: (obj: AnalyzeExpenseResponse) => any;
|
|
891
891
|
}
|
|
892
|
+
export interface AnalyzeIDRequest {
|
|
893
|
+
/**
|
|
894
|
+
* <p>The document being passed to AnalyzeID.</p>
|
|
895
|
+
*/
|
|
896
|
+
DocumentPages: Document[] | undefined;
|
|
897
|
+
}
|
|
898
|
+
export declare namespace AnalyzeIDRequest {
|
|
899
|
+
/**
|
|
900
|
+
* @internal
|
|
901
|
+
*/
|
|
902
|
+
const filterSensitiveLog: (obj: AnalyzeIDRequest) => any;
|
|
903
|
+
}
|
|
904
|
+
export declare enum ValueType {
|
|
905
|
+
DATE = "DATE"
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* <p>Contains information relating to dates in a document, including the type
|
|
909
|
+
* of value, and the value.</p>
|
|
910
|
+
*/
|
|
911
|
+
export interface NormalizedValue {
|
|
912
|
+
/**
|
|
913
|
+
* <p>The value of the date, written as Year-Month-DayTHour:Minute:Second.</p>
|
|
914
|
+
*/
|
|
915
|
+
Value?: string;
|
|
916
|
+
/**
|
|
917
|
+
* <p>The normalized type of the value detected. In this case, DATE.</p>
|
|
918
|
+
*/
|
|
919
|
+
ValueType?: ValueType | string;
|
|
920
|
+
}
|
|
921
|
+
export declare namespace NormalizedValue {
|
|
922
|
+
/**
|
|
923
|
+
* @internal
|
|
924
|
+
*/
|
|
925
|
+
const filterSensitiveLog: (obj: NormalizedValue) => any;
|
|
926
|
+
}
|
|
927
|
+
/**
|
|
928
|
+
* <p>Used to contain the information detected by an AnalyzeID operation.</p>
|
|
929
|
+
*/
|
|
930
|
+
export interface AnalyzeIDDetections {
|
|
931
|
+
/**
|
|
932
|
+
* <p>Text of either the normalized field or value associated with it.</p>
|
|
933
|
+
*/
|
|
934
|
+
Text: string | undefined;
|
|
935
|
+
/**
|
|
936
|
+
* <p>Only returned for dates, returns the type of value detected and the date
|
|
937
|
+
* written in a more machine readable way.</p>
|
|
938
|
+
*/
|
|
939
|
+
NormalizedValue?: NormalizedValue;
|
|
940
|
+
/**
|
|
941
|
+
* <p>The confidence score of the detected text.</p>
|
|
942
|
+
*/
|
|
943
|
+
Confidence?: number;
|
|
944
|
+
}
|
|
945
|
+
export declare namespace AnalyzeIDDetections {
|
|
946
|
+
/**
|
|
947
|
+
* @internal
|
|
948
|
+
*/
|
|
949
|
+
const filterSensitiveLog: (obj: AnalyzeIDDetections) => any;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* <p>Structure containing both the normalized type of the extracted information
|
|
953
|
+
* and the text associated with it. These are extracted as Type and Value respectively.</p>
|
|
954
|
+
*/
|
|
955
|
+
export interface IdentityDocumentField {
|
|
956
|
+
/**
|
|
957
|
+
* <p>Used to contain the information detected by an AnalyzeID operation.</p>
|
|
958
|
+
*/
|
|
959
|
+
Type?: AnalyzeIDDetections;
|
|
960
|
+
/**
|
|
961
|
+
* <p>Used to contain the information detected by an AnalyzeID operation.</p>
|
|
962
|
+
*/
|
|
963
|
+
ValueDetection?: AnalyzeIDDetections;
|
|
964
|
+
}
|
|
965
|
+
export declare namespace IdentityDocumentField {
|
|
966
|
+
/**
|
|
967
|
+
* @internal
|
|
968
|
+
*/
|
|
969
|
+
const filterSensitiveLog: (obj: IdentityDocumentField) => any;
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* <p>The structure that lists each document processed in an AnalyzeID operation.</p>
|
|
973
|
+
*/
|
|
974
|
+
export interface IdentityDocument {
|
|
975
|
+
/**
|
|
976
|
+
* <p>Denotes the placement of a document in the IdentityDocument list. The first document
|
|
977
|
+
* is marked 1, the second 2 and so on.</p>
|
|
978
|
+
*/
|
|
979
|
+
DocumentIndex?: number;
|
|
980
|
+
/**
|
|
981
|
+
* <p>The structure used to record information extracted from identity documents.
|
|
982
|
+
* Contains both normalized field and value of the extracted text.</p>
|
|
983
|
+
*/
|
|
984
|
+
IdentityDocumentFields?: IdentityDocumentField[];
|
|
985
|
+
}
|
|
986
|
+
export declare namespace IdentityDocument {
|
|
987
|
+
/**
|
|
988
|
+
* @internal
|
|
989
|
+
*/
|
|
990
|
+
const filterSensitiveLog: (obj: IdentityDocument) => any;
|
|
991
|
+
}
|
|
992
|
+
export interface AnalyzeIDResponse {
|
|
993
|
+
/**
|
|
994
|
+
* <p>The list of documents processed by AnalyzeID. Includes a number denoting their
|
|
995
|
+
* place in the list and the response structure for the document.</p>
|
|
996
|
+
*/
|
|
997
|
+
IdentityDocuments?: IdentityDocument[];
|
|
998
|
+
/**
|
|
999
|
+
* <p>Information about the input document.</p>
|
|
1000
|
+
*/
|
|
1001
|
+
DocumentMetadata?: DocumentMetadata;
|
|
1002
|
+
/**
|
|
1003
|
+
* <p>The version of the AnalyzeIdentity API being used to process documents.</p>
|
|
1004
|
+
*/
|
|
1005
|
+
AnalyzeIDModelVersion?: string;
|
|
1006
|
+
}
|
|
1007
|
+
export declare namespace AnalyzeIDResponse {
|
|
1008
|
+
/**
|
|
1009
|
+
* @internal
|
|
1010
|
+
*/
|
|
1011
|
+
const filterSensitiveLog: (obj: AnalyzeIDResponse) => any;
|
|
1012
|
+
}
|
|
892
1013
|
export interface DetectDocumentTextRequest {
|
|
893
1014
|
/**
|
|
894
1015
|
* <p>The input document as base64-encoded bytes or an Amazon S3 object. If you use the AWS CLI
|
|
@@ -2,6 +2,7 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@a
|
|
|
2
2
|
import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
|
|
3
3
|
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "../commands/AnalyzeDocumentCommand";
|
|
4
4
|
import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "../commands/AnalyzeExpenseCommand";
|
|
5
|
+
import { AnalyzeIDCommandInput, AnalyzeIDCommandOutput } from "../commands/AnalyzeIDCommand";
|
|
5
6
|
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "../commands/DetectDocumentTextCommand";
|
|
6
7
|
import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "../commands/GetDocumentAnalysisCommand";
|
|
7
8
|
import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "../commands/GetDocumentTextDetectionCommand";
|
|
@@ -11,6 +12,7 @@ import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionComma
|
|
|
11
12
|
import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "../commands/StartExpenseAnalysisCommand";
|
|
12
13
|
export declare const serializeAws_json1_1AnalyzeDocumentCommand: (input: AnalyzeDocumentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
13
14
|
export declare const serializeAws_json1_1AnalyzeExpenseCommand: (input: AnalyzeExpenseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
15
|
+
export declare const serializeAws_json1_1AnalyzeIDCommand: (input: AnalyzeIDCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
14
16
|
export declare const serializeAws_json1_1DetectDocumentTextCommand: (input: DetectDocumentTextCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
15
17
|
export declare const serializeAws_json1_1GetDocumentAnalysisCommand: (input: GetDocumentAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
16
18
|
export declare const serializeAws_json1_1GetDocumentTextDetectionCommand: (input: GetDocumentTextDetectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
@@ -20,6 +22,7 @@ export declare const serializeAws_json1_1StartDocumentTextDetectionCommand: (inp
|
|
|
20
22
|
export declare const serializeAws_json1_1StartExpenseAnalysisCommand: (input: StartExpenseAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
21
23
|
export declare const deserializeAws_json1_1AnalyzeDocumentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeDocumentCommandOutput>;
|
|
22
24
|
export declare const deserializeAws_json1_1AnalyzeExpenseCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeExpenseCommandOutput>;
|
|
25
|
+
export declare const deserializeAws_json1_1AnalyzeIDCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeIDCommandOutput>;
|
|
23
26
|
export declare const deserializeAws_json1_1DetectDocumentTextCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectDocumentTextCommandOutput>;
|
|
24
27
|
export declare const deserializeAws_json1_1GetDocumentAnalysisCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentAnalysisCommandOutput>;
|
|
25
28
|
export declare const deserializeAws_json1_1GetDocumentTextDetectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentTextDetectionCommandOutput>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
|
|
2
2
|
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "./commands/AnalyzeDocumentCommand";
|
|
3
3
|
import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "./commands/AnalyzeExpenseCommand";
|
|
4
|
+
import { AnalyzeIDCommandInput, AnalyzeIDCommandOutput } from "./commands/AnalyzeIDCommand";
|
|
4
5
|
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "./commands/DetectDocumentTextCommand";
|
|
5
6
|
import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "./commands/GetDocumentAnalysisCommand";
|
|
6
7
|
import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "./commands/GetDocumentTextDetectionCommand";
|
|
@@ -20,6 +21,10 @@ export declare class Textract extends TextractClient {
|
|
|
20
21
|
analyzeExpense(args: AnalyzeExpenseCommandInput, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
21
22
|
analyzeExpense(args: AnalyzeExpenseCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeExpenseCommandOutput) => void): void;
|
|
22
23
|
|
|
24
|
+
analyzeID(args: AnalyzeIDCommandInput, options?: __HttpHandlerOptions): Promise<AnalyzeIDCommandOutput>;
|
|
25
|
+
analyzeID(args: AnalyzeIDCommandInput, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
26
|
+
analyzeID(args: AnalyzeIDCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: AnalyzeIDCommandOutput) => void): void;
|
|
27
|
+
|
|
23
28
|
detectDocumentText(args: DetectDocumentTextCommandInput, options?: __HttpHandlerOptions): Promise<DetectDocumentTextCommandOutput>;
|
|
24
29
|
detectDocumentText(args: DetectDocumentTextCommandInput, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
25
30
|
detectDocumentText(args: DetectDocumentTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DetectDocumentTextCommandOutput) => void): void;
|
|
@@ -8,6 +8,7 @@ import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, Smith
|
|
|
8
8
|
import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
|
|
9
9
|
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "./commands/AnalyzeDocumentCommand";
|
|
10
10
|
import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "./commands/AnalyzeExpenseCommand";
|
|
11
|
+
import { AnalyzeIDCommandInput, AnalyzeIDCommandOutput } from "./commands/AnalyzeIDCommand";
|
|
11
12
|
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "./commands/DetectDocumentTextCommand";
|
|
12
13
|
import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "./commands/GetDocumentAnalysisCommand";
|
|
13
14
|
import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "./commands/GetDocumentTextDetectionCommand";
|
|
@@ -15,8 +16,8 @@ import { GetExpenseAnalysisCommandInput, GetExpenseAnalysisCommandOutput } from
|
|
|
15
16
|
import { StartDocumentAnalysisCommandInput, StartDocumentAnalysisCommandOutput } from "./commands/StartDocumentAnalysisCommand";
|
|
16
17
|
import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionCommandOutput } from "./commands/StartDocumentTextDetectionCommand";
|
|
17
18
|
import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "./commands/StartExpenseAnalysisCommand";
|
|
18
|
-
export declare type ServiceInputTypes = AnalyzeDocumentCommandInput | AnalyzeExpenseCommandInput | DetectDocumentTextCommandInput | GetDocumentAnalysisCommandInput | GetDocumentTextDetectionCommandInput | GetExpenseAnalysisCommandInput | StartDocumentAnalysisCommandInput | StartDocumentTextDetectionCommandInput | StartExpenseAnalysisCommandInput;
|
|
19
|
-
export declare type ServiceOutputTypes = AnalyzeDocumentCommandOutput | AnalyzeExpenseCommandOutput | DetectDocumentTextCommandOutput | GetDocumentAnalysisCommandOutput | GetDocumentTextDetectionCommandOutput | GetExpenseAnalysisCommandOutput | StartDocumentAnalysisCommandOutput | StartDocumentTextDetectionCommandOutput | StartExpenseAnalysisCommandOutput;
|
|
19
|
+
export declare type ServiceInputTypes = AnalyzeDocumentCommandInput | AnalyzeExpenseCommandInput | AnalyzeIDCommandInput | DetectDocumentTextCommandInput | GetDocumentAnalysisCommandInput | GetDocumentTextDetectionCommandInput | GetExpenseAnalysisCommandInput | StartDocumentAnalysisCommandInput | StartDocumentTextDetectionCommandInput | StartExpenseAnalysisCommandInput;
|
|
20
|
+
export declare type ServiceOutputTypes = AnalyzeDocumentCommandOutput | AnalyzeExpenseCommandOutput | AnalyzeIDCommandOutput | DetectDocumentTextCommandOutput | GetDocumentAnalysisCommandOutput | GetDocumentTextDetectionCommandOutput | GetExpenseAnalysisCommandOutput | StartDocumentAnalysisCommandOutput | StartDocumentTextDetectionCommandOutput | StartExpenseAnalysisCommandOutput;
|
|
20
21
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
21
22
|
|
|
22
23
|
requestHandler?: __HttpHandler;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
2
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
3
|
+
import { AnalyzeIDRequest, AnalyzeIDResponse } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, TextractClientResolvedConfig } from "../TextractClient";
|
|
5
|
+
export interface AnalyzeIDCommandInput extends AnalyzeIDRequest {
|
|
6
|
+
}
|
|
7
|
+
export interface AnalyzeIDCommandOutput extends AnalyzeIDResponse, __MetadataBearer {
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare class AnalyzeIDCommand extends $Command<AnalyzeIDCommandInput, AnalyzeIDCommandOutput, TextractClientResolvedConfig> {
|
|
11
|
+
readonly input: AnalyzeIDCommandInput;
|
|
12
|
+
constructor(input: AnalyzeIDCommandInput);
|
|
13
|
+
|
|
14
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: TextractClientResolvedConfig, options?: __HttpHandlerOptions): Handler<AnalyzeIDCommandInput, AnalyzeIDCommandOutput>;
|
|
15
|
+
private serialize;
|
|
16
|
+
private deserialize;
|
|
17
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./AnalyzeDocumentCommand";
|
|
2
2
|
export * from "./AnalyzeExpenseCommand";
|
|
3
|
+
export * from "./AnalyzeIDCommand";
|
|
3
4
|
export * from "./DetectDocumentTextCommand";
|
|
4
5
|
export * from "./GetDocumentAnalysisCommand";
|
|
5
6
|
export * from "./GetDocumentTextDetectionCommand";
|
|
@@ -417,6 +417,75 @@ export declare namespace AnalyzeExpenseResponse {
|
|
|
417
417
|
|
|
418
418
|
const filterSensitiveLog: (obj: AnalyzeExpenseResponse) => any;
|
|
419
419
|
}
|
|
420
|
+
export interface AnalyzeIDRequest {
|
|
421
|
+
|
|
422
|
+
DocumentPages: Document[] | undefined;
|
|
423
|
+
}
|
|
424
|
+
export declare namespace AnalyzeIDRequest {
|
|
425
|
+
|
|
426
|
+
const filterSensitiveLog: (obj: AnalyzeIDRequest) => any;
|
|
427
|
+
}
|
|
428
|
+
export declare enum ValueType {
|
|
429
|
+
DATE = "DATE"
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export interface NormalizedValue {
|
|
433
|
+
|
|
434
|
+
Value?: string;
|
|
435
|
+
|
|
436
|
+
ValueType?: ValueType | string;
|
|
437
|
+
}
|
|
438
|
+
export declare namespace NormalizedValue {
|
|
439
|
+
|
|
440
|
+
const filterSensitiveLog: (obj: NormalizedValue) => any;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export interface AnalyzeIDDetections {
|
|
444
|
+
|
|
445
|
+
Text: string | undefined;
|
|
446
|
+
|
|
447
|
+
NormalizedValue?: NormalizedValue;
|
|
448
|
+
|
|
449
|
+
Confidence?: number;
|
|
450
|
+
}
|
|
451
|
+
export declare namespace AnalyzeIDDetections {
|
|
452
|
+
|
|
453
|
+
const filterSensitiveLog: (obj: AnalyzeIDDetections) => any;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export interface IdentityDocumentField {
|
|
457
|
+
|
|
458
|
+
Type?: AnalyzeIDDetections;
|
|
459
|
+
|
|
460
|
+
ValueDetection?: AnalyzeIDDetections;
|
|
461
|
+
}
|
|
462
|
+
export declare namespace IdentityDocumentField {
|
|
463
|
+
|
|
464
|
+
const filterSensitiveLog: (obj: IdentityDocumentField) => any;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export interface IdentityDocument {
|
|
468
|
+
|
|
469
|
+
DocumentIndex?: number;
|
|
470
|
+
|
|
471
|
+
IdentityDocumentFields?: IdentityDocumentField[];
|
|
472
|
+
}
|
|
473
|
+
export declare namespace IdentityDocument {
|
|
474
|
+
|
|
475
|
+
const filterSensitiveLog: (obj: IdentityDocument) => any;
|
|
476
|
+
}
|
|
477
|
+
export interface AnalyzeIDResponse {
|
|
478
|
+
|
|
479
|
+
IdentityDocuments?: IdentityDocument[];
|
|
480
|
+
|
|
481
|
+
DocumentMetadata?: DocumentMetadata;
|
|
482
|
+
|
|
483
|
+
AnalyzeIDModelVersion?: string;
|
|
484
|
+
}
|
|
485
|
+
export declare namespace AnalyzeIDResponse {
|
|
486
|
+
|
|
487
|
+
const filterSensitiveLog: (obj: AnalyzeIDResponse) => any;
|
|
488
|
+
}
|
|
420
489
|
export interface DetectDocumentTextRequest {
|
|
421
490
|
|
|
422
491
|
Document: Document | undefined;
|
|
@@ -2,6 +2,7 @@ import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@a
|
|
|
2
2
|
import { SerdeContext as __SerdeContext } from "@aws-sdk/types";
|
|
3
3
|
import { AnalyzeDocumentCommandInput, AnalyzeDocumentCommandOutput } from "../commands/AnalyzeDocumentCommand";
|
|
4
4
|
import { AnalyzeExpenseCommandInput, AnalyzeExpenseCommandOutput } from "../commands/AnalyzeExpenseCommand";
|
|
5
|
+
import { AnalyzeIDCommandInput, AnalyzeIDCommandOutput } from "../commands/AnalyzeIDCommand";
|
|
5
6
|
import { DetectDocumentTextCommandInput, DetectDocumentTextCommandOutput } from "../commands/DetectDocumentTextCommand";
|
|
6
7
|
import { GetDocumentAnalysisCommandInput, GetDocumentAnalysisCommandOutput } from "../commands/GetDocumentAnalysisCommand";
|
|
7
8
|
import { GetDocumentTextDetectionCommandInput, GetDocumentTextDetectionCommandOutput } from "../commands/GetDocumentTextDetectionCommand";
|
|
@@ -11,6 +12,7 @@ import { StartDocumentTextDetectionCommandInput, StartDocumentTextDetectionComma
|
|
|
11
12
|
import { StartExpenseAnalysisCommandInput, StartExpenseAnalysisCommandOutput } from "../commands/StartExpenseAnalysisCommand";
|
|
12
13
|
export declare const serializeAws_json1_1AnalyzeDocumentCommand: (input: AnalyzeDocumentCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
13
14
|
export declare const serializeAws_json1_1AnalyzeExpenseCommand: (input: AnalyzeExpenseCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
15
|
+
export declare const serializeAws_json1_1AnalyzeIDCommand: (input: AnalyzeIDCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
14
16
|
export declare const serializeAws_json1_1DetectDocumentTextCommand: (input: DetectDocumentTextCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
15
17
|
export declare const serializeAws_json1_1GetDocumentAnalysisCommand: (input: GetDocumentAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
16
18
|
export declare const serializeAws_json1_1GetDocumentTextDetectionCommand: (input: GetDocumentTextDetectionCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
@@ -20,6 +22,7 @@ export declare const serializeAws_json1_1StartDocumentTextDetectionCommand: (inp
|
|
|
20
22
|
export declare const serializeAws_json1_1StartExpenseAnalysisCommand: (input: StartExpenseAnalysisCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
21
23
|
export declare const deserializeAws_json1_1AnalyzeDocumentCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeDocumentCommandOutput>;
|
|
22
24
|
export declare const deserializeAws_json1_1AnalyzeExpenseCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeExpenseCommandOutput>;
|
|
25
|
+
export declare const deserializeAws_json1_1AnalyzeIDCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<AnalyzeIDCommandOutput>;
|
|
23
26
|
export declare const deserializeAws_json1_1DetectDocumentTextCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DetectDocumentTextCommandOutput>;
|
|
24
27
|
export declare const deserializeAws_json1_1GetDocumentAnalysisCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentAnalysisCommandOutput>;
|
|
25
28
|
export declare const deserializeAws_json1_1GetDocumentTextDetectionCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetDocumentTextDetectionCommandOutput>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-textract",
|
|
3
3
|
"description": "AWS SDK for JavaScript Textract Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.43.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn build:cjs && yarn build:es && yarn build:types",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.json",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "2.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "2.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.43.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.40.0",
|
|
26
26
|
"@aws-sdk/credential-provider-node": "3.41.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.40.0",
|