@aws-sdk/client-rekognitionstreaming 3.305.0 → 3.308.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 (33) hide show
  1. package/README.md +23 -8
  2. package/dist-cjs/RekognitionStreaming.js +0 -15
  3. package/dist-cjs/RekognitionStreamingClient.js +2 -0
  4. package/dist-cjs/commands/index.js +0 -1
  5. package/dist-cjs/endpoint/ruleset.js +3 -3
  6. package/dist-cjs/models/models_0.js +20 -12
  7. package/dist-cjs/protocols/Aws_restJson1.js +56 -85
  8. package/dist-es/RekognitionStreaming.js +0 -15
  9. package/dist-es/RekognitionStreamingClient.js +2 -0
  10. package/dist-es/commands/index.js +0 -1
  11. package/dist-es/endpoint/ruleset.js +3 -3
  12. package/dist-es/models/models_0.js +18 -9
  13. package/dist-es/protocols/Aws_restJson1.js +56 -83
  14. package/dist-types/RekognitionStreaming.d.ts +31 -7
  15. package/dist-types/RekognitionStreamingClient.d.ts +24 -3
  16. package/dist-types/commands/StartFaceLivenessSessionCommand.d.ts +109 -0
  17. package/dist-types/commands/index.d.ts +0 -1
  18. package/dist-types/models/models_0.d.ts +308 -37
  19. package/dist-types/protocols/Aws_restJson1.d.ts +0 -3
  20. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  21. package/dist-types/runtimeConfig.d.ts +1 -1
  22. package/dist-types/ts3.4/RekognitionStreaming.d.ts +0 -17
  23. package/dist-types/ts3.4/RekognitionStreamingClient.d.ts +2 -10
  24. package/dist-types/ts3.4/commands/index.d.ts +0 -1
  25. package/dist-types/ts3.4/models/models_0.d.ts +48 -25
  26. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -12
  27. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  28. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  29. package/package.json +36 -35
  30. package/dist-cjs/commands/StartStreamingLivenessSessionCommand.js +0 -50
  31. package/dist-es/commands/StartStreamingLivenessSessionCommand.js +0 -46
  32. package/dist-types/commands/StartStreamingLivenessSessionCommand.d.ts +0 -39
  33. package/dist-types/ts3.4/commands/StartStreamingLivenessSessionCommand.d.ts +0 -41
package/README.md CHANGED
@@ -9,6 +9,29 @@
9
9
 
10
10
  AWS SDK for JavaScript RekognitionStreaming Client for Node.js, Browser and React Native.
11
11
 
12
+ <p>A real-time video processing service based on Rekognition. This section documents the API
13
+ operations for Rekognition Face Liveness.</p>
14
+ <p>
15
+ <b>Amazon Rekognition Face Liveness</b>
16
+ </p>
17
+ <ul>
18
+ <li>
19
+ <p>
20
+ <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateFaceLivenessSession.html">CreateFaceLivenessSession</a>
21
+ </p>
22
+ </li>
23
+ <li>
24
+ <p>
25
+ <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetFaceLivenessSessionResults.html">GetFaceLivenessSessionResults</a>
26
+ </p>
27
+ </li>
28
+ <li>
29
+ <p>
30
+ <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_rekognitionstreaming_StartFaceLivenessSession.html">StartFaceLivenessSession</a>
31
+ </p>
32
+ </li>
33
+ </ul>
34
+
12
35
  ## Installing
13
36
 
14
37
  To install the this package, simply type add or install @aws-sdk/client-rekognitionstreaming
@@ -212,11 +235,3 @@ StartFaceLivenessSession
212
235
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognitionstreaming/classes/startfacelivenesssessioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognitionstreaming/interfaces/startfacelivenesssessioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognitionstreaming/interfaces/startfacelivenesssessioncommandoutput.html)
213
236
 
214
237
  </details>
