@aws-sdk/client-rekognitionstreaming 3.305.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/LICENSE +201 -0
- package/README.md +222 -0
- package/dist-cjs/RekognitionStreaming.js +37 -0
- package/dist-cjs/RekognitionStreamingClient.js +46 -0
- package/dist-cjs/commands/StartFaceLivenessSessionCommand.js +50 -0
- package/dist-cjs/commands/StartStreamingLivenessSessionCommand.js +50 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/endpoint/EndpointParameters.js +12 -0
- package/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist-cjs/index.js +10 -0
- package/dist-cjs/models/RekognitionStreamingServiceException.js +11 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +188 -0
- package/dist-cjs/protocols/Aws_restJson1.js +573 -0
- package/dist-cjs/runtimeConfig.browser.js +44 -0
- package/dist-cjs/runtimeConfig.js +52 -0
- package/dist-cjs/runtimeConfig.native.js +18 -0
- package/dist-cjs/runtimeConfig.shared.js +21 -0
- package/dist-es/RekognitionStreaming.js +33 -0
- package/dist-es/RekognitionStreamingClient.js +42 -0
- package/dist-es/commands/StartFaceLivenessSessionCommand.js +46 -0
- package/dist-es/commands/StartStreamingLivenessSessionCommand.js +46 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/endpoint/EndpointParameters.js +8 -0
- package/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist-es/endpoint/ruleset.js +4 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/RekognitionStreamingServiceException.js +7 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +173 -0
- package/dist-es/protocols/Aws_restJson1.js +566 -0
- package/dist-es/runtimeConfig.browser.js +39 -0
- package/dist-es/runtimeConfig.js +47 -0
- package/dist-es/runtimeConfig.native.js +14 -0
- package/dist-es/runtimeConfig.shared.js +17 -0
- package/dist-types/RekognitionStreaming.d.ts +21 -0
- package/dist-types/RekognitionStreamingClient.d.ts +174 -0
- package/dist-types/commands/StartFaceLivenessSessionCommand.d.ts +39 -0
- package/dist-types/commands/StartStreamingLivenessSessionCommand.d.ts +39 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +19 -0
- package/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/RekognitionStreamingServiceException.d.ts +12 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +415 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +8 -0
- package/dist-types/runtimeConfig.browser.d.ts +44 -0
- package/dist-types/runtimeConfig.d.ts +44 -0
- package/dist-types/runtimeConfig.native.d.ts +43 -0
- package/dist-types/runtimeConfig.shared.d.ts +18 -0
- package/dist-types/ts3.4/RekognitionStreaming.d.ts +38 -0
- package/dist-types/ts3.4/RekognitionStreamingClient.d.ts +147 -0
- package/dist-types/ts3.4/commands/StartFaceLivenessSessionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/StartStreamingLivenessSessionCommand.d.ts +41 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +33 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +5 -0
- package/dist-types/ts3.4/models/RekognitionStreamingServiceException.d.ts +7 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +316 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +32 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +84 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +20 -0
- package/package.json +104 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const sha256_js_1 = require("@aws-crypto/sha256-js");
|
|
5
|
+
const invalid_dependency_1 = require("@aws-sdk/invalid-dependency");
|
|
6
|
+
const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
|
|
7
|
+
const getRuntimeConfig = (config) => {
|
|
8
|
+
const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
|
|
9
|
+
return {
|
|
10
|
+
...browserDefaults,
|
|
11
|
+
...config,
|
|
12
|
+
runtime: "react-native",
|
|
13
|
+
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ??
|
|
14
|
+
(() => ({ handle: (0, invalid_dependency_1.invalidFunction)("event stream request is not supported in ReactNative.") })),
|
|
15
|
+
sha256: config?.sha256 ?? sha256_js_1.Sha256,
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRuntimeConfig = void 0;
|
|
4
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
|
+
const url_parser_1 = require("@aws-sdk/url-parser");
|
|
6
|
+
const util_base64_1 = require("@aws-sdk/util-base64");
|
|
7
|
+
const util_utf8_1 = require("@aws-sdk/util-utf8");
|
|
8
|
+
const endpointResolver_1 = require("./endpoint/endpointResolver");
|
|
9
|
+
const getRuntimeConfig = (config) => ({
|
|
10
|
+
apiVersion: "2022-05-30",
|
|
11
|
+
base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
|
|
12
|
+
base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
|
|
13
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
14
|
+
endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
|
|
15
|
+
logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
|
|
16
|
+
serviceId: config?.serviceId ?? "RekognitionStreaming",
|
|
17
|
+
urlParser: config?.urlParser ?? url_parser_1.parseUrl,
|
|
18
|
+
utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
|
|
19
|
+
utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
|
|
20
|
+
});
|
|
21
|
+
exports.getRuntimeConfig = getRuntimeConfig;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { StartFaceLivenessSessionCommand, } from "./commands/StartFaceLivenessSessionCommand";
|
|
2
|
+
import { StartStreamingLivenessSessionCommand, } from "./commands/StartStreamingLivenessSessionCommand";
|
|
3
|
+
import { RekognitionStreamingClient } from "./RekognitionStreamingClient";
|
|
4
|
+
export class RekognitionStreaming extends RekognitionStreamingClient {
|
|
5
|
+
startFaceLivenessSession(args, optionsOrCb, cb) {
|
|
6
|
+
const command = new StartFaceLivenessSessionCommand(args);
|
|
7
|
+
if (typeof optionsOrCb === "function") {
|
|
8
|
+
this.send(command, optionsOrCb);
|
|
9
|
+
}
|
|
10
|
+
else if (typeof cb === "function") {
|
|
11
|
+
if (typeof optionsOrCb !== "object")
|
|
12
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
13
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return this.send(command, optionsOrCb);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
startStreamingLivenessSession(args, optionsOrCb, cb) {
|
|
20
|
+
const command = new StartStreamingLivenessSessionCommand(args);
|
|
21
|
+
if (typeof optionsOrCb === "function") {
|
|
22
|
+
this.send(command, optionsOrCb);
|
|
23
|
+
}
|
|
24
|
+
else if (typeof cb === "function") {
|
|
25
|
+
if (typeof optionsOrCb !== "object")
|
|
26
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
27
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return this.send(command, optionsOrCb);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { resolveRegionConfig } from "@aws-sdk/config-resolver";
|
|
2
|
+
import { resolveEventStreamSerdeConfig, } from "@aws-sdk/eventstream-serde-config-resolver";
|
|
3
|
+
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
|
+
import { resolveEndpointConfig } from "@aws-sdk/middleware-endpoint";
|
|
5
|
+
import { resolveEventStreamConfig, } from "@aws-sdk/middleware-eventstream";
|
|
6
|
+
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
7
|
+
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
|
|
8
|
+
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
|
|
9
|
+
import { getRetryPlugin, resolveRetryConfig } from "@aws-sdk/middleware-retry";
|
|
10
|
+
import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
|
|
11
|
+
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
12
|
+
import { resolveWebSocketConfig } from "@aws-sdk/middleware-websocket";
|
|
13
|
+
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
14
|
+
import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
|
|
15
|
+
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
16
|
+
export class RekognitionStreamingClient extends __Client {
|
|
17
|
+
constructor(configuration) {
|
|
18
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
19
|
+
const _config_1 = resolveClientEndpointParameters(_config_0);
|
|
20
|
+
const _config_2 = resolveRegionConfig(_config_1);
|
|
21
|
+
const _config_3 = resolveEndpointConfig(_config_2);
|
|
22
|
+
const _config_4 = resolveRetryConfig(_config_3);
|
|
23
|
+
const _config_5 = resolveHostHeaderConfig(_config_4);
|
|
24
|
+
const _config_6 = resolveAwsAuthConfig(_config_5);
|
|
25
|
+
const _config_7 = resolveEventStreamConfig(_config_6);
|
|
26
|
+
const _config_8 = resolveWebSocketConfig(_config_7);
|
|
27
|
+
const _config_9 = resolveUserAgentConfig(_config_8);
|
|
28
|
+
const _config_10 = resolveEventStreamSerdeConfig(_config_9);
|
|
29
|
+
super(_config_10);
|
|
30
|
+
this.config = _config_10;
|
|
31
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
32
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
33
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
34
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
35
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
36
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
37
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
38
|
+
}
|
|
39
|
+
destroy() {
|
|
40
|
+
super.destroy();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
|
|
3
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
|
+
import { getWebSocketPlugin } from "@aws-sdk/middleware-websocket";
|
|
5
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
6
|
+
import { StartFaceLivenessSessionRequestFilterSensitiveLog, StartFaceLivenessSessionResponseFilterSensitiveLog, } from "../models/models_0";
|
|
7
|
+
import { deserializeAws_restJson1StartFaceLivenessSessionCommand, serializeAws_restJson1StartFaceLivenessSessionCommand, } from "../protocols/Aws_restJson1";
|
|
8
|
+
export class StartFaceLivenessSessionCommand extends $Command {
|
|
9
|
+
static getEndpointParameterInstructions() {
|
|
10
|
+
return {
|
|
11
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
12
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
13
|
+
Region: { type: "builtInParams", name: "region" },
|
|
14
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
constructor(input) {
|
|
18
|
+
super();
|
|
19
|
+
this.input = input;
|
|
20
|
+
}
|
|
21
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
22
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
23
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, StartFaceLivenessSessionCommand.getEndpointParameterInstructions()));
|
|
24
|
+
this.middlewareStack.use(getEventStreamPlugin(configuration));
|
|
25
|
+
this.middlewareStack.use(getWebSocketPlugin(configuration, { headerPrefix: "x-amz-rekognition-streaming-liveness-" }));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "RekognitionStreamingClient";
|
|
29
|
+
const commandName = "StartFaceLivenessSessionCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: StartFaceLivenessSessionRequestFilterSensitiveLog,
|
|
35
|
+
outputFilterSensitiveLog: StartFaceLivenessSessionResponseFilterSensitiveLog,
|
|
36
|
+
};
|
|
37
|
+
const { requestHandler } = configuration;
|
|
38
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
39
|
+
}
|
|
40
|
+
serialize(input, context) {
|
|
41
|
+
return serializeAws_restJson1StartFaceLivenessSessionCommand(input, context);
|
|
42
|
+
}
|
|
43
|
+
deserialize(output, context) {
|
|
44
|
+
return deserializeAws_restJson1StartFaceLivenessSessionCommand(output, context);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getEventStreamPlugin } from "@aws-sdk/middleware-eventstream";
|
|
3
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
4
|
+
import { getWebSocketPlugin } from "@aws-sdk/middleware-websocket";
|
|
5
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
6
|
+
import { StartStreamingLivenessSessionRequestFilterSensitiveLog, StartStreamingLivenessSessionResponseFilterSensitiveLog, } from "../models/models_0";
|
|
7
|
+
import { deserializeAws_restJson1StartStreamingLivenessSessionCommand, serializeAws_restJson1StartStreamingLivenessSessionCommand, } from "../protocols/Aws_restJson1";
|
|
8
|
+
export class StartStreamingLivenessSessionCommand extends $Command {
|
|
9
|
+
static getEndpointParameterInstructions() {
|
|
10
|
+
return {
|
|
11
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
12
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
13
|
+
Region: { type: "builtInParams", name: "region" },
|
|
14
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
constructor(input) {
|
|
18
|
+
super();
|
|
19
|
+
this.input = input;
|
|
20
|
+
}
|
|
21
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
22
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
23
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, StartStreamingLivenessSessionCommand.getEndpointParameterInstructions()));
|
|
24
|
+
this.middlewareStack.use(getEventStreamPlugin(configuration));
|
|
25
|
+
this.middlewareStack.use(getWebSocketPlugin(configuration, { headerPrefix: "x-amz-rekognition-streaming-liveness-" }));
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const { logger } = configuration;
|
|
28
|
+
const clientName = "RekognitionStreamingClient";
|
|
29
|
+
const commandName = "StartStreamingLivenessSessionCommand";
|
|
30
|
+
const handlerExecutionContext = {
|
|
31
|
+
logger,
|
|
32
|
+
clientName,
|
|
33
|
+
commandName,
|
|
34
|
+
inputFilterSensitiveLog: StartStreamingLivenessSessionRequestFilterSensitiveLog,
|
|
35
|
+
outputFilterSensitiveLog: StartStreamingLivenessSessionResponseFilterSensitiveLog,
|
|
36
|
+
};
|
|
37
|
+
const { requestHandler } = configuration;
|
|
38
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
39
|
+
}
|
|
40
|
+
serialize(input, context) {
|
|
41
|
+
return serializeAws_restJson1StartStreamingLivenessSessionCommand(input, context);
|
|
42
|
+
}
|
|
43
|
+
deserialize(output, context) {
|
|
44
|
+
return deserializeAws_restJson1StartStreamingLivenessSessionCommand(output, context);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { resolveEndpoint } from "@aws-sdk/util-endpoints";
|
|
2
|
+
import { ruleSet } from "./ruleset";
|
|
3
|
+
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
4
|
+
return resolveEndpoint(ruleSet, {
|
|
5
|
+
endpointParams: endpointParams,
|
|
6
|
+
logger: context.logger,
|
|
7
|
+
});
|
|
8
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const p = "required", q = "fn", r = "argv", s = "ref";
|
|
2
|
+
const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
|
|
3
|
+
const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://rekognitionstreaming.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://rekognitionstreaming.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
|
|
4
|
+
export const ruleSet = _data;
|
package/dist-es/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
|
|
2
|
+
export class RekognitionStreamingServiceException extends __ServiceException {
|
|
3
|
+
constructor(options) {
|
|
4
|
+
super(options);
|
|
5
|
+
Object.setPrototypeOf(this, RekognitionStreamingServiceException.prototype);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models_0";
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { RekognitionStreamingServiceException as __BaseException } from "./RekognitionStreamingServiceException";
|
|
2
|
+
export class AccessDeniedException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "AccessDeniedException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "AccessDeniedException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, AccessDeniedException.prototype);
|
|
12
|
+
this.Message = opts.Message;
|
|
13
|
+
this.Code = opts.Code;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export var ClientChallenge;
|
|
17
|
+
(function (ClientChallenge) {
|
|
18
|
+
ClientChallenge.visit = (value, visitor) => {
|
|
19
|
+
if (value.FaceMovementAndLightChallenge !== undefined)
|
|
20
|
+
return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);
|
|
21
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
22
|
+
};
|
|
23
|
+
})(ClientChallenge || (ClientChallenge = {}));
|
|
24
|
+
export const LightChallengeType = {
|
|
25
|
+
SEQUENTIAL: "SEQUENTIAL",
|
|
26
|
+
SIMULTANEOUS: "SIMULTANEOUS",
|
|
27
|
+
};
|
|
28
|
+
export class InternalServerException extends __BaseException {
|
|
29
|
+
constructor(opts) {
|
|
30
|
+
super({
|
|
31
|
+
name: "InternalServerException",
|
|
32
|
+
$fault: "server",
|
|
33
|
+
...opts,
|
|
34
|
+
});
|
|
35
|
+
this.name = "InternalServerException";
|
|
36
|
+
this.$fault = "server";
|
|
37
|
+
Object.setPrototypeOf(this, InternalServerException.prototype);
|
|
38
|
+
this.Message = opts.Message;
|
|
39
|
+
this.Code = opts.Code;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export var LivenessRequestStream;
|
|
43
|
+
(function (LivenessRequestStream) {
|
|
44
|
+
LivenessRequestStream.visit = (value, visitor) => {
|
|
45
|
+
if (value.VideoEvent !== undefined)
|
|
46
|
+
return visitor.VideoEvent(value.VideoEvent);
|
|
47
|
+
if (value.ClientSessionInformationEvent !== undefined)
|
|
48
|
+
return visitor.ClientSessionInformationEvent(value.ClientSessionInformationEvent);
|
|
49
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
50
|
+
};
|
|
51
|
+
})(LivenessRequestStream || (LivenessRequestStream = {}));
|
|
52
|
+
export var ServerChallenge;
|
|
53
|
+
(function (ServerChallenge) {
|
|
54
|
+
ServerChallenge.visit = (value, visitor) => {
|
|
55
|
+
if (value.FaceMovementAndLightChallenge !== undefined)
|
|
56
|
+
return visitor.FaceMovementAndLightChallenge(value.FaceMovementAndLightChallenge);
|
|
57
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
58
|
+
};
|
|
59
|
+
})(ServerChallenge || (ServerChallenge = {}));
|
|
60
|
+
export class ServiceQuotaExceededException extends __BaseException {
|
|
61
|
+
constructor(opts) {
|
|
62
|
+
super({
|
|
63
|
+
name: "ServiceQuotaExceededException",
|
|
64
|
+
$fault: "client",
|
|
65
|
+
...opts,
|
|
66
|
+
});
|
|
67
|
+
this.name = "ServiceQuotaExceededException";
|
|
68
|
+
this.$fault = "client";
|
|
69
|
+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
|
|
70
|
+
this.Message = opts.Message;
|
|
71
|
+
this.Code = opts.Code;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
export class ThrottlingException extends __BaseException {
|
|
75
|
+
constructor(opts) {
|
|
76
|
+
super({
|
|
77
|
+
name: "ThrottlingException",
|
|
78
|
+
$fault: "client",
|
|
79
|
+
...opts,
|
|
80
|
+
});
|
|
81
|
+
this.name = "ThrottlingException";
|
|
82
|
+
this.$fault = "client";
|
|
83
|
+
Object.setPrototypeOf(this, ThrottlingException.prototype);
|
|
84
|
+
this.Message = opts.Message;
|
|
85
|
+
this.Code = opts.Code;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export class ValidationException extends __BaseException {
|
|
89
|
+
constructor(opts) {
|
|
90
|
+
super({
|
|
91
|
+
name: "ValidationException",
|
|
92
|
+
$fault: "client",
|
|
93
|
+
...opts,
|
|
94
|
+
});
|
|
95
|
+
this.name = "ValidationException";
|
|
96
|
+
this.$fault = "client";
|
|
97
|
+
Object.setPrototypeOf(this, ValidationException.prototype);
|
|
98
|
+
this.Message = opts.Message;
|
|
99
|
+
this.Code = opts.Code;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
export var LivenessResponseStream;
|
|
103
|
+
(function (LivenessResponseStream) {
|
|
104
|
+
LivenessResponseStream.visit = (value, visitor) => {
|
|
105
|
+
if (value.ServerSessionInformationEvent !== undefined)
|
|
106
|
+
return visitor.ServerSessionInformationEvent(value.ServerSessionInformationEvent);
|
|
107
|
+
if (value.DisconnectionEvent !== undefined)
|
|
108
|
+
return visitor.DisconnectionEvent(value.DisconnectionEvent);
|
|
109
|
+
if (value.ValidationException !== undefined)
|
|
110
|
+
return visitor.ValidationException(value.ValidationException);
|
|
111
|
+
if (value.InternalServerException !== undefined)
|
|
112
|
+
return visitor.InternalServerException(value.InternalServerException);
|
|
113
|
+
if (value.ThrottlingException !== undefined)
|
|
114
|
+
return visitor.ThrottlingException(value.ThrottlingException);
|
|
115
|
+
if (value.ServiceQuotaExceededException !== undefined)
|
|
116
|
+
return visitor.ServiceQuotaExceededException(value.ServiceQuotaExceededException);
|
|
117
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
118
|
+
};
|
|
119
|
+
})(LivenessResponseStream || (LivenessResponseStream = {}));
|
|
120
|
+
export class SessionNotFoundException extends __BaseException {
|
|
121
|
+
constructor(opts) {
|
|
122
|
+
super({
|
|
123
|
+
name: "SessionNotFoundException",
|
|
124
|
+
$fault: "client",
|
|
125
|
+
...opts,
|
|
126
|
+
});
|
|
127
|
+
this.name = "SessionNotFoundException";
|
|
128
|
+
this.$fault = "client";
|
|
129
|
+
Object.setPrototypeOf(this, SessionNotFoundException.prototype);
|
|
130
|
+
this.Message = opts.Message;
|
|
131
|
+
this.Code = opts.Code;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
export const LivenessRequestStreamFilterSensitiveLog = (obj) => {
|
|
135
|
+
if (obj.VideoEvent !== undefined)
|
|
136
|
+
return { VideoEvent: obj.VideoEvent };
|
|
137
|
+
if (obj.ClientSessionInformationEvent !== undefined)
|
|
138
|
+
return { ClientSessionInformationEvent: obj.ClientSessionInformationEvent };
|
|
139
|
+
if (obj.$unknown !== undefined)
|
|
140
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
141
|
+
};
|
|
142
|
+
export const LivenessResponseStreamFilterSensitiveLog = (obj) => {
|
|
143
|
+
if (obj.ServerSessionInformationEvent !== undefined)
|
|
144
|
+
return { ServerSessionInformationEvent: obj.ServerSessionInformationEvent };
|
|
145
|
+
if (obj.DisconnectionEvent !== undefined)
|
|
146
|
+
return { DisconnectionEvent: obj.DisconnectionEvent };
|
|
147
|
+
if (obj.ValidationException !== undefined)
|
|
148
|
+
return { ValidationException: obj.ValidationException };
|
|
149
|
+
if (obj.InternalServerException !== undefined)
|
|
150
|
+
return { InternalServerException: obj.InternalServerException };
|
|
151
|
+
if (obj.ThrottlingException !== undefined)
|
|
152
|
+
return { ThrottlingException: obj.ThrottlingException };
|
|
153
|
+
if (obj.ServiceQuotaExceededException !== undefined)
|
|
154
|
+
return { ServiceQuotaExceededException: obj.ServiceQuotaExceededException };
|
|
155
|
+
if (obj.$unknown !== undefined)
|
|
156
|
+
return { [obj.$unknown[0]]: "UNKNOWN" };
|
|
157
|
+
};
|
|
158
|
+
export const StartFaceLivenessSessionRequestFilterSensitiveLog = (obj) => ({
|
|
159
|
+
...obj,
|
|
160
|
+
...(obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }),
|
|
161
|
+
});
|
|
162
|
+
export const StartFaceLivenessSessionResponseFilterSensitiveLog = (obj) => ({
|
|
163
|
+
...obj,
|
|
164
|
+
...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
|
|
165
|
+
});
|
|
166
|
+
export const StartStreamingLivenessSessionRequestFilterSensitiveLog = (obj) => ({
|
|
167
|
+
...obj,
|
|
168
|
+
...(obj.LivenessRequestStream && { LivenessRequestStream: "STREAMING_CONTENT" }),
|
|
169
|
+
});
|
|
170
|
+
export const StartStreamingLivenessSessionResponseFilterSensitiveLog = (obj) => ({
|
|
171
|
+
...obj,
|
|
172
|
+
...(obj.LivenessResponseStream && { LivenessResponseStream: "STREAMING_CONTENT" }),
|
|
173
|
+
});
|