@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.
Files changed (49) hide show
  1. package/README.md +16 -0
  2. package/dist-cjs/Rekognition.js +30 -0
  3. package/dist-cjs/commands/CreateFaceLivenessSessionCommand.js +45 -0
  4. package/dist-cjs/commands/GetFaceLivenessSessionResultsCommand.js +46 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/endpoint/ruleset.js +3 -3
  7. package/dist-cjs/models/index.js +1 -0
  8. package/dist-cjs/models/models_0.js +36 -2
  9. package/dist-cjs/models/models_1.js +2 -0
  10. package/dist-cjs/protocols/Aws_json1_1.js +193 -3
  11. package/dist-es/Rekognition.js +30 -0
  12. package/dist-es/commands/CreateFaceLivenessSessionCommand.js +41 -0
  13. package/dist-es/commands/GetFaceLivenessSessionResultsCommand.js +42 -0
  14. package/dist-es/commands/index.js +2 -0
  15. package/dist-es/endpoint/ruleset.js +3 -3
  16. package/dist-es/models/index.js +1 -0
  17. package/dist-es/models/models_0.js +31 -0
  18. package/dist-es/models/models_1.js +1 -0
  19. package/dist-es/protocols/Aws_json1_1.js +187 -1
  20. package/dist-types/Rekognition.d.ts +51 -10
  21. package/dist-types/RekognitionClient.d.ts +4 -2
  22. package/dist-types/commands/CopyProjectVersionCommand.d.ts +1 -0
  23. package/dist-types/commands/CreateFaceLivenessSessionCommand.d.ts +94 -0
  24. package/dist-types/commands/CreateStreamProcessorCommand.d.ts +17 -7
  25. package/dist-types/commands/DeleteProjectPolicyCommand.d.ts +1 -0
  26. package/dist-types/commands/DetectLabelsCommand.d.ts +2 -3
  27. package/dist-types/commands/GetFaceLivenessSessionResultsCommand.d.ts +88 -0
  28. package/dist-types/commands/ListProjectPoliciesCommand.d.ts +1 -0
  29. package/dist-types/commands/PutProjectPolicyCommand.d.ts +1 -0
  30. package/dist-types/commands/StopProjectVersionCommand.d.ts +1 -0
  31. package/dist-types/commands/UpdateStreamProcessorCommand.d.ts +4 -1
  32. package/dist-types/commands/index.d.ts +2 -0
  33. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  34. package/dist-types/models/index.d.ts +1 -0
  35. package/dist-types/models/models_0.d.ts +241 -106
  36. package/dist-types/models/models_1.d.ts +56 -0
  37. package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
  38. package/dist-types/ts3.4/Rekognition.d.ts +34 -0
  39. package/dist-types/ts3.4/RekognitionClient.d.ts +12 -0
  40. package/dist-types/ts3.4/commands/CreateFaceLivenessSessionCommand.d.ts +41 -0
  41. package/dist-types/ts3.4/commands/GetFaceLivenessSessionResultsCommand.d.ts +41 -0
  42. package/dist-types/ts3.4/commands/UpdateStreamProcessorCommand.d.ts +1 -1
  43. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  44. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  45. package/dist-types/ts3.4/models/index.d.ts +1 -0
  46. package/dist-types/ts3.4/models/models_0.d.ts +59 -17
  47. package/dist-types/ts3.4/models/models_1.d.ts +17 -0
  48. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
  49. package/package.json +36 -36
package/README.md CHANGED
@@ -560,6 +560,14 @@ CreateDataset
560
560
 
561
561
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/createdatasetcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createdatasetcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createdatasetcommandoutput.html)
562
562
 
563
+ </details>
564
+ <details>
565
+ <summary>
566
+ CreateFaceLivenessSession
567
+ </summary>
568
+
569
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/createfacelivenesssessioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createfacelivenesssessioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/createfacelivenesssessioncommandoutput.html)
570
+
563
571
  </details>
564
572
  <details>
565
573
  <summary>
@@ -768,6 +776,14 @@ GetFaceDetection
768
776
 
769
777
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/getfacedetectioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/getfacedetectioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/getfacedetectioncommandoutput.html)
770
778
 
779
+ </details>
780
+ <details>
781
+ <summary>
782
+ GetFaceLivenessSessionResults
783
+ </summary>
784
+
785
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/classes/getfacelivenesssessionresultscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/getfacelivenesssessionresultscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognition/interfaces/getfacelivenesssessionresultscommandoutput.html)
786
+
771
787
  </details>
772
788
  <details>
773
789
  <summary>
@@ -5,6 +5,7 @@ const CompareFacesCommand_1 = require("./commands/CompareFacesCommand");
5
5
  const CopyProjectVersionCommand_1 = require("./commands/CopyProjectVersionCommand");
6
6
  const CreateCollectionCommand_1 = require("./commands/CreateCollectionCommand");
7
7
  const CreateDatasetCommand_1 = require("./commands/CreateDatasetCommand");
8
+ const CreateFaceLivenessSessionCommand_1 = require("./commands/CreateFaceLivenessSessionCommand");
8
9
  const CreateProjectCommand_1 = require("./commands/CreateProjectCommand");
9
10
  const CreateProjectVersionCommand_1 = require("./commands/CreateProjectVersionCommand");
10
11
  const CreateStreamProcessorCommand_1 = require("./commands/CreateStreamProcessorCommand");
@@ -31,6 +32,7 @@ const GetCelebrityInfoCommand_1 = require("./commands/GetCelebrityInfoCommand");
31
32
  const GetCelebrityRecognitionCommand_1 = require("./commands/GetCelebrityRecognitionCommand");