215
- <details>
216
- <summary>
217
- StartStreamingLivenessSession
218
- </summary>
219
-
220
- [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognitionstreaming/classes/startstreaminglivenesssessioncommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognitionstreaming/interfaces/startstreaminglivenesssessioncommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-rekognitionstreaming/interfaces/startstreaminglivenesssessioncommandoutput.html)
221
-
222
- </details>
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RekognitionStreaming = void 0;
4
4
  const StartFaceLivenessSessionCommand_1 = require("./commands/StartFaceLivenessSessionCommand");
5
- const StartStreamingLivenessSessionCommand_1 = require("./commands/StartStreamingLivenessSessionCommand");
6
5
  const RekognitionStreamingClient_1 = require("./RekognitionStreamingClient");
7
6
  class RekognitionStreaming extends RekognitionStreamingClient_1.RekognitionStreamingClient {
8
7
  startFaceLivenessSession(args, optionsOrCb, cb) {
@@ -19,19 +18,5 @@ class RekognitionStreaming extends RekognitionStreamingClient_1.RekognitionStrea
19
18
  return this.send(command, optionsOrCb);
20
19
  }
21
20
  }
22
- startStreamingLivenessSession(args, optionsOrCb, cb) {
23
- const command = new StartStreamingLivenessSessionCommand_1.StartStreamingLivenessSessionCommand(args);
24
- if (typeof optionsOrCb === "function") {
25
- this.send(command, optionsOrCb);
26
- }
27
- else if (typeof cb === "function") {
28
- if (typeof optionsOrCb !== "object")
29
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
30
- this.send(command, optionsOrCb || {}, cb);
31
- }
32
- else {
33
- return this.send(command, optionsOrCb);
34
- }
35
- }
36
21
  }
37
22
  exports.RekognitionStreaming = RekognitionStreaming;
@@ -10,6 +10,7 @@ const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
10
10
  const middleware_logger_1 = require("@aws-sdk/middleware-logger");
11
11
  const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
12
12
  const middleware_retry_1 = require("@aws-sdk/middleware-retry");
13
+ const middleware_sdk_rekognitionstreaming_1 = require("@aws-sdk/middleware-sdk-rekognitionstreaming");
13
14
  const middleware_signing_1 = require("@aws-sdk/middleware-signing");
14
15
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
15
16
  const middleware_websocket_1 = require("@aws-sdk/middleware-websocket");
@@ -37,6 +38,7 @@ class RekognitionStreamingClient extends smithy_client_1.Client {
37
38
  this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
38
39
  this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
39
40
  this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
41
+ this.middlewareStack.use((0, middleware_sdk_rekognitionstreaming_1.getRekognitionStreamingPlugin)(this.config));
40
42
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
41
43
  }
