@aws-sdk/client-sagemaker-a2i-runtime 3.476.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,81 +1,59 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_StopHumanLoopCommand = exports.de_StartHumanLoopCommand = exports.de_ListHumanLoopsCommand = exports.de_DescribeHumanLoopCommand = exports.de_DeleteHumanLoopCommand = exports.se_StopHumanLoopCommand = exports.se_StartHumanLoopCommand = exports.se_ListHumanLoopsCommand = exports.se_DescribeHumanLoopCommand = exports.se_DeleteHumanLoopCommand = 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 SageMakerA2IRuntimeServiceException_1 = require("../models/SageMakerA2IRuntimeServiceException");
8
8
  const se_DeleteHumanLoopCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/{HumanLoopName}";
12
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
11
+ b.bp("/human-loops/{HumanLoopName}");
12
+ b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
13
13
  let body;
14
- return new protocol_http_1.HttpRequest({
15
- protocol,
16
- hostname,
17
- port,
18
- method: "DELETE",
19
- headers,
20
- path: resolvedPath,
21
- body,
22
- });
14
+ b.m("DELETE").h(headers).b(body);
15
+ return b.build();
23
16
  };
24
17
  exports.se_DeleteHumanLoopCommand = se_DeleteHumanLoopCommand;
25
18
  const se_DescribeHumanLoopCommand = async (input, context) => {
26
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
19
+ const b = (0, core_1.requestBuilder)(input, context);
27
20
  const headers = {};
28
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/{HumanLoopName}";
29
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
21
+ b.bp("/human-loops/{HumanLoopName}");
22
+ b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
30
23
  let body;
31
- return new protocol_http_1.HttpRequest({
32
- protocol,
33
- hostname,
34
- port,
35
- method: "GET",
36
- headers,
37
- path: resolvedPath,
38
- body,
39
- });
24
+ b.m("GET").h(headers).b(body);
25
+ return b.build();
40
26
  };
41
27
  exports.se_DescribeHumanLoopCommand = se_DescribeHumanLoopCommand;
