@aws-sdk/client-rekognitionstreaming 3.474.0 → 3.477.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.
@@ -2,32 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_StartFaceLivenessSessionCommand = exports.se_StartFaceLivenessSessionCommand = void 0;
4
4
  const core_1 = require("@aws-sdk/core");
5
- const protocol_http_1 = require("@smithy/protocol-http");
5
+ const core_2 = require("@smithy/core");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const RekognitionStreamingServiceException_1 = require("../models/RekognitionStreamingServiceException");
9
9
  const se_StartFaceLivenessSessionCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_2.requestBuilder)(input, context);
11
11
  const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, {
12
- "x-amz-rekognition-streaming-liveness-session-id": input.SessionId,
13
- "x-amz-rekognition-streaming-liveness-video-width": input.VideoWidth,
14
- "x-amz-rekognition-streaming-liveness-video-height": input.VideoHeight,
15
- "x-amz-rekognition-streaming-liveness-challenge-versions": input.ChallengeVersions,
12
+ [_xarslsi]: input[_SI],
13
+ [_xarslvw]: input[_VW],
14
+ [_xarslvh]: input[_VH],
15
+ [_xarslcv]: input[_CV],
16
16
  });
17
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-face-liveness-session";
17
+ b.bp("/start-face-liveness-session");
18
18
  let body;
19
19
  if (input.LivenessRequestStream !== undefined) {
20
20
  body = se_LivenessRequestStream(input.LivenessRequestStream, context);
21
21
  }
22
- return new protocol_http_1.HttpRequest({
23
- protocol,
24
- hostname,
25
- port,
26
- method: "POST",
27
- headers,
28
- path: resolvedPath,
29
- body,
30
- });
22
+ b.m("POST").h(headers).b(body);
23
+ return b.build();
31
24
  };
32
25
  exports.se_StartFaceLivenessSessionCommand = se_StartFaceLivenessSessionCommand;