42
44
  destroy() {
@@ -2,4 +2,3 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./StartFaceLivenessSessionCommand"), exports);
5
- tslib_1.__exportStar(require("./StartStreamingLivenessSessionCommand"), 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 p = "required", q = "fn", r = "argv", s = "ref";
5
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
6
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], 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: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, 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: [k], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://rekognitionstreaming.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
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://streaming-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://streaming-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://streaming-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://streaming-rekognition.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
7
7
  exports.ruleSet = _data;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartStreamingLivenessSessionResponseFilterSensitiveLog = exports.StartStreamingLivenessSessionRequestFilterSensitiveLog = exports.StartFaceLivenessSessionResponseFilterSensitiveLog = exports.StartFaceLivenessSessionRequestFilterSensitiveLog = exports.LivenessResponseStreamFilterSensitiveLog = exports.LivenessRequestStreamFilterSensitiveLog = exports.SessionNotFoundException = exports.LivenessResponseStream = exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ServerChallenge = exports.LivenessRequestStream = exports.InternalServerException = exports.LightChallengeType = exports.ClientChallenge = exports.AccessDeniedException = void 0;
3
+ exports.StartFaceLivenessSessionResponseFilterSensitiveLog = exports.StartFaceLivenessSessionRequestFilterSensitiveLog = exports.LivenessResponseStreamFilterSensitiveLog = exports.LivenessRequestStreamFilterSensitiveLog = exports.SessionNotFoundException = exports.LivenessResponseStream = exports.ValidationException = exports.ThrottlingException = exports.ServiceUnavailableException = exports.ServiceQuotaExceededException = exports.ServerChallenge = exports.LivenessRequestStream = exports.InternalServerException = exports.LightChallengeType = exports.ClientChallenge = exports.AccessDeniedException = void 0;
4
4
  const RekognitionStreamingServiceException_1 = require("./RekognitionStreamingServiceException");
5
5
  class AccessDeniedException extends RekognitionStreamingServiceException_1.RekognitionStreamingServiceException {
6
6
  constructor(opts) {
@@ -27,7 +27,6 @@ var ClientChallenge;
27
27
  })(ClientChallenge = exports.ClientChallenge || (exports.ClientChallenge = {}));
28
28
  exports.LightChallengeType = {
29
29
  SEQUENTIAL: "SEQUENTIAL",
30
- SIMULTANEOUS: "SIMULTANEOUS",
31
30
  };
32
31
  class InternalServerException extends RekognitionStreamingServiceException_1.RekognitionStreamingServiceException {
33
32
  constructor(opts) {
@@ -77,6 +76,21 @@ class ServiceQuotaExceededException extends RekognitionStreamingServiceException
77
76
  }
78
77
  }
79
78
  exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
79
+ class ServiceUnavailableException extends RekognitionStreamingServiceException_1.RekognitionStreamingServiceException {
80
+ constructor(opts) {
81
+ super({
82
+ name: "ServiceUnavailableException",
83
+ $fault: "server",
84
+ ...opts,
85
+ });
86
+ this.name = "ServiceUnavailableException";
87
+ this.$fault = "server";
88
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
89
+ this.Message = opts.Message;
90
+ this.Code = opts.Code;
91
+ }
92
+ }
93
+ exports.ServiceUnavailableException = ServiceUnavailableException;
80
94
  class ThrottlingException extends RekognitionStreamingServiceException_1.RekognitionStreamingServiceException {
81
95
  constructor(opts) {
82
96
  super({
@@ -122,6 +136,8 @@ var LivenessResponseStream;
122
136
  return visitor.ThrottlingException(value.ThrottlingException);
123
137
  if (value.ServiceQuotaExceededException !== undefined)
124
138
  return visitor.ServiceQuotaExceededException(value.ServiceQuotaExceededException);
139
+ if (value.ServiceUnavailableException !== undefined)
140
+ return visitor.ServiceUnavailableException(value.ServiceUnavailableException);
125
141
  return visitor._(value.$unknown[0], value.$unknown[1]);
126
142
  };
127
143
  })(LivenessResponseStream = exports.LivenessResponseStream || (exports.LivenessResponseStream = {}));
@@ -162,6 +178,8 @@ const LivenessResponseStreamFilterSensitiveLog = (obj) => {
162
178
  return { ThrottlingException: obj.ThrottlingException };
163
179
  if (obj.ServiceQuotaExceededException !== undefined)
164
180
  return { ServiceQuotaExceededException: obj.ServiceQuotaExceededException };
181
+ if (obj.ServiceUnavailableException !== undefined)
182
+ return { ServiceUnavailableException: obj.ServiceUnavailableException };
165
183
  if (obj.$unknown !== undefined)
166
184
  return { [obj.$unknown[0]]: "UNKNOWN" };
167
185
  };
@@ -176,13 +194,3 @@ const StartFaceLivenessSessionResponseFilterSensitiveLog = (obj) => ({
176
194
  ...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
177
195
  });
178
196
  exports.StartFaceLivenessSessionResponseFilterSensitiveLog = StartFaceLivenessSessionResponseFilterSensitiveLog;
179
- const StartStreamingLivenessSessionRequestFilterSensitiveLog = (obj) => ({
180
- ...obj,
181
- ...(obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }),
182
- });
183
- exports.StartStreamingLivenessSessionRequestFilterSensitiveLog = StartStreamingLivenessSessionRequestFilterSensitiveLog;
184
- const StartStreamingLivenessSessionResponseFilterSensitiveLog = (obj) => ({
185
- ...obj,
186
- ...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
187
- });
188
- exports.StartStreamingLivenessSessionResponseFilterSensitiveLog = StartStreamingLivenessSessionResponseFilterSensitiveLog;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deserializeAws_restJson1StartStreamingLivenessSessionCommand = exports.deserializeAws_restJson1StartFaceLivenessSessionCommand = exports.serializeAws_restJson1StartStreamingLivenessSessionCommand = exports.serializeAws_restJson1StartFaceLivenessSessionCommand = void 0;
3
+ exports.deserializeAws_restJson1StartFaceLivenessSessionCommand = exports.serializeAws_restJson1StartFaceLivenessSessionCommand = 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 models_0_1 = require("../models/models_0");
@@ -9,7 +9,9 @@ const serializeAws_restJson1StartFaceLivenessSessionCommand = async (input, cont
9
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
10
  const headers = map({}, isSerializableHeaderValue, {
11
11
  "x-amz-rekognition-streaming-liveness-session-id": input.SessionId,
12
- "x-amz-rekognition-streaming-liveness-client-sdk-version": input.ClientSDKVersion,
12
+ "x-amz-rekognition-streaming-liveness-video-width": input.VideoWidth,
13
+ "x-amz-rekognition-streaming-liveness-video-height": input.VideoHeight,
14
+ "x-amz-rekognition-streaming-liveness-challenge-versions": input.ChallengeVersions,
13
15
  });
14
16
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-face-liveness-session";
15
17
  let body;
@@ -27,28 +29,6 @@ const serializeAws_restJson1StartFaceLivenessSessionCommand = async (input, cont
27
29
  });
28
30
  };