32
33
  const GetContentModerationCommand_1 = require("./commands/GetContentModerationCommand");
33
34
  const GetFaceDetectionCommand_1 = require("./commands/GetFaceDetectionCommand");
35
+ const GetFaceLivenessSessionResultsCommand_1 = require("./commands/GetFaceLivenessSessionResultsCommand");
34
36
  const GetFaceSearchCommand_1 = require("./commands/GetFaceSearchCommand");
35
37
  const GetLabelDetectionCommand_1 = require("./commands/GetLabelDetectionCommand");
36
38
  const GetPersonTrackingCommand_1 = require("./commands/GetPersonTrackingCommand");
@@ -122,6 +124,20 @@ class Rekognition extends RekognitionClient_1.RekognitionClient {
122
124
  return this.send(command, optionsOrCb);
123
125
  }
124
126
  }
127
+ createFaceLivenessSession(args, optionsOrCb, cb) {
128
+ const command = new CreateFaceLivenessSessionCommand_1.CreateFaceLivenessSessionCommand(args);
129
+ if (typeof optionsOrCb === "function") {
130
+ this.send(command, optionsOrCb);
131
+ }
132
+ else if (typeof cb === "function") {
133
+ if (typeof optionsOrCb !== "object")
134
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
135
+ this.send(command, optionsOrCb || {}, cb);
136
+ }
137
+ else {
138
+ return this.send(command, optionsOrCb);
139
+ }
140
+ }
125
141
  createProject(args, optionsOrCb, cb) {
126
142
  const command = new CreateProjectCommand_1.CreateProjectCommand(args);
127
143
  if (typeof optionsOrCb === "function") {
@@ -486,6 +502,20 @@ class Rekognition extends RekognitionClient_1.RekognitionClient {
486
502
  return this.send(command, optionsOrCb);
487
503
  }
488
504
  }
505
+ getFaceLivenessSessionResults(args, optionsOrCb, cb) {
506
+ const command = new GetFaceLivenessSessionResultsCommand_1.GetFaceLivenessSessionResultsCommand(args);
507
+ if (typeof optionsOrCb === "function") {
508
+ this.send(command, optionsOrCb);
509
+ }
510
+ else if (typeof cb === "function") {
511
+ if (typeof optionsOrCb !== "object")
512
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
513
+ this.send(command, optionsOrCb || {}, cb);
514
+ }
515
+ else {
516
+ return this.send(command, optionsOrCb);
517
+ }
518
+ }
489
519
  getFaceSearch(args, optionsOrCb, cb) {
490
520
  const command = new GetFaceSearchCommand_1.GetFaceSearchCommand(args);
491
521
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateFaceLivenessSessionCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
8
+ class CreateFaceLivenessSessionCommand extends smithy_client_1.Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateFaceLivenessSessionCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "RekognitionClient";
27
+ const commandName = "CreateFaceLivenessSessionCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ };
35
+ const { requestHandler } = configuration;
36
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
+ }
38
+ serialize(input, context) {
39
+ return (0, Aws_json1_1_1.se_CreateFaceLivenessSessionCommand)(input, context);
40
+ }
41
+ deserialize(output, context) {
42
+ return (0, Aws_json1_1_1.de_CreateFaceLivenessSessionCommand)(output, context);
43
+ }
44
+ }
45
+ exports.CreateFaceLivenessSessionCommand = CreateFaceLivenessSessionCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetFaceLivenessSessionResultsCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class GetFaceLivenessSessionResultsCommand extends smithy_client_1.Command {
10
+ static getEndpointParameterInstructions() {
11
+ return {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
17
+ }
18
+ constructor(input) {
19
+ super();
20
+ this.input = input;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetFaceLivenessSessionResultsCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "RekognitionClient";
28
+ const commandName = "GetFaceLivenessSessionResultsCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (_) => _,
34
+ outputFilterSensitiveLog: models_0_1.GetFaceLivenessSessionResultsResponseFilterSensitiveLog,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_json1_1_1.se_GetFaceLivenessSessionResultsCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.de_GetFaceLivenessSessionResultsCommand)(output, context);
44
+ }
45
+ }
46
+ exports.GetFaceLivenessSessionResultsCommand = GetFaceLivenessSessionResultsCommand;
@@ -5,6 +5,7 @@ tslib_1.__exportStar(require("./CompareFacesCommand"), exports);
5
5
  tslib_1.__exportStar(require("./CopyProjectVersionCommand"), exports);
6
6
  tslib_1.__exportStar(require("./CreateCollectionCommand"), exports);
7
7
  tslib_1.__exportStar(require("./CreateDatasetCommand"), exports);
8
+ tslib_1.__exportStar(require("./CreateFaceLivenessSessionCommand"), exports);
8
9
  tslib_1.__exportStar(require("./CreateProjectCommand"), exports);
9
10
  tslib_1.__exportStar(require("./CreateProjectVersionCommand"), exports);
10
11
  tslib_1.__exportStar(require("./CreateStreamProcessorCommand"), exports);
@@ -31,6 +32,7 @@ tslib_1.__exportStar(require("./GetCelebrityInfoCommand"), exports);
31
32
  tslib_1.__exportStar(require("./GetCelebrityRecognitionCommand"), exports);
32
33
  tslib_1.__exportStar(require("./GetContentModerationCommand"), exports);
33
34
  tslib_1.__exportStar(require("./GetFaceDetectionCommand"), exports);
35
+ tslib_1.__exportStar(require("./GetFaceLivenessSessionResultsCommand"), exports);
34
36
  tslib_1.__exportStar(require("./GetFaceSearchCommand"), exports);
35
37
  tslib_1.__exportStar(require("./GetLabelDetectionCommand"), exports);
