@aws-sdk/client-sagemaker-edge 3.489.0 → 3.495.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,17 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SagemakerEdge = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- const GetDeploymentsCommand_1 = require("./commands/GetDeploymentsCommand");
6
- const GetDeviceRegistrationCommand_1 = require("./commands/GetDeviceRegistrationCommand");
7
- const SendHeartbeatCommand_1 = require("./commands/SendHeartbeatCommand");
8
- const SagemakerEdgeClient_1 = require("./SagemakerEdgeClient");
9
- const commands = {
10
- GetDeploymentsCommand: GetDeploymentsCommand_1.GetDeploymentsCommand,
11
- GetDeviceRegistrationCommand: GetDeviceRegistrationCommand_1.GetDeviceRegistrationCommand,
12
- SendHeartbeatCommand: SendHeartbeatCommand_1.SendHeartbeatCommand,
13
- };
14
- class SagemakerEdge extends SagemakerEdgeClient_1.SagemakerEdgeClient {
15
- }
16
- exports.SagemakerEdge = SagemakerEdge;
17
- (0, smithy_client_1.createAggregatedClient)(commands, SagemakerEdge);
1
+ module.exports = require("./index.js");
@@ -1,43 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SagemakerEdgeClient = exports.__Client = void 0;
4
- const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
5
- const middleware_logger_1 = require("@aws-sdk/middleware-logger");
6
- const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
7
- const middleware_signing_1 = require("@aws-sdk/middleware-signing");
8
- const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
9
- const config_resolver_1 = require("@smithy/config-resolver");
10
- const middleware_content_length_1 = require("@smithy/middleware-content-length");
11
- const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
12
- const middleware_retry_1 = require("@smithy/middleware-retry");
13
- const smithy_client_1 = require("@smithy/smithy-client");
14
- Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
15
- const EndpointParameters_1 = require("./endpoint/EndpointParameters");
16
- const runtimeConfig_1 = require("./runtimeConfig");
17
- const runtimeExtensions_1 = require("./runtimeExtensions");
18
- class SagemakerEdgeClient extends smithy_client_1.Client {
19
- constructor(...[configuration]) {
20
- const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
21
- const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
22
- const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1);
23
- const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
24
- const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
25
- const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
26
- const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
27
- const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
28
- const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
29
- super(_config_8);
30
- this.config = _config_8;
31
- this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
32
- this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
33
- this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
34
- this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
35
- this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
36
- this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
37
- this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
38
- }
39
- destroy() {
40
- super.destroy();
41
- }
42
- }
43
- exports.SagemakerEdgeClient = SagemakerEdgeClient;
1
+ module.exports = require("./index.js");
@@ -1,28 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetDeploymentsCommand = exports.$Command = void 0;
4
- const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
- const middleware_serde_1 = require("@smithy/middleware-serde");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
- const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
- class GetDeploymentsCommand extends smithy_client_1.Command
11
- .classBuilder()
12
- .ep({
13
- ...EndpointParameters_1.commonParams,
14
- })
15
- .m(function (Command, cs, config, o) {
16
- return [
17
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
- ];
20
- })
21
- .s("AmazonSageMakerEdge", "GetDeployments", {})
22
- .n("SagemakerEdgeClient", "GetDeploymentsCommand")
23
- .f(void 0, void 0)
24
- .ser(Aws_restJson1_1.se_GetDeploymentsCommand)
25
- .de(Aws_restJson1_1.de_GetDeploymentsCommand)
26
- .build() {
27
- }
28
- exports.GetDeploymentsCommand = GetDeploymentsCommand;
1
+ module.exports = require("../index.js");
@@ -1,28 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetDeviceRegistrationCommand = exports.$Command = void 0;
4
- const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
- const middleware_serde_1 = require("@smithy/middleware-serde");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
- const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
- class GetDeviceRegistrationCommand extends smithy_client_1.Command
11
- .classBuilder()
12
- .ep({
13
- ...EndpointParameters_1.commonParams,
14
- })
15
- .m(function (Command, cs, config, o) {
16
- return [
17
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
- ];
20
- })
21
- .s("AmazonSageMakerEdge", "GetDeviceRegistration", {})
22
- .n("SagemakerEdgeClient", "GetDeviceRegistrationCommand")
23
- .f(void 0, void 0)
24
- .ser(Aws_restJson1_1.se_GetDeviceRegistrationCommand)
25
- .de(Aws_restJson1_1.de_GetDeviceRegistrationCommand)
26
- .build() {
27
- }
28
- exports.GetDeviceRegistrationCommand = GetDeviceRegistrationCommand;
1
+ module.exports = require("../index.js");
@@ -1,28 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SendHeartbeatCommand = exports.$Command = void 0;
4
- const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
5
- const middleware_serde_1 = require("@smithy/middleware-serde");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
- const EndpointParameters_1 = require("../endpoint/EndpointParameters");
9
- const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
10
- class SendHeartbeatCommand extends smithy_client_1.Command
11
- .classBuilder()
12
- .ep({
13
- ...EndpointParameters_1.commonParams,
14
- })
15
- .m(function (Command, cs, config, o) {
16
- return [
17
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
18
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
19
- ];
20
- })
21
- .s("AmazonSageMakerEdge", "SendHeartbeat", {})
22
- .n("SagemakerEdgeClient", "SendHeartbeatCommand")
23
- .f(void 0, void 0)
24
- .ser(Aws_restJson1_1.se_SendHeartbeatCommand)
25
- .de(Aws_restJson1_1.de_SendHeartbeatCommand)
26
- .build() {
27
- }
28
- exports.SendHeartbeatCommand = SendHeartbeatCommand;
1
+ module.exports = require("../index.js");
@@ -1,6 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./GetDeploymentsCommand"), exports);
5
- tslib_1.__exportStar(require("./GetDeviceRegistrationCommand"), exports);
6
- tslib_1.__exportStar(require("./SendHeartbeatCommand"), exports);
1
+ module.exports = require("../index.js");
@@ -1,18 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.commonParams = exports.resolveClientEndpointParameters = void 0;
4
- const resolveClientEndpointParameters = (options) => {
5
- return {
6
- ...options,
7
- useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
- useFipsEndpoint: options.useFipsEndpoint ?? false,
9
- defaultSigningName: "sagemaker",
10
- };
11
- };
12
- exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
13
- exports.commonParams = {
14
- UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
15
- Endpoint: { type: "builtInParams", name: "endpoint" },
16
- Region: { type: "builtInParams", name: "region" },
17
- UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
18
- };
1
+ module.exports = require("../index.js");
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ module.exports = require("./index.js");
package/dist-cjs/index.js CHANGED
@@ -1,11 +1,514 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SagemakerEdgeServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./SagemakerEdgeClient"), exports);
6
- tslib_1.__exportStar(require("./SagemakerEdge"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var SagemakerEdgeServiceException_1 = require("./models/SagemakerEdgeServiceException");
11
- Object.defineProperty(exports, "SagemakerEdgeServiceException", { enumerable: true, get: function () { return SagemakerEdgeServiceException_1.SagemakerEdgeServiceException; } });
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
+ ChecksumType: () => ChecksumType,
25
+ DeploymentStatus: () => DeploymentStatus,
26
+ DeploymentType: () => DeploymentType,
27
+ FailureHandlingPolicy: () => FailureHandlingPolicy,
28
+ GetDeploymentsCommand: () => GetDeploymentsCommand,
29
+ GetDeviceRegistrationCommand: () => GetDeviceRegistrationCommand,
30
+ InternalServiceException: () => InternalServiceException,
31
+ ModelState: () => ModelState,
32
+ SagemakerEdge: () => SagemakerEdge,
33
+ SagemakerEdgeClient: () => SagemakerEdgeClient,
34
+ SagemakerEdgeServiceException: () => SagemakerEdgeServiceException,
35
+ SendHeartbeatCommand: () => SendHeartbeatCommand,
36
+ __Client: () => import_smithy_client.Client
37
+ });
38
+ module.exports = __toCommonJS(src_exports);
39
+
40
+ // src/SagemakerEdgeClient.ts
41
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
42
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
43
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
44
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
45
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
46
+ var import_config_resolver = require("@smithy/config-resolver");
47
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
48
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
49
+ var import_middleware_retry = require("@smithy/middleware-retry");
50
+
51
+
52
+ // src/endpoint/EndpointParameters.ts
53
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
54
+ return {
55
+ ...options,
56
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
57
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
58
+ defaultSigningName: "sagemaker"
59
+ };
60
+ }, "resolveClientEndpointParameters");
61
+ var commonParams = {
62
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
63
+ Endpoint: { type: "builtInParams", name: "endpoint" },
64
+ Region: { type: "builtInParams", name: "region" },
65
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
66
+ };
67
+
68
+ // src/SagemakerEdgeClient.ts
69
+ var import_runtimeConfig = require("././runtimeConfig");
70
+
71
+ // src/runtimeExtensions.ts
72
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
73
+ var import_protocol_http = require("@smithy/protocol-http");
74
+ var import_smithy_client = require("@smithy/smithy-client");
75
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
76
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
77
+ const extensionConfiguration = {
78
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
79
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
80
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
81
+ };
82
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
83
+ return {
84
+ ...runtimeConfig,
85
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
86
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
87
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
88
+ };
89
+ }, "resolveRuntimeExtensions");
90
+
91
+ // src/SagemakerEdgeClient.ts
92
+ var _SagemakerEdgeClient = class _SagemakerEdgeClient extends import_smithy_client.Client {
93
+ constructor(...[configuration]) {
94
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
95
+ const _config_1 = resolveClientEndpointParameters(_config_0);
96
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
97
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
98
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
99
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
100
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
101
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
102
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
103
+ super(_config_8);
104
+ this.config = _config_8;
105
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
106
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
107
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
108
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
109
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
110
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
111
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
112
+ }
113
+ /**
114
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
115
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
116
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
117
+ */
118
+ destroy() {
119
+ super.destroy();
120
+ }
121
+ };
122
+ __name(_SagemakerEdgeClient, "SagemakerEdgeClient");
123
+ var SagemakerEdgeClient = _SagemakerEdgeClient;
124
+
125
+ // src/SagemakerEdge.ts
126
+
127
+
128
+ // src/commands/GetDeploymentsCommand.ts
129
+
130
+ var import_middleware_serde = require("@smithy/middleware-serde");
131
+
132
+ var import_types = require("@smithy/types");
133
+
134
+ // src/protocols/Aws_restJson1.ts
135
+ var import_core = require("@smithy/core");
136
+
137
+
138
+ // src/models/SagemakerEdgeServiceException.ts
139
+
140
+ var _SagemakerEdgeServiceException = class _SagemakerEdgeServiceException extends import_smithy_client.ServiceException {
141
+ /**
142
+ * @internal
143
+ */
144
+ constructor(options) {
145
+ super(options);
146
+ Object.setPrototypeOf(this, _SagemakerEdgeServiceException.prototype);
147
+ }
148
+ };
149
+ __name(_SagemakerEdgeServiceException, "SagemakerEdgeServiceException");
150
+ var SagemakerEdgeServiceException = _SagemakerEdgeServiceException;
151
+
152
+ // src/models/models_0.ts
153
+ var ChecksumType = {
154
+ Sha1: "SHA1"
155
+ };
156
+ var ModelState = {
157
+ Deploy: "DEPLOY",
158
+ Undeploy: "UNDEPLOY"
159
+ };
160
+ var FailureHandlingPolicy = {
161
+ DoNothing: "DO_NOTHING",
162
+ RollbackOnFailure: "ROLLBACK_ON_FAILURE"
163
+ };
164
+ var DeploymentType = {
165
+ Model: "Model"
166
+ };
167
+ var _InternalServiceException = class _InternalServiceException extends SagemakerEdgeServiceException {
168
+ /**
169
+ * @internal
170
+ */
171
+ constructor(opts) {
172
+ super({
173
+ name: "InternalServiceException",
174
+ $fault: "client",
175
+ ...opts
176
+ });
177
+ this.name = "InternalServiceException";
178
+ this.$fault = "client";
179
+ Object.setPrototypeOf(this, _InternalServiceException.prototype);
180
+ this.Message = opts.Message;
181
+ }
182
+ };
183
+ __name(_InternalServiceException, "InternalServiceException");
184
+ var InternalServiceException = _InternalServiceException;
185
+ var DeploymentStatus = {
186
+ Fail: "FAIL",
187
+ Success: "SUCCESS"
188
+ };
189
+
190
+ // src/protocols/Aws_restJson1.ts
191
+ var se_GetDeploymentsCommand = /* @__PURE__ */ __name(async (input, context) => {
192
+ const b = (0, import_core.requestBuilder)(input, context);
193
+ const headers = {
194
+ "content-type": "application/json"
195
+ };
196
+ b.bp("/GetDeployments");
197
+ let body;
198
+ body = JSON.stringify(
199
+ (0, import_smithy_client.take)(input, {
200
+ DeviceFleetName: [],
201
+ DeviceName: []
202
+ })
203
+ );
204
+ b.m("POST").h(headers).b(body);
205
+ return b.build();
206
+ }, "se_GetDeploymentsCommand");
207
+ var se_GetDeviceRegistrationCommand = /* @__PURE__ */ __name(async (input, context) => {
208
+ const b = (0, import_core.requestBuilder)(input, context);
209
+ const headers = {
210
+ "content-type": "application/json"
211
+ };
212
+ b.bp("/GetDeviceRegistration");
213
+ let body;
214
+ body = JSON.stringify(
215
+ (0, import_smithy_client.take)(input, {
216
+ DeviceFleetName: [],
217
+ DeviceName: []
218
+ })
219
+ );
220
+ b.m("POST").h(headers).b(body);
221
+ return b.build();
222
+ }, "se_GetDeviceRegistrationCommand");
223
+ var se_SendHeartbeatCommand = /* @__PURE__ */ __name(async (input, context) => {
224
+ const b = (0, import_core.requestBuilder)(input, context);
225
+ const headers = {
226
+ "content-type": "application/json"
227
+ };
228
+ b.bp("/SendHeartbeat");
229
+ let body;
230
+ body = JSON.stringify(
231
+ (0, import_smithy_client.take)(input, {
232
+ AgentMetrics: (_) => se_EdgeMetrics(_, context),
233
+ AgentVersion: [],
234
+ DeploymentResult: (_) => se_DeploymentResult(_, context),
235
+ DeviceFleetName: [],
236
+ DeviceName: [],
237
+ Models: (_) => se_Models(_, context)
238
+ })
239
+ );
240
+ b.m("POST").h(headers).b(body);
241
+ return b.build();
242
+ }, "se_SendHeartbeatCommand");
243
+ var de_GetDeploymentsCommand = /* @__PURE__ */ __name(async (output, context) => {
244
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
245
+ return de_GetDeploymentsCommandError(output, context);
246
+ }
247
+ const contents = (0, import_smithy_client.map)({
248
+ $metadata: deserializeMetadata(output)
249
+ });
250
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
251
+ const doc = (0, import_smithy_client.take)(data, {
252
+ Deployments: import_smithy_client._json
253
+ });
254
+ Object.assign(contents, doc);
255
+ return contents;
256
+ }, "de_GetDeploymentsCommand");
257
+ var de_GetDeploymentsCommandError = /* @__PURE__ */ __name(async (output, context) => {
258
+ const parsedOutput = {
259
+ ...output,
260
+ body: await parseErrorBody(output.body, context)
261
+ };
262
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
263
+ switch (errorCode) {
264
+ case "InternalServiceException":
265
+ case "com.amazonaws.sagemakeredge#InternalServiceException":
266
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
267
+ default:
268
+ const parsedBody = parsedOutput.body;
269
+ return throwDefaultError({
270
+ output,
271
+ parsedBody,
272
+ errorCode
273
+ });
274
+ }
275
+ }, "de_GetDeploymentsCommandError");
276
+ var de_GetDeviceRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => {
277
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
278
+ return de_GetDeviceRegistrationCommandError(output, context);
279
+ }
280
+ const contents = (0, import_smithy_client.map)({
281
+ $metadata: deserializeMetadata(output)
282
+ });
283
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
284
+ const doc = (0, import_smithy_client.take)(data, {
285
+ CacheTTL: import_smithy_client.expectString,
286
+ DeviceRegistration: import_smithy_client.expectString
287
+ });
288
+ Object.assign(contents, doc);
289
+ return contents;
290
+ }, "de_GetDeviceRegistrationCommand");
291
+ var de_GetDeviceRegistrationCommandError = /* @__PURE__ */ __name(async (output, context) => {
292
+ const parsedOutput = {
293
+ ...output,
294
+ body: await parseErrorBody(output.body, context)
295
+ };
296
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
297
+ switch (errorCode) {
298
+ case "InternalServiceException":
299
+ case "com.amazonaws.sagemakeredge#InternalServiceException":
300
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
301
+ default:
302
+ const parsedBody = parsedOutput.body;
303
+ return throwDefaultError({
304
+ output,
305
+ parsedBody,
306
+ errorCode
307
+ });
308
+ }
309
+ }, "de_GetDeviceRegistrationCommandError");
310
+ var de_SendHeartbeatCommand = /* @__PURE__ */ __name(async (output, context) => {
311
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
312
+ return de_SendHeartbeatCommandError(output, context);
313
+ }
314
+ const contents = (0, import_smithy_client.map)({
315
+ $metadata: deserializeMetadata(output)
316
+ });
317
+ await (0, import_smithy_client.collectBody)(output.body, context);
318
+ return contents;
319
+ }, "de_SendHeartbeatCommand");
320
+ var de_SendHeartbeatCommandError = /* @__PURE__ */ __name(async (output, context) => {
321
+ const parsedOutput = {
322
+ ...output,
323
+ body: await parseErrorBody(output.body, context)
324
+ };
325
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
326
+ switch (errorCode) {
327
+ case "InternalServiceException":
328
+ case "com.amazonaws.sagemakeredge#InternalServiceException":
329
+ throw await de_InternalServiceExceptionRes(parsedOutput, context);
330
+ default:
331
+ const parsedBody = parsedOutput.body;
332
+ return throwDefaultError({
333
+ output,
334
+ parsedBody,
335
+ errorCode
336
+ });
337
+ }
338
+ }, "de_SendHeartbeatCommandError");
339
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(SagemakerEdgeServiceException);
340
+ var de_InternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
341
+ const contents = (0, import_smithy_client.map)({});
342
+ const data = parsedOutput.body;
343
+ const doc = (0, import_smithy_client.take)(data, {
344
+ Message: import_smithy_client.expectString
345
+ });
346
+ Object.assign(contents, doc);
347
+ const exception = new InternalServiceException({
348
+ $metadata: deserializeMetadata(parsedOutput),
349
+ ...contents
350
+ });
351
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
352
+ }, "de_InternalServiceExceptionRes");
353
+ var se_DeploymentResult = /* @__PURE__ */ __name((input, context) => {
354
+ return (0, import_smithy_client.take)(input, {
355
+ DeploymentEndTime: (_) => Math.round(_.getTime() / 1e3),
356
+ DeploymentModels: import_smithy_client._json,
357
+ DeploymentName: [],
358
+ DeploymentStartTime: (_) => Math.round(_.getTime() / 1e3),
359
+ DeploymentStatus: [],
360
+ DeploymentStatusMessage: []
361
+ });
362
+ }, "se_DeploymentResult");
363
+ var se_EdgeMetric = /* @__PURE__ */ __name((input, context) => {
364
+ return (0, import_smithy_client.take)(input, {
365
+ Dimension: [],
366
+ MetricName: [],
367
+ Timestamp: (_) => Math.round(_.getTime() / 1e3),
368
+ Value: import_smithy_client.serializeFloat
369
+ });
370
+ }, "se_EdgeMetric");
371
+ var se_EdgeMetrics = /* @__PURE__ */ __name((input, context) => {
372
+ return input.filter((e) => e != null).map((entry) => {
373
+ return se_EdgeMetric(entry, context);
374
+ });
375
+ }, "se_EdgeMetrics");
376
+ var se_Model = /* @__PURE__ */ __name((input, context) => {
377
+ return (0, import_smithy_client.take)(input, {
378
+ LatestInference: (_) => Math.round(_.getTime() / 1e3),
379
+ LatestSampleTime: (_) => Math.round(_.getTime() / 1e3),
380
+ ModelMetrics: (_) => se_EdgeMetrics(_, context),
381
+ ModelName: [],
382
+ ModelVersion: []
383
+ });
384
+ }, "se_Model");
385
+ var se_Models = /* @__PURE__ */ __name((input, context) => {
386
+ return input.filter((e) => e != null).map((entry) => {
387
+ return se_Model(entry, context);
388
+ });
389
+ }, "se_Models");
390
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
391
+ httpStatusCode: output.statusCode,
392
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
393
+ extendedRequestId: output.headers["x-amz-id-2"],
394
+ cfId: output.headers["x-amz-cf-id"]
395
+ }), "deserializeMetadata");
396
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
397
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
398
+ if (encoded.length) {
399
+ return JSON.parse(encoded);
400
+ }
401
+ return {};
402
+ }), "parseBody");
403
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
404
+ const value = await parseBody(errorBody, context);
405
+ value.message = value.message ?? value.Message;
406
+ return value;
407
+ }, "parseErrorBody");
408
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
409
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
410
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
411
+ let cleanValue = rawValue;
412
+ if (typeof cleanValue === "number") {
413
+ cleanValue = cleanValue.toString();
414
+ }
415
+ if (cleanValue.indexOf(",") >= 0) {
416
+ cleanValue = cleanValue.split(",")[0];
417
+ }
418
+ if (cleanValue.indexOf(":") >= 0) {
419
+ cleanValue = cleanValue.split(":")[0];
420
+ }
421
+ if (cleanValue.indexOf("#") >= 0) {
422
+ cleanValue = cleanValue.split("#")[1];
423
+ }
424
+ return cleanValue;
425
+ }, "sanitizeErrorCode");
426
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
427
+ if (headerKey !== void 0) {
428
+ return sanitizeErrorCode(output.headers[headerKey]);
429
+ }
430
+ if (data.code !== void 0) {
431
+ return sanitizeErrorCode(data.code);
432
+ }
433
+ if (data["__type"] !== void 0) {
434
+ return sanitizeErrorCode(data["__type"]);
435
+ }
436
+ }, "loadRestJsonErrorCode");
437
+
438
+ // src/commands/GetDeploymentsCommand.ts
439
+ var _GetDeploymentsCommand = class _GetDeploymentsCommand extends import_smithy_client.Command.classBuilder().ep({
440
+ ...commonParams
441
+ }).m(function(Command, cs, config, o) {
442
+ return [
443
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
444
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
445
+ ];
446
+ }).s("AmazonSageMakerEdge", "GetDeployments", {}).n("SagemakerEdgeClient", "GetDeploymentsCommand").f(void 0, void 0).ser(se_GetDeploymentsCommand).de(de_GetDeploymentsCommand).build() {
447
+ };
448
+ __name(_GetDeploymentsCommand, "GetDeploymentsCommand");
449
+ var GetDeploymentsCommand = _GetDeploymentsCommand;
450
+
451
+ // src/commands/GetDeviceRegistrationCommand.ts
452
+
453
+
454
+
455
+
456
+ var _GetDeviceRegistrationCommand = class _GetDeviceRegistrationCommand extends import_smithy_client.Command.classBuilder().ep({
457
+ ...commonParams
458
+ }).m(function(Command, cs, config, o) {
459
+ return [
460
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
461
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
462
+ ];
463
+ }).s("AmazonSageMakerEdge", "GetDeviceRegistration", {}).n("SagemakerEdgeClient", "GetDeviceRegistrationCommand").f(void 0, void 0).ser(se_GetDeviceRegistrationCommand).de(de_GetDeviceRegistrationCommand).build() {
464
+ };
465
+ __name(_GetDeviceRegistrationCommand, "GetDeviceRegistrationCommand");
466
+ var GetDeviceRegistrationCommand = _GetDeviceRegistrationCommand;
467
+
468
+ // src/commands/SendHeartbeatCommand.ts
469
+
470
+
471
+
472
+
473
+ var _SendHeartbeatCommand = class _SendHeartbeatCommand extends import_smithy_client.Command.classBuilder().ep({
474
+ ...commonParams
475
+ }).m(function(Command, cs, config, o) {
476
+ return [
477
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
478
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
479
+ ];
480
+ }).s("AmazonSageMakerEdge", "SendHeartbeat", {}).n("SagemakerEdgeClient", "SendHeartbeatCommand").f(void 0, void 0).ser(se_SendHeartbeatCommand).de(de_SendHeartbeatCommand).build() {
481
+ };
482
+ __name(_SendHeartbeatCommand, "SendHeartbeatCommand");
483
+ var SendHeartbeatCommand = _SendHeartbeatCommand;
484
+
485
+ // src/SagemakerEdge.ts
486
+ var commands = {
487
+ GetDeploymentsCommand,
488
+ GetDeviceRegistrationCommand,
489
+ SendHeartbeatCommand
490
+ };
491
+ var _SagemakerEdge = class _SagemakerEdge extends SagemakerEdgeClient {
492
+ };
493
+ __name(_SagemakerEdge, "SagemakerEdge");
494
+ var SagemakerEdge = _SagemakerEdge;
495
+ (0, import_smithy_client.createAggregatedClient)(commands, SagemakerEdge);
496
+
497
+ // src/index.ts
498
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
499
+ // Annotate the CommonJS export names for ESM import in node:
500
+ 0 && (module.exports = {
501
+ ChecksumType,
502
+ DeploymentStatus,
503
+ DeploymentType,
504
+ FailureHandlingPolicy,
505
+ GetDeploymentsCommand,
506
+ GetDeviceRegistrationCommand,
507
+ InternalServiceException,
508
+ ModelState,
509
+ SagemakerEdge,
510
+ SagemakerEdgeClient,
511
+ SagemakerEdgeServiceException,
512
+ SendHeartbeatCommand,
513
+ __Client
514
+ });
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SagemakerEdgeServiceException = exports.__ServiceException = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- Object.defineProperty(exports, "__ServiceException", { enumerable: true, get: function () { return smithy_client_1.ServiceException; } });
6
- class SagemakerEdgeServiceException extends smithy_client_1.ServiceException {
7
- constructor(options) {
8
- super(options);
9
- Object.setPrototypeOf(this, SagemakerEdgeServiceException.prototype);
10
- }
11
- }
12
- exports.SagemakerEdgeServiceException = SagemakerEdgeServiceException;
1
+ module.exports = require("../index.js");
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./models_0"), exports);
1
+ module.exports = require("../index.js");
@@ -1,36 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeploymentStatus = exports.InternalServiceException = exports.DeploymentType = exports.FailureHandlingPolicy = exports.ModelState = exports.ChecksumType = void 0;
4
- const SagemakerEdgeServiceException_1 = require("./SagemakerEdgeServiceException");
5
- exports.ChecksumType = {
6
- Sha1: "SHA1",
7
- };
8
- exports.ModelState = {
9
- Deploy: "DEPLOY",
10
- Undeploy: "UNDEPLOY",
11
- };
12
- exports.FailureHandlingPolicy = {
13
- DoNothing: "DO_NOTHING",
14
- RollbackOnFailure: "ROLLBACK_ON_FAILURE",
15
- };
16
- exports.DeploymentType = {
17
- Model: "Model",
18
- };
19
- class InternalServiceException extends SagemakerEdgeServiceException_1.SagemakerEdgeServiceException {
20
- constructor(opts) {
21
- super({
22
- name: "InternalServiceException",
23
- $fault: "client",
24
- ...opts,
25
- });
26
- this.name = "InternalServiceException";
27
- this.$fault = "client";
28
- Object.setPrototypeOf(this, InternalServiceException.prototype);
29
- this.Message = opts.Message;
30
- }
31
- }
32
- exports.InternalServiceException = InternalServiceException;
33
- exports.DeploymentStatus = {
34
- Fail: "FAIL",
35
- Success: "SUCCESS",
36
- };
1
+ module.exports = require("../index.js");
@@ -1,262 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_SendHeartbeatCommand = exports.de_GetDeviceRegistrationCommand = exports.de_GetDeploymentsCommand = exports.se_SendHeartbeatCommand = exports.se_GetDeviceRegistrationCommand = exports.se_GetDeploymentsCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const models_0_1 = require("../models/models_0");
7
- const SagemakerEdgeServiceException_1 = require("../models/SagemakerEdgeServiceException");
8
- const se_GetDeploymentsCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
- const headers = {
11
- "content-type": "application/json",
12
- };
13
- b.bp("/GetDeployments");
14
- let body;
15
- body = JSON.stringify((0, smithy_client_1.take)(input, {
16
- DeviceFleetName: [],
17
- DeviceName: [],
18
- }));
19
- b.m("POST").h(headers).b(body);
20
- return b.build();
21
- };
22
- exports.se_GetDeploymentsCommand = se_GetDeploymentsCommand;
23
- const se_GetDeviceRegistrationCommand = async (input, context) => {
24
- const b = (0, core_1.requestBuilder)(input, context);
25
- const headers = {
26
- "content-type": "application/json",
27
- };
28
- b.bp("/GetDeviceRegistration");
29
- let body;
30
- body = JSON.stringify((0, smithy_client_1.take)(input, {
31
- DeviceFleetName: [],
32
- DeviceName: [],
33
- }));
34
- b.m("POST").h(headers).b(body);
35
- return b.build();
36
- };
37
- exports.se_GetDeviceRegistrationCommand = se_GetDeviceRegistrationCommand;
38
- const se_SendHeartbeatCommand = async (input, context) => {
39
- const b = (0, core_1.requestBuilder)(input, context);
40
- const headers = {
41
- "content-type": "application/json",
42
- };
43
- b.bp("/SendHeartbeat");
44
- let body;
45
- body = JSON.stringify((0, smithy_client_1.take)(input, {
46
- AgentMetrics: (_) => se_EdgeMetrics(_, context),
47
- AgentVersion: [],
48
- DeploymentResult: (_) => se_DeploymentResult(_, context),
49
- DeviceFleetName: [],
50
- DeviceName: [],
51
- Models: (_) => se_Models(_, context),
52
- }));
53
- b.m("POST").h(headers).b(body);
54
- return b.build();
55
- };
56
- exports.se_SendHeartbeatCommand = se_SendHeartbeatCommand;
57
- const de_GetDeploymentsCommand = async (output, context) => {
58
- if (output.statusCode !== 200 && output.statusCode >= 300) {
59
- return de_GetDeploymentsCommandError(output, context);
60
- }
61
- const contents = (0, smithy_client_1.map)({
62
- $metadata: deserializeMetadata(output),
63
- });
64
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
65
- const doc = (0, smithy_client_1.take)(data, {
66
- Deployments: smithy_client_1._json,
67
- });
68
- Object.assign(contents, doc);
69
- return contents;
70
- };
71
- exports.de_GetDeploymentsCommand = de_GetDeploymentsCommand;
72
- const de_GetDeploymentsCommandError = async (output, context) => {
73
- const parsedOutput = {
74
- ...output,
75
- body: await parseErrorBody(output.body, context),
76
- };
77
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
78
- switch (errorCode) {
79
- case "InternalServiceException":
80
- case "com.amazonaws.sagemakeredge#InternalServiceException":
81
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
82
- default:
83
- const parsedBody = parsedOutput.body;
84
- return throwDefaultError({
85
- output,
86
- parsedBody,
87
- errorCode,
88
- });
89
- }
90
- };
91
- const de_GetDeviceRegistrationCommand = async (output, context) => {
92
- if (output.statusCode !== 200 && output.statusCode >= 300) {
93
- return de_GetDeviceRegistrationCommandError(output, context);
94
- }
95
- const contents = (0, smithy_client_1.map)({
96
- $metadata: deserializeMetadata(output),
97
- });
98
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
99
- const doc = (0, smithy_client_1.take)(data, {
100
- CacheTTL: smithy_client_1.expectString,
101
- DeviceRegistration: smithy_client_1.expectString,
102
- });
103
- Object.assign(contents, doc);
104
- return contents;
105
- };
106
- exports.de_GetDeviceRegistrationCommand = de_GetDeviceRegistrationCommand;
107
- const de_GetDeviceRegistrationCommandError = async (output, context) => {
108
- const parsedOutput = {
109
- ...output,
110
- body: await parseErrorBody(output.body, context),
111
- };
112
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
113
- switch (errorCode) {
114
- case "InternalServiceException":
115
- case "com.amazonaws.sagemakeredge#InternalServiceException":
116
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
117
- default:
118
- const parsedBody = parsedOutput.body;
119
- return throwDefaultError({
120
- output,
121
- parsedBody,
122
- errorCode,
123
- });
124
- }
125
- };
126
- const de_SendHeartbeatCommand = async (output, context) => {
127
- if (output.statusCode !== 200 && output.statusCode >= 300) {
128
- return de_SendHeartbeatCommandError(output, context);
129
- }
130
- const contents = (0, smithy_client_1.map)({
131
- $metadata: deserializeMetadata(output),
132
- });
133
- await (0, smithy_client_1.collectBody)(output.body, context);
134
- return contents;
135
- };
136
- exports.de_SendHeartbeatCommand = de_SendHeartbeatCommand;
137
- const de_SendHeartbeatCommandError = async (output, context) => {
138
- const parsedOutput = {
139
- ...output,
140
- body: await parseErrorBody(output.body, context),
141
- };
142
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
143
- switch (errorCode) {
144
- case "InternalServiceException":
145
- case "com.amazonaws.sagemakeredge#InternalServiceException":
146
- throw await de_InternalServiceExceptionRes(parsedOutput, context);
147
- default:
148
- const parsedBody = parsedOutput.body;
149
- return throwDefaultError({
150
- output,
151
- parsedBody,
152
- errorCode,
153
- });
154
- }
155
- };
156
- const throwDefaultError = (0, smithy_client_1.withBaseException)(SagemakerEdgeServiceException_1.SagemakerEdgeServiceException);
157
- const de_InternalServiceExceptionRes = async (parsedOutput, context) => {
158
- const contents = (0, smithy_client_1.map)({});
159
- const data = parsedOutput.body;
160
- const doc = (0, smithy_client_1.take)(data, {
161
- Message: smithy_client_1.expectString,
162
- });
163
- Object.assign(contents, doc);
164
- const exception = new models_0_1.InternalServiceException({
165
- $metadata: deserializeMetadata(parsedOutput),
166
- ...contents,
167
- });
168
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
169
- };
170
- const se_DeploymentResult = (input, context) => {
171
- return (0, smithy_client_1.take)(input, {
172
- DeploymentEndTime: (_) => Math.round(_.getTime() / 1000),
173
- DeploymentModels: smithy_client_1._json,
174
- DeploymentName: [],
175
- DeploymentStartTime: (_) => Math.round(_.getTime() / 1000),
176
- DeploymentStatus: [],
177
- DeploymentStatusMessage: [],
178
- });
179
- };
180
- const se_EdgeMetric = (input, context) => {
181
- return (0, smithy_client_1.take)(input, {
182
- Dimension: [],
183
- MetricName: [],
184
- Timestamp: (_) => Math.round(_.getTime() / 1000),
185
- Value: smithy_client_1.serializeFloat,
186
- });
187
- };
188
- const se_EdgeMetrics = (input, context) => {
189
- return input
190
- .filter((e) => e != null)
191
- .map((entry) => {
192
- return se_EdgeMetric(entry, context);
193
- });
194
- };
195
- const se_Model = (input, context) => {
196
- return (0, smithy_client_1.take)(input, {
197
- LatestInference: (_) => Math.round(_.getTime() / 1000),
198
- LatestSampleTime: (_) => Math.round(_.getTime() / 1000),
199
- ModelMetrics: (_) => se_EdgeMetrics(_, context),
200
- ModelName: [],
201
- ModelVersion: [],
202
- });
203
- };
204
- const se_Models = (input, context) => {
205
- return input
206
- .filter((e) => e != null)
207
- .map((entry) => {
208
- return se_Model(entry, context);
209
- });
210
- };
211
- const deserializeMetadata = (output) => ({
212
- httpStatusCode: output.statusCode,
213
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
214
- extendedRequestId: output.headers["x-amz-id-2"],
215
- cfId: output.headers["x-amz-cf-id"],
216
- });
217
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
218
- const isSerializableHeaderValue = (value) => value !== undefined &&
219
- value !== null &&
220
- value !== "" &&
221
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
222
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
223
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
224
- if (encoded.length) {
225
- return JSON.parse(encoded);
226
- }
227
- return {};
228
- });
229
- const parseErrorBody = async (errorBody, context) => {
230
- const value = await parseBody(errorBody, context);
231
- value.message = value.message ?? value.Message;
232
- return value;
233
- };
234
- const loadRestJsonErrorCode = (output, data) => {
235
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
236
- const sanitizeErrorCode = (rawValue) => {
237
- let cleanValue = rawValue;
238
- if (typeof cleanValue === "number") {
239
- cleanValue = cleanValue.toString();
240
- }
241
- if (cleanValue.indexOf(",") >= 0) {
242
- cleanValue = cleanValue.split(",")[0];
243
- }
244
- if (cleanValue.indexOf(":") >= 0) {
245
- cleanValue = cleanValue.split(":")[0];
246
- }
247
- if (cleanValue.indexOf("#") >= 0) {
248
- cleanValue = cleanValue.split("#")[1];
249
- }
250
- return cleanValue;
251
- };
252
- const headerKey = findKey(output.headers, "x-amzn-errortype");
253
- if (headerKey !== undefined) {
254
- return sanitizeErrorCode(output.headers[headerKey]);
255
- }
256
- if (data.code !== undefined) {
257
- return sanitizeErrorCode(data.code);
258
- }
259
- if (data["__type"] !== undefined) {
260
- return sanitizeErrorCode(data["__type"]);
261
- }
262
- };
1
+ module.exports = require("../index.js");
@@ -1,22 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRuntimeExtensions = void 0;
4
- const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const asPartial = (t) => t;
8
- const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
- const extensionConfiguration = {
10
- ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
- ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
- ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
13
- };
14
- extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
- return {
16
- ...runtimeConfig,
17
- ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
- ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
- ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
20
- };
21
- };
22
- exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
1
+ module.exports = require("./index.js");
package/package.json CHANGED
@@ -1,10 +1,10 @@
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.489.0",
4
+ "version": "3.495.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
- "build:cjs": "tsc -p tsconfig.cjs.json",
7
+ "build:cjs": "node ../../scripts/compilation/inline client-sagemaker-edge",
8
8
  "build:es": "tsc -p tsconfig.es.json",
