@aws-sdk/client-supplychain 3.491.0 → 3.496.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,15 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupplyChain = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- const CreateBillOfMaterialsImportJobCommand_1 = require("./commands/CreateBillOfMaterialsImportJobCommand");
6
- const GetBillOfMaterialsImportJobCommand_1 = require("./commands/GetBillOfMaterialsImportJobCommand");
7
- const SupplyChainClient_1 = require("./SupplyChainClient");
8
- const commands = {
9
- CreateBillOfMaterialsImportJobCommand: CreateBillOfMaterialsImportJobCommand_1.CreateBillOfMaterialsImportJobCommand,
10
- GetBillOfMaterialsImportJobCommand: GetBillOfMaterialsImportJobCommand_1.GetBillOfMaterialsImportJobCommand,
11
- };
12
- class SupplyChain extends SupplyChainClient_1.SupplyChainClient {
13
- }
14
- exports.SupplyChain = SupplyChain;
15
- (0, smithy_client_1.createAggregatedClient)(commands, SupplyChain);
1
+ module.exports = require("./index.js");
@@ -1,43 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupplyChainClient = 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 SupplyChainClient 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.SupplyChainClient = SupplyChainClient;
1
+ module.exports = require("./index.js");
@@ -1,28 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CreateBillOfMaterialsImportJobCommand = 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 CreateBillOfMaterialsImportJobCommand 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("GalaxyPublicAPIGateway", "CreateBillOfMaterialsImportJob", {})
22
- .n("SupplyChainClient", "CreateBillOfMaterialsImportJobCommand")
23
- .f(void 0, void 0)
24
- .ser(Aws_restJson1_1.se_CreateBillOfMaterialsImportJobCommand)
25
- .de(Aws_restJson1_1.de_CreateBillOfMaterialsImportJobCommand)
26
- .build() {
27
- }
28
- exports.CreateBillOfMaterialsImportJobCommand = CreateBillOfMaterialsImportJobCommand;
1
+ module.exports = require("../index.js");
@@ -1,28 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetBillOfMaterialsImportJobCommand = 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 GetBillOfMaterialsImportJobCommand 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("GalaxyPublicAPIGateway", "GetBillOfMaterialsImportJob", {})
22
- .n("SupplyChainClient", "GetBillOfMaterialsImportJobCommand")
23
- .f(void 0, void 0)
24
- .ser(Aws_restJson1_1.se_GetBillOfMaterialsImportJobCommand)
25
- .de(Aws_restJson1_1.de_GetBillOfMaterialsImportJobCommand)
26
- .build() {
27
- }
28
- exports.GetBillOfMaterialsImportJobCommand = GetBillOfMaterialsImportJobCommand;
1
+ module.exports = require("../index.js");
@@ -1,5 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./CreateBillOfMaterialsImportJobCommand"), exports);
5
- tslib_1.__exportStar(require("./GetBillOfMaterialsImportJobCommand"), 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: "scn",
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,617 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupplyChainServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./SupplyChainClient"), exports);
6
- tslib_1.__exportStar(require("./SupplyChain"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var SupplyChainServiceException_1 = require("./models/SupplyChainServiceException");
11
- Object.defineProperty(exports, "SupplyChainServiceException", { enumerable: true, get: function () { return SupplyChainServiceException_1.SupplyChainServiceException; } });
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
+ AccessDeniedException: () => AccessDeniedException,
25
+ ConfigurationJobStatus: () => ConfigurationJobStatus,
26
+ ConflictException: () => ConflictException,
27
+ CreateBillOfMaterialsImportJobCommand: () => CreateBillOfMaterialsImportJobCommand,
28
+ GetBillOfMaterialsImportJobCommand: () => GetBillOfMaterialsImportJobCommand,
29
+ InternalServerException: () => InternalServerException,
30
+ ResourceNotFoundException: () => ResourceNotFoundException,
31
+ ServiceQuotaExceededException: () => ServiceQuotaExceededException,
32
+ SupplyChain: () => SupplyChain,
33
+ SupplyChainClient: () => SupplyChainClient,
34
+ SupplyChainServiceException: () => SupplyChainServiceException,
35
+ ThrottlingException: () => ThrottlingException,
36
+ ValidationException: () => ValidationException,
37
+ __Client: () => import_smithy_client.Client
38
+ });
39
+ module.exports = __toCommonJS(src_exports);
40
+
41
+ // src/SupplyChainClient.ts
42
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
43
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
44
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
45
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
46
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
47
+ var import_config_resolver = require("@smithy/config-resolver");
48
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
49
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
50
+ var import_middleware_retry = require("@smithy/middleware-retry");
51
+
52
+
53
+ // src/endpoint/EndpointParameters.ts
54
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
55
+ return {
56
+ ...options,
57
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
58
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
59
+ defaultSigningName: "scn"
60
+ };
61
+ }, "resolveClientEndpointParameters");
62
+ var commonParams = {
63
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
64
+ Endpoint: { type: "builtInParams", name: "endpoint" },
65
+ Region: { type: "builtInParams", name: "region" },
66
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
67
+ };
68
+
69
+ // src/SupplyChainClient.ts
70
+ var import_runtimeConfig = require("././runtimeConfig");
71
+
72
+ // src/runtimeExtensions.ts
73
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
74
+ var import_protocol_http = require("@smithy/protocol-http");
75
+ var import_smithy_client = require("@smithy/smithy-client");
76
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
77
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
78
+ const extensionConfiguration = {
79
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
80
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
81
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
82
+ };
83
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
84
+ return {
85
+ ...runtimeConfig,
86
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
87
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
88
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
89
+ };
90
+ }, "resolveRuntimeExtensions");
91
+
92
+ // src/SupplyChainClient.ts
93
+ var _SupplyChainClient = class _SupplyChainClient extends import_smithy_client.Client {
94
+ constructor(...[configuration]) {
95
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
96
+ const _config_1 = resolveClientEndpointParameters(_config_0);
97
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
98
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
99
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
100
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
101
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
102
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
103
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
104
+ super(_config_8);
105
+ this.config = _config_8;
106
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
107
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
108
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
109
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
110
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
111
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
113
+ }
114
+ /**
115
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
116
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
117
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
118
+ */
119
+ destroy() {
120
+ super.destroy();
121
+ }
122
+ };
123
+ __name(_SupplyChainClient, "SupplyChainClient");
124
+ var SupplyChainClient = _SupplyChainClient;
125
+
126
+ // src/SupplyChain.ts
127
+
128
+
129
+ // src/commands/CreateBillOfMaterialsImportJobCommand.ts
130
+
131
+ var import_middleware_serde = require("@smithy/middleware-serde");
132
+
133
+ var import_types = require("@smithy/types");
134
+
135
+ // src/protocols/Aws_restJson1.ts
136
+ var import_core = require("@smithy/core");
137
+
138
+ var import_uuid = require("uuid");
139
+
140
+ // src/models/SupplyChainServiceException.ts
141
+
142
+ var _SupplyChainServiceException = class _SupplyChainServiceException extends import_smithy_client.ServiceException {
143
+ /**
144
+ * @internal
145
+ */
146
+ constructor(options) {
147
+ super(options);
148
+ Object.setPrototypeOf(this, _SupplyChainServiceException.prototype);
149
+ }
150
+ };
151
+ __name(_SupplyChainServiceException, "SupplyChainServiceException");
152
+ var SupplyChainServiceException = _SupplyChainServiceException;
153
+
154
+ // src/models/models_0.ts
155
+ var _AccessDeniedException = class _AccessDeniedException extends SupplyChainServiceException {
156
+ /**
157
+ * @internal
158
+ */
159
+ constructor(opts) {
160
+ super({
161
+ name: "AccessDeniedException",
162
+ $fault: "client",
163
+ ...opts
164
+ });
165
+ this.name = "AccessDeniedException";
166
+ this.$fault = "client";
167
+ Object.setPrototypeOf(this, _AccessDeniedException.prototype);
168
+ }
169
+ };
170
+ __name(_AccessDeniedException, "AccessDeniedException");
171
+ var AccessDeniedException = _AccessDeniedException;
172
+ var ConfigurationJobStatus = {
173
+ FAILED: "FAILED",
174
+ IN_PROGRESS: "IN_PROGRESS",
175
+ NEW: "NEW",
176
+ QUEUED: "QUEUED",
177
+ SUCCESS: "SUCCESS"
178
+ };
179
+ var _ConflictException = class _ConflictException extends SupplyChainServiceException {
180
+ /**
181
+ * @internal
182
+ */
183
+ constructor(opts) {
184
+ super({
185
+ name: "ConflictException",
186
+ $fault: "client",
187
+ ...opts
188
+ });
189
+ this.name = "ConflictException";
190
+ this.$fault = "client";
191
+ Object.setPrototypeOf(this, _ConflictException.prototype);
192
+ }
193
+ };
194
+ __name(_ConflictException, "ConflictException");
195
+ var ConflictException = _ConflictException;
196
+ var _InternalServerException = class _InternalServerException extends SupplyChainServiceException {
197
+ /**
198
+ * @internal
199
+ */
200
+ constructor(opts) {
201
+ super({
202
+ name: "InternalServerException",
203
+ $fault: "server",
204
+ ...opts
205
+ });
206
+ this.name = "InternalServerException";
207
+ this.$fault = "server";
208
+ this.$retryable = {};
209
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
210
+ }
211
+ };
212
+ __name(_InternalServerException, "InternalServerException");
213
+ var InternalServerException = _InternalServerException;
214
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends SupplyChainServiceException {
215
+ /**
216
+ * @internal
217
+ */
218
+ constructor(opts) {
219
+ super({
220
+ name: "ResourceNotFoundException",
221
+ $fault: "client",
222
+ ...opts
223
+ });
224
+ this.name = "ResourceNotFoundException";
225
+ this.$fault = "client";
226
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
227
+ }
228
+ };
229
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
230
+ var ResourceNotFoundException = _ResourceNotFoundException;
231
+ var _ServiceQuotaExceededException = class _ServiceQuotaExceededException extends SupplyChainServiceException {
232
+ /**
233
+ * @internal
234
+ */
235
+ constructor(opts) {
236
+ super({
237
+ name: "ServiceQuotaExceededException",
238
+ $fault: "client",
239
+ ...opts
240
+ });
241
+ this.name = "ServiceQuotaExceededException";
242
+ this.$fault = "client";
243
+ Object.setPrototypeOf(this, _ServiceQuotaExceededException.prototype);
244
+ }
245
+ };
246
+ __name(_ServiceQuotaExceededException, "ServiceQuotaExceededException");
247
+ var ServiceQuotaExceededException = _ServiceQuotaExceededException;
248
+ var _ThrottlingException = class _ThrottlingException extends SupplyChainServiceException {
249
+ /**
250
+ * @internal
251
+ */
252
+ constructor(opts) {
253
+ super({
254
+ name: "ThrottlingException",
255
+ $fault: "client",
256
+ ...opts
257
+ });
258
+ this.name = "ThrottlingException";
259
+ this.$fault = "client";
260
+ this.$retryable = {
261
+ throttling: true
262
+ };
263
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
264
+ }
265
+ };
266
+ __name(_ThrottlingException, "ThrottlingException");
267
+ var ThrottlingException = _ThrottlingException;
268
+ var _ValidationException = class _ValidationException extends SupplyChainServiceException {
269
+ /**
270
+ * @internal
271
+ */
272
+ constructor(opts) {
273
+ super({
274
+ name: "ValidationException",
275
+ $fault: "client",
276
+ ...opts
277
+ });
278
+ this.name = "ValidationException";
279
+ this.$fault = "client";
280
+ Object.setPrototypeOf(this, _ValidationException.prototype);
281
+ }
282
+ };
283
+ __name(_ValidationException, "ValidationException");
284
+ var ValidationException = _ValidationException;
285
+
286
+ // src/protocols/Aws_restJson1.ts
287
+ var se_CreateBillOfMaterialsImportJobCommand = /* @__PURE__ */ __name(async (input, context) => {
288
+ const b = (0, import_core.requestBuilder)(input, context);
289
+ const headers = {
290
+ "content-type": "application/json"
291
+ };
292
+ b.bp("/api/configuration/instances/{instanceId}/bill-of-materials-import-jobs");
293
+ b.p("instanceId", () => input.instanceId, "{instanceId}", false);
294
+ let body;
295
+ body = JSON.stringify(
296
+ (0, import_smithy_client.take)(input, {
297
+ clientToken: [true, (_) => _ ?? (0, import_uuid.v4)()],
298
+ s3uri: []
299
+ })
300
+ );
301
+ b.m("POST").h(headers).b(body);
302
+ return b.build();
303
+ }, "se_CreateBillOfMaterialsImportJobCommand");
304
+ var se_GetBillOfMaterialsImportJobCommand = /* @__PURE__ */ __name(async (input, context) => {
305
+ const b = (0, import_core.requestBuilder)(input, context);
306
+ const headers = {};
307
+ b.bp("/api/configuration/instances/{instanceId}/bill-of-materials-import-jobs/{jobId}");
308
+ b.p("instanceId", () => input.instanceId, "{instanceId}", false);
309
+ b.p("jobId", () => input.jobId, "{jobId}", false);
310
+ let body;
311
+ b.m("GET").h(headers).b(body);
312
+ return b.build();
313
+ }, "se_GetBillOfMaterialsImportJobCommand");
314
+ var de_CreateBillOfMaterialsImportJobCommand = /* @__PURE__ */ __name(async (output, context) => {
315
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
316
+ return de_CreateBillOfMaterialsImportJobCommandError(output, context);
317
+ }
318
+ const contents = (0, import_smithy_client.map)({
319
+ $metadata: deserializeMetadata(output)
320
+ });
321
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
322
+ const doc = (0, import_smithy_client.take)(data, {
323
+ jobId: import_smithy_client.expectString
324
+ });
325
+ Object.assign(contents, doc);
326
+ return contents;
327
+ }, "de_CreateBillOfMaterialsImportJobCommand");
328
+ var de_CreateBillOfMaterialsImportJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
329
+ const parsedOutput = {
330
+ ...output,
331
+ body: await parseErrorBody(output.body, context)
332
+ };
333
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
334
+ switch (errorCode) {
335
+ case "AccessDeniedException":
336
+ case "com.amazonaws.supplychain#AccessDeniedException":
337
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
338
+ case "ConflictException":
339
+ case "com.amazonaws.supplychain#ConflictException":
340
+ throw await de_ConflictExceptionRes(parsedOutput, context);
341
+ case "InternalServerException":
342
+ case "com.amazonaws.supplychain#InternalServerException":
343
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
344
+ case "ResourceNotFoundException":
345
+ case "com.amazonaws.supplychain#ResourceNotFoundException":
346
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
347
+ case "ServiceQuotaExceededException":
348
+ case "com.amazonaws.supplychain#ServiceQuotaExceededException":
349
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
350
+ case "ThrottlingException":
351
+ case "com.amazonaws.supplychain#ThrottlingException":
352
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
353
+ case "ValidationException":
354
+ case "com.amazonaws.supplychain#ValidationException":
355
+ throw await de_ValidationExceptionRes(parsedOutput, context);
356
+ default:
357
+ const parsedBody = parsedOutput.body;
358
+ return throwDefaultError({
359
+ output,
360
+ parsedBody,
361
+ errorCode
362
+ });
363
+ }
364
+ }, "de_CreateBillOfMaterialsImportJobCommandError");
365
+ var de_GetBillOfMaterialsImportJobCommand = /* @__PURE__ */ __name(async (output, context) => {
366
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
367
+ return de_GetBillOfMaterialsImportJobCommandError(output, context);
368
+ }
369
+ const contents = (0, import_smithy_client.map)({
370
+ $metadata: deserializeMetadata(output)
371
+ });
372
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
373
+ const doc = (0, import_smithy_client.take)(data, {
374
+ job: import_smithy_client._json
375
+ });
376
+ Object.assign(contents, doc);
377
+ return contents;
378
+ }, "de_GetBillOfMaterialsImportJobCommand");
379
+ var de_GetBillOfMaterialsImportJobCommandError = /* @__PURE__ */ __name(async (output, context) => {
380
+ const parsedOutput = {
381
+ ...output,
382
+ body: await parseErrorBody(output.body, context)
383
+ };
384
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
385
+ switch (errorCode) {
386
+ case "AccessDeniedException":
387
+ case "com.amazonaws.supplychain#AccessDeniedException":
388
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
389
+ case "ConflictException":
390
+ case "com.amazonaws.supplychain#ConflictException":
391
+ throw await de_ConflictExceptionRes(parsedOutput, context);
392
+ case "InternalServerException":
393
+ case "com.amazonaws.supplychain#InternalServerException":
394
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
395
+ case "ResourceNotFoundException":
396
+ case "com.amazonaws.supplychain#ResourceNotFoundException":
397
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
398
+ case "ServiceQuotaExceededException":
399
+ case "com.amazonaws.supplychain#ServiceQuotaExceededException":
400
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
401
+ case "ThrottlingException":
402
+ case "com.amazonaws.supplychain#ThrottlingException":
403
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
404
+ case "ValidationException":
405
+ case "com.amazonaws.supplychain#ValidationException":
406
+ throw await de_ValidationExceptionRes(parsedOutput, context);
407
+ default:
408
+ const parsedBody = parsedOutput.body;
409
+ return throwDefaultError({
410
+ output,
411
+ parsedBody,
412
+ errorCode
413
+ });
414
+ }
415
+ }, "de_GetBillOfMaterialsImportJobCommandError");
416
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(SupplyChainServiceException);
417
+ var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
418
+ const contents = (0, import_smithy_client.map)({});
419
+ const data = parsedOutput.body;
420
+ const doc = (0, import_smithy_client.take)(data, {
421
+ message: import_smithy_client.expectString
422
+ });
423
+ Object.assign(contents, doc);
424
+ const exception = new AccessDeniedException({
425
+ $metadata: deserializeMetadata(parsedOutput),
426
+ ...contents
427
+ });
428
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
429
+ }, "de_AccessDeniedExceptionRes");
430
+ var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
431
+ const contents = (0, import_smithy_client.map)({});
432
+ const data = parsedOutput.body;
433
+ const doc = (0, import_smithy_client.take)(data, {
434
+ message: import_smithy_client.expectString
435
+ });
436
+ Object.assign(contents, doc);
437
+ const exception = new ConflictException({
438
+ $metadata: deserializeMetadata(parsedOutput),
439
+ ...contents
440
+ });
441
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
442
+ }, "de_ConflictExceptionRes");
443
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
444
+ const contents = (0, import_smithy_client.map)({});
445
+ const data = parsedOutput.body;
446
+ const doc = (0, import_smithy_client.take)(data, {
447
+ message: import_smithy_client.expectString
448
+ });
449
+ Object.assign(contents, doc);
450
+ const exception = new InternalServerException({
451
+ $metadata: deserializeMetadata(parsedOutput),
452
+ ...contents
453
+ });
454
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
455
+ }, "de_InternalServerExceptionRes");
456
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
457
+ const contents = (0, import_smithy_client.map)({});
458
+ const data = parsedOutput.body;
459
+ const doc = (0, import_smithy_client.take)(data, {
460
+ message: import_smithy_client.expectString
461
+ });
462
+ Object.assign(contents, doc);
463
+ const exception = new ResourceNotFoundException({
464
+ $metadata: deserializeMetadata(parsedOutput),
465
+ ...contents
466
+ });
467
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
468
+ }, "de_ResourceNotFoundExceptionRes");
469
+ var de_ServiceQuotaExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
470
+ const contents = (0, import_smithy_client.map)({});
471
+ const data = parsedOutput.body;
472
+ const doc = (0, import_smithy_client.take)(data, {
473
+ message: import_smithy_client.expectString
474
+ });
475
+ Object.assign(contents, doc);
476
+ const exception = new ServiceQuotaExceededException({
477
+ $metadata: deserializeMetadata(parsedOutput),
478
+ ...contents
479
+ });
480
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
481
+ }, "de_ServiceQuotaExceededExceptionRes");
482
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
483
+ const contents = (0, import_smithy_client.map)({});
484
+ const data = parsedOutput.body;
485
+ const doc = (0, import_smithy_client.take)(data, {
486
+ message: import_smithy_client.expectString
487
+ });
488
+ Object.assign(contents, doc);
489
+ const exception = new ThrottlingException({
490
+ $metadata: deserializeMetadata(parsedOutput),
491
+ ...contents
492
+ });
493
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
494
+ }, "de_ThrottlingExceptionRes");
495
+ var de_ValidationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
496
+ const contents = (0, import_smithy_client.map)({});
497
+ const data = parsedOutput.body;
498
+ const doc = (0, import_smithy_client.take)(data, {
499
+ message: import_smithy_client.expectString
500
+ });
501
+ Object.assign(contents, doc);
502
+ const exception = new ValidationException({
503
+ $metadata: deserializeMetadata(parsedOutput),
504
+ ...contents
505
+ });
506
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
507
+ }, "de_ValidationExceptionRes");
508
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
509
+ httpStatusCode: output.statusCode,
510
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
511
+ extendedRequestId: output.headers["x-amz-id-2"],
512
+ cfId: output.headers["x-amz-cf-id"]
513
+ }), "deserializeMetadata");
514
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
515
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
516
+ if (encoded.length) {
517
+ return JSON.parse(encoded);
518
+ }
519
+ return {};
520
+ }), "parseBody");
521
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
522
+ const value = await parseBody(errorBody, context);
523
+ value.message = value.message ?? value.Message;
524
+ return value;
525
+ }, "parseErrorBody");
526
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
527
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
528
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
529
+ let cleanValue = rawValue;
530
+ if (typeof cleanValue === "number") {
531
+ cleanValue = cleanValue.toString();
532
+ }
533
+ if (cleanValue.indexOf(",") >= 0) {
534
+ cleanValue = cleanValue.split(",")[0];
535
+ }
536
+ if (cleanValue.indexOf(":") >= 0) {
537
+ cleanValue = cleanValue.split(":")[0];
538
+ }
539
+ if (cleanValue.indexOf("#") >= 0) {
540
+ cleanValue = cleanValue.split("#")[1];
541
+ }
542
+ return cleanValue;
543
+ }, "sanitizeErrorCode");
544
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
545
+ if (headerKey !== void 0) {
546
+ return sanitizeErrorCode(output.headers[headerKey]);
547
+ }
548
+ if (data.code !== void 0) {
549
+ return sanitizeErrorCode(data.code);
550
+ }
551
+ if (data["__type"] !== void 0) {
552
+ return sanitizeErrorCode(data["__type"]);
553
+ }
554
+ }, "loadRestJsonErrorCode");
555
+
556
+ // src/commands/CreateBillOfMaterialsImportJobCommand.ts
557
+ var _CreateBillOfMaterialsImportJobCommand = class _CreateBillOfMaterialsImportJobCommand extends import_smithy_client.Command.classBuilder().ep({
558
+ ...commonParams
559
+ }).m(function(Command, cs, config, o) {
560
+ return [
561
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
562
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
563
+ ];
564
+ }).s("GalaxyPublicAPIGateway", "CreateBillOfMaterialsImportJob", {}).n("SupplyChainClient", "CreateBillOfMaterialsImportJobCommand").f(void 0, void 0).ser(se_CreateBillOfMaterialsImportJobCommand).de(de_CreateBillOfMaterialsImportJobCommand).build() {
565
+ };
566
+ __name(_CreateBillOfMaterialsImportJobCommand, "CreateBillOfMaterialsImportJobCommand");
567
+ var CreateBillOfMaterialsImportJobCommand = _CreateBillOfMaterialsImportJobCommand;
568
+
569
+ // src/commands/GetBillOfMaterialsImportJobCommand.ts
570
+
571
+
572
+
573
+
574
+ var _GetBillOfMaterialsImportJobCommand = class _GetBillOfMaterialsImportJobCommand extends import_smithy_client.Command.classBuilder().ep({
575
+ ...commonParams
576
+ }).m(function(Command, cs, config, o) {
577
+ return [
578
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
579
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
580
+ ];
581
+ }).s("GalaxyPublicAPIGateway", "GetBillOfMaterialsImportJob", {}).n("SupplyChainClient", "GetBillOfMaterialsImportJobCommand").f(void 0, void 0).ser(se_GetBillOfMaterialsImportJobCommand).de(de_GetBillOfMaterialsImportJobCommand).build() {
582
+ };
583
+ __name(_GetBillOfMaterialsImportJobCommand, "GetBillOfMaterialsImportJobCommand");
584
+ var GetBillOfMaterialsImportJobCommand = _GetBillOfMaterialsImportJobCommand;
585
+
586
+ // src/SupplyChain.ts
587
+ var commands = {
588
+ CreateBillOfMaterialsImportJobCommand,
589
+ GetBillOfMaterialsImportJobCommand
590
+ };
591
+ var _SupplyChain = class _SupplyChain extends SupplyChainClient {
592
+ };
593
+ __name(_SupplyChain, "SupplyChain");
594
+ var SupplyChain = _SupplyChain;
595
+ (0, import_smithy_client.createAggregatedClient)(commands, SupplyChain);
596
+
597
+ // src/index.ts
598
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
599
+ // Annotate the CommonJS export names for ESM import in node:
600
+
601
+ 0 && (module.exports = {
602
+ AccessDeniedException,
603
+ ConfigurationJobStatus,
604
+ ConflictException,
605
+ CreateBillOfMaterialsImportJobCommand,
606
+ GetBillOfMaterialsImportJobCommand,
607
+ InternalServerException,
608
+ ResourceNotFoundException,
609
+ ServiceQuotaExceededException,
610
+ SupplyChain,
611
+ SupplyChainClient,
612
+ SupplyChainServiceException,
613
+ ThrottlingException,
614
+ ValidationException,
615
+ __Client
616
+ });
617
+
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SupplyChainServiceException = 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 SupplyChainServiceException extends smithy_client_1.ServiceException {
7
- constructor(options) {
8
- super(options);
9
- Object.setPrototypeOf(this, SupplyChainServiceException.prototype);
10
- }
11
- }
12
- exports.SupplyChainServiceException = SupplyChainServiceException;
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,106 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ValidationException = exports.ThrottlingException = exports.ServiceQuotaExceededException = exports.ResourceNotFoundException = exports.InternalServerException = exports.ConflictException = exports.ConfigurationJobStatus = exports.AccessDeniedException = void 0;
4
- const SupplyChainServiceException_1 = require("./SupplyChainServiceException");
5
- class AccessDeniedException extends SupplyChainServiceException_1.SupplyChainServiceException {
6
- constructor(opts) {
7
- super({
8
- name: "AccessDeniedException",
9
- $fault: "client",
10
- ...opts,
11
- });
12
- this.name = "AccessDeniedException";
13
- this.$fault = "client";
14
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
- }
16
- }
17
- exports.AccessDeniedException = AccessDeniedException;
18
- exports.ConfigurationJobStatus = {
19
- FAILED: "FAILED",
20
- IN_PROGRESS: "IN_PROGRESS",
21
- NEW: "NEW",
22
- QUEUED: "QUEUED",
23
- SUCCESS: "SUCCESS",
24
- };
25
- class ConflictException extends SupplyChainServiceException_1.SupplyChainServiceException {
26
- constructor(opts) {
27
- super({
28
- name: "ConflictException",
29
- $fault: "client",
30
- ...opts,
31
- });
32
- this.name = "ConflictException";
33
- this.$fault = "client";
34
- Object.setPrototypeOf(this, ConflictException.prototype);
35
- }
36
- }
37
- exports.ConflictException = ConflictException;
38
- class InternalServerException extends SupplyChainServiceException_1.SupplyChainServiceException {
39
- constructor(opts) {
40
- super({
41
- name: "InternalServerException",
42
- $fault: "server",
43
- ...opts,
44
- });
45
- this.name = "InternalServerException";
46
- this.$fault = "server";
47
- this.$retryable = {};
48
- Object.setPrototypeOf(this, InternalServerException.prototype);
49
- }
50
- }
51
- exports.InternalServerException = InternalServerException;
52
- class ResourceNotFoundException extends SupplyChainServiceException_1.SupplyChainServiceException {
53
- constructor(opts) {
54
- super({
55
- name: "ResourceNotFoundException",
56
- $fault: "client",
57
- ...opts,
58
- });
59
- this.name = "ResourceNotFoundException";
60
- this.$fault = "client";
61
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
62
- }
63
- }
64
- exports.ResourceNotFoundException = ResourceNotFoundException;
65
- class ServiceQuotaExceededException extends SupplyChainServiceException_1.SupplyChainServiceException {
66
- constructor(opts) {
67
- super({
68
- name: "ServiceQuotaExceededException",
69
- $fault: "client",
70
- ...opts,
71
- });
72
- this.name = "ServiceQuotaExceededException";
73
- this.$fault = "client";
74
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
75
- }
76
- }
77
- exports.ServiceQuotaExceededException = ServiceQuotaExceededException;
78
- class ThrottlingException extends SupplyChainServiceException_1.SupplyChainServiceException {
79
- constructor(opts) {
80
- super({
81
- name: "ThrottlingException",
82
- $fault: "client",
83
- ...opts,
84
- });
85
- this.name = "ThrottlingException";
86
- this.$fault = "client";
87
- this.$retryable = {
88
- throttling: true,
89
- };
90
- Object.setPrototypeOf(this, ThrottlingException.prototype);
91
- }
92
- }
93
- exports.ThrottlingException = ThrottlingException;
94
- class ValidationException extends SupplyChainServiceException_1.SupplyChainServiceException {
95
- constructor(opts) {
96
- super({
97
- name: "ValidationException",
98
- $fault: "client",
99
- ...opts,
100
- });
101
- this.name = "ValidationException";
102
- this.$fault = "client";
103
- Object.setPrototypeOf(this, ValidationException.prototype);
104
- }
105
- }
106
- exports.ValidationException = ValidationException;
1
+ module.exports = require("../index.js");
@@ -1,283 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_GetBillOfMaterialsImportJobCommand = exports.de_CreateBillOfMaterialsImportJobCommand = exports.se_GetBillOfMaterialsImportJobCommand = exports.se_CreateBillOfMaterialsImportJobCommand = void 0;
4
- const core_1 = require("@smithy/core");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- const uuid_1 = require("uuid");
7
- const models_0_1 = require("../models/models_0");
8
- const SupplyChainServiceException_1 = require("../models/SupplyChainServiceException");
9
- const se_CreateBillOfMaterialsImportJobCommand = async (input, context) => {
10
- const b = (0, core_1.requestBuilder)(input, context);
11
- const headers = {
12
- "content-type": "application/json",
13
- };
14
- b.bp("/api/configuration/instances/{instanceId}/bill-of-materials-import-jobs");
15
- b.p("instanceId", () => input.instanceId, "{instanceId}", false);
16
- let body;
17
- body = JSON.stringify((0, smithy_client_1.take)(input, {
18
- clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
19
- s3uri: [],
20
- }));
21
- b.m("POST").h(headers).b(body);
22
- return b.build();
23
- };
24
- exports.se_CreateBillOfMaterialsImportJobCommand = se_CreateBillOfMaterialsImportJobCommand;
25
- const se_GetBillOfMaterialsImportJobCommand = async (input, context) => {
26
- const b = (0, core_1.requestBuilder)(input, context);
27
- const headers = {};
28
- b.bp("/api/configuration/instances/{instanceId}/bill-of-materials-import-jobs/{jobId}");
29
- b.p("instanceId", () => input.instanceId, "{instanceId}", false);
30
- b.p("jobId", () => input.jobId, "{jobId}", false);
31
- let body;
32
- b.m("GET").h(headers).b(body);
33
- return b.build();
34
- };
35
- exports.se_GetBillOfMaterialsImportJobCommand = se_GetBillOfMaterialsImportJobCommand;
36
- const de_CreateBillOfMaterialsImportJobCommand = async (output, context) => {
37
- if (output.statusCode !== 200 && output.statusCode >= 300) {
38
- return de_CreateBillOfMaterialsImportJobCommandError(output, context);
39
- }
40
- const contents = (0, smithy_client_1.map)({
41
- $metadata: deserializeMetadata(output),
42
- });
43
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
44
- const doc = (0, smithy_client_1.take)(data, {
45
- jobId: smithy_client_1.expectString,
46
- });
47
- Object.assign(contents, doc);
48
- return contents;
49
- };
50
- exports.de_CreateBillOfMaterialsImportJobCommand = de_CreateBillOfMaterialsImportJobCommand;
51
- const de_CreateBillOfMaterialsImportJobCommandError = async (output, context) => {
52
- const parsedOutput = {
53
- ...output,
54
- body: await parseErrorBody(output.body, context),
55
- };
56
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
57
- switch (errorCode) {
58
- case "AccessDeniedException":
59
- case "com.amazonaws.supplychain#AccessDeniedException":
60
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
61
- case "ConflictException":
62
- case "com.amazonaws.supplychain#ConflictException":
63
- throw await de_ConflictExceptionRes(parsedOutput, context);
64
- case "InternalServerException":
65
- case "com.amazonaws.supplychain#InternalServerException":
66
- throw await de_InternalServerExceptionRes(parsedOutput, context);
67
- case "ResourceNotFoundException":
68
- case "com.amazonaws.supplychain#ResourceNotFoundException":
69
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
70
- case "ServiceQuotaExceededException":
71
- case "com.amazonaws.supplychain#ServiceQuotaExceededException":
72
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
73
- case "ThrottlingException":
74
- case "com.amazonaws.supplychain#ThrottlingException":
75
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
76
- case "ValidationException":
77
- case "com.amazonaws.supplychain#ValidationException":
78
- throw await de_ValidationExceptionRes(parsedOutput, context);
79
- default:
80
- const parsedBody = parsedOutput.body;
81
- return throwDefaultError({
82
- output,
83
- parsedBody,
84
- errorCode,
85
- });
86
- }
87
- };
88
- const de_GetBillOfMaterialsImportJobCommand = async (output, context) => {
89
- if (output.statusCode !== 200 && output.statusCode >= 300) {
90
- return de_GetBillOfMaterialsImportJobCommandError(output, context);
91
- }
92
- const contents = (0, smithy_client_1.map)({
93
- $metadata: deserializeMetadata(output),
94
- });
95
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
96
- const doc = (0, smithy_client_1.take)(data, {
97
- job: smithy_client_1._json,
98
- });
99
- Object.assign(contents, doc);
100
- return contents;
101
- };
102
- exports.de_GetBillOfMaterialsImportJobCommand = de_GetBillOfMaterialsImportJobCommand;
103
- const de_GetBillOfMaterialsImportJobCommandError = async (output, context) => {
104
- const parsedOutput = {
105
- ...output,
106
- body: await parseErrorBody(output.body, context),
107
- };
108
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
109
- switch (errorCode) {
110
- case "AccessDeniedException":
111
- case "com.amazonaws.supplychain#AccessDeniedException":
112
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
113
- case "ConflictException":
114
- case "com.amazonaws.supplychain#ConflictException":
115
- throw await de_ConflictExceptionRes(parsedOutput, context);
116
- case "InternalServerException":
117
- case "com.amazonaws.supplychain#InternalServerException":
118
- throw await de_InternalServerExceptionRes(parsedOutput, context);
119
- case "ResourceNotFoundException":
120
- case "com.amazonaws.supplychain#ResourceNotFoundException":
121
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
122
- case "ServiceQuotaExceededException":
123
- case "com.amazonaws.supplychain#ServiceQuotaExceededException":
124
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
125
- case "ThrottlingException":
126
- case "com.amazonaws.supplychain#ThrottlingException":
127
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
128
- case "ValidationException":
129
- case "com.amazonaws.supplychain#ValidationException":
130
- throw await de_ValidationExceptionRes(parsedOutput, context);
131
- default:
132
- const parsedBody = parsedOutput.body;
133
- return throwDefaultError({
134
- output,
135
- parsedBody,
136
- errorCode,
137
- });
138
- }
139
- };
140
- const throwDefaultError = (0, smithy_client_1.withBaseException)(SupplyChainServiceException_1.SupplyChainServiceException);
141
- const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
142
- const contents = (0, smithy_client_1.map)({});
143
- const data = parsedOutput.body;
144
- const doc = (0, smithy_client_1.take)(data, {
145
- message: smithy_client_1.expectString,
146
- });
147
- Object.assign(contents, doc);
148
- const exception = new models_0_1.AccessDeniedException({
149
- $metadata: deserializeMetadata(parsedOutput),
150
- ...contents,
151
- });
152
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
153
- };
154
- const de_ConflictExceptionRes = async (parsedOutput, context) => {
155
- const contents = (0, smithy_client_1.map)({});
156
- const data = parsedOutput.body;
157
- const doc = (0, smithy_client_1.take)(data, {
158
- message: smithy_client_1.expectString,
159
- });
160
- Object.assign(contents, doc);
161
- const exception = new models_0_1.ConflictException({
162
- $metadata: deserializeMetadata(parsedOutput),
163
- ...contents,
164
- });
165
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
166
- };
167
- const de_InternalServerExceptionRes = async (parsedOutput, context) => {
168
- const contents = (0, smithy_client_1.map)({});
169
- const data = parsedOutput.body;
170
- const doc = (0, smithy_client_1.take)(data, {
171
- message: smithy_client_1.expectString,
172
- });
173
- Object.assign(contents, doc);
174
- const exception = new models_0_1.InternalServerException({
175
- $metadata: deserializeMetadata(parsedOutput),
176
- ...contents,
177
- });
178
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
179
- };
180
- const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
181
- const contents = (0, smithy_client_1.map)({});
182
- const data = parsedOutput.body;
183
- const doc = (0, smithy_client_1.take)(data, {
184
- message: smithy_client_1.expectString,
185
- });
186
- Object.assign(contents, doc);
187
- const exception = new models_0_1.ResourceNotFoundException({
188
- $metadata: deserializeMetadata(parsedOutput),
189
- ...contents,
190
- });
191
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
192
- };
193
- const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
194
- const contents = (0, smithy_client_1.map)({});
195
- const data = parsedOutput.body;
196
- const doc = (0, smithy_client_1.take)(data, {
197
- message: smithy_client_1.expectString,
198
- });
199
- Object.assign(contents, doc);
200
- const exception = new models_0_1.ServiceQuotaExceededException({
201
- $metadata: deserializeMetadata(parsedOutput),
202
- ...contents,
203
- });
204
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
205
- };
206
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
207
- const contents = (0, smithy_client_1.map)({});
208
- const data = parsedOutput.body;
209
- const doc = (0, smithy_client_1.take)(data, {
210
- message: smithy_client_1.expectString,
211
- });
212
- Object.assign(contents, doc);
213
- const exception = new models_0_1.ThrottlingException({
214
- $metadata: deserializeMetadata(parsedOutput),
215
- ...contents,
216
- });
217
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
218
- };
219
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
220
- const contents = (0, smithy_client_1.map)({});
221
- const data = parsedOutput.body;
222
- const doc = (0, smithy_client_1.take)(data, {
223
- message: smithy_client_1.expectString,
224
- });
225
- Object.assign(contents, doc);
226
- const exception = new models_0_1.ValidationException({
227
- $metadata: deserializeMetadata(parsedOutput),
228
- ...contents,
229
- });
230
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
231
- };
232
- const deserializeMetadata = (output) => ({
233
- httpStatusCode: output.statusCode,
234
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
235
- extendedRequestId: output.headers["x-amz-id-2"],
236
- cfId: output.headers["x-amz-cf-id"],
237
- });
238
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
239
- const isSerializableHeaderValue = (value) => value !== undefined &&
240
- value !== null &&
241
- value !== "" &&
242
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
243
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
244
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
245
- if (encoded.length) {
246
- return JSON.parse(encoded);
247
- }
248
- return {};
249
- });
250
- const parseErrorBody = async (errorBody, context) => {
251
- const value = await parseBody(errorBody, context);
252
- value.message = value.message ?? value.Message;
253
- return value;
254
- };
255
- const loadRestJsonErrorCode = (output, data) => {
256
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
257
- const sanitizeErrorCode = (rawValue) => {
258
- let cleanValue = rawValue;
259
- if (typeof cleanValue === "number") {
260
- cleanValue = cleanValue.toString();
261
- }
262
- if (cleanValue.indexOf(",") >= 0) {
263
- cleanValue = cleanValue.split(",")[0];
264
- }
265
- if (cleanValue.indexOf(":") >= 0) {
266
- cleanValue = cleanValue.split(":")[0];
267
- }
268
- if (cleanValue.indexOf("#") >= 0) {
269
- cleanValue = cleanValue.split("#")[1];
270
- }
271
- return cleanValue;
272
- };
273
- const headerKey = findKey(output.headers, "x-amzn-errortype");
274
- if (headerKey !== undefined) {
275
- return sanitizeErrorCode(output.headers[headerKey]);
276
- }
277
- if (data.code !== undefined) {
278
- return sanitizeErrorCode(data.code);
279
- }
280
- if (data["__type"] !== undefined) {
281
- return sanitizeErrorCode(data["__type"]);
282
- }
283
- };
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-supplychain",
3
3
  "description": "AWS SDK for JavaScript Supplychain Client for Node.js, Browser and React Native",