42
28
  const se_ListHumanLoopsCommand = async (input, context) => {
43
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
29
+ const b = (0, core_1.requestBuilder)(input, context);
44
30
  const headers = {};
45
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
31
+ b.bp("/human-loops");
46
32
  const query = (0, smithy_client_1.map)({
47
- CreationTimeAfter: [
33
+ [_CTA]: [
48
34
  () => input.CreationTimeAfter !== void 0,
49
- () => (input.CreationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
35
+ () => (input[_CTA].toISOString().split(".")[0] + "Z").toString(),
50
36
  ],
51
- CreationTimeBefore: [
37
+ [_CTB]: [
52
38
  () => input.CreationTimeBefore !== void 0,
53
- () => (input.CreationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
39
+ () => (input[_CTB].toISOString().split(".")[0] + "Z").toString(),
54
40
  ],
55
- FlowDefinitionArn: [, (0, smithy_client_1.expectNonNull)(input.FlowDefinitionArn, `FlowDefinitionArn`)],
56
- SortOrder: [, input.SortOrder],
57
- NextToken: [, input.NextToken],
58
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
41
+ [_FDA]: [, (0, smithy_client_1.expectNonNull)(input[_FDA], `FlowDefinitionArn`)],
42
+ [_SO]: [, input[_SO]],
43
+ [_NT]: [, input[_NT]],
44
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
59
45
  });
60
46
  let body;
61
- return new protocol_http_1.HttpRequest({
62
- protocol,
63
- hostname,
64
- port,
65
- method: "GET",
66
- headers,
67
- path: resolvedPath,
68
- query,
69
- body,
70
- });
47
+ b.m("GET").h(headers).q(query).b(body);
48
+ return b.build();
71
49
  };
72
50
  exports.se_ListHumanLoopsCommand = se_ListHumanLoopsCommand;
73
51
  const se_StartHumanLoopCommand = async (input, context) => {
74
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
52
+ const b = (0, core_1.requestBuilder)(input, context);
75
53
  const headers = {
76
54
  "content-type": "application/json",
77
55
  };
78
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
56
+ b.bp("/human-loops");
79
57
  let body;
80
58
  body = JSON.stringify((0, smithy_client_1.take)(input, {
81
59
  DataAttributes: (_) => (0, smithy_client_1._json)(_),
@@ -83,36 +61,22 @@ const se_StartHumanLoopCommand = async (input, context) => {
83
61
  HumanLoopInput: (_) => (0, smithy_client_1._json)(_),
84
62
  HumanLoopName: [],
85
63
  }));
86
- return new protocol_http_1.HttpRequest({
87
- protocol,
88
- hostname,
89
- port,
90
- method: "POST",
91
- headers,
92
- path: resolvedPath,
93
- body,
94
- });
64
+ b.m("POST").h(headers).b(body);
65
+ return b.build();
95
66
  };
96
67
  exports.se_StartHumanLoopCommand = se_StartHumanLoopCommand;
97
68
  const se_StopHumanLoopCommand = async (input, context) => {
98
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
69
+ const b = (0, core_1.requestBuilder)(input, context);
99
70
  const headers = {
100
71
  "content-type": "application/json",
101
72
  };
102
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/stop";
73
+ b.bp("/human-loops/stop");
103
74
  let body;
104
75
  body = JSON.stringify((0, smithy_client_1.take)(input, {
105
76
  HumanLoopName: [],
106
77
  }));
107
- return new protocol_http_1.HttpRequest({
108
- protocol,
109
- hostname,
110
- port,
111
- method: "POST",
112
- headers,
113
- path: resolvedPath,
114
- body,
115
- });
78
+ b.m("POST").h(headers).b(body);
79
+ return b.build();
116
80
  };
117
81
  exports.se_StopHumanLoopCommand = se_StopHumanLoopCommand;
118
82
  const de_DeleteHumanLoopCommand = async (output, context) => {
@@ -441,6 +405,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
441
405
  value !== "" &&
442
406
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
443
407
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
408
+ const _CTA = "CreationTimeAfter";
409
+ const _CTB = "CreationTimeBefore";
410
+ const _FDA = "FlowDefinitionArn";
411
+ const _MR = "MaxResults";
412
+ const _NT = "NextToken";
413
+ const _SO = "SortOrder";
444
414
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
445
415
  if (encoded.length) {
446
416
  return JSON.parse(encoded);
@@ -1,75 +1,53 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
4
4
  import { SageMakerA2IRuntimeServiceException as __BaseException } from "../models/SageMakerA2IRuntimeServiceException";
5
5
  export const se_DeleteHumanLoopCommand = 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
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/{HumanLoopName}";
9
- resolvedPath = __resolvedPath(resolvedPath, input, "HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
8
+ b.bp("/human-loops/{HumanLoopName}");
9
+ b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
10
10
  let body;
11
- return new __HttpRequest({
12
- protocol,
13
- hostname,
14
- port,
15
- method: "DELETE",
16
- headers,
17
- path: resolvedPath,
18
- body,
19
- });
11
+ b.m("DELETE").h(headers).b(body);
12
+ return b.build();
20
13
  };
21
14
  export const se_DescribeHumanLoopCommand = async (input, context) => {
22
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
15
+ const b = rb(input, context);
23
16
  const headers = {};
24
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/{HumanLoopName}";
25
- resolvedPath = __resolvedPath(resolvedPath, input, "HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
17
+ b.bp("/human-loops/{HumanLoopName}");
18
+ b.p("HumanLoopName", () => input.HumanLoopName, "{HumanLoopName}", false);
26
19
  let body;
27
- return new __HttpRequest({
28
- protocol,
29
- hostname,
30
- port,
31
- method: "GET",
32
- headers,
33
- path: resolvedPath,
34
- body,
35
- });
20
+ b.m("GET").h(headers).b(body);
21
+ return b.build();
36
22
  };
37
23
  export const se_ListHumanLoopsCommand = async (input, context) => {
38
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = rb(input, context);
39
25
  const headers = {};
40
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
26
+ b.bp("/human-loops");
41
27
  const query = map({
42
- CreationTimeAfter: [
28
+ [_CTA]: [
43
29
  () => input.CreationTimeAfter !== void 0,
44
- () => (input.CreationTimeAfter.toISOString().split(".")[0] + "Z").toString(),
30
+ () => (input[_CTA].toISOString().split(".")[0] + "Z").toString(),
45
31
  ],
46
- CreationTimeBefore: [
32
+ [_CTB]: [
47
33
  () => input.CreationTimeBefore !== void 0,
48
- () => (input.CreationTimeBefore.toISOString().split(".")[0] + "Z").toString(),
34
+ () => (input[_CTB].toISOString().split(".")[0] + "Z").toString(),
49
35
  ],
50
- FlowDefinitionArn: [, __expectNonNull(input.FlowDefinitionArn, `FlowDefinitionArn`)],
51
- SortOrder: [, input.SortOrder],
52
- NextToken: [, input.NextToken],
53
- MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
36
+ [_FDA]: [, __expectNonNull(input[_FDA], `FlowDefinitionArn`)],
37
+ [_SO]: [, input[_SO]],
38
+ [_NT]: [, input[_NT]],
39
+ [_MR]: [() => input.MaxResults !== void 0, () => input[_MR].toString()],
54
40
  });
55
41
  let body;
56
- return new __HttpRequest({
57
- protocol,
58
- hostname,
59
- port,
60
- method: "GET",
61
- headers,
62
- path: resolvedPath,
63
- query,
64
- body,
65
- });
42
+ b.m("GET").h(headers).q(query).b(body);
43
+ return b.build();
66
44
  };
67
45
  export const se_StartHumanLoopCommand = async (input, context) => {
68
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
46
+ const b = rb(input, context);
69
47
  const headers = {
70
48
  "content-type": "application/json",
71
49
  };
72
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops";
50
+ b.bp("/human-loops");
73
51
  let body;
74
52
  body = JSON.stringify(take(input, {
75
53
  DataAttributes: (_) => _json(_),
@@ -77,35 +55,21 @@ export const se_StartHumanLoopCommand = async (input, context) => {
77
55
  HumanLoopInput: (_) => _json(_),
78
56
  HumanLoopName: [],
79
57
  }));
80
- return new __HttpRequest({
81
- protocol,
82
- hostname,
83
- port,
84
- method: "POST",
85
- headers,
86
- path: resolvedPath,
87
- body,
88
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
89
60
  };
90
61
  export const se_StopHumanLoopCommand = async (input, context) => {
91
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
62
+ const b = rb(input, context);
92
63
  const headers = {
93
64
  "content-type": "application/json",
94
65
  };
95
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/human-loops/stop";
66
+ b.bp("/human-loops/stop");
96
67
  let body;
97
68
  body = JSON.stringify(take(input, {
98
69
  HumanLoopName: [],
99
70
  }));
100
- return new __HttpRequest({
101
- protocol,
102
- hostname,
103
- port,
104
- method: "POST",
105
- headers,
106
- path: resolvedPath,
107
- body,
108
- });
71
+ b.m("POST").h(headers).b(body);
72
+ return b.build();
109
73
  };
110
74
  export const de_DeleteHumanLoopCommand = async (output, context) => {
111
75
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -428,6 +392,12 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
428
392
  value !== "" &&
429
393
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
430
394
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
395
+ const _CTA = "CreationTimeAfter";
396
+ const _CTB = "CreationTimeBefore";
397
+ const _FDA = "FlowDefinitionArn";
398
+ const _MR = "MaxResults";
399
+ const _NT = "NextToken";
400
+ const _SO = "SortOrder";
431
401
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
432
402
  if (encoded.length) {
433
403
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-sagemaker-a2i-runtime",
3
3
  "description": "AWS SDK for JavaScript Sagemaker A2i Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.476.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.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.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",