@aws-sdk/client-rekognitionstreaming 3.901.0 → 3.907.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/dist-cjs/index.js +808 -950
- package/package.json +6 -6
package/dist-cjs/index.js
CHANGED
|
@@ -1,976 +1,834 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
20
2
|
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
SessionNotFoundException: () => SessionNotFoundException,
|
|
41
|
-
StartFaceLivenessSessionCommand: () => StartFaceLivenessSessionCommand,
|
|
42
|
-
StartFaceLivenessSessionRequestFilterSensitiveLog: () => StartFaceLivenessSessionRequestFilterSensitiveLog,
|
|
43
|
-
StartFaceLivenessSessionResponseFilterSensitiveLog: () => StartFaceLivenessSessionResponseFilterSensitiveLog,
|
|
44
|
-
ThrottlingException: () => ThrottlingException,
|
|
45
|
-
ValidationException: () => ValidationException,
|
|
46
|
-
__Client: () => import_smithy_client.Client
|
|
47
|
-
});
|
|
48
|
-
module.exports = __toCommonJS(index_exports);
|
|
49
|
-
|
|
50
|
-
// src/RekognitionStreamingClient.ts
|
|
51
|
-
var import_middleware_eventstream = require("@aws-sdk/middleware-eventstream");
|
|
52
|
-
var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
|
|
53
|
-
var import_middleware_logger = require("@aws-sdk/middleware-logger");
|
|
54
|
-
var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
|
|
55
|
-
var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
|
|
56
|
-
var import_middleware_websocket = require("@aws-sdk/middleware-websocket");
|
|
57
|
-
var import_config_resolver = require("@smithy/config-resolver");
|
|
58
|
-
var import_core = require("@smithy/core");
|
|
59
|
-
var import_eventstream_serde_config_resolver = require("@smithy/eventstream-serde-config-resolver");
|
|
60
|
-
var import_middleware_content_length = require("@smithy/middleware-content-length");
|
|
61
|
-
var import_middleware_endpoint = require("@smithy/middleware-endpoint");
|
|
62
|
-
var import_middleware_retry = require("@smithy/middleware-retry");
|
|
63
|
-
|
|
64
|
-
var import_httpAuthSchemeProvider = require("./auth/httpAuthSchemeProvider");
|
|
3
|
+
var middlewareEventstream = require('@aws-sdk/middleware-eventstream');
|
|
4
|
+
var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
|
|
5
|
+
var middlewareLogger = require('@aws-sdk/middleware-logger');
|
|
6
|
+
var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
|
|
7
|
+
var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
|
|
8
|
+
var middlewareWebsocket = require('@aws-sdk/middleware-websocket');
|
|
9
|
+
var configResolver = require('@smithy/config-resolver');
|
|
10
|
+
var core = require('@smithy/core');
|
|
11
|
+
var eventstreamSerdeConfigResolver = require('@smithy/eventstream-serde-config-resolver');
|
|
12
|
+
var middlewareContentLength = require('@smithy/middleware-content-length');
|
|
13
|
+
var middlewareEndpoint = require('@smithy/middleware-endpoint');
|
|
14
|
+
var middlewareRetry = require('@smithy/middleware-retry');
|
|
15
|
+
var smithyClient = require('@smithy/smithy-client');
|
|
16
|
+
var httpAuthSchemeProvider = require('./auth/httpAuthSchemeProvider');
|
|
17
|
+
var runtimeConfig = require('./runtimeConfig');
|
|
18
|
+
var regionConfigResolver = require('@aws-sdk/region-config-resolver');
|
|
19
|
+
var protocolHttp = require('@smithy/protocol-http');
|
|
20
|
+
var middlewareSerde = require('@smithy/middleware-serde');
|
|
21
|
+
var core$1 = require('@aws-sdk/core');
|
|
65
22
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
|
|
23
|
+
const resolveClientEndpointParameters = (options) => {
|
|
24
|
+
return Object.assign(options, {
|
|
25
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
26
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
27
|
+
defaultSigningName: "rekognition",
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const commonParams = {
|
|
31
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
32
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
33
|
+
Region: { type: "builtInParams", name: "region" },
|
|
34
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
79
35
|
};
|
|
80
36
|
|
|
81
|
-
|
|
82
|
-
|
|
37
|
+
const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
38
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
39
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
40
|
+
let _credentials = runtimeConfig.credentials;
|
|
41
|
+
return {
|
|
42
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
43
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
44
|
+
if (index === -1) {
|
|
45
|
+
_httpAuthSchemes.push(httpAuthScheme);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
_httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
httpAuthSchemes() {
|
|
52
|
+
return _httpAuthSchemes;
|
|
53
|
+
},
|
|
54
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
55
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
56
|
+
},
|
|
57
|
+
httpAuthSchemeProvider() {
|
|
58
|
+
return _httpAuthSchemeProvider;
|
|
59
|
+
},
|
|
60
|
+
setCredentials(credentials) {
|
|
61
|
+
_credentials = credentials;
|
|
62
|
+
},
|
|
63
|
+
credentials() {
|
|
64
|
+
return _credentials;
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
const resolveHttpAuthRuntimeConfig = (config) => {
|
|
69
|
+
return {
|
|
70
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
71
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
72
|
+
credentials: config.credentials(),
|
|
73
|
+
};
|
|
74
|
+
};
|
|
83
75
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
77
|
+
const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
78
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
79
|
+
return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
80
|
+
};
|
|
88
81
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
82
|
+
class RekognitionStreamingClient extends smithyClient.Client {
|
|
83
|
+
config;
|
|
84
|
+
constructor(...[configuration]) {
|
|
85
|
+
const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {});
|
|
86
|
+
super(_config_0);
|
|
87
|
+
this.initConfig = _config_0;
|
|
88
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
89
|
+
const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
|
|
90
|
+
const _config_3 = middlewareRetry.resolveRetryConfig(_config_2);
|
|
91
|
+
const _config_4 = configResolver.resolveRegionConfig(_config_3);
|
|
92
|
+
const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
|
|
93
|
+
const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5);
|
|
94
|
+
const _config_7 = eventstreamSerdeConfigResolver.resolveEventStreamSerdeConfig(_config_6);
|
|
95
|
+
const _config_8 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_7);
|
|
96
|
+
const _config_9 = middlewareEventstream.resolveEventStreamConfig(_config_8);
|
|
97
|
+
const _config_10 = middlewareWebsocket.resolveWebSocketConfig(_config_9);
|
|
98
|
+
const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
|
|
99
|
+
this.config = _config_11;
|
|
100
|
+
this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
|
|
101
|
+
this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config));
|
|
102
|
+
this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config));
|
|
103
|
+
this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
|
|
104
|
+
this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
|
|
105
|
+
this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
|
|
106
|
+
this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
107
|
+
httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultRekognitionStreamingHttpAuthSchemeParametersProvider,
|
|
108
|
+
identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
|
|
109
|
+
"aws.auth#sigv4": config.credentials,
|
|
110
|
+
}),
|
|
111
|
+
}));
|
|
112
|
+
this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
|
|
117
113
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
httpAuthSchemes: config.httpAuthSchemes(),
|
|
123
|
-
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
124
|
-
credentials: config.credentials()
|
|
125
|
-
};
|
|
126
|
-
}, "resolveHttpAuthRuntimeConfig");
|
|
114
|
+
destroy() {
|
|
115
|
+
super.destroy();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
127
118
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
getHttpAuthExtensionConfiguration(runtimeConfig)
|
|
135
|
-
);
|
|
136
|
-
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
137
|
-
return Object.assign(
|
|
138
|
-
runtimeConfig,
|
|
139
|
-
(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
|
|
140
|
-
(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
|
|
141
|
-
(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
|
|
142
|
-
resolveHttpAuthRuntimeConfig(extensionConfiguration)
|
|
143
|
-
);
|
|
144
|
-
}, "resolveRuntimeExtensions");
|
|
119
|
+
class RekognitionStreamingServiceException extends smithyClient.ServiceException {
|
|
120
|
+
constructor(options) {
|
|
121
|
+
super(options);
|
|
122
|
+
Object.setPrototypeOf(this, RekognitionStreamingServiceException.prototype);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
145
125
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const _config_7 = (0, import_eventstream_serde_config_resolver.resolveEventStreamSerdeConfig)(_config_6);
|
|
166
|
-
const _config_8 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_7);
|
|
167
|
-
const _config_9 = (0, import_middleware_eventstream.resolveEventStreamConfig)(_config_8);
|
|
168
|
-
const _config_10 = (0, import_middleware_websocket.resolveWebSocketConfig)(_config_9);
|
|
169
|
-
const _config_11 = resolveRuntimeExtensions(_config_10, configuration?.extensions || []);
|
|
170
|
-
this.config = _config_11;
|
|
171
|
-
this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
|
|
172
|
-
this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
|
|
173
|
-
this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
|
|
174
|
-
this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
|
|
175
|
-
this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
|
|
176
|
-
this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
|
|
177
|
-
this.middlewareStack.use(
|
|
178
|
-
(0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
|
|
179
|
-
httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultRekognitionStreamingHttpAuthSchemeParametersProvider,
|
|
180
|
-
identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({
|
|
181
|
-
"aws.auth#sigv4": config.credentials
|
|
182
|
-
}), "identityProviderConfigProvider")
|
|
183
|
-
})
|
|
184
|
-
);
|
|
185
|
-
this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Destroy underlying resources, like sockets. It's usually not necessary to do this.
|
|
189
|
-
* However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
|
|
190
|
-
* Otherwise, sockets might stay open for quite a long time before the server terminates them.
|
|
191
|
-
*/
|
|
192
|
-
destroy() {
|
|
193
|
-
super.destroy();
|
|
194
|
-
}
|
|
126
|
+
class AccessDeniedException extends RekognitionStreamingServiceException {
|
|
127
|
+
name = "AccessDeniedException";
|
|
128
|
+
$fault = "client";
|
|
129
|
+
Message;
|
|
130
|
+
Code;
|
|
131
|
+
constructor(opts) {
|
|
132
|
+
super({
|
|
133
|
+
name: "AccessDeniedException",
|
|
134
|
+
$fault: "client",
|
|
135
|
+
...opts,
|
|
136
|
+
});
|
|
137
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
138
|
+
this.Message = opts.Message;
|
|
139
|
+
this.Code = opts.Code;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const ChallengeType = {
|
|
143
|
+
FACE_MOVEMENT_AND_LIGHT_CHALLENGE: "FaceMovementAndLightChallenge",
|
|
144
|
+
FACE_MOVEMENT_CHALLENGE: "FaceMovementChallenge",
|
|
195
145
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
var RekognitionStreamingServiceException = class _RekognitionStreamingServiceException extends import_smithy_client.ServiceException {
|
|
210
|
-
static {
|
|
211
|
-
__name(this, "RekognitionStreamingServiceException");
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* @internal
|
|
215
|
-
*/
|
|
216
|
-
constructor(options) {
|
|
217
|
-
super(options);
|
|
218
|
-
Object.setPrototypeOf(this, _RekognitionStreamingServiceException.prototype);
|
|
219
|
-
}
|
|
146
|
+
exports.ClientChallenge = void 0;
|
|
147
|
+
(function (ClientChallenge) {
|
|
148
|
+
ClientChallenge.visit = (value, visitor) => {
|
|
149
|
+
if (value.FaceMovementAndLightChallenge !== undefined)
|
|
150
|
+
return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);
|
|
151
|
+
if (value.FaceMovementChallenge !== undefined)
|
|
152
|
+
return visitor.FaceMovementChallenge(value.FaceMovementChallenge);
|
|
153
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
154
|
+
};
|
|
155
|
+
})(exports.ClientChallenge || (exports.ClientChallenge = {}));
|
|
156
|
+
const LightChallengeType = {
|
|
157
|
+
SEQUENTIAL: "SEQUENTIAL",
|
|
220
158
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
super({
|
|
236
|
-
name: "AccessDeniedException",
|
|
237
|
-
$fault: "client",
|
|
238
|
-
...opts
|
|
239
|
-
});
|
|
240
|
-
Object.setPrototypeOf(this, _AccessDeniedException.prototype);
|
|
241
|
-
this.Message = opts.Message;
|
|
242
|
-
this.Code = opts.Code;
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
var ChallengeType = {
|
|
246
|
-
FACE_MOVEMENT_AND_LIGHT_CHALLENGE: "FaceMovementAndLightChallenge",
|
|
247
|
-
FACE_MOVEMENT_CHALLENGE: "FaceMovementChallenge"
|
|
248
|
-
};
|
|
249
|
-
var ClientChallenge;
|
|
250
|
-
((ClientChallenge2) => {
|
|
251
|
-
ClientChallenge2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
252
|
-
if (value.FaceMovementAndLightChallenge !== void 0)
|
|
253
|
-
return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);
|
|
254
|
-
if (value.FaceMovementChallenge !== void 0) return visitor.FaceMovementChallenge(value.FaceMovementChallenge);
|
|
255
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
256
|
-
}, "visit");
|
|
257
|
-
})(ClientChallenge || (ClientChallenge = {}));
|
|
258
|
-
var LightChallengeType = {
|
|
259
|
-
SEQUENTIAL: "SEQUENTIAL"
|
|
260
|
-
};
|
|
261
|
-
var InternalServerException = class _InternalServerException extends RekognitionStreamingServiceException {
|
|
262
|
-
static {
|
|
263
|
-
__name(this, "InternalServerException");
|
|
264
|
-
}
|
|
265
|
-
name = "InternalServerException";
|
|
266
|
-
$fault = "server";
|
|
267
|
-
Message;
|
|
268
|
-
Code;
|
|
269
|
-
/**
|
|
270
|
-
* @internal
|
|
271
|
-
*/
|
|
272
|
-
constructor(opts) {
|
|
273
|
-
super({
|
|
274
|
-
name: "InternalServerException",
|
|
275
|
-
$fault: "server",
|
|
276
|
-
...opts
|
|
277
|
-
});
|
|
278
|
-
Object.setPrototypeOf(this, _InternalServerException.prototype);
|
|
279
|
-
this.Message = opts.Message;
|
|
280
|
-
this.Code = opts.Code;
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
var LivenessRequestStream;
|
|
284
|
-
((LivenessRequestStream2) => {
|
|
285
|
-
LivenessRequestStream2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
286
|
-
if (value.VideoEvent !== void 0) return visitor.VideoEvent(value.VideoEvent);
|
|
287
|
-
if (value.ClientSessionInformationEvent !== void 0)
|
|
288
|
-
return visitor.ClientSessionInformationEvent(value.ClientSessionInformationEvent);
|
|
289
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
290
|
-
}, "visit");
|
|
291
|
-
})(LivenessRequestStream || (LivenessRequestStream = {}));
|
|
292
|
-
var ServerChallenge;
|
|
293
|
-
((ServerChallenge3) => {
|
|
294
|
-
ServerChallenge3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
295
|
-
if (value.FaceMovementAndLightChallenge !== void 0)
|
|
296
|
-
return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);
|
|
297
|
-
if (value.FaceMovementChallenge !== void 0) return visitor.FaceMovementChallenge(value.FaceMovementChallenge);
|
|
298
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
299
|
-
}, "visit");
|
|
300
|
-
})(ServerChallenge || (ServerChallenge = {}));
|
|
301
|
-
var ServiceQuotaExceededException = class _ServiceQuotaExceededException extends RekognitionStreamingServiceException {
|
|
302
|
-
static {
|
|
303
|
-
__name(this, "ServiceQuotaExceededException");
|
|
304
|
-
}
|
|
305
|
-
name = "ServiceQuotaExceededException";
|
|
306
|
-
$fault = "client";
|
|
307
|
-
Message;
|
|
308
|
-
Code;
|
|
309
|
-
/**
|
|
310
|
-
* @internal
|
|
311
|
-
*/
|
|
312
|
-
constructor(opts) {
|
|
313
|
-
super({
|
|
314
|
-
name: "ServiceQuotaExceededException",
|
|
315
|
-
$fault: "client",
|
|
316
|
-
...opts
|
|
317
|
-
});
|
|
318
|
-
Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
|
|
319
|
-
this.Message = opts.Message;
|
|
320
|
-
this.Code = opts.Code;
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
var ServiceUnavailableException = class _ServiceUnavailableException extends RekognitionStreamingServiceException {
|
|
324
|
-
static {
|
|
325
|
-
__name(this, "ServiceUnavailableException");
|
|
326
|
-
}
|
|
327
|
-
name = "ServiceUnavailableException";
|
|
328
|
-
$fault = "server";
|
|
329
|
-
Message;
|
|
330
|
-
Code;
|
|
331
|
-
/**
|
|
332
|
-
* @internal
|
|
333
|
-
*/
|
|
334
|
-
constructor(opts) {
|
|
335
|
-
super({
|
|
336
|
-
name: "ServiceUnavailableException",
|
|
337
|
-
$fault: "server",
|
|
338
|
-
...opts
|
|
339
|
-
});
|
|
340
|
-
Object.setPrototypeOf(this, _ServiceUnavailableException.prototype);
|
|
341
|
-
this.Message = opts.Message;
|
|
342
|
-
this.Code = opts.Code;
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
var ThrottlingException = class _ThrottlingException extends RekognitionStreamingServiceException {
|
|
346
|
-
static {
|
|
347
|
-
__name(this, "ThrottlingException");
|
|
348
|
-
}
|
|
349
|
-
name = "ThrottlingException";
|
|
350
|
-
$fault = "client";
|
|
351
|
-
Message;
|
|
352
|
-
Code;
|
|
353
|
-
/**
|
|
354
|
-
* @internal
|
|
355
|
-
*/
|
|
356
|
-
constructor(opts) {
|
|
357
|
-
super({
|
|
358
|
-
name: "ThrottlingException",
|
|
359
|
-
$fault: "client",
|
|
360
|
-
...opts
|
|
361
|
-
});
|
|
362
|
-
Object.setPrototypeOf(this, _ThrottlingException.prototype);
|
|
363
|
-
this.Message = opts.Message;
|
|
364
|
-
this.Code = opts.Code;
|
|
365
|
-
}
|
|
366
|
-
};
|
|
367
|
-
var ValidationException = class _ValidationException extends RekognitionStreamingServiceException {
|
|
368
|
-
static {
|
|
369
|
-
__name(this, "ValidationException");
|
|
370
|
-
}
|
|
371
|
-
name = "ValidationException";
|
|
372
|
-
$fault = "client";
|
|
373
|
-
Message;
|
|
374
|
-
Code;
|
|
375
|
-
/**
|
|
376
|
-
* @internal
|
|
377
|
-
*/
|
|
378
|
-
constructor(opts) {
|
|
379
|
-
super({
|
|
380
|
-
name: "ValidationException",
|
|
381
|
-
$fault: "client",
|
|
382
|
-
...opts
|
|
383
|
-
});
|
|
384
|
-
Object.setPrototypeOf(this, _ValidationException.prototype);
|
|
385
|
-
this.Message = opts.Message;
|
|
386
|
-
this.Code = opts.Code;
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
var LivenessResponseStream;
|
|
390
|
-
((LivenessResponseStream3) => {
|
|
391
|
-
LivenessResponseStream3.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
392
|
-
if (value.ServerSessionInformationEvent !== void 0)
|
|
393
|
-
return visitor.ServerSessionInformationEvent(value.ServerSessionInformationEvent);
|
|
394
|
-
if (value.DisconnectionEvent !== void 0) return visitor.DisconnectionEvent(value.DisconnectionEvent);
|
|
395
|
-
if (value.ChallengeEvent !== void 0) return visitor.ChallengeEvent(value.ChallengeEvent);
|
|
396
|
-
if (value.ValidationException !== void 0) return visitor.ValidationException(value.ValidationException);
|
|
397
|
-
if (value.InternalServerException !== void 0)
|
|
398
|
-
return visitor.InternalServerException(value.InternalServerException);
|
|
399
|
-
if (value.ThrottlingException !== void 0) return visitor.ThrottlingException(value.ThrottlingException);
|
|
400
|
-
if (value.ServiceQuotaExceededException !== void 0)
|
|
401
|
-
return visitor.ServiceQuotaExceededException(value.ServiceQuotaExceededException);
|
|
402
|
-
if (value.ServiceUnavailableException !== void 0)
|
|
403
|
-
return visitor.ServiceUnavailableException(value.ServiceUnavailableException);
|
|
404
|
-
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
405
|
-
}, "visit");
|
|
406
|
-
})(LivenessResponseStream || (LivenessResponseStream = {}));
|
|
407
|
-
var SessionNotFoundException = class _SessionNotFoundException extends RekognitionStreamingServiceException {
|
|
408
|
-
static {
|
|
409
|
-
__name(this, "SessionNotFoundException");
|
|
410
|
-
}
|
|
411
|
-
name = "SessionNotFoundException";
|
|
412
|
-
$fault = "client";
|
|
413
|
-
Message;
|
|
414
|
-
Code;
|
|
415
|
-
/**
|
|
416
|
-
* @internal
|
|
417
|
-
*/
|
|
418
|
-
constructor(opts) {
|
|
419
|
-
super({
|
|
420
|
-
name: "SessionNotFoundException",
|
|
421
|
-
$fault: "client",
|
|
422
|
-
...opts
|
|
423
|
-
});
|
|
424
|
-
Object.setPrototypeOf(this, _SessionNotFoundException.prototype);
|
|
425
|
-
this.Message = opts.Message;
|
|
426
|
-
this.Code = opts.Code;
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
var LivenessRequestStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
430
|
-
if (obj.VideoEvent !== void 0) return { VideoEvent: obj.VideoEvent };
|
|
431
|
-
if (obj.ClientSessionInformationEvent !== void 0)
|
|
432
|
-
return { ClientSessionInformationEvent: obj.ClientSessionInformationEvent };
|
|
433
|
-
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
434
|
-
}, "LivenessRequestStreamFilterSensitiveLog");
|
|
435
|
-
var LivenessResponseStreamFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
|
|
436
|
-
if (obj.ServerSessionInformationEvent !== void 0)
|
|
437
|
-
return { ServerSessionInformationEvent: obj.ServerSessionInformationEvent };
|
|
438
|
-
if (obj.DisconnectionEvent !== void 0) return { DisconnectionEvent: obj.DisconnectionEvent };
|
|
439
|
-
if (obj.ChallengeEvent !== void 0) return { ChallengeEvent: obj.ChallengeEvent };
|
|
440
|
-
if (obj.ValidationException !== void 0) return { ValidationException: obj.ValidationException };
|
|
441
|
-
if (obj.InternalServerException !== void 0) return { InternalServerException: obj.InternalServerException };
|
|
442
|
-
if (obj.ThrottlingException !== void 0) return { ThrottlingException: obj.ThrottlingException };
|
|
443
|
-
if (obj.ServiceQuotaExceededException !== void 0)
|
|
444
|
-
return { ServiceQuotaExceededException: obj.ServiceQuotaExceededException };
|
|
445
|
-
if (obj.ServiceUnavailableException !== void 0)
|
|
446
|
-
return { ServiceUnavailableException: obj.ServiceUnavailableException };
|
|
447
|
-
if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
448
|
-
}, "LivenessResponseStreamFilterSensitiveLog");
|
|
449
|
-
var StartFaceLivenessSessionRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
450
|
-
...obj,
|
|
451
|
-
...obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }
|
|
452
|
-
}), "StartFaceLivenessSessionRequestFilterSensitiveLog");
|
|
453
|
-
var StartFaceLivenessSessionResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
|
|
454
|
-
...obj,
|
|
455
|
-
...obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }
|
|
456
|
-
}), "StartFaceLivenessSessionResponseFilterSensitiveLog");
|
|
457
|
-
|
|
458
|
-
// src/protocols/Aws_restJson1.ts
|
|
459
|
-
var import_core2 = require("@aws-sdk/core");
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
var se_StartFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
463
|
-
const b = (0, import_core.requestBuilder)(input, context);
|
|
464
|
-
const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {
|
|
465
|
-
"content-type": "application/json",
|
|
466
|
-
[_xarslsi]: input[_SI],
|
|
467
|
-
[_xarslvw]: input[_VW],
|
|
468
|
-
[_xarslvh]: input[_VH],
|
|
469
|
-
[_xarslcv]: input[_CV]
|
|
470
|
-
});
|
|
471
|
-
b.bp("/start-face-liveness-session");
|
|
472
|
-
let body;
|
|
473
|
-
if (input.LivenessRequestStream !== void 0) {
|
|
474
|
-
body = se_LivenessRequestStream(input.LivenessRequestStream, context);
|
|
475
|
-
}
|
|
476
|
-
b.m("POST").h(headers).b(body);
|
|
477
|
-
return b.build();
|
|
478
|
-
}, "se_StartFaceLivenessSessionCommand");
|
|
479
|
-
var de_StartFaceLivenessSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
480
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
481
|
-
return de_CommandError(output, context);
|
|
482
|
-
}
|
|
483
|
-
const contents = (0, import_smithy_client.map)({
|
|
484
|
-
$metadata: deserializeMetadata(output),
|
|
485
|
-
[_SI]: [, output.headers[_xarslsi]]
|
|
486
|
-
});
|
|
487
|
-
const data = output.body;
|
|
488
|
-
contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
|
|
489
|
-
return contents;
|
|
490
|
-
}, "de_StartFaceLivenessSessionCommand");
|
|
491
|
-
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
492
|
-
const parsedOutput = {
|
|
493
|
-
...output,
|
|
494
|
-
body: await (0, import_core2.parseJsonErrorBody)(output.body, context)
|
|
495
|
-
};
|
|
496
|
-
const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);
|
|
497
|
-
switch (errorCode) {
|
|
498
|
-
case "AccessDeniedException":
|
|
499
|
-
case "com.amazonaws.rekognitionstreaming#AccessDeniedException":
|
|
500
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
501
|
-
case "InternalServerException":
|
|
502
|
-
case "com.amazonaws.rekognitionstreaming#InternalServerException":
|
|
503
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
504
|
-
case "ServiceQuotaExceededException":
|
|
505
|
-
case "com.amazonaws.rekognitionstreaming#ServiceQuotaExceededException":
|
|
506
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
507
|
-
case "ServiceUnavailableException":
|
|
508
|
-
case "com.amazonaws.rekognitionstreaming#ServiceUnavailableException":
|
|
509
|
-
throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
510
|
-
case "SessionNotFoundException":
|
|
511
|
-
case "com.amazonaws.rekognitionstreaming#SessionNotFoundException":
|
|
512
|
-
throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
|
|
513
|
-
case "ThrottlingException":
|
|
514
|
-
case "com.amazonaws.rekognitionstreaming#ThrottlingException":
|
|
515
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
516
|
-
case "ValidationException":
|
|
517
|
-
case "com.amazonaws.rekognitionstreaming#ValidationException":
|
|
518
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
519
|
-
default:
|
|
520
|
-
const parsedBody = parsedOutput.body;
|
|
521
|
-
return throwDefaultError({
|
|
522
|
-
output,
|
|
523
|
-
parsedBody,
|
|
524
|
-
errorCode
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
}, "de_CommandError");
|
|
528
|
-
var throwDefaultError = (0, import_smithy_client.withBaseException)(RekognitionStreamingServiceException);
|
|
529
|
-
var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
530
|
-
const contents = (0, import_smithy_client.map)({});
|
|
531
|
-
const data = parsedOutput.body;
|
|
532
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
533
|
-
Code: import_smithy_client.expectString,
|
|
534
|
-
Message: import_smithy_client.expectString
|
|
535
|
-
});
|
|
536
|
-
Object.assign(contents, doc);
|
|
537
|
-
const exception = new AccessDeniedException({
|
|
538
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
539
|
-
...contents
|
|
540
|
-
});
|
|
541
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
542
|
-
}, "de_AccessDeniedExceptionRes");
|
|
543
|
-
var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
544
|
-
const contents = (0, import_smithy_client.map)({});
|
|
545
|
-
const data = parsedOutput.body;
|
|
546
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
547
|
-
Code: import_smithy_client.expectString,
|
|
548
|
-
Message: import_smithy_client.expectString
|
|
549
|
-
});
|
|
550
|
-
Object.assign(contents, doc);
|
|
551
|
-
const exception = new InternalServerException({
|
|
552
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
553
|
-
...contents
|
|
554
|
-
});
|
|
555
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
556
|
-
}, "de_InternalServerExceptionRes");
|
|
557
|
-
var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
558
|
-
const contents = (0, import_smithy_client.map)({});
|
|
559
|
-
const data = parsedOutput.body;
|
|
560
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
561
|
-
Code: import_smithy_client.expectString,
|
|
562
|
-
Message: import_smithy_client.expectString
|
|
563
|
-
});
|
|
564
|
-
Object.assign(contents, doc);
|
|
565
|
-
const exception = new ServiceQuotaExceededException({
|
|
566
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
567
|
-
...contents
|
|
568
|
-
});
|
|
569
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
570
|
-
}, "de_ServiceQuotaExceededExceptionRes");
|
|
571
|
-
var de_ServiceUnavailableExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
572
|
-
const contents = (0, import_smithy_client.map)({});
|
|
573
|
-
const data = parsedOutput.body;
|
|
574
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
575
|
-
Code: import_smithy_client.expectString,
|
|
576
|
-
Message: import_smithy_client.expectString
|
|
577
|
-
});
|
|
578
|
-
Object.assign(contents, doc);
|
|
579
|
-
const exception = new ServiceUnavailableException({
|
|
580
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
581
|
-
...contents
|
|
582
|
-
});
|
|
583
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
584
|
-
}, "de_ServiceUnavailableExceptionRes");
|
|
585
|
-
var de_SessionNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
586
|
-
const contents = (0, import_smithy_client.map)({});
|
|
587
|
-
const data = parsedOutput.body;
|
|
588
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
589
|
-
Code: import_smithy_client.expectString,
|
|
590
|
-
Message: import_smithy_client.expectString
|
|
591
|
-
});
|
|
592
|
-
Object.assign(contents, doc);
|
|
593
|
-
const exception = new SessionNotFoundException({
|
|
594
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
595
|
-
...contents
|
|
596
|
-
});
|
|
597
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
598
|
-
}, "de_SessionNotFoundExceptionRes");
|
|
599
|
-
var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
600
|
-
const contents = (0, import_smithy_client.map)({});
|
|
601
|
-
const data = parsedOutput.body;
|
|
602
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
603
|
-
Code: import_smithy_client.expectString,
|
|
604
|
-
Message: import_smithy_client.expectString
|
|
605
|
-
});
|
|
606
|
-
Object.assign(contents, doc);
|
|
607
|
-
const exception = new ThrottlingException({
|
|
608
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
609
|
-
...contents
|
|
610
|
-
});
|
|
611
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
612
|
-
}, "de_ThrottlingExceptionRes");
|
|
613
|
-
var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
614
|
-
const contents = (0, import_smithy_client.map)({});
|
|
615
|
-
const data = parsedOutput.body;
|
|
616
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
617
|
-
Code: import_smithy_client.expectString,
|
|
618
|
-
Message: import_smithy_client.expectString
|
|
619
|
-
});
|
|
620
|
-
Object.assign(contents, doc);
|
|
621
|
-
const exception = new ValidationException({
|
|
622
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
623
|
-
...contents
|
|
624
|
-
});
|
|
625
|
-
return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
|
|
626
|
-
}, "de_ValidationExceptionRes");
|
|
627
|
-
var se_LivenessRequestStream = /* @__PURE__ */ __name((input, context) => {
|
|
628
|
-
const eventMarshallingVisitor = /* @__PURE__ */ __name((event) => LivenessRequestStream.visit(event, {
|
|
629
|
-
VideoEvent: /* @__PURE__ */ __name((value) => se_VideoEvent_event(value, context), "VideoEvent"),
|
|
630
|
-
ClientSessionInformationEvent: /* @__PURE__ */ __name((value) => se_ClientSessionInformationEvent_event(value, context), "ClientSessionInformationEvent"),
|
|
631
|
-
_: /* @__PURE__ */ __name((value) => value, "_")
|
|
632
|
-
}), "eventMarshallingVisitor");
|
|
633
|
-
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
634
|
-
}, "se_LivenessRequestStream");
|
|
635
|
-
var se_ClientSessionInformationEvent_event = /* @__PURE__ */ __name((input, context) => {
|
|
636
|
-
const headers = {
|
|
637
|
-
":event-type": { type: "string", value: "ClientSessionInformationEvent" },
|
|
638
|
-
":message-type": { type: "string", value: "event" },
|
|
639
|
-
":content-type": { type: "string", value: "application/json" }
|
|
640
|
-
};
|
|
641
|
-
let body = new Uint8Array();
|
|
642
|
-
body = se_ClientSessionInformationEvent(input, context);
|
|
643
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
644
|
-
return { headers, body };
|
|
645
|
-
}, "se_ClientSessionInformationEvent_event");
|
|
646
|
-
var se_VideoEvent_event = /* @__PURE__ */ __name((input, context) => {
|
|
647
|
-
const headers = {
|
|
648
|
-
":event-type": { type: "string", value: "VideoEvent" },
|
|
649
|
-
":message-type": { type: "string", value: "event" },
|
|
650
|
-
":content-type": { type: "string", value: "application/json" }
|
|
651
|
-
};
|
|
652
|
-
let body = new Uint8Array();
|
|
653
|
-
body = se_VideoEvent(input, context);
|
|
654
|
-
body = context.utf8Decoder(JSON.stringify(body));
|
|
655
|
-
return { headers, body };
|
|
656
|
-
}, "se_VideoEvent_event");
|
|
657
|
-
var de_LivenessResponseStream = /* @__PURE__ */ __name((output, context) => {
|
|
658
|
-
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
659
|
-
if (event["ServerSessionInformationEvent"] != null) {
|
|
660
|
-
return {
|
|
661
|
-
ServerSessionInformationEvent: await de_ServerSessionInformationEvent_event(
|
|
662
|
-
event["ServerSessionInformationEvent"],
|
|
663
|
-
context
|
|
664
|
-
)
|
|
665
|
-
};
|
|
159
|
+
class InternalServerException extends RekognitionStreamingServiceException {
|
|
160
|
+
name = "InternalServerException";
|
|
161
|
+
$fault = "server";
|
|
162
|
+
Message;
|
|
163
|
+
Code;
|
|
164
|
+
constructor(opts) {
|
|
165
|
+
super({
|
|
166
|
+
name: "InternalServerException",
|
|
167
|
+
$fault: "server",
|
|
168
|
+
...opts,
|
|
169
|
+
});
|
|
170
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
171
|
+
this.Message = opts.Message;
|
|
172
|
+
this.Code = opts.Code;
|
|
666
173
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
174
|
+
}
|
|
175
|
+
exports.LivenessRequestStream = void 0;
|
|
176
|
+
(function (LivenessRequestStream) {
|
|
177
|
+
LivenessRequestStream.visit = (value, visitor) => {
|
|
178
|
+
if (value.VideoEvent !== undefined)
|
|
179
|
+
return visitor.VideoEvent(value.VideoEvent);
|
|
180
|
+
if (value.ClientSessionInformationEvent !== undefined)
|
|
181
|
+
return visitor.ClientSessionInformationEvent(value.ClientSessionInformationEvent);
|
|
182
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
183
|
+
};
|
|
184
|
+
})(exports.LivenessRequestStream || (exports.LivenessRequestStream = {}));
|
|
185
|
+
exports.ServerChallenge = void 0;
|
|
186
|
+
(function (ServerChallenge) {
|
|
187
|
+
ServerChallenge.visit = (value, visitor) => {
|
|
188
|
+
if (value.FaceMovementAndLightChallenge !== undefined)
|
|
189
|
+
return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);
|
|
190
|
+
if (value.FaceMovementChallenge !== undefined)
|
|
191
|
+
return visitor.FaceMovementChallenge(value.FaceMovementChallenge);
|
|
192
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
193
|
+
};
|
|
194
|
+
})(exports.ServerChallenge || (exports.ServerChallenge = {}));
|
|
195
|
+
class ServiceQuotaExceededException extends RekognitionStreamingServiceException {
|
|
196
|
+
name = "ServiceQuotaExceededException";
|
|
197
|
+
$fault = "client";
|
|
198
|
+
Message;
|
|
199
|
+
Code;
|
|
200
|
+
constructor(opts) {
|
|
201
|
+
super({
|
|
202
|
+
name: "ServiceQuotaExceededException",
|
|
203
|
+
$fault: "client",
|
|
204
|
+
...opts,
|
|
205
|
+
});
|
|
206
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
207
|
+
this.Message = opts.Message;
|
|
208
|
+
this.Code = opts.Code;
|
|
671
209
|
}
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
210
|
+
}
|
|
211
|
+
class ServiceUnavailableException extends RekognitionStreamingServiceException {
|
|
212
|
+
name = "ServiceUnavailableException";
|
|
213
|
+
$fault = "server";
|
|
214
|
+
Message;
|
|
215
|
+
Code;
|
|
216
|
+
constructor(opts) {
|
|
217
|
+
super({
|
|
218
|
+
name: "ServiceUnavailableException",
|
|
219
|
+
$fault: "server",
|
|
220
|
+
...opts,
|
|
221
|
+
});
|
|
222
|
+
Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
|
|
223
|
+
this.Message = opts.Message;
|
|
224
|
+
this.Code = opts.Code;
|
|
676
225
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
226
|
+
}
|
|
227
|
+
class ThrottlingException extends RekognitionStreamingServiceException {
|
|
228
|
+
name = "ThrottlingException";
|
|
229
|
+
$fault = "client";
|
|
230
|
+
Message;
|
|
231
|
+
Code;
|
|
232
|
+
constructor(opts) {
|
|
233
|
+
super({
|
|
234
|
+
name: "ThrottlingException",
|
|
235
|
+
$fault: "client",
|
|
236
|
+
...opts,
|
|
237
|
+
});
|
|
238
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
239
|
+
this.Message = opts.Message;
|
|
240
|
+
this.Code = opts.Code;
|
|
681
241
|
}
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
242
|
+
}
|
|
243
|
+
class ValidationException extends RekognitionStreamingServiceException {
|
|
244
|
+
name = "ValidationException";
|
|
245
|
+
$fault = "client";
|
|
246
|
+
Message;
|
|
247
|
+
Code;
|
|
248
|
+
constructor(opts) {
|
|
249
|
+
super({
|
|
250
|
+
name: "ValidationException",
|
|
251
|
+
$fault: "client",
|
|
252
|
+
...opts,
|
|
253
|
+
});
|
|
254
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
255
|
+
this.Message = opts.Message;
|
|
256
|
+
this.Code = opts.Code;
|
|
686
257
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
258
|
+
}
|
|
259
|
+
exports.LivenessResponseStream = void 0;
|
|
260
|
+
(function (LivenessResponseStream) {
|
|
261
|
+
LivenessResponseStream.visit = (value, visitor) => {
|
|
262
|
+
if (value.ServerSessionInformationEvent !== undefined)
|
|
263
|
+
return visitor.ServerSessionInformationEvent(value.ServerSessionInformationEvent);
|
|
264
|
+
if (value.DisconnectionEvent !== undefined)
|
|
265
|
+
return visitor.DisconnectionEvent(value.DisconnectionEvent);
|
|
266
|
+
if (value.ChallengeEvent !== undefined)
|
|
267
|
+
return visitor.ChallengeEvent(value.ChallengeEvent);
|
|
268
|
+
if (value.ValidationException !== undefined)
|
|
269
|
+
return visitor.ValidationException(value.ValidationException);
|
|
270
|
+
if (value.InternalServerException !== undefined)
|
|
271
|
+
return visitor.InternalServerException(value.InternalServerException);
|
|
272
|
+
if (value.ThrottlingException !== undefined)
|
|
273
|
+
return visitor.ThrottlingException(value.ThrottlingException);
|
|
274
|
+
if (value.ServiceQuotaExceededException !== undefined)
|
|
275
|
+
return visitor.ServiceQuotaExceededException(value.ServiceQuotaExceededException);
|
|
276
|
+
if (value.ServiceUnavailableException !== undefined)
|
|
277
|
+
return visitor.ServiceUnavailableException(value.ServiceUnavailableException);
|
|
278
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
279
|
+
};
|
|
280
|
+
})(exports.LivenessResponseStream || (exports.LivenessResponseStream = {}));
|
|
281
|
+
class SessionNotFoundException extends RekognitionStreamingServiceException {
|
|
282
|
+
name = "SessionNotFoundException";
|
|
283
|
+
$fault = "client";
|
|
284
|
+
Message;
|
|
285
|
+
Code;
|
|
286
|
+
constructor(opts) {
|
|
287
|
+
super({
|
|
288
|
+
name: "SessionNotFoundException",
|
|
289
|
+
$fault: "client",
|
|
290
|
+
...opts,
|
|
291
|
+
});
|
|
292
|
+
Object.setPrototypeOf(this, SessionNotFoundException.prototype);
|
|
293
|
+
this.Message = opts.Message;
|
|
294
|
+
this.Code = opts.Code;
|
|
691
295
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
296
|
+
}
|
|
297
|
+
const LivenessRequestStreamFilterSensitiveLog = (obj) => {
|
|
298
|
+
if (obj.VideoEvent !== undefined)
|
|
299
|
+
return { VideoEvent: obj.VideoEvent };
|
|
300
|
+
if (obj.ClientSessionInformationEvent !== undefined)
|
|
301
|
+
return { ClientSessionInformationEvent: obj.ClientSessionInformationEvent };
|
|
302
|
+
if (obj.$unknown !== undefined)
|
|
303
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
304
|
+
};
|
|
305
|
+
const LivenessResponseStreamFilterSensitiveLog = (obj) => {
|
|
306
|
+
if (obj.ServerSessionInformationEvent !== undefined)
|
|
307
|
+
return { ServerSessionInformationEvent: obj.ServerSessionInformationEvent };
|
|
308
|
+
if (obj.DisconnectionEvent !== undefined)
|
|
309
|
+
return { DisconnectionEvent: obj.DisconnectionEvent };
|
|
310
|
+
if (obj.ChallengeEvent !== undefined)
|
|
311
|
+
return { ChallengeEvent: obj.ChallengeEvent };
|
|
312
|
+
if (obj.ValidationException !== undefined)
|
|
313
|
+
return { ValidationException: obj.ValidationException };
|
|
314
|
+
if (obj.InternalServerException !== undefined)
|
|
315
|
+
return { InternalServerException: obj.InternalServerException };
|
|
316
|
+
if (obj.ThrottlingException !== undefined)
|
|
317
|
+
return { ThrottlingException: obj.ThrottlingException };
|
|
318
|
+
if (obj.ServiceQuotaExceededException !== undefined)
|
|
319
|
+
return { ServiceQuotaExceededException: obj.ServiceQuotaExceededException };
|
|
320
|
+
if (obj.ServiceUnavailableException !== undefined)
|
|
321
|
+
return { ServiceUnavailableException: obj.ServiceUnavailableException };
|
|
322
|
+
if (obj.$unknown !== undefined)
|
|
323
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
324
|
+
};
|
|
325
|
+
const StartFaceLivenessSessionRequestFilterSensitiveLog = (obj) => ({
|
|
326
|
+
...obj,
|
|
327
|
+
...(obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }),
|
|
328
|
+
});
|
|
329
|
+
const StartFaceLivenessSessionResponseFilterSensitiveLog = (obj) => ({
|
|
330
|
+
...obj,
|
|
331
|
+
...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
const se_StartFaceLivenessSessionCommand = async (input, context) => {
|
|
335
|
+
const b = core.requestBuilder(input, context);
|
|
336
|
+
const headers = smithyClient.map({}, smithyClient.isSerializableHeaderValue, {
|
|
337
|
+
"content-type": "application/json",
|
|
338
|
+
[_xarslsi]: input[_SI],
|
|
339
|
+
[_xarslvw]: input[_VW],
|
|
340
|
+
[_xarslvh]: input[_VH],
|
|
341
|
+
[_xarslcv]: input[_CV],
|
|
342
|
+
});
|
|
343
|
+
b.bp("/start-face-liveness-session");
|
|
344
|
+
let body;
|
|
345
|
+
if (input.LivenessRequestStream !== undefined) {
|
|
346
|
+
body = se_LivenessRequestStream(input.LivenessRequestStream, context);
|
|
699
347
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
)
|
|
706
|
-
};
|
|
348
|
+
b.m("POST").h(headers).b(body);
|
|
349
|
+
return b.build();
|
|
350
|
+
};
|
|
351
|
+
const de_StartFaceLivenessSessionCommand = async (output, context) => {
|
|
352
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
353
|
+
return de_CommandError(output, context);
|
|
707
354
|
}
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
Object.assign(contents, (0, import_smithy_client._json)(data));
|
|
721
|
-
return contents;
|
|
722
|
-
}, "de_DisconnectionEvent_event");
|
|
723
|
-
var de_InternalServerException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
724
|
-
const parsedOutput = {
|
|
725
|
-
...output,
|
|
726
|
-
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
727
|
-
};
|
|
728
|
-
return de_InternalServerExceptionRes(parsedOutput, context);
|
|
729
|
-
}, "de_InternalServerException_event");
|
|
730
|
-
var de_ServerSessionInformationEvent_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
731
|
-
const contents = {};
|
|
732
|
-
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
733
|
-
Object.assign(contents, de_ServerSessionInformationEvent(data, context));
|
|
734
|
-
return contents;
|
|
735
|
-
}, "de_ServerSessionInformationEvent_event");
|
|
736
|
-
var de_ServiceQuotaExceededException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
737
|
-
const parsedOutput = {
|
|
738
|
-
...output,
|
|
739
|
-
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
740
|
-
};
|
|
741
|
-
return de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
742
|
-
}, "de_ServiceQuotaExceededException_event");
|
|
743
|
-
var de_ServiceUnavailableException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
744
|
-
const parsedOutput = {
|
|
745
|
-
...output,
|
|
746
|
-
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
747
|
-
};
|
|
748
|
-
return de_ServiceUnavailableExceptionRes(parsedOutput, context);
|
|
749
|
-
}, "de_ServiceUnavailableException_event");
|
|
750
|
-
var de_ThrottlingException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
751
|
-
const parsedOutput = {
|
|
752
|
-
...output,
|
|
753
|
-
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
754
|
-
};
|
|
755
|
-
return de_ThrottlingExceptionRes(parsedOutput, context);
|
|
756
|
-
}, "de_ThrottlingException_event");
|
|
757
|
-
var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context) => {
|
|
758
|
-
const parsedOutput = {
|
|
759
|
-
...output,
|
|
760
|
-
body: await (0, import_core2.parseJsonBody)(output.body, context)
|
|
761
|
-
};
|
|
762
|
-
return de_ValidationExceptionRes(parsedOutput, context);
|
|
763
|
-
}, "de_ValidationException_event");
|
|
764
|
-
var se_BoundingBox = /* @__PURE__ */ __name((input, context) => {
|
|
765
|
-
return (0, import_smithy_client.take)(input, {
|
|
766
|
-
Height: import_smithy_client.serializeFloat,
|
|
767
|
-
Left: import_smithy_client.serializeFloat,
|
|
768
|
-
Top: import_smithy_client.serializeFloat,
|
|
769
|
-
Width: import_smithy_client.serializeFloat
|
|
770
|
-
});
|
|
771
|
-
}, "se_BoundingBox");
|
|
772
|
-
var se_ClientChallenge = /* @__PURE__ */ __name((input, context) => {
|
|
773
|
-
return ClientChallenge.visit(input, {
|
|
774
|
-
FaceMovementAndLightChallenge: /* @__PURE__ */ __name((value) => ({
|
|
775
|
-
FaceMovementAndLightChallenge: se_FaceMovementAndLightClientChallenge(value, context)
|
|
776
|
-
}), "FaceMovementAndLightChallenge"),
|
|
777
|
-
FaceMovementChallenge: /* @__PURE__ */ __name((value) => ({ FaceMovementChallenge: se_FaceMovementClientChallenge(value, context) }), "FaceMovementChallenge"),
|
|
778
|
-
_: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")
|
|
779
|
-
});
|
|
780
|
-
}, "se_ClientChallenge");
|
|
781
|
-
var se_ClientSessionInformationEvent = /* @__PURE__ */ __name((input, context) => {
|
|
782
|
-
return (0, import_smithy_client.take)(input, {
|
|
783
|
-
Challenge: /* @__PURE__ */ __name((_) => se_ClientChallenge(_, context), "Challenge")
|
|
784
|
-
});
|
|
785
|
-
}, "se_ClientSessionInformationEvent");
|
|
786
|
-
var se_FaceMovementAndLightClientChallenge = /* @__PURE__ */ __name((input, context) => {
|
|
787
|
-
return (0, import_smithy_client.take)(input, {
|
|
788
|
-
ChallengeId: [],
|
|
789
|
-
ColorDisplayed: import_smithy_client._json,
|
|
790
|
-
InitialFace: /* @__PURE__ */ __name((_) => se_InitialFace(_, context), "InitialFace"),
|
|
791
|
-
TargetFace: /* @__PURE__ */ __name((_) => se_TargetFace(_, context), "TargetFace"),
|
|
792
|
-
VideoEndTimestamp: [],
|
|
793
|
-
VideoStartTimestamp: []
|
|
794
|
-
});
|
|
795
|
-
}, "se_FaceMovementAndLightClientChallenge");
|
|
796
|
-
var se_FaceMovementClientChallenge = /* @__PURE__ */ __name((input, context) => {
|
|
797
|
-
return (0, import_smithy_client.take)(input, {
|
|
798
|
-
ChallengeId: [],
|
|
799
|
-
InitialFace: /* @__PURE__ */ __name((_) => se_InitialFace(_, context), "InitialFace"),
|
|
800
|
-
TargetFace: /* @__PURE__ */ __name((_) => se_TargetFace(_, context), "TargetFace"),
|
|
801
|
-
VideoEndTimestamp: [],
|
|
802
|
-
VideoStartTimestamp: []
|
|
803
|
-
});
|
|
804
|
-
}, "se_FaceMovementClientChallenge");
|
|
805
|
-
var se_InitialFace = /* @__PURE__ */ __name((input, context) => {
|
|
806
|
-
return (0, import_smithy_client.take)(input, {
|
|
807
|
-
BoundingBox: /* @__PURE__ */ __name((_) => se_BoundingBox(_, context), "BoundingBox"),
|
|
808
|
-
InitialFaceDetectedTimestamp: []
|
|
809
|
-
});
|
|
810
|
-
}, "se_InitialFace");
|
|
811
|
-
var se_TargetFace = /* @__PURE__ */ __name((input, context) => {
|
|
812
|
-
return (0, import_smithy_client.take)(input, {
|
|
813
|
-
BoundingBox: /* @__PURE__ */ __name((_) => se_BoundingBox(_, context), "BoundingBox"),
|
|
814
|
-
FaceDetectedInTargetPositionEndTimestamp: [],
|
|
815
|
-
FaceDetectedInTargetPositionStartTimestamp: []
|
|
816
|
-
});
|
|
817
|
-
}, "se_TargetFace");
|
|
818
|
-
var se_VideoEvent = /* @__PURE__ */ __name((input, context) => {
|
|
819
|
-
return (0, import_smithy_client.take)(input, {
|
|
820
|
-
TimestampMillis: [],
|
|
821
|
-
VideoChunk: context.base64Encoder
|
|
822
|
-
});
|
|
823
|
-
}, "se_VideoEvent");
|
|
824
|
-
var de_ChallengeConfig = /* @__PURE__ */ __name((output, context) => {
|
|
825
|
-
return (0, import_smithy_client.take)(output, {
|
|
826
|
-
BlazeFaceDetectionThreshold: import_smithy_client.limitedParseFloat32,
|
|
827
|
-
FaceDistanceThreshold: import_smithy_client.limitedParseFloat32,
|
|
828
|
-
FaceDistanceThresholdMax: import_smithy_client.limitedParseFloat32,
|
|
829
|
-
FaceDistanceThresholdMin: import_smithy_client.limitedParseFloat32,
|
|
830
|
-
FaceIouHeightThreshold: import_smithy_client.limitedParseFloat32,
|
|
831
|
-
FaceIouWidthThreshold: import_smithy_client.limitedParseFloat32,
|
|
832
|
-
OvalFitTimeout: import_smithy_client.expectInt32,
|
|
833
|
-
OvalHeightWidthRatio: import_smithy_client.limitedParseFloat32,
|
|
834
|
-
OvalIouHeightThreshold: import_smithy_client.limitedParseFloat32,
|
|
835
|
-
OvalIouThreshold: import_smithy_client.limitedParseFloat32,
|
|
836
|
-
OvalIouWidthThreshold: import_smithy_client.limitedParseFloat32
|
|
837
|
-
});
|
|
838
|
-
}, "de_ChallengeConfig");
|
|
839
|
-
var de_ColorSequence = /* @__PURE__ */ __name((output, context) => {
|
|
840
|
-
return (0, import_smithy_client.take)(output, {
|
|
841
|
-
DownscrollDuration: import_smithy_client.limitedParseFloat32,
|
|
842
|
-
FlatDisplayDuration: import_smithy_client.limitedParseFloat32,
|
|
843
|
-
FreshnessColor: import_smithy_client._json
|
|
844
|
-
});
|
|
845
|
-
}, "de_ColorSequence");
|
|
846
|
-
var de_ColorSequences = /* @__PURE__ */ __name((output, context) => {
|
|
847
|
-
const retVal = (output || []).filter((e) => e != null).map((entry) => {
|
|
848
|
-
return de_ColorSequence(entry, context);
|
|
849
|
-
});
|
|
850
|
-
return retVal;
|
|
851
|
-
}, "de_ColorSequences");
|
|
852
|
-
var de_FaceMovementAndLightServerChallenge = /* @__PURE__ */ __name((output, context) => {
|
|
853
|
-
return (0, import_smithy_client.take)(output, {
|
|
854
|
-
ChallengeConfig: /* @__PURE__ */ __name((_) => de_ChallengeConfig(_, context), "ChallengeConfig"),
|
|
855
|
-
ColorSequences: /* @__PURE__ */ __name((_) => de_ColorSequences(_, context), "ColorSequences"),
|
|
856
|
-
LightChallengeType: import_smithy_client.expectString,
|
|
857
|
-
OvalParameters: /* @__PURE__ */ __name((_) => de_OvalParameters(_, context), "OvalParameters")
|
|
858
|
-
});
|
|
859
|
-
}, "de_FaceMovementAndLightServerChallenge");
|
|
860
|
-
var de_FaceMovementServerChallenge = /* @__PURE__ */ __name((output, context) => {
|
|
861
|
-
return (0, import_smithy_client.take)(output, {
|
|
862
|
-
ChallengeConfig: /* @__PURE__ */ __name((_) => de_ChallengeConfig(_, context), "ChallengeConfig"),
|
|
863
|
-
OvalParameters: /* @__PURE__ */ __name((_) => de_OvalParameters(_, context), "OvalParameters")
|
|
864
|
-
});
|
|
865
|
-
}, "de_FaceMovementServerChallenge");
|
|
866
|
-
var de_OvalParameters = /* @__PURE__ */ __name((output, context) => {
|
|
867
|
-
return (0, import_smithy_client.take)(output, {
|
|
868
|
-
CenterX: import_smithy_client.limitedParseFloat32,
|
|
869
|
-
CenterY: import_smithy_client.limitedParseFloat32,
|
|
870
|
-
Height: import_smithy_client.limitedParseFloat32,
|
|
871
|
-
Width: import_smithy_client.limitedParseFloat32
|
|
872
|
-
});
|
|
873
|
-
}, "de_OvalParameters");
|
|
874
|
-
var de_ServerChallenge = /* @__PURE__ */ __name((output, context) => {
|
|
875
|
-
if (output.FaceMovementAndLightChallenge != null) {
|
|
876
|
-
return {
|
|
877
|
-
FaceMovementAndLightChallenge: de_FaceMovementAndLightServerChallenge(
|
|
878
|
-
output.FaceMovementAndLightChallenge,
|
|
879
|
-
context
|
|
880
|
-
)
|
|
355
|
+
const contents = smithyClient.map({
|
|
356
|
+
$metadata: deserializeMetadata(output),
|
|
357
|
+
[_SI]: [, output.headers[_xarslsi]],
|
|
358
|
+
});
|
|
359
|
+
const data = output.body;
|
|
360
|
+
contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
|
|
361
|
+
return contents;
|
|
362
|
+
};
|
|
363
|
+
const de_CommandError = async (output, context) => {
|
|
364
|
+
const parsedOutput = {
|
|
365
|
+
...output,
|
|
366
|
+
body: await core$1.parseJsonErrorBody(output.body, context),
|
|
881
367
|
};
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
368
|
+
const errorCode = core$1.loadRestJsonErrorCode(output, parsedOutput.body);
|
|
369
|
+
switch (errorCode) {
|
|
370
|
+
case "AccessDeniedException":
|
|
371
|
+
case "com.amazonaws.rekognitionstreaming#AccessDeniedException":
|
|
372
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput);
|
|
373
|
+
case "InternalServerException":
|
|
374
|
+
case "com.amazonaws.rekognitionstreaming#InternalServerException":
|
|
375
|
+
throw await de_InternalServerExceptionRes(parsedOutput);
|
|
376
|
+
case "ServiceQuotaExceededException":
|
|
377
|
+
case "com.amazonaws.rekognitionstreaming#ServiceQuotaExceededException":
|
|
378
|
+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput);
|
|
379
|
+
case "ServiceUnavailableException":
|
|
380
|
+
case "com.amazonaws.rekognitionstreaming#ServiceUnavailableException":
|
|
381
|
+
throw await de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
382
|
+
case "SessionNotFoundException":
|
|
383
|
+
case "com.amazonaws.rekognitionstreaming#SessionNotFoundException":
|
|
384
|
+
throw await de_SessionNotFoundExceptionRes(parsedOutput);
|
|
385
|
+
case "ThrottlingException":
|
|
386
|
+
case "com.amazonaws.rekognitionstreaming#ThrottlingException":
|
|
387
|
+
throw await de_ThrottlingExceptionRes(parsedOutput);
|
|
388
|
+
case "ValidationException":
|
|
389
|
+
case "com.amazonaws.rekognitionstreaming#ValidationException":
|
|
390
|
+
throw await de_ValidationExceptionRes(parsedOutput);
|
|
391
|
+
default:
|
|
392
|
+
const parsedBody = parsedOutput.body;
|
|
393
|
+
return throwDefaultError({
|
|
394
|
+
output,
|
|
395
|
+
parsedBody,
|
|
396
|
+
errorCode,
|
|
397
|
+
});
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
const throwDefaultError = smithyClient.withBaseException(RekognitionStreamingServiceException);
|
|
401
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
402
|
+
const contents = smithyClient.map({});
|
|
403
|
+
const data = parsedOutput.body;
|
|
404
|
+
const doc = smithyClient.take(data, {
|
|
405
|
+
Code: smithyClient.expectString,
|
|
406
|
+
Message: smithyClient.expectString,
|
|
407
|
+
});
|
|
408
|
+
Object.assign(contents, doc);
|
|
409
|
+
const exception = new AccessDeniedException({
|
|
410
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
411
|
+
...contents,
|
|
412
|
+
});
|
|
413
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
414
|
+
};
|
|
415
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
416
|
+
const contents = smithyClient.map({});
|
|
417
|
+
const data = parsedOutput.body;
|
|
418
|
+
const doc = smithyClient.take(data, {
|
|
419
|
+
Code: smithyClient.expectString,
|
|
420
|
+
Message: smithyClient.expectString,
|
|
421
|
+
});
|
|
422
|
+
Object.assign(contents, doc);
|
|
423
|
+
const exception = new InternalServerException({
|
|
424
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
425
|
+
...contents,
|
|
426
|
+
});
|
|
427
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
428
|
+
};
|
|
429
|
+
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
430
|
+
const contents = smithyClient.map({});
|
|
431
|
+
const data = parsedOutput.body;
|
|
432
|
+
const doc = smithyClient.take(data, {
|
|
433
|
+
Code: smithyClient.expectString,
|
|
434
|
+
Message: smithyClient.expectString,
|
|
435
|
+
});
|
|
436
|
+
Object.assign(contents, doc);
|
|
437
|
+
const exception = new ServiceQuotaExceededException({
|
|
438
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
439
|
+
...contents,
|
|
440
|
+
});
|
|
441
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
442
|
+
};
|
|
443
|
+
const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
444
|
+
const contents = smithyClient.map({});
|
|
445
|
+
const data = parsedOutput.body;
|
|
446
|
+
const doc = smithyClient.take(data, {
|
|
447
|
+
Code: smithyClient.expectString,
|
|
448
|
+
Message: smithyClient.expectString,
|
|
449
|
+
});
|
|
450
|
+
Object.assign(contents, doc);
|
|
451
|
+
const exception = new ServiceUnavailableException({
|
|
452
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
453
|
+
...contents,
|
|
454
|
+
});
|
|
455
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
456
|
+
};
|
|
457
|
+
const de_SessionNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
458
|
+
const contents = smithyClient.map({});
|
|
459
|
+
const data = parsedOutput.body;
|
|
460
|
+
const doc = smithyClient.take(data, {
|
|
461
|
+
Code: smithyClient.expectString,
|
|
462
|
+
Message: smithyClient.expectString,
|
|
463
|
+
});
|
|
464
|
+
Object.assign(contents, doc);
|
|
465
|
+
const exception = new SessionNotFoundException({
|
|
466
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
467
|
+
...contents,
|
|
468
|
+
});
|
|
469
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
470
|
+
};
|
|
471
|
+
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
472
|
+
const contents = smithyClient.map({});
|
|
473
|
+
const data = parsedOutput.body;
|
|
474
|
+
const doc = smithyClient.take(data, {
|
|
475
|
+
Code: smithyClient.expectString,
|
|
476
|
+
Message: smithyClient.expectString,
|
|
477
|
+
});
|
|
478
|
+
Object.assign(contents, doc);
|
|
479
|
+
const exception = new ThrottlingException({
|
|
480
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
481
|
+
...contents,
|
|
482
|
+
});
|
|
483
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
484
|
+
};
|
|
485
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
486
|
+
const contents = smithyClient.map({});
|
|
487
|
+
const data = parsedOutput.body;
|
|
488
|
+
const doc = smithyClient.take(data, {
|
|
489
|
+
Code: smithyClient.expectString,
|
|
490
|
+
Message: smithyClient.expectString,
|
|
491
|
+
});
|
|
492
|
+
Object.assign(contents, doc);
|
|
493
|
+
const exception = new ValidationException({
|
|
494
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
495
|
+
...contents,
|
|
496
|
+
});
|
|
497
|
+
return smithyClient.decorateServiceException(exception, parsedOutput.body);
|
|
498
|
+
};
|
|
499
|
+
const se_LivenessRequestStream = (input, context) => {
|
|
500
|
+
const eventMarshallingVisitor = (event) => exports.LivenessRequestStream.visit(event, {
|
|
501
|
+
VideoEvent: (value) => se_VideoEvent_event(value, context),
|
|
502
|
+
ClientSessionInformationEvent: (value) => se_ClientSessionInformationEvent_event(value, context),
|
|
503
|
+
_: (value) => value,
|
|
504
|
+
});
|
|
505
|
+
return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
|
|
506
|
+
};
|
|
507
|
+
const se_ClientSessionInformationEvent_event = (input, context) => {
|
|
508
|
+
const headers = {
|
|
509
|
+
":event-type": { type: "string", value: "ClientSessionInformationEvent" },
|
|
510
|
+
":message-type": { type: "string", value: "event" },
|
|
511
|
+
":content-type": { type: "string", value: "application/json" },
|
|
886
512
|
};
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
return (0, import_smithy_client.take)(output, {
|
|
892
|
-
SessionInformation: /* @__PURE__ */ __name((_) => de_SessionInformation(_, context), "SessionInformation")
|
|
893
|
-
});
|
|
894
|
-
}, "de_ServerSessionInformationEvent");
|
|
895
|
-
var de_SessionInformation = /* @__PURE__ */ __name((output, context) => {
|
|
896
|
-
return (0, import_smithy_client.take)(output, {
|
|
897
|
-
Challenge: /* @__PURE__ */ __name((_) => de_ServerChallenge((0, import_core2.awsExpectUnion)(_), context), "Challenge")
|
|
898
|
-
});
|
|
899
|
-
}, "de_SessionInformation");
|
|
900
|
-
var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
|
|
901
|
-
httpStatusCode: output.statusCode,
|
|
902
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
903
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
904
|
-
cfId: output.headers["x-amz-cf-id"]
|
|
905
|
-
}), "deserializeMetadata");
|
|
906
|
-
var _CV = "ChallengeVersions";
|
|
907
|
-
var _SI = "SessionId";
|
|
908
|
-
var _VH = "VideoHeight";
|
|
909
|
-
var _VW = "VideoWidth";
|
|
910
|
-
var _xarslcv = "x-amz-rekognition-streaming-liveness-challenge-versions";
|
|
911
|
-
var _xarslsi = "x-amz-rekognition-streaming-liveness-session-id";
|
|
912
|
-
var _xarslvh = "x-amz-rekognition-streaming-liveness-video-height";
|
|
913
|
-
var _xarslvw = "x-amz-rekognition-streaming-liveness-video-width";
|
|
914
|
-
|
|
915
|
-
// src/commands/StartFaceLivenessSessionCommand.ts
|
|
916
|
-
var StartFaceLivenessSessionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
917
|
-
return [
|
|
918
|
-
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
919
|
-
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
|
|
920
|
-
(0, import_middleware_eventstream.getEventStreamPlugin)(config),
|
|
921
|
-
(0, import_middleware_websocket.getWebSocketPlugin)(config, {
|
|
922
|
-
headerPrefix: "x-amz-rekognition-streaming-liveness-"
|
|
923
|
-
})
|
|
924
|
-
];
|
|
925
|
-
}).s("RekognitionStreamingService", "StartFaceLivenessSession", {
|
|
926
|
-
/**
|
|
927
|
-
* @internal
|
|
928
|
-
*/
|
|
929
|
-
eventStream: {
|
|
930
|
-
input: true,
|
|
931
|
-
output: true
|
|
932
|
-
}
|
|
933
|
-
}).n("RekognitionStreamingClient", "StartFaceLivenessSessionCommand").f(StartFaceLivenessSessionRequestFilterSensitiveLog, StartFaceLivenessSessionResponseFilterSensitiveLog).ser(se_StartFaceLivenessSessionCommand).de(de_StartFaceLivenessSessionCommand).build() {
|
|
934
|
-
static {
|
|
935
|
-
__name(this, "StartFaceLivenessSessionCommand");
|
|
936
|
-
}
|
|
513
|
+
let body = new Uint8Array();
|
|
514
|
+
body = se_ClientSessionInformationEvent(input);
|
|
515
|
+
body = context.utf8Decoder(JSON.stringify(body));
|
|
516
|
+
return { headers, body };
|
|
937
517
|
};
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
518
|
+
const se_VideoEvent_event = (input, context) => {
|
|
519
|
+
const headers = {
|
|
520
|
+
":event-type": { type: "string", value: "VideoEvent" },
|
|
521
|
+
":message-type": { type: "string", value: "event" },
|
|
522
|
+
":content-type": { type: "string", value: "application/json" },
|
|
523
|
+
};
|
|
524
|
+
let body = new Uint8Array();
|
|
525
|
+
body = se_VideoEvent(input, context);
|
|
526
|
+
body = context.utf8Decoder(JSON.stringify(body));
|
|
527
|
+
return { headers, body };
|
|
528
|
+
};
|
|
529
|
+
const de_LivenessResponseStream = (output, context) => {
|
|
530
|
+
return context.eventStreamMarshaller.deserialize(output, async (event) => {
|
|
531
|
+
if (event["ServerSessionInformationEvent"] != null) {
|
|
532
|
+
return {
|
|
533
|
+
ServerSessionInformationEvent: await de_ServerSessionInformationEvent_event(event["ServerSessionInformationEvent"], context),
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
if (event["DisconnectionEvent"] != null) {
|
|
537
|
+
return {
|
|
538
|
+
DisconnectionEvent: await de_DisconnectionEvent_event(event["DisconnectionEvent"], context),
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
if (event["ChallengeEvent"] != null) {
|
|
542
|
+
return {
|
|
543
|
+
ChallengeEvent: await de_ChallengeEvent_event(event["ChallengeEvent"], context),
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
if (event["ValidationException"] != null) {
|
|
547
|
+
return {
|
|
548
|
+
ValidationException: await de_ValidationException_event(event["ValidationException"], context),
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
if (event["InternalServerException"] != null) {
|
|
552
|
+
return {
|
|
553
|
+
InternalServerException: await de_InternalServerException_event(event["InternalServerException"], context),
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
if (event["ThrottlingException"] != null) {
|
|
557
|
+
return {
|
|
558
|
+
ThrottlingException: await de_ThrottlingException_event(event["ThrottlingException"], context),
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
if (event["ServiceQuotaExceededException"] != null) {
|
|
562
|
+
return {
|
|
563
|
+
ServiceQuotaExceededException: await de_ServiceQuotaExceededException_event(event["ServiceQuotaExceededException"], context),
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
if (event["ServiceUnavailableException"] != null) {
|
|
567
|
+
return {
|
|
568
|
+
ServiceUnavailableException: await de_ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
return { $unknown: event };
|
|
572
|
+
});
|
|
942
573
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
574
|
+
const de_ChallengeEvent_event = async (output, context) => {
|
|
575
|
+
const contents = {};
|
|
576
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
577
|
+
Object.assign(contents, smithyClient._json(data));
|
|
578
|
+
return contents;
|
|
947
579
|
};
|
|
948
|
-
(
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
580
|
+
const de_DisconnectionEvent_event = async (output, context) => {
|
|
581
|
+
const contents = {};
|
|
582
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
583
|
+
Object.assign(contents, smithyClient._json(data));
|
|
584
|
+
return contents;
|
|
585
|
+
};
|
|
586
|
+
const de_InternalServerException_event = async (output, context) => {
|
|
587
|
+
const parsedOutput = {
|
|
588
|
+
...output,
|
|
589
|
+
body: await core$1.parseJsonBody(output.body, context),
|
|
590
|
+
};
|
|
591
|
+
return de_InternalServerExceptionRes(parsedOutput);
|
|
592
|
+
};
|
|
593
|
+
const de_ServerSessionInformationEvent_event = async (output, context) => {
|
|
594
|
+
const contents = {};
|
|
595
|
+
const data = await core$1.parseJsonBody(output.body, context);
|
|
596
|
+
Object.assign(contents, de_ServerSessionInformationEvent(data));
|
|
597
|
+
return contents;
|
|
598
|
+
};
|
|
599
|
+
const de_ServiceQuotaExceededException_event = async (output, context) => {
|
|
600
|
+
const parsedOutput = {
|
|
601
|
+
...output,
|
|
602
|
+
body: await core$1.parseJsonBody(output.body, context),
|
|
603
|
+
};
|
|
604
|
+
return de_ServiceQuotaExceededExceptionRes(parsedOutput);
|
|
605
|
+
};
|
|
606
|
+
const de_ServiceUnavailableException_event = async (output, context) => {
|
|
607
|
+
const parsedOutput = {
|
|
608
|
+
...output,
|
|
609
|
+
body: await core$1.parseJsonBody(output.body, context),
|
|
610
|
+
};
|
|
611
|
+
return de_ServiceUnavailableExceptionRes(parsedOutput);
|
|
612
|
+
};
|
|
613
|
+
const de_ThrottlingException_event = async (output, context) => {
|
|
614
|
+
const parsedOutput = {
|
|
615
|
+
...output,
|
|
616
|
+
body: await core$1.parseJsonBody(output.body, context),
|
|
617
|
+
};
|
|
618
|
+
return de_ThrottlingExceptionRes(parsedOutput);
|
|
619
|
+
};
|
|
620
|
+
const de_ValidationException_event = async (output, context) => {
|
|
621
|
+
const parsedOutput = {
|
|
622
|
+
...output,
|
|
623
|
+
body: await core$1.parseJsonBody(output.body, context),
|
|
624
|
+
};
|
|
625
|
+
return de_ValidationExceptionRes(parsedOutput);
|
|
626
|
+
};
|
|
627
|
+
const se_BoundingBox = (input, context) => {
|
|
628
|
+
return smithyClient.take(input, {
|
|
629
|
+
Height: smithyClient.serializeFloat,
|
|
630
|
+
Left: smithyClient.serializeFloat,
|
|
631
|
+
Top: smithyClient.serializeFloat,
|
|
632
|
+
Width: smithyClient.serializeFloat,
|
|
633
|
+
});
|
|
634
|
+
};
|
|
635
|
+
const se_ClientChallenge = (input, context) => {
|
|
636
|
+
return exports.ClientChallenge.visit(input, {
|
|
637
|
+
FaceMovementAndLightChallenge: (value) => ({
|
|
638
|
+
FaceMovementAndLightChallenge: se_FaceMovementAndLightClientChallenge(value),
|
|
639
|
+
}),
|
|
640
|
+
FaceMovementChallenge: (value) => ({ FaceMovementChallenge: se_FaceMovementClientChallenge(value) }),
|
|
641
|
+
_: (name, value) => ({ [name]: value }),
|
|
642
|
+
});
|
|
643
|
+
};
|
|
644
|
+
const se_ClientSessionInformationEvent = (input, context) => {
|
|
645
|
+
return smithyClient.take(input, {
|
|
646
|
+
Challenge: (_) => se_ClientChallenge(_),
|
|
647
|
+
});
|
|
648
|
+
};
|
|
649
|
+
const se_FaceMovementAndLightClientChallenge = (input, context) => {
|
|
650
|
+
return smithyClient.take(input, {
|
|
651
|
+
ChallengeId: [],
|
|
652
|
+
ColorDisplayed: smithyClient._json,
|
|
653
|
+
InitialFace: (_) => se_InitialFace(_),
|
|
654
|
+
TargetFace: (_) => se_TargetFace(_),
|
|
655
|
+
VideoEndTimestamp: [],
|
|
656
|
+
VideoStartTimestamp: [],
|
|
657
|
+
});
|
|
658
|
+
};
|
|
659
|
+
const se_FaceMovementClientChallenge = (input, context) => {
|
|
660
|
+
return smithyClient.take(input, {
|
|
661
|
+
ChallengeId: [],
|
|
662
|
+
InitialFace: (_) => se_InitialFace(_),
|
|
663
|
+
TargetFace: (_) => se_TargetFace(_),
|
|
664
|
+
VideoEndTimestamp: [],
|
|
665
|
+
VideoStartTimestamp: [],
|
|
666
|
+
});
|
|
667
|
+
};
|
|
668
|
+
const se_InitialFace = (input, context) => {
|
|
669
|
+
return smithyClient.take(input, {
|
|
670
|
+
BoundingBox: (_) => se_BoundingBox(_),
|
|
671
|
+
InitialFaceDetectedTimestamp: [],
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
const se_TargetFace = (input, context) => {
|
|
675
|
+
return smithyClient.take(input, {
|
|
676
|
+
BoundingBox: (_) => se_BoundingBox(_),
|
|
677
|
+
FaceDetectedInTargetPositionEndTimestamp: [],
|
|
678
|
+
FaceDetectedInTargetPositionStartTimestamp: [],
|
|
679
|
+
});
|
|
680
|
+
};
|
|
681
|
+
const se_VideoEvent = (input, context) => {
|
|
682
|
+
return smithyClient.take(input, {
|
|
683
|
+
TimestampMillis: [],
|
|
684
|
+
VideoChunk: context.base64Encoder,
|
|
685
|
+
});
|
|
686
|
+
};
|
|
687
|
+
const de_ChallengeConfig = (output, context) => {
|
|
688
|
+
return smithyClient.take(output, {
|
|
689
|
+
BlazeFaceDetectionThreshold: smithyClient.limitedParseFloat32,
|
|
690
|
+
FaceDistanceThreshold: smithyClient.limitedParseFloat32,
|
|
691
|
+
FaceDistanceThresholdMax: smithyClient.limitedParseFloat32,
|
|
692
|
+
FaceDistanceThresholdMin: smithyClient.limitedParseFloat32,
|
|
693
|
+
FaceIouHeightThreshold: smithyClient.limitedParseFloat32,
|
|
694
|
+
FaceIouWidthThreshold: smithyClient.limitedParseFloat32,
|
|
695
|
+
OvalFitTimeout: smithyClient.expectInt32,
|
|
696
|
+
OvalHeightWidthRatio: smithyClient.limitedParseFloat32,
|
|
697
|
+
OvalIouHeightThreshold: smithyClient.limitedParseFloat32,
|
|
698
|
+
OvalIouThreshold: smithyClient.limitedParseFloat32,
|
|
699
|
+
OvalIouWidthThreshold: smithyClient.limitedParseFloat32,
|
|
700
|
+
});
|
|
701
|
+
};
|
|
702
|
+
const de_ColorSequence = (output, context) => {
|
|
703
|
+
return smithyClient.take(output, {
|
|
704
|
+
DownscrollDuration: smithyClient.limitedParseFloat32,
|
|
705
|
+
FlatDisplayDuration: smithyClient.limitedParseFloat32,
|
|
706
|
+
FreshnessColor: smithyClient._json,
|
|
707
|
+
});
|
|
708
|
+
};
|
|
709
|
+
const de_ColorSequences = (output, context) => {
|
|
710
|
+
const retVal = (output || [])
|
|
711
|
+
.filter((e) => e != null)
|
|
712
|
+
.map((entry) => {
|
|
713
|
+
return de_ColorSequence(entry);
|
|
714
|
+
});
|
|
715
|
+
return retVal;
|
|
716
|
+
};
|
|
717
|
+
const de_FaceMovementAndLightServerChallenge = (output, context) => {
|
|
718
|
+
return smithyClient.take(output, {
|
|
719
|
+
ChallengeConfig: (_) => de_ChallengeConfig(_),
|
|
720
|
+
ColorSequences: (_) => de_ColorSequences(_),
|
|
721
|
+
LightChallengeType: smithyClient.expectString,
|
|
722
|
+
OvalParameters: (_) => de_OvalParameters(_),
|
|
723
|
+
});
|
|
724
|
+
};
|
|
725
|
+
const de_FaceMovementServerChallenge = (output, context) => {
|
|
726
|
+
return smithyClient.take(output, {
|
|
727
|
+
ChallengeConfig: (_) => de_ChallengeConfig(_),
|
|
728
|
+
OvalParameters: (_) => de_OvalParameters(_),
|
|
729
|
+
});
|
|
730
|
+
};
|
|
731
|
+
const de_OvalParameters = (output, context) => {
|
|
732
|
+
return smithyClient.take(output, {
|
|
733
|
+
CenterX: smithyClient.limitedParseFloat32,
|
|
734
|
+
CenterY: smithyClient.limitedParseFloat32,
|
|
735
|
+
Height: smithyClient.limitedParseFloat32,
|
|
736
|
+
Width: smithyClient.limitedParseFloat32,
|
|
737
|
+
});
|
|
738
|
+
};
|
|
739
|
+
const de_ServerChallenge = (output, context) => {
|
|
740
|
+
if (output.FaceMovementAndLightChallenge != null) {
|
|
741
|
+
return {
|
|
742
|
+
FaceMovementAndLightChallenge: de_FaceMovementAndLightServerChallenge(output.FaceMovementAndLightChallenge),
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
if (output.FaceMovementChallenge != null) {
|
|
746
|
+
return {
|
|
747
|
+
FaceMovementChallenge: de_FaceMovementServerChallenge(output.FaceMovementChallenge),
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
return { $unknown: Object.entries(output)[0] };
|
|
751
|
+
};
|
|
752
|
+
const de_ServerSessionInformationEvent = (output, context) => {
|
|
753
|
+
return smithyClient.take(output, {
|
|
754
|
+
SessionInformation: (_) => de_SessionInformation(_),
|
|
755
|
+
});
|
|
756
|
+
};
|
|
757
|
+
const de_SessionInformation = (output, context) => {
|
|
758
|
+
return smithyClient.take(output, {
|
|
759
|
+
Challenge: (_) => de_ServerChallenge(core$1.awsExpectUnion(_)),
|
|
760
|
+
});
|
|
761
|
+
};
|
|
762
|
+
const deserializeMetadata = (output) => ({
|
|
763
|
+
httpStatusCode: output.statusCode,
|
|
764
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
765
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
766
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
975
767
|
});
|
|
768
|
+
const _CV = "ChallengeVersions";
|
|
769
|
+
const _SI = "SessionId";
|
|
770
|
+
const _VH = "VideoHeight";
|
|
771
|
+
const _VW = "VideoWidth";
|
|
772
|
+
const _xarslcv = "x-amz-rekognition-streaming-liveness-challenge-versions";
|
|
773
|
+
const _xarslsi = "x-amz-rekognition-streaming-liveness-session-id";
|
|
774
|
+
const _xarslvh = "x-amz-rekognition-streaming-liveness-video-height";
|
|
775
|
+
const _xarslvw = "x-amz-rekognition-streaming-liveness-video-width";
|
|
776
|
+
|
|
777
|
+
class StartFaceLivenessSessionCommand extends smithyClient.Command
|
|
778
|
+
.classBuilder()
|
|
779
|
+
.ep(commonParams)
|
|
780
|
+
.m(function (Command, cs, config, o) {
|
|
781
|
+
return [
|
|
782
|
+
middlewareSerde.getSerdePlugin(config, this.serialize, this.deserialize),
|
|
783
|
+
middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
784
|
+
middlewareEventstream.getEventStreamPlugin(config),
|
|
785
|
+
middlewareWebsocket.getWebSocketPlugin(config, {
|
|
786
|
+
headerPrefix: "x-amz-rekognition-streaming-liveness-",
|
|
787
|
+
}),
|
|
788
|
+
];
|
|
789
|
+
})
|
|
790
|
+
.s("RekognitionStreamingService", "StartFaceLivenessSession", {
|
|
791
|
+
eventStream: {
|
|
792
|
+
input: true,
|
|
793
|
+
output: true,
|
|
794
|
+
},
|
|
795
|
+
})
|
|
796
|
+
.n("RekognitionStreamingClient", "StartFaceLivenessSessionCommand")
|
|
797
|
+
.f(StartFaceLivenessSessionRequestFilterSensitiveLog, StartFaceLivenessSessionResponseFilterSensitiveLog)
|
|
798
|
+
.ser(se_StartFaceLivenessSessionCommand)
|
|
799
|
+
.de(de_StartFaceLivenessSessionCommand)
|
|
800
|
+
.build() {
|
|
801
|
+
}
|
|
976
802
|
|
|
803
|
+
const commands = {
|
|
804
|
+
StartFaceLivenessSessionCommand,
|
|
805
|
+
};
|
|
806
|
+
class RekognitionStreaming extends RekognitionStreamingClient {
|
|
807
|
+
}
|
|
808
|
+
smithyClient.createAggregatedClient(commands, RekognitionStreaming);
|
|
809
|
+
|
|
810
|
+
Object.defineProperty(exports, "$Command", {
|
|
811
|
+
enumerable: true,
|
|
812
|
+
get: function () { return smithyClient.Command; }
|
|
813
|
+
});
|
|
814
|
+
Object.defineProperty(exports, "__Client", {
|
|
815
|
+
enumerable: true,
|
|
816
|
+
get: function () { return smithyClient.Client; }
|
|
817
|
+
});
|
|
818
|
+
exports.AccessDeniedException = AccessDeniedException;
|
|
819
|
+
exports.ChallengeType = ChallengeType;
|
|
820
|
+
exports.InternalServerException = InternalServerException;
|
|
821
|
+
exports.LightChallengeType = LightChallengeType;
|
|
822
|
+
exports.LivenessRequestStreamFilterSensitiveLog = LivenessRequestStreamFilterSensitiveLog;
|
|
823
|
+
exports.LivenessResponseStreamFilterSensitiveLog = LivenessResponseStreamFilterSensitiveLog;
|
|
824
|
+
exports.RekognitionStreaming = RekognitionStreaming;
|
|
825
|
+
exports.RekognitionStreamingClient = RekognitionStreamingClient;
|
|
826
|
+
exports.RekognitionStreamingServiceException = RekognitionStreamingServiceException;
|
|
827
|
+
exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
|
|
828
|
+
exports.ServiceUnavailableException = ServiceUnavailableException;
|
|
829
|
+
exports.SessionNotFoundException = SessionNotFoundException;
|
|
830
|
+
exports.StartFaceLivenessSessionCommand = StartFaceLivenessSessionCommand;
|
|
831
|
+
exports.StartFaceLivenessSessionRequestFilterSensitiveLog = StartFaceLivenessSessionRequestFilterSensitiveLog;
|
|
832
|
+
exports.StartFaceLivenessSessionResponseFilterSensitiveLog = StartFaceLivenessSessionResponseFilterSensitiveLog;
|
|
833
|
+
exports.ThrottlingException = ThrottlingException;
|
|
834
|
+
exports.ValidationException = ValidationException;
|