4
- "version": "3.491.0",
4
+ "version": "3.496.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-supplychain",
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,48 +20,48 @@
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.490.0",
24
- "@aws-sdk/core": "3.490.0",
25
- "@aws-sdk/credential-provider-node": "3.490.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.496.0",
24
+ "@aws-sdk/core": "3.496.0",
25
+ "@aws-sdk/credential-provider-node": "3.496.0",
26
+ "@aws-sdk/middleware-host-header": "3.496.0",
27
+ "@aws-sdk/middleware-logger": "3.496.0",
28
+ "@aws-sdk/middleware-recursion-detection": "3.496.0",
29
+ "@aws-sdk/middleware-signing": "3.496.0",
30
+ "@aws-sdk/middleware-user-agent": "3.496.0",
31
+ "@aws-sdk/region-config-resolver": "3.496.0",
32
+ "@aws-sdk/types": "3.496.0",
33
+ "@aws-sdk/util-endpoints": "3.496.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.496.0",
35
+ "@aws-sdk/util-user-agent-node": "3.496.0",
36
+ "@smithy/config-resolver": "^2.1.1",
37
+ "@smithy/core": "^1.3.1",
38
+ "@smithy/fetch-http-handler": "^2.4.1",
39
+ "@smithy/hash-node": "^2.1.1",
40
+ "@smithy/invalid-dependency": "^2.1.1",
41
+ "@smithy/middleware-content-length": "^2.1.1",
42
+ "@smithy/middleware-endpoint": "^2.4.1",
43
+ "@smithy/middleware-retry": "^2.1.1",
44
+ "@smithy/middleware-serde": "^2.1.1",
45
+ "@smithy/middleware-stack": "^2.1.1",
46
+ "@smithy/node-config-provider": "^2.2.1",
47
+ "@smithy/node-http-handler": "^2.3.1",
48
+ "@smithy/protocol-http": "^3.1.1",
49
+ "@smithy/smithy-client": "^2.3.1",
50
+ "@smithy/types": "^2.9.1",
51
+ "@smithy/url-parser": "^2.1.1",
52
+ "@smithy/util-base64": "^2.1.1",
53
+ "@smithy/util-body-length-browser": "^2.1.1",
54
+ "@smithy/util-body-length-node": "^2.2.1",
55
+ "@smithy/util-defaults-mode-browser": "^2.1.1",
56
+ "@smithy/util-defaults-mode-node": "^2.1.1",
57
+ "@smithy/util-endpoints": "^1.1.1",
58
+ "@smithy/util-retry": "^2.1.1",
59
+ "@smithy/util-utf8": "^2.1.1",
60
60
  "tslib": "^2.5.0",
61
61
  "uuid": "^8.3.2"
62
62
  },
63
63
  "devDependencies": {
64
- "@smithy/service-client-documentation-generator": "^2.0.0",
64
+ "@smithy/service-client-documentation-generator": "^2.1.1",
65
65
  "@tsconfig/node14": "1.0.3",
66
66
  "@types/node": "^14.14.31",
67
67
  "@types/uuid": "^8.3.0",