29
31
  exports.serializeAws_restJson1StartFaceLivenessSessionCommand = serializeAws_restJson1StartFaceLivenessSessionCommand;
30
- const serializeAws_restJson1StartStreamingLivenessSessionCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
32
- const headers = map({}, isSerializableHeaderValue, {
33
- "x-amz-rekognition-streaming-liveness-session-id": input.SessionId,
34
- "x-amz-rekognition-streaming-liveness-client-sdk-version": input.ClientSDKVersion,
35
- });
36
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-streaming-liveness-session";
37
- let body;
38
- if (input.LivenessRequestStream !== undefined) {
39
- body = serializeAws_restJson1LivenessRequestStream(input.LivenessRequestStream, context);
40
- }
41
- return new protocol_http_1.HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
50
- };
51
- exports.serializeAws_restJson1StartStreamingLivenessSessionCommand = serializeAws_restJson1StartStreamingLivenessSessionCommand;
52
32
  const deserializeAws_restJson1StartFaceLivenessSessionCommand = async (output, context) => {
53
33
  if (output.statusCode !== 200 && output.statusCode >= 300) {
54
34
  return deserializeAws_restJson1StartFaceLivenessSessionCommandError(output, context);
@@ -78,54 +58,9 @@ const deserializeAws_restJson1StartFaceLivenessSessionCommandError = async (outp
78
58
  case "ServiceQuotaExceededException":
79
59
  case "com.amazonaws.rekognitionstreaming#ServiceQuotaExceededException":
80
60
  throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
81
- case "SessionNotFoundException":
82
- case "com.amazonaws.rekognitionstreaming#SessionNotFoundException":
83
- throw await deserializeAws_restJson1SessionNotFoundExceptionResponse(parsedOutput, context);
84
- case "ThrottlingException":
85
- case "com.amazonaws.rekognitionstreaming#ThrottlingException":
86
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
87
- case "ValidationException":
88
- case "com.amazonaws.rekognitionstreaming#ValidationException":
89
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
90
- default:
91
- const parsedBody = parsedOutput.body;
92
- (0, smithy_client_1.throwDefaultError)({
93
- output,
94
- parsedBody,
95
- exceptionCtor: RekognitionStreamingServiceException_1.RekognitionStreamingServiceException,
96
- errorCode,
97
- });
98
- }
99
- };
100
- const deserializeAws_restJson1StartStreamingLivenessSessionCommand = async (output, context) => {
101
- if (output.statusCode !== 200 && output.statusCode >= 300) {
102
- return deserializeAws_restJson1StartStreamingLivenessSessionCommandError(output, context);
103
- }
104
- const contents = map({
105
- $metadata: deserializeMetadata(output),
106
- SessionId: [, output.headers["x-amz-rekognition-streaming-liveness-session-id"]],
107
- });
108
- const data = output.body;
109
- contents.LivenessResponseStream = deserializeAws_restJson1LivenessResponseStream(data, context);
110
- return contents;
111
- };
112
- exports.deserializeAws_restJson1StartStreamingLivenessSessionCommand = deserializeAws_restJson1StartStreamingLivenessSessionCommand;
113
- const deserializeAws_restJson1StartStreamingLivenessSessionCommandError = async (output, context) => {
114
- const parsedOutput = {
115
- ...output,
116
- body: await parseErrorBody(output.body, context),
117
- };
118
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
119
- switch (errorCode) {
120
- case "AccessDeniedException":
121
- case "com.amazonaws.rekognitionstreaming#AccessDeniedException":
122
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
123
- case "InternalServerException":
124
- case "com.amazonaws.rekognitionstreaming#InternalServerException":
125
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
126
- case "ServiceQuotaExceededException":
127
- case "com.amazonaws.rekognitionstreaming#ServiceQuotaExceededException":
128
- throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
61
+ case "ServiceUnavailableException":
62
+ case "com.amazonaws.rekognitionstreaming#ServiceUnavailableException":
63
+ throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
129
64
  case "SessionNotFoundException":
130
65
  case "com.amazonaws.rekognitionstreaming#SessionNotFoundException":
131
66
  throw await deserializeAws_restJson1SessionNotFoundExceptionResponse(parsedOutput, context);
@@ -191,6 +126,21 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
191
126
  });
192
127
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
193
128
  };
