@aws-sdk/client-sagemaker-edge 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.
@@ -1,60 +1,46 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_SendHeartbeatCommand = exports.de_GetDeviceRegistrationCommand = exports.de_GetDeploymentsCommand = exports.se_SendHeartbeatCommand = exports.se_GetDeviceRegistrationCommand = exports.se_GetDeploymentsCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const models_0_1 = require("../models/models_0");
7
7
  const SagemakerEdgeServiceException_1 = require("../models/SagemakerEdgeServiceException");
8
8
  const se_GetDeploymentsCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeployments";
13
+ b.bp("/GetDeployments");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  DeviceFleetName: [],
17
17
  DeviceName: [],
18
18
  }));
19
- return new protocol_http_1.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
  exports.se_GetDeploymentsCommand = se_GetDeploymentsCommand;
30
23
  const se_GetDeviceRegistrationCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeviceRegistration";
28
+ b.bp("/GetDeviceRegistration");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  DeviceFleetName: [],
39
32
  DeviceName: [],
40
33
  }));
41
- return new protocol_http_1.HttpRequest({
42
- protocol,
43
- hostname,
44
- port,
45
- method: "POST",
46
- headers,
47
- path: resolvedPath,
48
- body,
49
- });
34
+ b.m("POST").h(headers).b(body);
35
+ return b.build();
50
36
  };
51
37
  exports.se_GetDeviceRegistrationCommand = se_GetDeviceRegistrationCommand;
52
38
  const se_SendHeartbeatCommand = async (input, context) => {
53
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
39
+ const b = (0, core_1.requestBuilder)(input, context);
54
40
  const headers = {
55
41
  "content-type": "application/json",
56
42
  };
57
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SendHeartbeat";
43
+ b.bp("/SendHeartbeat");
58
44
  let body;
59
45
  body = JSON.stringify((0, smithy_client_1.take)(input, {
60
46
  AgentMetrics: (_) => se_EdgeMetrics(_, context),
@@ -64,15 +50,8 @@ const se_SendHeartbeatCommand = async (input, context) => {
64
50
  DeviceName: [],
65
51
  Models: (_) => se_Models(_, context),
66
52
  }));
67
- return new protocol_http_1.HttpRequest({
68
- protocol,
69
- hostname,
70
- port,
71
- method: "POST",
72
- headers,
73
- path: resolvedPath,
74
- body,
75
- });
53
+ b.m("POST").h(headers).b(body);
54
+ return b.build();
76
55
  };
77
56
  exports.se_SendHeartbeatCommand = se_SendHeartbeatCommand;
78
57
  const de_GetDeploymentsCommand = async (output, context) => {
@@ -1,55 +1,41 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { InternalServiceException } from "../models/models_0";
4
4
  import { SagemakerEdgeServiceException as __BaseException } from "../models/SagemakerEdgeServiceException";
5
5
  export const se_GetDeploymentsCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeployments";
10
+ b.bp("/GetDeployments");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  DeviceFleetName: [],
14
14
  DeviceName: [],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_GetDeviceRegistrationCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/GetDeviceRegistration";
24
+ b.bp("/GetDeviceRegistration");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  DeviceFleetName: [],
35
28
  DeviceName: [],
36
29
  }));
37
- return new __HttpRequest({
38
- protocol,
39
- hostname,
40
- port,
41
- method: "POST",
42
- headers,
43
- path: resolvedPath,
44
- body,
45
- });
30
+ b.m("POST").h(headers).b(body);
31
+ return b.build();
46
32
  };
47
33
  export const se_SendHeartbeatCommand = async (input, context) => {
48
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
34
+ const b = rb(input, context);
49
35
  const headers = {
50
36
  "content-type": "application/json",
51
37
  };
52
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/SendHeartbeat";
38
+ b.bp("/SendHeartbeat");
53
39
  let body;
54
40
  body = JSON.stringify(take(input, {
55
41
  AgentMetrics: (_) => se_EdgeMetrics(_, context),
@@ -59,15 +45,8 @@ export const se_SendHeartbeatCommand = async (input, context) => {
59
45
  DeviceName: [],
60
46
  Models: (_) => se_Models(_, context),
61
47
  }));
62
- return new __HttpRequest({
63
- protocol,
64
- hostname,
65
- port,
66
- method: "POST",
67
- headers,
68
- path: resolvedPath,
69
- body,
70
- });
48
+ b.m("POST").h(headers).b(body);
49
+ return b.build();
71
50
  };
72
51
  export const de_GetDeploymentsCommand = async (output, context) => {
73
52
  if (output.statusCode !== 200 && output.statusCode >= 300) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sagemaker-edge",
3
3
  "description": "AWS SDK for JavaScript Sagemaker Edge 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/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",