36
38
  tslib_1.__exportStar(require("./GetPersonTrackingCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const s = "fn", t = "argv", u = "ref";
5
- const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = "stringEquals", i = { "required": true, "default": false, "type": "Boolean" }, j = { [u]: "Region" }, k = { [u]: "Endpoint" }, l = { [s]: "booleanEquals", [t]: [{ [u]: "UseFIPS" }, true] }, m = { [s]: "booleanEquals", [t]: [{ [u]: "UseDualStack" }, true] }, n = {}, o = { [s]: "booleanEquals", [t]: [true, { [s]: "getAttr", [t]: [{ [u]: d }, "supportsFIPS"] }] }, p = { [s]: "booleanEquals", [t]: [true, { [s]: "getAttr", [t]: [{ [u]: d }, "supportsDualStack"] }] }, q = [l], r = [m];
6
- const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseDualStack: i, UseFIPS: i, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ [s]: "aws.partition", [t]: [j], assign: d }], type: e, rules: [{ conditions: [{ [s]: "isSet", [t]: [k] }], type: e, rules: [{ conditions: q, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: f }, { type: e, rules: [{ conditions: r, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: f }, { endpoint: { url: k, properties: n, headers: n }, type: g }] }] }, { conditions: [l, m], type: e, rules: [{ conditions: [o, p], type: e, rules: [{ endpoint: { url: "https://rekognition-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: g }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: f }] }, { conditions: q, type: e, rules: [{ conditions: [o], type: e, rules: [{ type: e, rules: [{ conditions: [{ [s]: h, [t]: [j, "rekognition.ca-central-1"] }], endpoint: { url: "https://rekognition-fips.ca-central-1.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "rekognition.us-east-1"] }], endpoint: { url: "https://rekognition-fips.us-east-1.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "rekognition.us-east-2"] }], endpoint: { url: "https://rekognition-fips.us-east-2.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "rekognition.us-west-1"] }], endpoint: { url: "https://rekognition-fips.us-west-1.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "rekognition.us-west-2"] }], endpoint: { url: "https://rekognition-fips.us-west-2.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "rekognition.us-gov-west-1"] }], endpoint: { url: "https://rekognition-fips.us-gov-west-1.amazonaws.com", properties: n, headers: n }, type: g }, { endpoint: { url: "https://rekognition-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: g }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: f }] }, { conditions: r, type: e, rules: [{ conditions: [p], type: e, rules: [{ endpoint: { url: "https://rekognition.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: g }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: f }] }, { endpoint: { url: "https://rekognition.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: g }] }] };
4
+ const q = "required", r = "fn", s = "argv", t = "ref";
5
+ 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" }];
6
+ 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 }] }] };
7
7
  exports.ruleSet = _data;
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./models_0"), exports);
5
+ tslib_1.__exportStar(require("./models_1"), exports);
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MalformedPolicyDocumentException = exports.LabelDetectionFeatureName = exports.Reason = exports.IdempotentParameterMismatchException = exports.SegmentType = exports.TechnicalCueType = exports.PersonTrackingSortBy = exports.LabelDetectionSortBy = exports.LabelDetectionAggregateBy = exports.VideoColorRange = exports.VideoJobStatus = exports.FaceSearchSortBy = exports.FaceAttributes = exports.TextTypes = exports.HumanLoopQuotaExceededException = exports.DetectLabelsFeatureName = exports.ResourceNotReadyException = exports.StreamProcessorStatus = exports.InvalidPaginationTokenException = exports.ProjectVersionStatus = exports.InvalidPolicyRevisionIdException = exports.ProjectStatus = exports.DatasetStatusMessageCode = exports.DatasetStatus = exports.DatasetType = exports.ResourceAlreadyExistsException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.LimitExceededException = exports.ContentModerationSortBy = exports.ContentClassifier = exports.ThrottlingException = exports.ProvisionedThroughputExceededException = exports.InvalidS3ObjectException = exports.InvalidParameterException = exports.InvalidImageFormatException = exports.InternalServerError = exports.ImageTooLargeException = exports.OrientationCorrection = exports.QualityFilter = exports.CelebrityRecognitionSortBy = exports.GenderType = exports.KnownGenderType = exports.LandmarkType = exports.EmotionName = exports.ProtectiveEquipmentType = exports.BodyPart = exports.Attribute = exports.AccessDeniedException = void 0;
4
- exports.StreamProcessorParameterToDelete = exports.VideoTooLargeException = void 0;
3
+ exports.Reason = exports.IdempotentParameterMismatchException = exports.SegmentType = exports.TechnicalCueType = exports.PersonTrackingSortBy = exports.LabelDetectionSortBy = exports.LabelDetectionAggregateBy = exports.SessionNotFoundException = exports.LivenessSessionStatus = exports.VideoColorRange = exports.VideoJobStatus = exports.FaceSearchSortBy = exports.FaceAttributes = exports.TextTypes = exports.HumanLoopQuotaExceededException = exports.DetectLabelsFeatureName = exports.ResourceNotReadyException = exports.StreamProcessorStatus = exports.InvalidPaginationTokenException = exports.ProjectVersionStatus = exports.InvalidPolicyRevisionIdException = exports.ProjectStatus = exports.DatasetStatusMessageCode = exports.DatasetStatus = exports.DatasetType = exports.ResourceAlreadyExistsException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.ResourceInUseException = exports.LimitExceededException = exports.ContentModerationSortBy = exports.ContentClassifier = exports.ThrottlingException = exports.ProvisionedThroughputExceededException = exports.InvalidS3ObjectException = exports.InvalidParameterException = exports.InvalidImageFormatException = exports.InternalServerError = exports.ImageTooLargeException = exports.OrientationCorrection = exports.QualityFilter = exports.CelebrityRecognitionSortBy = exports.GenderType = exports.KnownGenderType = exports.LandmarkType = exports.EmotionName = exports.ProtectiveEquipmentType = exports.BodyPart = exports.Attribute = exports.AccessDeniedException = void 0;
4
+ exports.GetFaceLivenessSessionResultsResponseFilterSensitiveLog = exports.AuditImageFilterSensitiveLog = exports.StreamProcessorParameterToDelete = exports.VideoTooLargeException = exports.MalformedPolicyDocumentException = exports.LabelDetectionFeatureName = void 0;
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
5
6
  const RekognitionServiceException_1 = require("./RekognitionServiceException");
6
7
  class AccessDeniedException extends RekognitionServiceException_1.RekognitionServiceException {
7
8
  constructor(opts) {
@@ -441,6 +442,28 @@ exports.VideoColorRange = {
441
442
  FULL: "FULL",
442
443
  LIMITED: "LIMITED",
443
444
  };
445
+ exports.LivenessSessionStatus = {
446
+ CREATED: "CREATED",
447
+ FAILED: "FAILED",
448
+ IN_PROGRESS: "IN_PROGRESS",
449
+ SUCCEEDED: "SUCCEEDED",
450
+ };
451
+ class SessionNotFoundException extends RekognitionServiceException_1.RekognitionServiceException {
452
+ constructor(opts) {
453
+ super({
454
+ name: "SessionNotFoundException",
455
+ $fault: "client",
456
+ ...opts,
457
+ });
458
+ this.name = "SessionNotFoundException";
459
+ this.$fault = "client";
460
+ Object.setPrototypeOf(this, SessionNotFoundException.prototype);
461
+ this.Message = opts.Message;
462
+ this.Code = opts.Code;
463
+ this.Logref = opts.Logref;
464
+ }
465
+ }
466
+ exports.SessionNotFoundException = SessionNotFoundException;
444
467
  exports.LabelDetectionAggregateBy = {
445
468
  SEGMENTS: "SEGMENTS",
446
469
  TIMESTAMPS: "TIMESTAMPS",
@@ -530,3 +553,14 @@ exports.StreamProcessorParameterToDelete = {
530
553
  ConnectedHomeMinConfidence: "ConnectedHomeMinConfidence",
531
554
  RegionsOfInterest: "RegionsOfInterest",
532
555
  };
556
+ const AuditImageFilterSensitiveLog = (obj) => ({
557
+ ...obj,
558
+ ...(obj.Bytes && { Bytes: smithy_client_1.SENSITIVE_STRING }),
559
+ });
560
+ exports.AuditImageFilterSensitiveLog = AuditImageFilterSensitiveLog;
561
+ const GetFaceLivenessSessionResultsResponseFilterSensitiveLog = (obj) => ({
562
+ ...obj,
563
+ ...(obj.ReferenceImage && { ReferenceImage: (0, exports.AuditImageFilterSensitiveLog)(obj.ReferenceImage) }),
564
+ ...(obj.AuditImages && { AuditImages: obj.AuditImages.map((item) => (0, exports.AuditImageFilterSensitiveLog)(item)) }),
565
+ });
566
+ exports.GetFaceLivenessSessionResultsResponseFilterSensitiveLog = GetFaceLivenessSessionResultsResponseFilterSensitiveLog;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_StartFaceDetectionCommand = exports.se_StartContentModerationCommand = exports.se_StartCelebrityRecognitionCommand = exports.se_SearchFacesByImageCommand = exports.se_SearchFacesCommand = exports.se_RecognizeCelebritiesCommand = exports.se_PutProjectPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStreamProcessorsCommand = exports.se_ListProjectPoliciesCommand = exports.se_ListFacesCommand = exports.se_ListDatasetLabelsCommand = exports.se_ListDatasetEntriesCommand = exports.se_ListCollectionsCommand = exports.se_IndexFacesCommand = exports.se_GetTextDetectionCommand = exports.se_GetSegmentDetectionCommand = exports.se_GetPersonTrackingCommand = exports.se_GetLabelDetectionCommand = exports.se_GetFaceSearchCommand = exports.se_GetFaceDetectionCommand = exports.se_GetContentModerationCommand = exports.se_GetCelebrityRecognitionCommand = exports.se_GetCelebrityInfoCommand = exports.se_DistributeDatasetEntriesCommand = exports.se_DetectTextCommand = exports.se_DetectProtectiveEquipmentCommand = exports.se_DetectModerationLabelsCommand = exports.se_DetectLabelsCommand = exports.se_DetectFacesCommand = exports.se_DetectCustomLabelsCommand = exports.se_DescribeStreamProcessorCommand = exports.se_DescribeProjectVersionsCommand = exports.se_DescribeProjectsCommand = exports.se_DescribeDatasetCommand = exports.se_DescribeCollectionCommand = exports.se_DeleteStreamProcessorCommand = exports.se_DeleteProjectVersionCommand = exports.se_DeleteProjectPolicyCommand = exports.se_DeleteProjectCommand = exports.se_DeleteFacesCommand = exports.se_DeleteDatasetCommand = exports.se_DeleteCollectionCommand = exports.se_CreateStreamProcessorCommand = exports.se_CreateProjectVersionCommand = exports.se_CreateProjectCommand = exports.se_CreateDatasetCommand = exports.se_CreateCollectionCommand = exports.se_CopyProjectVersionCommand = exports.se_CompareFacesCommand = void 0;
4
- exports.de_ListCollectionsCommand = exports.de_IndexFacesCommand = exports.de_GetTextDetectionCommand = exports.de_GetSegmentDetectionCommand = exports.de_GetPersonTrackingCommand = exports.de_GetLabelDetectionCommand = exports.de_GetFaceSearchCommand = exports.de_GetFaceDetectionCommand = exports.de_GetContentModerationCommand = exports.de_GetCelebrityRecognitionCommand = exports.de_GetCelebrityInfoCommand = exports.de_DistributeDatasetEntriesCommand = exports.de_DetectTextCommand = exports.de_DetectProtectiveEquipmentCommand = exports.de_DetectModerationLabelsCommand = exports.de_DetectLabelsCommand = exports.de_DetectFacesCommand = exports.de_DetectCustomLabelsCommand = exports.de_DescribeStreamProcessorCommand = exports.de_DescribeProjectVersionsCommand = exports.de_DescribeProjectsCommand = exports.de_DescribeDatasetCommand = exports.de_DescribeCollectionCommand = exports.de_DeleteStreamProcessorCommand = exports.de_DeleteProjectVersionCommand = exports.de_DeleteProjectPolicyCommand = exports.de_DeleteProjectCommand = exports.de_DeleteFacesCommand = exports.de_DeleteDatasetCommand = exports.de_DeleteCollectionCommand = exports.de_CreateStreamProcessorCommand = exports.de_CreateProjectVersionCommand = exports.de_CreateProjectCommand = exports.de_CreateDatasetCommand = exports.de_CreateCollectionCommand = exports.de_CopyProjectVersionCommand = exports.de_CompareFacesCommand = exports.se_UpdateStreamProcessorCommand = exports.se_UpdateDatasetEntriesCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopStreamProcessorCommand = exports.se_StopProjectVersionCommand = exports.se_StartTextDetectionCommand = exports.se_StartStreamProcessorCommand = exports.se_StartSegmentDetectionCommand = exports.se_StartProjectVersionCommand = exports.se_StartPersonTrackingCommand = exports.se_StartLabelDetectionCommand = exports.se_StartFaceSearchCommand = void 0;
5
- exports.de_UpdateStreamProcessorCommand = exports.de_UpdateDatasetEntriesCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopStreamProcessorCommand = exports.de_StopProjectVersionCommand = exports.de_StartTextDetectionCommand = exports.de_StartStreamProcessorCommand = exports.de_StartSegmentDetectionCommand = exports.de_StartProjectVersionCommand = exports.de_StartPersonTrackingCommand = exports.de_StartLabelDetectionCommand = exports.de_StartFaceSearchCommand = exports.de_StartFaceDetectionCommand = exports.de_StartContentModerationCommand = exports.de_StartCelebrityRecognitionCommand = exports.de_SearchFacesByImageCommand = exports.de_SearchFacesCommand = exports.de_RecognizeCelebritiesCommand = exports.de_PutProjectPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStreamProcessorsCommand = exports.de_ListProjectPoliciesCommand = exports.de_ListFacesCommand = exports.de_ListDatasetLabelsCommand = exports.de_ListDatasetEntriesCommand = void 0;
3
+ exports.se_StartCelebrityRecognitionCommand = exports.se_SearchFacesByImageCommand = exports.se_SearchFacesCommand = exports.se_RecognizeCelebritiesCommand = exports.se_PutProjectPolicyCommand = exports.se_ListTagsForResourceCommand = exports.se_ListStreamProcessorsCommand = exports.se_ListProjectPoliciesCommand = exports.se_ListFacesCommand = exports.se_ListDatasetLabelsCommand = exports.se_ListDatasetEntriesCommand = exports.se_ListCollectionsCommand = exports.se_IndexFacesCommand = exports.se_GetTextDetectionCommand = exports.se_GetSegmentDetectionCommand = exports.se_GetPersonTrackingCommand = exports.se_GetLabelDetectionCommand = exports.se_GetFaceSearchCommand = exports.se_GetFaceLivenessSessionResultsCommand = exports.se_GetFaceDetectionCommand = exports.se_GetContentModerationCommand = exports.se_GetCelebrityRecognitionCommand = exports.se_GetCelebrityInfoCommand = exports.se_DistributeDatasetEntriesCommand = exports.se_DetectTextCommand = exports.se_DetectProtectiveEquipmentCommand = exports.se_DetectModerationLabelsCommand = exports.se_DetectLabelsCommand = exports.se_DetectFacesCommand = exports.se_DetectCustomLabelsCommand = exports.se_DescribeStreamProcessorCommand = exports.se_DescribeProjectVersionsCommand = exports.se_DescribeProjectsCommand = exports.se_DescribeDatasetCommand = exports.se_DescribeCollectionCommand = exports.se_DeleteStreamProcessorCommand = exports.se_DeleteProjectVersionCommand = exports.se_DeleteProjectPolicyCommand = exports.se_DeleteProjectCommand = exports.se_DeleteFacesCommand = exports.se_DeleteDatasetCommand = exports.se_DeleteCollectionCommand = exports.se_CreateStreamProcessorCommand = exports.se_CreateProjectVersionCommand = exports.se_CreateProjectCommand = exports.se_CreateFaceLivenessSessionCommand = exports.se_CreateDatasetCommand = exports.se_CreateCollectionCommand = exports.se_CopyProjectVersionCommand = exports.se_CompareFacesCommand = void 0;
4
+ exports.de_GetPersonTrackingCommand = exports.de_GetLabelDetectionCommand = exports.de_GetFaceSearchCommand = exports.de_GetFaceLivenessSessionResultsCommand = exports.de_GetFaceDetectionCommand = exports.de_GetContentModerationCommand = exports.de_GetCelebrityRecognitionCommand = exports.de_GetCelebrityInfoCommand = exports.de_DistributeDatasetEntriesCommand = exports.de_DetectTextCommand = exports.de_DetectProtectiveEquipmentCommand = exports.de_DetectModerationLabelsCommand = exports.de_DetectLabelsCommand = exports.de_DetectFacesCommand = exports.de_DetectCustomLabelsCommand = exports.de_DescribeStreamProcessorCommand = exports.de_DescribeProjectVersionsCommand = exports.de_DescribeProjectsCommand = exports.de_DescribeDatasetCommand = exports.de_DescribeCollectionCommand = exports.de_DeleteStreamProcessorCommand = exports.de_DeleteProjectVersionCommand = exports.de_DeleteProjectPolicyCommand = exports.de_DeleteProjectCommand = exports.de_DeleteFacesCommand = exports.de_DeleteDatasetCommand = exports.de_DeleteCollectionCommand = exports.de_CreateStreamProcessorCommand = exports.de_CreateProjectVersionCommand = exports.de_CreateProjectCommand = exports.de_CreateFaceLivenessSessionCommand = exports.de_CreateDatasetCommand = exports.de_CreateCollectionCommand = exports.de_CopyProjectVersionCommand = exports.de_CompareFacesCommand = exports.se_UpdateStreamProcessorCommand = exports.se_UpdateDatasetEntriesCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopStreamProcessorCommand = exports.se_StopProjectVersionCommand = exports.se_StartTextDetectionCommand = exports.se_StartStreamProcessorCommand = exports.se_StartSegmentDetectionCommand = exports.se_StartProjectVersionCommand = exports.se_StartPersonTrackingCommand = exports.se_StartLabelDetectionCommand = exports.se_StartFaceSearchCommand = exports.se_StartFaceDetectionCommand = exports.se_StartContentModerationCommand = void 0;
5
+ exports.de_UpdateStreamProcessorCommand = exports.de_UpdateDatasetEntriesCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopStreamProcessorCommand = exports.de_StopProjectVersionCommand = exports.de_StartTextDetectionCommand = exports.de_StartStreamProcessorCommand = exports.de_StartSegmentDetectionCommand = exports.de_StartProjectVersionCommand = exports.de_StartPersonTrackingCommand = exports.de_StartLabelDetectionCommand = exports.de_StartFaceSearchCommand = exports.de_StartFaceDetectionCommand = exports.de_StartContentModerationCommand = exports.de_StartCelebrityRecognitionCommand = exports.de_SearchFacesByImageCommand = exports.de_SearchFacesCommand = exports.de_RecognizeCelebritiesCommand = exports.de_PutProjectPolicyCommand = exports.de_ListTagsForResourceCommand = exports.de_ListStreamProcessorsCommand = exports.de_ListProjectPoliciesCommand = exports.de_ListFacesCommand = exports.de_ListDatasetLabelsCommand = exports.de_ListDatasetEntriesCommand = exports.de_ListCollectionsCommand = exports.de_IndexFacesCommand = exports.de_GetTextDetectionCommand = exports.de_GetSegmentDetectionCommand = void 0;
6
6
  const protocol_http_1 = require("@aws-sdk/protocol-http");
7
7
  const smithy_client_1 = require("@aws-sdk/smithy-client");
8
8
  const models_0_1 = require("../models/models_0");
@@ -47,6 +47,16 @@ const se_CreateDatasetCommand = async (input, context) => {
47
47
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
48
48
  };
49
49
  exports.se_CreateDatasetCommand = se_CreateDatasetCommand;
50
+ const se_CreateFaceLivenessSessionCommand = async (input, context) => {
51
+ const headers = {
52
+ "content-type": "application/x-amz-json-1.1",
53
+ "x-amz-target": "RekognitionService.CreateFaceLivenessSession",
54
+ };
55
+ let body;
56
+ body = JSON.stringify(se_CreateFaceLivenessSessionRequest(input, context));
57
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
+ };
59
+ exports.se_CreateFaceLivenessSessionCommand = se_CreateFaceLivenessSessionCommand;
50
60
  const se_CreateProjectCommand = async (input, context) => {
51
61
  const headers = {
52
62
  "content-type": "application/x-amz-json-1.1",
@@ -307,6 +317,16 @@ const se_GetFaceDetectionCommand = async (input, context) => {
307
317
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
318
  };
309
319
  exports.se_GetFaceDetectionCommand = se_GetFaceDetectionCommand;
320
+ const se_GetFaceLivenessSessionResultsCommand = async (input, context) => {
321
+ const headers = {
322
+ "content-type": "application/x-amz-json-1.1",
323
+ "x-amz-target": "RekognitionService.GetFaceLivenessSessionResults",
324
+ };
325
+ let body;
326
+ body = JSON.stringify(se_GetFaceLivenessSessionResultsRequest(input, context));
327
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
328
+ };
329
+ exports.se_GetFaceLivenessSessionResultsCommand = se_GetFaceLivenessSessionResultsCommand;
310
330
  const se_GetFaceSearchCommand = async (input, context) => {
311
331
  const headers = {
312
332
  "content-type": "application/x-amz-json-1.1",
@@ -860,6 +880,52 @@ const de_CreateDatasetCommandError = async (output, context) => {
860
880
  });
861
881
  }
862
882
  };
883
+ const de_CreateFaceLivenessSessionCommand = async (output, context) => {
884
+ if (output.statusCode >= 300) {
885
+ return de_CreateFaceLivenessSessionCommandError(output, context);
886
+ }
887
+ const data = await parseBody(output.body, context);
888
+ let contents = {};
889
+ contents = de_CreateFaceLivenessSessionResponse(data, context);
890
+ const response = {
891
+ $metadata: deserializeMetadata(output),
892
+ ...contents,
893
+ };
894
+ return Promise.resolve(response);
895
+ };
896
+ exports.de_CreateFaceLivenessSessionCommand = de_CreateFaceLivenessSessionCommand;
897
+ const de_CreateFaceLivenessSessionCommandError = async (output, context) => {
898
+ const parsedOutput = {
899
+ ...output,
900
+ body: await parseErrorBody(output.body, context),
901
+ };
902
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
903
+ switch (errorCode) {
904
+ case "AccessDeniedException":
905
+ case "com.amazonaws.rekognition#AccessDeniedException":
906
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
907
+ case "InternalServerError":
908
+ case "com.amazonaws.rekognition#InternalServerError":
909
+ throw await de_InternalServerErrorRes(parsedOutput, context);
910
+ case "InvalidParameterException":
911
+ case "com.amazonaws.rekognition#InvalidParameterException":
912
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
913
+ case "ProvisionedThroughputExceededException":
914
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
915
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
916
+ case "ThrottlingException":
917
+ case "com.amazonaws.rekognition#ThrottlingException":
918
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
919
+ default:
920
+ const parsedBody = parsedOutput.body;
921
+ (0, smithy_client_1.throwDefaultError)({
922
+ output,
923
+ parsedBody,
924
+ exceptionCtor: RekognitionServiceException_1.RekognitionServiceException,
925
+ errorCode,
926
+ });
927
+ }
928
+ };
863
929
  const de_CreateProjectCommand = async (output, context) => {
864
930
  if (output.statusCode >= 300) {
865
931
  return de_CreateProjectCommandError(output, context);
@@ -2233,6 +2299,55 @@ const de_GetFaceDetectionCommandError = async (output, context) => {
2233
2299
  });
2234
2300
  }
2235
2301
  };
2302
+ const de_GetFaceLivenessSessionResultsCommand = async (output, context) => {
2303
+ if (output.statusCode >= 300) {
2304
+ return de_GetFaceLivenessSessionResultsCommandError(output, context);
2305
+ }
2306
+ const data = await parseBody(output.body, context);
2307
+ let contents = {};
2308
+ contents = de_GetFaceLivenessSessionResultsResponse(data, context);
2309
+ const response = {
2310
+ $metadata: deserializeMetadata(output),
2311
+ ...contents,
2312
+ };
2313
+ return Promise.resolve(response);
2314
+ };
2315
+ exports.de_GetFaceLivenessSessionResultsCommand = de_GetFaceLivenessSessionResultsCommand;
2316
+ const de_GetFaceLivenessSessionResultsCommandError = async (output, context) => {
2317
+ const parsedOutput = {
2318
+ ...output,
2319
+ body: await parseErrorBody(output.body, context),
2320
+ };
2321
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2322
+ switch (errorCode) {
2323
+ case "AccessDeniedException":
2324
+ case "com.amazonaws.rekognition#AccessDeniedException":
2325
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2326
+ case "InternalServerError":
2327
+ case "com.amazonaws.rekognition#InternalServerError":
2328
+ throw await de_InternalServerErrorRes(parsedOutput, context);
2329
+ case "InvalidParameterException":
2330
+ case "com.amazonaws.rekognition#InvalidParameterException":
2331
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2332
+ case "ProvisionedThroughputExceededException":
2333
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2334
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2335
+ case "SessionNotFoundException":
2336
+ case "com.amazonaws.rekognition#SessionNotFoundException":
2337
+ throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
2338
+ case "ThrottlingException":
2339
+ case "com.amazonaws.rekognition#ThrottlingException":
2340
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2341
+ default:
2342
+ const parsedBody = parsedOutput.body;
2343
+ (0, smithy_client_1.throwDefaultError)({
2344
+ output,
2345
+ parsedBody,
2346
+ exceptionCtor: RekognitionServiceException_1.RekognitionServiceException,
2347
+ errorCode,
2348
+ });
2349
+ }
2350
+ };
2236
2351
  const de_GetFaceSearchCommand = async (output, context) => {
2237
2352
  if (output.statusCode >= 300) {
2238
2353
  return de_GetFaceSearchCommandError(output, context);
@@ -4017,6 +4132,9 @@ const de_UpdateStreamProcessorCommandError = async (output, context) => {
4017
4132
  case "ProvisionedThroughputExceededException":
4018
4133
  case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
4019
4134
  throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
4135
+ case "ResourceInUseException":
4136
+ case "com.amazonaws.rekognition#ResourceInUseException":
4137
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
4020
4138
  case "ResourceNotFoundException":
4021
4139
  case "com.amazonaws.rekognition#ResourceNotFoundException":
4022
4140
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -4195,6 +4313,15 @@ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
4195
4313
  });
4196
4314
  return (0, smithy_client_1.decorateServiceException)(exception, body);
4197
4315
  };
4316
+ const de_SessionNotFoundExceptionRes = async (parsedOutput, context) => {
4317
+ const body = parsedOutput.body;
4318
+ const deserialized = de_SessionNotFoundException(body, context);
4319
+ const exception = new models_0_1.SessionNotFoundException({
4320
+ $metadata: deserializeMetadata(parsedOutput),
4321
+ ...deserialized,
4322
+ });
4323
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
4324
+ };
4198
4325
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
4199
4326
  const body = parsedOutput.body;
4200
4327
  const deserialized = de_ThrottlingException(body, context);
@@ -4308,6 +4435,19 @@ const se_CreateDatasetRequest = (input, context) => {
4308
4435
  ...(input.ProjectArn != null && { ProjectArn: input.ProjectArn }),
4309
4436
  };
4310
4437
  };
4438
+ const se_CreateFaceLivenessSessionRequest = (input, context) => {
4439
+ return {
4440
+ ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
4441
+ ...(input.KmsKeyId != null && { KmsKeyId: input.KmsKeyId }),
4442
+ ...(input.Settings != null && { Settings: se_CreateFaceLivenessSessionRequestSettings(input.Settings, context) }),
4443
+ };
4444
+ };
4445
+ const se_CreateFaceLivenessSessionRequestSettings = (input, context) => {
4446
+ return {
4447
+ ...(input.AuditImagesLimit != null && { AuditImagesLimit: input.AuditImagesLimit }),
4448
+ ...(input.OutputConfig != null && { OutputConfig: se_LivenessOutputConfig(input.OutputConfig, context) }),
4449
+ };
4450
+ };
4311
4451
  const se_CreateProjectRequest = (input, context) => {
4312
4452
  return {
4313
4453
  ...(input.ProjectName != null && { ProjectName: input.ProjectName }),
@@ -4592,6 +4732,11 @@ const se_GetFaceDetectionRequest = (input, context) => {
4592
4732
  ...(input.NextToken != null && { NextToken: input.NextToken }),
4593
4733
  };
4594
4734
  };
4735
+ const se_GetFaceLivenessSessionResultsRequest = (input, context) => {
4736
+ return {
4737
+ ...(input.SessionId != null && { SessionId: input.SessionId }),
4738
+ };
4739
+ };
4595
4740
  const se_GetFaceSearchRequest = (input, context) => {
4596
4741
  return {
4597
4742
  ...(input.JobId != null && { JobId: input.JobId }),
@@ -4745,6 +4890,12 @@ const se_ListTagsForResourceRequest = (input, context) => {
4745
4890
  ...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
4746
4891
  };
4747
4892
  };
4893
+ const se_LivenessOutputConfig = (input, context) => {
4894
+ return {
4895
+ ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
4896
+ ...(input.S3KeyPrefix != null && { S3KeyPrefix: input.S3KeyPrefix }),
4897
+ };
4898
+ };
4748
4899
  const se_NotificationChannel = (input, context) => {
4749
4900
  return {
4750
4901
  ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
@@ -5177,6 +5328,24 @@ const de_AudioMetadataList = (output, context) => {
5177
5328
  });
5178
5329
  return retVal;
5179
5330
  };
5331
+ const de_AuditImage = (output, context) => {
5332
+ return {
5333
+ BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined,
5334
+ Bytes: output.Bytes != null ? context.base64Decoder(output.Bytes) : undefined,
5335
+ S3Object: output.S3Object != null ? de_S3Object(output.S3Object, context) : undefined,
5336
+ };
5337
+ };
5338
+ const de_AuditImages = (output, context) => {
5339
+ const retVal = (output || [])
5340
+ .filter((e) => e != null)
5341
+ .map((entry) => {
5342
+ if (entry === null) {
5343
+ return null;
5344
+ }
5345
+ return de_AuditImage(entry, context);
5346
+ });
5347
+ return retVal;
5348
+ };
5180
5349
  const de_Beard = (output, context) => {
5181
5350
  return {
5182
5351
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
@@ -5384,6 +5553,11 @@ const de_CreateDatasetResponse = (output, context) => {
5384
5553
  DatasetArn: (0, smithy_client_1.expectString)(output.DatasetArn),
5385
5554
  };
5386
5555
  };
5556
+ const de_CreateFaceLivenessSessionResponse = (output, context) => {
5557
+ return {
5558
+ SessionId: (0, smithy_client_1.expectString)(output.SessionId),
5559
+ };
5560
+ };
5387
5561
  const de_CreateProjectResponse = (output, context) => {
5388
5562
  return {
5389
5563
  ProjectArn: (0, smithy_client_1.expectString)(output.ProjectArn),
@@ -5904,6 +6078,15 @@ const de_GetFaceDetectionResponse = (output, context) => {
5904
6078
  VideoMetadata: output.VideoMetadata != null ? de_VideoMetadata(output.VideoMetadata, context) : undefined,
5905
6079
  };
5906
6080
  };
6081
+ const de_GetFaceLivenessSessionResultsResponse = (output, context) => {
6082
+ return {
6083
+ AuditImages: output.AuditImages != null ? de_AuditImages(output.AuditImages, context) : undefined,
6084
+ Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),
6085
+ ReferenceImage: output.ReferenceImage != null ? de_AuditImage(output.ReferenceImage, context) : undefined,
6086
+ SessionId: (0, smithy_client_1.expectString)(output.SessionId),
6087
+ Status: (0, smithy_client_1.expectString)(output.Status),
6088
+ };
6089
+ };
5907
6090
  const de_GetFaceSearchResponse = (output, context) => {
5908
6091
  return {
5909
6092
  JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
@@ -6645,6 +6828,13 @@ const de_ServiceQuotaExceededException = (output, context) => {
6645
6828
  Message: (0, smithy_client_1.expectString)(output.Message),
6646
6829
  };
6647
6830
  };
6831
+ const de_SessionNotFoundException = (output, context) => {
6832
+ return {
6833
+ Code: (0, smithy_client_1.expectString)(output.Code),
6834
+ Logref: (0, smithy_client_1.expectString)(output.Logref),
6835
+ Message: (0, smithy_client_1.expectString)(output.Message),
6836
+ };
6837
+ };
6648
6838
  const de_ShotSegment = (output, context) => {
6649
6839
  return {
6650
6840
  Confidence: (0, smithy_client_1.limitedParseFloat32)(output.Confidence),