129
+ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
130
+ const contents = map({});
131
+ const data = parsedOutput.body;
132
+ if (data.Code != null) {
133
+ contents.Code = (0, smithy_client_1.expectString)(data.Code);
134
+ }
135
+ if (data.Message != null) {
136
+ contents.Message = (0, smithy_client_1.expectString)(data.Message);
137
+ }
138
+ const exception = new models_0_1.ServiceUnavailableException({
139
+ $metadata: deserializeMetadata(parsedOutput),
140
+ ...contents,
141
+ });
142
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
143
+ };
194
144
  const deserializeAws_restJson1SessionNotFoundExceptionResponse = async (parsedOutput, context) => {
195
145
  const contents = map({});
196
146
  const data = parsedOutput.body;
@@ -298,6 +248,11 @@ const deserializeAws_restJson1LivenessResponseStream = (output, context) => {
298
248
  ServiceQuotaExceededException: await deserializeAws_restJson1ServiceQuotaExceededException_event(event["ServiceQuotaExceededException"], context),
299
249
  };
300
250
  }
251
+ if (event["ServiceUnavailableException"] != null) {
252
+ return {
253
+ ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
254
+ };
255
+ }
301
256
  return { $unknown: output };
302
257
  });
303
258
  };
@@ -327,6 +282,13 @@ const deserializeAws_restJson1ServiceQuotaExceededException_event = async (outpu
327
282
  };
328
283
  return deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
329
284
  };
