@aws-sdk/client-rekognition 3.309.0 → 3.310.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/README.md +16 -0
- package/dist-cjs/Rekognition.js +30 -0
- package/dist-cjs/commands/CreateFaceLivenessSessionCommand.js +45 -0
- package/dist-cjs/commands/GetFaceLivenessSessionResultsCommand.js +46 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/index.js +1 -0
- package/dist-cjs/models/models_0.js +36 -2
- package/dist-cjs/models/models_1.js +2 -0
- package/dist-cjs/protocols/Aws_json1_1.js +193 -3
- package/dist-es/Rekognition.js +30 -0
- package/dist-es/commands/CreateFaceLivenessSessionCommand.js +41 -0
- package/dist-es/commands/GetFaceLivenessSessionResultsCommand.js +42 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +31 -0
- package/dist-es/models/models_1.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +187 -1
- package/dist-types/Rekognition.d.ts +51 -10
- package/dist-types/RekognitionClient.d.ts +4 -2
- package/dist-types/commands/CopyProjectVersionCommand.d.ts +1 -0
- package/dist-types/commands/CreateFaceLivenessSessionCommand.d.ts +94 -0
- package/dist-types/commands/CreateStreamProcessorCommand.d.ts +17 -7
- package/dist-types/commands/DeleteProjectPolicyCommand.d.ts +1 -0
- package/dist-types/commands/DetectLabelsCommand.d.ts +2 -3
- package/dist-types/commands/GetFaceLivenessSessionResultsCommand.d.ts +88 -0
- package/dist-types/commands/ListProjectPoliciesCommand.d.ts +1 -0
- package/dist-types/commands/PutProjectPolicyCommand.d.ts +1 -0
- package/dist-types/commands/StopProjectVersionCommand.d.ts +1 -0
- package/dist-types/commands/UpdateStreamProcessorCommand.d.ts +4 -1
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +241 -106
- package/dist-types/models/models_1.d.ts +56 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
- package/dist-types/ts3.4/Rekognition.d.ts +34 -0
- package/dist-types/ts3.4/RekognitionClient.d.ts +12 -0
- package/dist-types/ts3.4/commands/CreateFaceLivenessSessionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/GetFaceLivenessSessionResultsCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/UpdateStreamProcessorCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +59 -17
- package/dist-types/ts3.4/models/models_1.d.ts +17 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
- package/package.json +36 -36
package/dist-es/Rekognition.js
CHANGED
|
@@ -2,6 +2,7 @@ import { CompareFacesCommand, } from "./commands/CompareFacesCommand";
|
|
|
2
2
|
import { CopyProjectVersionCommand, } from "./commands/CopyProjectVersionCommand";
|
|
3
3
|
import { CreateCollectionCommand, } from "./commands/CreateCollectionCommand";
|
|
4
4
|
import { CreateDatasetCommand, } from "./commands/CreateDatasetCommand";
|
|
5
|
+
import { CreateFaceLivenessSessionCommand, } from "./commands/CreateFaceLivenessSessionCommand";
|
|
5
6
|
import { CreateProjectCommand, } from "./commands/CreateProjectCommand";
|
|
6
7
|
import { CreateProjectVersionCommand, } from "./commands/CreateProjectVersionCommand";
|
|
7
8
|
import { CreateStreamProcessorCommand, } from "./commands/CreateStreamProcessorCommand";
|
|
@@ -28,6 +29,7 @@ import { GetCelebrityInfoCommand, } from "./commands/GetCelebrityInfoCommand";
|
|
|
28
29
|
import { GetCelebrityRecognitionCommand, } from "./commands/GetCelebrityRecognitionCommand";
|
|
29
30
|
import { GetContentModerationCommand, } from "./commands/GetContentModerationCommand";
|
|
30
31
|
import { GetFaceDetectionCommand, } from "./commands/GetFaceDetectionCommand";
|
|
32
|
+
import { GetFaceLivenessSessionResultsCommand, } from "./commands/GetFaceLivenessSessionResultsCommand";
|
|
31
33
|
import { GetFaceSearchCommand, } from "./commands/GetFaceSearchCommand";
|
|
32
34
|
import { GetLabelDetectionCommand, } from "./commands/GetLabelDetectionCommand";
|
|
33
35
|
import { GetPersonTrackingCommand, } from "./commands/GetPersonTrackingCommand";
|
|
@@ -119,6 +121,20 @@ export class Rekognition extends RekognitionClient {
|
|
|
119
121
|
return this.send(command, optionsOrCb);
|
|
120
122
|
}
|
|
121
123
|
}
|
|
124
|
+
createFaceLivenessSession(args, optionsOrCb, cb) {
|
|
125
|
+
const command = new CreateFaceLivenessSessionCommand(args);
|
|
126
|
+
if (typeof optionsOrCb === "function") {
|
|
127
|
+
this.send(command, optionsOrCb);
|
|
128
|
+
}
|
|
129
|
+
else if (typeof cb === "function") {
|
|
130
|
+
if (typeof optionsOrCb !== "object")
|
|
131
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
132
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return this.send(command, optionsOrCb);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
122
138
|
createProject(args, optionsOrCb, cb) {
|
|
123
139
|
const command = new CreateProjectCommand(args);
|
|
124
140
|
if (typeof optionsOrCb === "function") {
|
|
@@ -483,6 +499,20 @@ export class Rekognition extends RekognitionClient {
|
|
|
483
499
|
return this.send(command, optionsOrCb);
|
|
484
500
|
}
|
|
485
501
|
}
|
|
502
|
+
getFaceLivenessSessionResults(args, optionsOrCb, cb) {
|
|
503
|
+
const command = new GetFaceLivenessSessionResultsCommand(args);
|
|
504
|
+
if (typeof optionsOrCb === "function") {
|
|
505
|
+
this.send(command, optionsOrCb);
|
|
506
|
+
}
|
|
507
|
+
else if (typeof cb === "function") {
|
|
508
|
+
if (typeof optionsOrCb !== "object")
|
|
509
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
510
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
return this.send(command, optionsOrCb);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
486
516
|
getFaceSearch(args, optionsOrCb, cb) {
|
|
487
517
|
const command = new GetFaceSearchCommand(args);
|
|
488
518
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { de_CreateFaceLivenessSessionCommand, se_CreateFaceLivenessSessionCommand } from "../protocols/Aws_json1_1";
|
|
5
|
+
export class CreateFaceLivenessSessionCommand extends $Command {
|
|
6
|
+
static getEndpointParameterInstructions() {
|
|
7
|
+
return {
|
|
8
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
9
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
10
|
+
Region: { type: "builtInParams", name: "region" },
|
|
11
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor(input) {
|
|
15
|
+
super();
|
|
16
|
+
this.input = input;
|
|
17
|
+
}
|
|
18
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
19
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
20
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, CreateFaceLivenessSessionCommand.getEndpointParameterInstructions()));
|
|
21
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
22
|
+
const { logger } = configuration;
|
|
23
|
+
const clientName = "RekognitionClient";
|
|
24
|
+
const commandName = "CreateFaceLivenessSessionCommand";
|
|
25
|
+
const handlerExecutionContext = {
|
|
26
|
+
logger,
|
|
27
|
+
clientName,
|
|
28
|
+
commandName,
|
|
29
|
+
inputFilterSensitiveLog: (_) => _,
|
|
30
|
+
outputFilterSensitiveLog: (_) => _,
|
|
31
|
+
};
|
|
32
|
+
const { requestHandler } = configuration;
|
|
33
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
34
|
+
}
|
|
35
|
+
serialize(input, context) {
|
|
36
|
+
return se_CreateFaceLivenessSessionCommand(input, context);
|
|
37
|
+
}
|
|
38
|
+
deserialize(output, context) {
|
|
39
|
+
return de_CreateFaceLivenessSessionCommand(output, context);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { GetFaceLivenessSessionResultsResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { de_GetFaceLivenessSessionResultsCommand, se_GetFaceLivenessSessionResultsCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export class GetFaceLivenessSessionResultsCommand extends $Command {
|
|
7
|
+
static getEndpointParameterInstructions() {
|
|
8
|
+
return {
|
|
9
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
10
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
11
|
+
Region: { type: "builtInParams", name: "region" },
|
|
12
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
constructor(input) {
|
|
16
|
+
super();
|
|
17
|
+
this.input = input;
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, GetFaceLivenessSessionResultsCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "RekognitionClient";
|
|
25
|
+
const commandName = "GetFaceLivenessSessionResultsCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: (_) => _,
|
|
31
|
+
outputFilterSensitiveLog: GetFaceLivenessSessionResultsResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return se_GetFaceLivenessSessionResultsCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return de_GetFaceLivenessSessionResultsCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -2,6 +2,7 @@ export * from "./CompareFacesCommand";
|
|
|
2
2
|
export * from "./CopyProjectVersionCommand";
|
|
3
3
|
export * from "./CreateCollectionCommand";
|
|
4
4
|
export * from "./CreateDatasetCommand";
|
|
5
|
+
export * from "./CreateFaceLivenessSessionCommand";
|
|
5
6
|
export * from "./CreateProjectCommand";
|
|
6
7
|
export * from "./CreateProjectVersionCommand";
|
|
7
8
|
export * from "./CreateStreamProcessorCommand";
|
|
@@ -28,6 +29,7 @@ export * from "./GetCelebrityInfoCommand";
|
|
|
28
29
|
export * from "./GetCelebrityRecognitionCommand";
|
|
29
30
|
export * from "./GetContentModerationCommand";
|
|
30
31
|
export * from "./GetFaceDetectionCommand";
|
|
32
|
+
export * from "./GetFaceLivenessSessionResultsCommand";
|
|
31
33
|
export * from "./GetFaceSearchCommand";
|
|
32
34
|
export * from "./GetLabelDetectionCommand";
|
|
33
35
|
export * from "./GetPersonTrackingCommand";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const a =
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
1
|
+
const q = "required", r = "fn", s = "argv", t = "ref";
|
|
2
|
+
const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://rekognition-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://rekognition.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
|
|
4
4
|
export const ruleSet = _data;
|
package/dist-es/models/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SENSITIVE_STRING, } from "@aws-sdk/smithy-client";
|
|
1
2
|
import { RekognitionServiceException as __BaseException } from "./RekognitionServiceException";
|
|
2
3
|
export class AccessDeniedException extends __BaseException {
|
|
3
4
|
constructor(opts) {
|
|
@@ -420,6 +421,27 @@ export const VideoColorRange = {
|
|
|
420
421
|
FULL: "FULL",
|
|
421
422
|
LIMITED: "LIMITED",
|
|
422
423
|
};
|
|
424
|
+
export const LivenessSessionStatus = {
|
|
425
|
+
CREATED: "CREATED",
|
|
426
|
+
FAILED: "FAILED",
|
|
427
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
428
|
+
SUCCEEDED: "SUCCEEDED",
|
|
429
|
+
};
|
|
430
|
+
export class SessionNotFoundException extends __BaseException {
|
|
431
|
+
constructor(opts) {
|
|
432
|
+
super({
|
|
433
|
+
name: "SessionNotFoundException",
|
|
434
|
+
$fault: "client",
|
|
435
|
+
...opts,
|
|
436
|
+
});
|
|
437
|
+
this.name = "SessionNotFoundException";
|
|
438
|
+
this.$fault = "client";
|
|
439
|
+
Object.setPrototypeOf(this, SessionNotFoundException.prototype);
|
|
440
|
+
this.Message = opts.Message;
|
|
441
|
+
this.Code = opts.Code;
|
|
442
|
+
this.Logref = opts.Logref;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
423
445
|
export const LabelDetectionAggregateBy = {
|
|
424
446
|
SEGMENTS: "SEGMENTS",
|
|
425
447
|
TIMESTAMPS: "TIMESTAMPS",
|
|
@@ -506,3 +528,12 @@ export const StreamProcessorParameterToDelete = {
|
|
|
506
528
|
ConnectedHomeMinConfidence: "ConnectedHomeMinConfidence",
|
|
507
529
|
RegionsOfInterest: "RegionsOfInterest",
|
|
508
530
|
};
|
|
531
|
+
export const AuditImageFilterSensitiveLog = (obj) => ({
|
|
532
|
+
...obj,
|
|
533
|
+
...(obj.Bytes && { Bytes: SENSITIVE_STRING }),
|
|
534
|
+
});
|
|
535
|
+
export const GetFaceLivenessSessionResultsResponseFilterSensitiveLog = (obj) => ({
|
|
536
|
+
...obj,
|
|
537
|
+
...(obj.ReferenceImage && { ReferenceImage: AuditImageFilterSensitiveLog(obj.ReferenceImage) }),
|
|
538
|
+
...(obj.AuditImages && { AuditImages: obj.AuditImages.map((item) => AuditImageFilterSensitiveLog(item)) }),
|
|
539
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
|
-
import { AccessDeniedException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, ImageTooLargeException, InternalServerError, InvalidImageFormatException, InvalidPaginationTokenException, InvalidParameterException, InvalidPolicyRevisionIdException, InvalidS3ObjectException, LimitExceededException, MalformedPolicyDocumentException, ProvisionedThroughputExceededException, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, ThrottlingException, VideoTooLargeException, } from "../models/models_0";
|
|
3
|
+
import { AccessDeniedException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, ImageTooLargeException, InternalServerError, InvalidImageFormatException, InvalidPaginationTokenException, InvalidParameterException, InvalidPolicyRevisionIdException, InvalidS3ObjectException, LimitExceededException, MalformedPolicyDocumentException, ProvisionedThroughputExceededException, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, SessionNotFoundException, ThrottlingException, VideoTooLargeException, } from "../models/models_0";
|
|
4
4
|
import { RekognitionServiceException as __BaseException } from "../models/RekognitionServiceException";
|
|
5
5
|
export const se_CompareFacesCommand = async (input, context) => {
|
|
6
6
|
const headers = {
|
|
@@ -38,6 +38,15 @@ export const se_CreateDatasetCommand = async (input, context) => {
|
|
|
38
38
|
body = JSON.stringify(se_CreateDatasetRequest(input, context));
|
|
39
39
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
40
|
};
|
|
41
|
+
export const se_CreateFaceLivenessSessionCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "RekognitionService.CreateFaceLivenessSession",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(se_CreateFaceLivenessSessionRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
41
50
|
export const se_CreateProjectCommand = async (input, context) => {
|
|
42
51
|
const headers = {
|
|
43
52
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -272,6 +281,15 @@ export const se_GetFaceDetectionCommand = async (input, context) => {
|
|
|
272
281
|
body = JSON.stringify(se_GetFaceDetectionRequest(input, context));
|
|
273
282
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
274
283
|
};
|
|
284
|
+
export const se_GetFaceLivenessSessionResultsCommand = async (input, context) => {
|
|
285
|
+
const headers = {
|
|
286
|
+
"content-type": "application/x-amz-json-1.1",
|
|
287
|
+
"x-amz-target": "RekognitionService.GetFaceLivenessSessionResults",
|
|
288
|
+
};
|
|
289
|
+
let body;
|
|
290
|
+
body = JSON.stringify(se_GetFaceLivenessSessionResultsRequest(input, context));
|
|
291
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
292
|
+
};
|
|
275
293
|
export const se_GetFaceSearchCommand = async (input, context) => {
|
|
276
294
|
const headers = {
|
|
277
295
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -788,6 +806,51 @@ const de_CreateDatasetCommandError = async (output, context) => {
|
|
|
788
806
|
});
|
|
789
807
|
}
|
|
790
808
|
};
|
|
809
|
+
export const de_CreateFaceLivenessSessionCommand = async (output, context) => {
|
|
810
|
+
if (output.statusCode >= 300) {
|
|
811
|
+
return de_CreateFaceLivenessSessionCommandError(output, context);
|
|
812
|
+
}
|
|
813
|
+
const data = await parseBody(output.body, context);
|
|
814
|
+
let contents = {};
|
|
815
|
+
contents = de_CreateFaceLivenessSessionResponse(data, context);
|
|
816
|
+
const response = {
|
|
817
|
+
$metadata: deserializeMetadata(output),
|
|
818
|
+
...contents,
|
|
819
|
+
};
|
|
820
|
+
return Promise.resolve(response);
|
|
821
|
+
};
|
|
822
|
+
const de_CreateFaceLivenessSessionCommandError = async (output, context) => {
|
|
823
|
+
const parsedOutput = {
|
|
824
|
+
...output,
|
|
825
|
+
body: await parseErrorBody(output.body, context),
|
|
826
|
+
};
|
|
827
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
828
|
+
switch (errorCode) {
|
|
829
|
+
case "AccessDeniedException":
|
|
830
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
831
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
832
|
+
case "InternalServerError":
|
|
833
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
834
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
835
|
+
case "InvalidParameterException":
|
|
836
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
837
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
838
|
+
case "ProvisionedThroughputExceededException":
|
|
839
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
840
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
841
|
+
case "ThrottlingException":
|
|
842
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
843
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
844
|
+
default:
|
|
845
|
+
const parsedBody = parsedOutput.body;
|
|
846
|
+
throwDefaultError({
|
|
847
|
+
output,
|
|
848
|
+
parsedBody,
|
|
849
|
+
exceptionCtor: __BaseException,
|
|
850
|
+
errorCode,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
};
|
|
791
854
|
export const de_CreateProjectCommand = async (output, context) => {
|
|
792
855
|
if (output.statusCode >= 300) {
|
|
793
856
|
return de_CreateProjectCommandError(output, context);
|
|
@@ -2135,6 +2198,54 @@ const de_GetFaceDetectionCommandError = async (output, context) => {
|
|
|
2135
2198
|
});
|
|
2136
2199
|
}
|
|
2137
2200
|
};
|
|
2201
|
+
export const de_GetFaceLivenessSessionResultsCommand = async (output, context) => {
|
|
2202
|
+
if (output.statusCode >= 300) {
|
|
2203
|
+
return de_GetFaceLivenessSessionResultsCommandError(output, context);
|
|
2204
|
+
}
|
|
2205
|
+
const data = await parseBody(output.body, context);
|
|
2206
|
+
let contents = {};
|
|
2207
|
+
contents = de_GetFaceLivenessSessionResultsResponse(data, context);
|
|
2208
|
+
const response = {
|
|
2209
|
+
$metadata: deserializeMetadata(output),
|
|
2210
|
+
...contents,
|
|
2211
|
+
};
|
|
2212
|
+
return Promise.resolve(response);
|
|
2213
|
+
};
|
|
2214
|
+
const de_GetFaceLivenessSessionResultsCommandError = async (output, context) => {
|
|
2215
|
+
const parsedOutput = {
|
|
2216
|
+
...output,
|
|
2217
|
+
body: await parseErrorBody(output.body, context),
|
|
2218
|
+
};
|
|
2219
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2220
|
+
switch (errorCode) {
|
|
2221
|
+
case "AccessDeniedException":
|
|
2222
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
2223
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
2224
|
+
case "InternalServerError":
|
|
2225
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
2226
|
+
throw await de_InternalServerErrorRes(parsedOutput, context);
|
|
2227
|
+
case "InvalidParameterException":
|
|
2228
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
2229
|
+
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2230
|
+
case "ProvisionedThroughputExceededException":
|
|
2231
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
2232
|
+
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
2233
|
+
case "SessionNotFoundException":
|
|
2234
|
+
case "com.amazonaws.rekognition#SessionNotFoundException":
|
|
2235
|
+
throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
|
|
2236
|
+
case "ThrottlingException":
|
|
2237
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
2238
|
+
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
2239
|
+
default:
|
|
2240
|
+
const parsedBody = parsedOutput.body;
|
|
2241
|
+
throwDefaultError({
|
|
2242
|
+
output,
|
|
2243
|
+
parsedBody,
|
|
2244
|
+
exceptionCtor: __BaseException,
|
|
2245
|
+
errorCode,
|
|
2246
|
+
});
|
|
2247
|
+
}
|
|
2248
|
+
};
|
|
2138
2249
|
export const de_GetFaceSearchCommand = async (output, context) => {
|
|
2139
2250
|
if (output.statusCode >= 300) {
|
|
2140
2251
|
return de_GetFaceSearchCommandError(output, context);
|
|
@@ -3886,6 +3997,9 @@ const de_UpdateStreamProcessorCommandError = async (output, context) => {
|
|
|
3886
3997
|
case "ProvisionedThroughputExceededException":
|
|
3887
3998
|
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
3888
3999
|
throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
|
|
4000
|
+
case "ResourceInUseException":
|
|
4001
|
+
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
4002
|
+
throw await de_ResourceInUseExceptionRes(parsedOutput, context);
|
|
3889
4003
|
case "ResourceNotFoundException":
|
|
3890
4004
|
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
3891
4005
|
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -4064,6 +4178,15 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
|
4064
4178
|
});
|
|
4065
4179
|
return __decorateServiceException(exception, body);
|
|
4066
4180
|
};
|
|
4181
|
+
const de_SessionNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
4182
|
+
const body = parsedOutput.body;
|
|
4183
|
+
const deserialized = de_SessionNotFoundException(body, context);
|
|
4184
|
+
const exception = new SessionNotFoundException({
|
|
4185
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
4186
|
+
...deserialized,
|
|
4187
|
+
});
|
|
4188
|
+
return __decorateServiceException(exception, body);
|
|
4189
|
+
};
|
|
4067
4190
|
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
4068
4191
|
const body = parsedOutput.body;
|
|
4069
4192
|
const deserialized = de_ThrottlingException(body, context);
|
|
@@ -4177,6 +4300,19 @@ const se_CreateDatasetRequest = (input, context) => {
|
|
|
4177
4300
|
...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }),
|
|
4178
4301
|
};
|
|
4179
4302
|
};
|
|
4303
|
+
const se_CreateFaceLivenessSessionRequest = (input, context) => {
|
|
4304
|
+
return {
|
|
4305
|
+
...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
|
|
4306
|
+
...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
|
|
4307
|
+
...(input.Settings != null && { Settings: se_CreateFaceLivenessSessionRequestSettings(input.Settings, context) }),
|
|
4308
|
+
};
|
|
4309
|
+
};
|
|
4310
|
+
const se_CreateFaceLivenessSessionRequestSettings = (input, context) => {
|
|
4311
|
+
return {
|
|
4312
|
+
...(input.AuditImagesLimit != null && { AuditImagesLimit: input.AuditImagesLimit }),
|
|
4313
|
+
...(input.OutputConfig != null && { OutputConfig: se_LivenessOutputConfig(input.OutputConfig, context) }),
|
|
4314
|
+
};
|
|
4315
|
+
};
|
|
4180
4316
|
const se_CreateProjectRequest = (input, context) => {
|
|
4181
4317
|
return {
|
|
4182
4318
|
...(input.ProjectName != null && { ProjectName: input.ProjectName }),
|
|
@@ -4461,6 +4597,11 @@ const se_GetFaceDetectionRequest = (input, context) => {
|
|
|
4461
4597
|
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
4462
4598
|
};
|
|
4463
4599
|
};
|
|
4600
|
+
const se_GetFaceLivenessSessionResultsRequest = (input, context) => {
|
|
4601
|
+
return {
|
|
4602
|
+
...(input.SessionId != null && { SessionId: input.SessionId }),
|
|
4603
|
+
};
|
|
4604
|
+
};
|
|
4464
4605
|
const se_GetFaceSearchRequest = (input, context) => {
|
|
4465
4606
|
return {
|
|
4466
4607
|
...(input.JobId != null && { JobId: input.JobId }),
|
|
@@ -4614,6 +4755,12 @@ const se_ListTagsForResourceRequest = (input, context) => {
|
|
|
4614
4755
|
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
4615
4756
|
};
|
|
4616
4757
|
};
|
|
4758
|
+
const se_LivenessOutputConfig = (input, context) => {
|
|
4759
|
+
return {
|
|
4760
|
+
...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
|
|
4761
|
+
...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }),
|
|
4762
|
+
};
|
|
4763
|
+
};
|
|
4617
4764
|
const se_NotificationChannel = (input, context) => {
|
|
4618
4765
|
return {
|
|
4619
4766
|
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
@@ -5046,6 +5193,24 @@ const de_AudioMetadataList = (output, context) => {
|
|
|
5046
5193
|
});
|
|
5047
5194
|
return retVal;
|
|
5048
5195
|
};
|
|
5196
|
+
const de_AuditImage = (output, context) => {
|
|
5197
|
+
return {
|
|
5198
|
+
BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined,
|
|
5199
|
+
Bytes: output.Bytes != null ? context.base64Decoder(output.Bytes) : undefined,
|
|
5200
|
+
S3Object: output.S3Object != null ? de_S3Object(output.S3Object, context) : undefined,
|
|
5201
|
+
};
|
|
5202
|
+
};
|
|
5203
|
+
const de_AuditImages = (output, context) => {
|
|
5204
|
+
const retVal = (output || [])
|
|
5205
|
+
.filter((e) => e != null)
|
|
5206
|
+
.map((entry) => {
|
|
5207
|
+
if (entry === null) {
|
|
5208
|
+
return null;
|
|
5209
|
+
}
|
|
5210
|
+
return de_AuditImage(entry, context);
|
|
5211
|
+
});
|
|
5212
|
+
return retVal;
|
|
5213
|
+
};
|
|
5049
5214
|
const de_Beard = (output, context) => {
|
|
5050
5215
|
return {
|
|
5051
5216
|
Confidence: __limitedParseFloat32(output.Confidence),
|
|
@@ -5253,6 +5418,11 @@ const de_CreateDatasetResponse = (output, context) => {
|
|
|
5253
5418
|
DatasetArn: __expectString(output.DatasetArn),
|
|
5254
5419
|
};
|
|
5255
5420
|
};
|
|
5421
|
+
const de_CreateFaceLivenessSessionResponse = (output, context) => {
|
|
5422
|
+
return {
|
|
5423
|
+
SessionId: __expectString(output.SessionId),
|
|
5424
|
+
};
|
|
5425
|
+
};
|
|
5256
5426
|
const de_CreateProjectResponse = (output, context) => {
|
|
5257
5427
|
return {
|
|
5258
5428
|
ProjectArn: __expectString(output.ProjectArn),
|
|
@@ -5773,6 +5943,15 @@ const de_GetFaceDetectionResponse = (output, context) => {
|
|
|
5773
5943
|
VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined,
|
|
5774
5944
|
};
|
|
5775
5945
|
};
|
|
5946
|
+
const de_GetFaceLivenessSessionResultsResponse = (output, context) => {
|
|
5947
|
+
return {
|
|
5948
|
+
AuditImages: output.AuditImages != null ? de_AuditImages(output.AuditImages, context) : undefined,
|
|
5949
|
+
Confidence: __limitedParseFloat32(output.Confidence),
|
|
5950
|
+
ReferenceImage: output.ReferenceImage != null ? de_AuditImage(output.ReferenceImage, context) : undefined,
|
|
5951
|
+
SessionId: __expectString(output.SessionId),
|
|
5952
|
+
Status: __expectString(output.Status),
|
|
5953
|
+
};
|
|
5954
|
+
};
|
|
5776
5955
|
const de_GetFaceSearchResponse = (output, context) => {
|
|
5777
5956
|
return {
|
|
5778
5957
|
JobStatus: __expectString(output.JobStatus),
|
|
@@ -6514,6 +6693,13 @@ const de_ServiceQuotaExceededException = (output, context) => {
|
|
|
6514
6693
|
Message: __expectString(output.Message),
|
|
6515
6694
|
};
|
|
6516
6695
|
};
|
|
6696
|
+
const de_SessionNotFoundException = (output, context) => {
|
|
6697
|
+
return {
|
|
6698
|
+
Code: __expectString(output.Code),
|
|
6699
|
+
Logref: __expectString(output.Logref),
|
|
6700
|
+
Message: __expectString(output.Message),
|
|
6701
|
+
};
|
|
6702
|
+
};
|
|
6517
6703
|
const de_ShotSegment = (output, context) => {
|
|
6518
6704
|
return {
|
|
6519
6705
|
Confidence: __limitedParseFloat32(output.Confidence),
|