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