285
+ const deserializeAws_restJson1ServiceUnavailableException_event = async (output, context) => {
286
+ const parsedOutput = {
287
+ ...output,
288
+ body: await parseBody(output.body, context),
289
+ };
290
+ return deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
291
+ };
330
292
  const deserializeAws_restJson1ThrottlingException_event = async (output, context) => {
331
293
  const parsedOutput = {
332
294
  ...output,
@@ -360,9 +322,6 @@ const serializeAws_restJson1ClientChallenge = (input, context) => {
360
322
  const serializeAws_restJson1ClientSessionInformationEvent = (input, context) => {
361
323
  return {
362
324
  ...(input.Challenge != null && { Challenge: serializeAws_restJson1ClientChallenge(input.Challenge, context) }),
363
- ...(input.DeviceInformation != null && {
364
- DeviceInformation: serializeAws_restJson1DeviceInformation(input.DeviceInformation, context),
365
- }),
366
325
  };
367
326
  };
368
327
  const serializeAws_restJson1ColorComponentList = (input, context) => {
@@ -384,13 +343,6 @@ const serializeAws_restJson1ColorDisplayed = (input, context) => {
384
343
  ...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }),
385
344
  };
386
345
  };
387
- const serializeAws_restJson1DeviceInformation = (input, context) => {
388
- return {
389
- ...(input.ClientSDKVersion != null && { ClientSDKVersion: input.ClientSDKVersion }),
390
- ...(input.VideoHeight != null && { VideoHeight: (0, smithy_client_1.serializeFloat)(input.VideoHeight) }),
391
- ...(input.VideoWidth != null && { VideoWidth: (0, smithy_client_1.serializeFloat)(input.VideoWidth) }),
392
- };
393
- };
394
346
  const serializeAws_restJson1FaceMovementAndLightClientChallenge = (input, context) => {
395
347
  return {
396
348
  ...(input.ChallengeId != null && { ChallengeId: input.ChallengeId }),
@@ -399,6 +351,7 @@ const serializeAws_restJson1FaceMovementAndLightClientChallenge = (input, contex
399
351
  }),
400
352
  ...(input.InitialFace != null && { InitialFace: serializeAws_restJson1InitialFace(input.InitialFace, context) }),
401
353
  ...(input.TargetFace != null && { TargetFace: serializeAws_restJson1TargetFace(input.TargetFace, context) }),
354
+ ...(input.VideoEndTimestamp != null && { VideoEndTimestamp: input.VideoEndTimestamp }),
402
355
  ...(input.VideoStartTimestamp != null && { VideoStartTimestamp: input.VideoStartTimestamp }),
403
356
  };
404
357
  };
@@ -432,6 +385,20 @@ const serializeAws_restJson1VideoEvent = (input, context) => {
432
385
  ...(input.VideoChunk != null && { VideoChunk: context.base64Encoder(input.VideoChunk) }),
433
386
  };
434
387
  };