33
26
  const de_StartFaceLivenessSessionCommand = async (output, context) => {
@@ -36,7 +29,7 @@ const de_StartFaceLivenessSessionCommand = async (output, context) => {
36
29
  }
37
30
  const contents = (0, smithy_client_1.map)({
38
31
  $metadata: deserializeMetadata(output),
39
- SessionId: [, output.headers["x-amz-rekognition-streaming-liveness-session-id"]],
32
+ [_SI]: [, output.headers[_xarslsi]],
40
33
  });
41
34
  const data = output.body;
42
35
  contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
@@ -422,6 +415,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
422
415
  value !== "" &&
423
416
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
424
417
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
418
+ const _CV = "ChallengeVersions";
419
+ const _SI = "SessionId";
420
+ const _VH = "VideoHeight";
421
+ const _VW = "VideoWidth";
422
+ const _xarslcv = "x-amz-rekognition-streaming-liveness-challenge-versions";
423
+ const _xarslsi = "x-amz-rekognition-streaming-liveness-session-id";
424
+ const _xarslvh = "x-amz-rekognition-streaming-liveness-video-height";
425
+ const _xarslvw = "x-amz-rekognition-streaming-liveness-video-width";
425
426
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
426
427
  if (encoded.length) {
427
428
  return JSON.parse(encoded);
@@ -1,30 +1,23 @@
1
1
  import { awsExpectUnion as __expectUnion } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
+ import { requestBuilder as rb } from "@smithy/core";
3
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
4
4
  import { AccessDeniedException, ClientChallenge, InternalServerException, LivenessRequestStream, ServiceQuotaExceededException, ServiceUnavailableException, SessionNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  import { RekognitionStreamingServiceException as __BaseException } from "../models/RekognitionStreamingServiceException";
6
6
  export const se_StartFaceLivenessSessionCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = map({}, isSerializableHeaderValue, {
9
- "x-amz-rekognition-streaming-liveness-session-id": input.SessionId,
10
- "x-amz-rekognition-streaming-liveness-video-width": input.VideoWidth,
11
- "x-amz-rekognition-streaming-liveness-video-height": input.VideoHeight,
12
- "x-amz-rekognition-streaming-liveness-challenge-versions": input.ChallengeVersions,
9
+ [_xarslsi]: input[_SI],
10
+ [_xarslvw]: input[_VW],
11
+ [_xarslvh]: input[_VH],
12
+ [_xarslcv]: input[_CV],
13
13
  });
14
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-face-liveness-session";
14
+ b.bp("/start-face-liveness-session");
15
15
  let body;
16
16
  if (input.LivenessRequestStream !== undefined) {
17
17
  body = se_LivenessRequestStream(input.LivenessRequestStream, context);
18
18
  }
19
- return new __HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  export const de_StartFaceLivenessSessionCommand = async (output, context) => {
30
23
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -32,7 +25,7 @@ export const de_StartFaceLivenessSessionCommand = async (output, context) => {
32
25
  }
33
26
  const contents = map({
34
27
  $metadata: deserializeMetadata(output),
35
- SessionId: [, output.headers["x-amz-rekognition-streaming-liveness-session-id"]],
28
+ [_SI]: [, output.headers[_xarslsi]],
36
29
  });
37
30
  const data = output.body;
38
31
  contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
@@ -417,6 +410,14 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
417
410
  value !== "" &&
418
411
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
419
412
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
413
+ const _CV = "ChallengeVersions";
414
+ const _SI = "SessionId";
415
+ const _VH = "VideoHeight";
416
+ const _VW = "VideoWidth";
417
+ const _xarslcv = "x-amz-rekognition-streaming-liveness-challenge-versions";
418
+ const _xarslsi = "x-amz-rekognition-streaming-liveness-session-id";
419
+ const _xarslvh = "x-amz-rekognition-streaming-liveness-video-height";
420
+ const _xarslvw = "x-amz-rekognition-streaming-liveness-video-width";
420
421
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
421
422
  if (encoded.length) {
422
423
  return JSON.parse(encoded);
@@ -32,7 +32,7 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
32
32
  serviceId: string;
33
33
  logger: import("@smithy/types").Logger;
34
34
  extensions: import("./runtimeExtensions").RuntimeExtension[];
35
- endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<string> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
35
+ endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
36
36
  endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
37
37
  logger?: import("@smithy/types").Logger | undefined;
38
38
  }) => import("@smithy/types").EndpointV2;
@@ -32,7 +32,7 @@ export declare const getRuntimeConfig: (config: RekognitionStreamingClientConfig
32
32
  serviceId: string;
33
33
  logger: import("@smithy/types").Logger;
34
34
  extensions: import("./runtimeExtensions").RuntimeExtension[];
35
- endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").Provider<string> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
35
+ endpoint?: ((string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>) & (string | import("@smithy/types").Provider<string> | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>)) | undefined;
36
36
  endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
37
37
  logger?: import("@smithy/types").Logger | undefined;
38
38
  }) => import("@smithy/types").EndpointV2;
@@ -58,9 +58,9 @@ export declare const getRuntimeConfig: (
58
58
  ) &
59
59
  (
60
60
  | string
61
+ | import("@smithy/types").Provider<string>
61
62
  | import("@smithy/types").Endpoint
62
63
  | import("@smithy/types").Provider<import("@smithy/types").Endpoint>
63
- | import("@smithy/types").Provider<string>
64
64
  | import("@smithy/types").EndpointV2
65
65
  | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
66
66
  ))
@@ -58,9 +58,9 @@ export declare const getRuntimeConfig: (
58
58
  ) &
59
59
  (
60
60
  | string
61
+ | import("@smithy/types").Provider<string>
61
62
  | import("@smithy/types").Endpoint
62
63
  | import("@smithy/types").Provider<import("@smithy/types").Endpoint>
63
- | import("@smithy/types").Provider<string>
64
64
  | import("@smithy/types").EndpointV2
65
65
  | import("@smithy/types").Provider<import("@smithy/types").EndpointV2>
66
66
  ))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-rekognitionstreaming",
3
3
  "description": "AWS SDK for JavaScript Rekognitionstreaming Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/eventstream-handler-node": "3.468.0",
27
27
  "@aws-sdk/middleware-eventstream": "3.468.0",
28
28
  "@aws-sdk/middleware-host-header": "3.468.0",
@@ -37,6 +37,7 @@
37
37
  "@aws-sdk/util-user-agent-browser": "3.468.0",
38
38
  "@aws-sdk/util-user-agent-node": "3.470.0",
39
39
  "@smithy/config-resolver": "^2.0.21",
40
+ "@smithy/core": "^1.2.0",
40
41
  "@smithy/eventstream-serde-browser": "^2.0.15",
41
42
  "@smithy/eventstream-serde-config-resolver": "^2.0.15",
42
43
  "@smithy/eventstream-serde-node": "^2.0.15",