9
9
  "build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
10
10
  "build:types": "tsc -p tsconfig.types.json",
@@ -20,47 +20,47 @@
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.489.0",
24
- "@aws-sdk/core": "3.485.0",
25
- "@aws-sdk/credential-provider-node": "3.489.0",
26
- "@aws-sdk/middleware-host-header": "3.489.0",
27
- "@aws-sdk/middleware-logger": "3.489.0",
28
- "@aws-sdk/middleware-recursion-detection": "3.489.0",
29
- "@aws-sdk/middleware-signing": "3.489.0",
30
- "@aws-sdk/middleware-user-agent": "3.489.0",
31
- "@aws-sdk/region-config-resolver": "3.489.0",
32
- "@aws-sdk/types": "3.489.0",
33
- "@aws-sdk/util-endpoints": "3.489.0",
34
- "@aws-sdk/util-user-agent-browser": "3.489.0",
35
- "@aws-sdk/util-user-agent-node": "3.489.0",
36
- "@smithy/config-resolver": "^2.0.23",
37
- "@smithy/core": "^1.2.2",
38
- "@smithy/fetch-http-handler": "^2.3.2",
39
- "@smithy/hash-node": "^2.0.18",
40
- "@smithy/invalid-dependency": "^2.0.16",
41
- "@smithy/middleware-content-length": "^2.0.18",
42
- "@smithy/middleware-endpoint": "^2.3.0",
43
- "@smithy/middleware-retry": "^2.0.26",
44
- "@smithy/middleware-serde": "^2.0.16",
45
- "@smithy/middleware-stack": "^2.0.10",
46
- "@smithy/node-config-provider": "^2.1.9",
47
- "@smithy/node-http-handler": "^2.2.2",
48
- "@smithy/protocol-http": "^3.0.12",
49
- "@smithy/smithy-client": "^2.2.1",
50
- "@smithy/types": "^2.8.0",
51
- "@smithy/url-parser": "^2.0.16",
52
- "@smithy/util-base64": "^2.0.1",
53
- "@smithy/util-body-length-browser": "^2.0.1",
54
- "@smithy/util-body-length-node": "^2.1.0",
55
- "@smithy/util-defaults-mode-browser": "^2.0.24",
56
- "@smithy/util-defaults-mode-node": "^2.0.32",
57
- "@smithy/util-endpoints": "^1.0.8",
58
- "@smithy/util-retry": "^2.0.9",
59
- "@smithy/util-utf8": "^2.0.2",
23
+ "@aws-sdk/client-sts": "3.495.0",
24
+ "@aws-sdk/core": "3.495.0",
25
+ "@aws-sdk/credential-provider-node": "3.495.0",
26
+ "@aws-sdk/middleware-host-header": "3.495.0",
27
+ "@aws-sdk/middleware-logger": "3.495.0",
28
+ "@aws-sdk/middleware-recursion-detection": "3.495.0",
29
+ "@aws-sdk/middleware-signing": "3.495.0",
30
+ "@aws-sdk/middleware-user-agent": "3.495.0",
31
+ "@aws-sdk/region-config-resolver": "3.495.0",
32
+ "@aws-sdk/types": "3.495.0",
33
+ "@aws-sdk/util-endpoints": "3.495.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.495.0",
35
+ "@aws-sdk/util-user-agent-node": "3.495.0",
36
+ "@smithy/config-resolver": "^2.1.0",
37
+ "@smithy/core": "^1.3.0",
38
+ "@smithy/fetch-http-handler": "^2.4.0",
39
+ "@smithy/hash-node": "^2.1.0",
40
+ "@smithy/invalid-dependency": "^2.1.0",
41
+ "@smithy/middleware-content-length": "^2.1.0",
42
+ "@smithy/middleware-endpoint": "^2.4.0",
43
+ "@smithy/middleware-retry": "^2.1.0",
44
+ "@smithy/middleware-serde": "^2.1.0",
45
+ "@smithy/middleware-stack": "^2.1.0",
46
+ "@smithy/node-config-provider": "^2.2.0",
47
+ "@smithy/node-http-handler": "^2.3.0",
48
+ "@smithy/protocol-http": "^3.1.0",
49
+ "@smithy/smithy-client": "^2.3.0",
50
+ "@smithy/types": "^2.9.0",
51
+ "@smithy/url-parser": "^2.1.0",
52
+ "@smithy/util-base64": "^2.1.0",
53
+ "@smithy/util-body-length-browser": "^2.1.0",
54
+ "@smithy/util-body-length-node": "^2.2.0",
55
+ "@smithy/util-defaults-mode-browser": "^2.1.0",
56
+ "@smithy/util-defaults-mode-node": "^2.1.0",
57
+ "@smithy/util-endpoints": "^1.1.0",
58
+ "@smithy/util-retry": "^2.1.0",
59
+ "@smithy/util-utf8": "^2.1.0",
60
60
  "tslib": "^2.5.0"
61
61
  },
62
62
  "devDependencies": {
63
- "@smithy/service-client-documentation-generator": "^2.0.0",
63
+ "@smithy/service-client-documentation-generator": "^2.1.0",
64
64
  "@tsconfig/node14": "1.0.3",
65
65
  "@types/node": "^14.14.31",
66
66
  "concurrently": "7.0.0",