388
+ const deserializeAws_restJson1ChallengeConfig = (output, context) => {
389
+ return {
390
+ BlazeFaceDetectionThreshold: (0, smithy_client_1.limitedParseFloat32)(output.BlazeFaceDetectionThreshold),
391
+ FaceDistanceThreshold: (0, smithy_client_1.limitedParseFloat32)(output.FaceDistanceThreshold),
392
+ FaceDistanceThresholdMax: (0, smithy_client_1.limitedParseFloat32)(output.FaceDistanceThresholdMax),
393
+ FaceDistanceThresholdMin: (0, smithy_client_1.limitedParseFloat32)(output.FaceDistanceThresholdMin),
394
+ FaceIouHeightThreshold: (0, smithy_client_1.limitedParseFloat32)(output.FaceIouHeightThreshold),
395
+ FaceIouWidthThreshold: (0, smithy_client_1.limitedParseFloat32)(output.FaceIouWidthThreshold),
396
+ OvalHeightWidthRatio: (0, smithy_client_1.limitedParseFloat32)(output.OvalHeightWidthRatio),
397
+ OvalIouHeightThreshold: (0, smithy_client_1.limitedParseFloat32)(output.OvalIouHeightThreshold),
398
+ OvalIouThreshold: (0, smithy_client_1.limitedParseFloat32)(output.OvalIouThreshold),
399
+ OvalIouWidthThreshold: (0, smithy_client_1.limitedParseFloat32)(output.OvalIouWidthThreshold),
400
+ };
401
+ };
435
402
  const deserializeAws_restJson1ColorComponentList = (output, context) => {
436
403
  const retVal = (output || [])
437
404
  .filter((e) => e != null)
@@ -470,12 +437,15 @@ const deserializeAws_restJson1DisconnectionEvent = (output, context) => {
470
437
  };
471
438
  const deserializeAws_restJson1FaceMovementAndLightServerChallenge = (output, context) => {
472
439
  return {
440
+ ChallengeConfig: output.ChallengeConfig != null
441
+ ? deserializeAws_restJson1ChallengeConfig(output.ChallengeConfig, context)
442
+ : undefined,
473
443
  ColorSequences: output.ColorSequences != null
474
444
  ? deserializeAws_restJson1ColorSequences(output.ColorSequences, context)
475
445
  : undefined,
476
446
  LightChallengeType: (0, smithy_client_1.expectString)(output.LightChallengeType),
477
- OvalScaleFactors: output.OvalScaleFactors != null
478
- ? deserializeAws_restJson1OvalScaleFactors(output.OvalScaleFactors, context)
447
+ OvalParameters: output.OvalParameters != null
448
+ ? deserializeAws_restJson1OvalParameters(output.OvalParameters, context)
479
449
  : undefined,
480
450
  };
481
451
  };
@@ -484,10 +454,11 @@ const deserializeAws_restJson1FreshnessColor = (output, context) => {
484
454
  RGB: output.RGB != null ? deserializeAws_restJson1ColorComponentList(output.RGB, context) : undefined,
485
455
  };
486
456
  };
487
- const deserializeAws_restJson1OvalScaleFactors = (output, context) => {
457
+ const deserializeAws_restJson1OvalParameters = (output, context) => {
488
458
  return {
489
459
  CenterX: (0, smithy_client_1.limitedParseFloat32)(output.CenterX),
490
460
  CenterY: (0, smithy_client_1.limitedParseFloat32)(output.CenterY),
461
+ Height: (0, smithy_client_1.limitedParseFloat32)(output.Height),
491
462
  Width: (0, smithy_client_1.limitedParseFloat32)(output.Width),
492
463
  };
493
464
  };
@@ -1,5 +1,4 @@
1
1
  import { StartFaceLivenessSessionCommand, } from "./commands/StartFaceLivenessSessionCommand";
2
- import { StartStreamingLivenessSessionCommand, } from "./commands/StartStreamingLivenessSessionCommand";
3
2
  import { RekognitionStreamingClient } from "./RekognitionStreamingClient";
4
3
  export class RekognitionStreaming extends RekognitionStreamingClient {
5
4
  startFaceLivenessSession(args, optionsOrCb, cb) {
@@ -16,18 +15,4 @@ export class RekognitionStreaming extends RekognitionStreamingClient {
16
15
  return this.send(command, optionsOrCb);
17
16
  }
18
17
  }
19
- startStreamingLivenessSession(args, optionsOrCb, cb) {
20
- const command = new StartStreamingLivenessSessionCommand(args);
21
- if (typeof optionsOrCb === "function") {
22
- this.send(command, optionsOrCb);
23
- }
24
- else if (typeof cb === "function") {
25
- if (typeof optionsOrCb !== "object")
26
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
27
- this.send(command, optionsOrCb || {}, cb);
28
- }
29
- else {
30
- return this.send(command, optionsOrCb);
31
- }
32
- }
33
18
  }
@@ -7,6 +7,7 @@ import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middlewa
7
7
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
8
8
  import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
9
9
  import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
10
+ import { getRekognitionStreamingPlugin } from "@aws-sdk/middleware-sdk-rekognitionstreaming";
10
11
  import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
11
12
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
12
13
  import { resolveWebSocketConfig } from "@aws-sdk/middleware-websocket";
@@ -34,6 +35,7 @@ export class RekognitionStreamingClient extends __Client {
34
35
  this.middlewareStack.use(getLoggerPlugin(this.config));
35
36
  this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
36
37
  this.middlewareStack.use(getAwsAuthPlugin(this.config));
38
+ this.middlewareStack.use(getRekognitionStreamingPlugin(this.config));
37
39
  this.middlewareStack.use(getUserAgentPlugin(this.config));
38
40
  }
39
41
  destroy() {
@@ -1,2 +1 @@
1
1
  export * from "./StartFaceLivenessSessionCommand";
2
- export * from "./StartStreamingLivenessSessionCommand";
@@ -1,4 +1,4 @@
1
- const p = "required", q = "fn", r = "argv", s = "ref";
2
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
3
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], 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: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, 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: [k], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://rekognitionstreaming.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
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://streaming-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://streaming-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://streaming-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://streaming-rekognition.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
4
4
  export const ruleSet = _data;
@@ -23,7 +23,6 @@ export var ClientChallenge;
23
23
  })(ClientChallenge || (ClientChallenge = {}));
