@aws-sdk/client-rekognitionstreaming 3.305.0 → 3.306.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 +0 -8
- package/dist-cjs/RekognitionStreaming.js +0 -15
- package/dist-cjs/commands/index.js +0 -1
- package/dist-cjs/endpoint/ruleset.js +3 -3
- package/dist-cjs/models/models_0.js +20 -12
- package/dist-cjs/protocols/Aws_restJson1.js +56 -85
- package/dist-es/RekognitionStreaming.js +0 -15
- package/dist-es/commands/index.js +0 -1
- package/dist-es/endpoint/ruleset.js +3 -3
- package/dist-es/models/models_0.js +18 -9
- package/dist-es/protocols/Aws_restJson1.js +56 -83
- package/dist-types/RekognitionStreaming.d.ts +0 -7
- package/dist-types/RekognitionStreamingClient.d.ts +2 -3
- package/dist-types/commands/index.d.ts +0 -1
- package/dist-types/models/models_0.d.ts +55 -37
- package/dist-types/protocols/Aws_restJson1.d.ts +0 -3
- package/dist-types/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/runtimeConfig.d.ts +1 -1
- package/dist-types/ts3.4/RekognitionStreaming.d.ts +0 -17
- package/dist-types/ts3.4/RekognitionStreamingClient.d.ts +2 -10
- package/dist-types/ts3.4/commands/index.d.ts +0 -1
- package/dist-types/ts3.4/models/models_0.d.ts +48 -25
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +0 -12
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
- package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
- package/package.json +35 -35
- package/dist-cjs/commands/StartStreamingLivenessSessionCommand.js +0 -50
- package/dist-es/commands/StartStreamingLivenessSessionCommand.js +0 -46
- package/dist-types/commands/StartStreamingLivenessSessionCommand.d.ts +0 -39
- package/dist-types/ts3.4/commands/StartStreamingLivenessSessionCommand.d.ts +0 -41
package/README.md
CHANGED
|
@@ -212,11 +212,3 @@ StartFaceLivenessSession
|
|
|
212
212
|
[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
213
|
|
|
214
214
|
</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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ruleSet = void 0;
|
|
4
|
-
const
|
|
5
|
-
const a = "
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region:
|
|
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://rekognitionstreaming-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://rekognitionstreaming-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://rekognitionstreaming.{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://rekognitionstreaming.{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.
|
|
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.
|
|
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-
|
|
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 "
|
|
82
|
-
case "com.amazonaws.rekognitionstreaming#
|
|
83
|
-
throw await
|
|
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
|
-
|
|
478
|
-
?
|
|
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
|
|
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
|
}
|
|
@@ -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://rekognitionstreaming-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://rekognitionstreaming-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://rekognitionstreaming.{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://rekognitionstreaming.{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
|
-
});
|