24
24
  export const LightChallengeType = {
25
25
  SEQUENTIAL: "SEQUENTIAL",
26
- SIMULTANEOUS: "SIMULTANEOUS",
27
26
  };
28
27
  export class InternalServerException extends __BaseException {
29
28
  constructor(opts) {
@@ -71,6 +70,20 @@ export class ServiceQuotaExceededException extends __BaseException {
71
70
  this.Code = opts.Code;
72
71
  }
73
72
  }
73
+ export class ServiceUnavailableException extends __BaseException {
74
+ constructor(opts) {
75
+ super({
76
+ name: "ServiceUnavailableException",
77
+ $fault: "server",
78
+ ...opts,
79
+ });
80
+ this.name = "ServiceUnavailableException";
81
+ this.$fault = "server";
82
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
83
+ this.Message = opts.Message;
84
+ this.Code = opts.Code;
85
+ }
86
+ }
74
87
  export class ThrottlingException extends __BaseException {
75
88
  constructor(opts) {
76
89
  super({
@@ -114,6 +127,8 @@ export var LivenessResponseStream;
114
127
  return visitor.ThrottlingException(value.ThrottlingException);
115
128
  if (value.ServiceQuotaExceededException !== undefined)
116
129
  return visitor.ServiceQuotaExceededException(value.ServiceQuotaExceededException);
130
+ if (value.ServiceUnavailableException !== undefined)
131
+ return visitor.ServiceUnavailableException(value.ServiceUnavailableException);
117
132
  return visitor._(value.$unknown[0], value.$unknown[1]);
118
133
  };
119
134
  })(LivenessResponseStream || (LivenessResponseStream = {}));
@@ -152,6 +167,8 @@ export const LivenessResponseStreamFilterSensitiveLog = (obj) => {
152
167
  return { ThrottlingException: obj.ThrottlingException };
153
168
  if (obj.ServiceQuotaExceededException !== undefined)
154
169
  return { ServiceQuotaExceededException: obj.ServiceQuotaExceededException };
170
+ if (obj.ServiceUnavailableException !== undefined)
171
+ return { ServiceUnavailableException: obj.ServiceUnavailableException };
155
172
  if (obj.$unknown !== undefined)
156
173
  return { [obj.$unknown[0]]: "UNKNOWN" };
157
174
  };
@@ -163,11 +180,3 @@ export const StartFaceLivenessSessionResponseFilterSensitiveLog = (obj) => ({
163
180
  ...obj,
164
181
  ...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
165
182
  });
166
- export const StartStreamingLivenessSessionRequestFilterSensitiveLog = (obj) => ({
167
- ...obj,
168
- ...(obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }),
169
- });
170
- export const StartStreamingLivenessSessionResponseFilterSensitiveLog = (obj) => ({
171
- ...obj,
172
- ...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
173
- });