@aws-sdk/client-appconfigdata 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,15 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppConfigData = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- const AppConfigDataClient_1 = require("./AppConfigDataClient");
6
- const GetLatestConfigurationCommand_1 = require("./commands/GetLatestConfigurationCommand");
7
- const StartConfigurationSessionCommand_1 = require("./commands/StartConfigurationSessionCommand");
8
- const commands = {
9
- GetLatestConfigurationCommand: GetLatestConfigurationCommand_1.GetLatestConfigurationCommand,
10
- StartConfigurationSessionCommand: StartConfigurationSessionCommand_1.StartConfigurationSessionCommand,
11
- };
12
- class AppConfigData extends AppConfigDataClient_1.AppConfigDataClient {
13
- }
14
- exports.AppConfigData = AppConfigData;
15
- (0, smithy_client_1.createAggregatedClient)(commands, AppConfigData);
1
+ module.exports = require("./index.js");
@@ -1,43 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppConfigDataClient = 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 AppConfigDataClient 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.AppConfigDataClient = AppConfigDataClient;
1
+ module.exports = require("./index.js");
@@ -1,29 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetLatestConfigurationCommand = 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 models_0_1 = require("../models/models_0");
10
- const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
11
- class GetLatestConfigurationCommand extends smithy_client_1.Command
12
- .classBuilder()
13
- .ep({
14
- ...EndpointParameters_1.commonParams,
15
- })
16
- .m(function (Command, cs, config, o) {
17
- return [
18
- (0, middleware_serde_1.getSerdePlugin)(config, this.serialize, this.deserialize),
19
- (0, middleware_endpoint_1.getEndpointPlugin)(config, Command.getEndpointParameterInstructions()),
20
- ];
21
- })
22
- .s("AppConfigData", "GetLatestConfiguration", {})
23
- .n("AppConfigDataClient", "GetLatestConfigurationCommand")
24
- .f(void 0, models_0_1.GetLatestConfigurationResponseFilterSensitiveLog)
25
- .ser(Aws_restJson1_1.se_GetLatestConfigurationCommand)
26
- .de(Aws_restJson1_1.de_GetLatestConfigurationCommand)
27
- .build() {
28
- }
29
- exports.GetLatestConfigurationCommand = GetLatestConfigurationCommand;
1
+ module.exports = require("../index.js");
@@ -1,28 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StartConfigurationSessionCommand = 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 StartConfigurationSessionCommand 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("AppConfigData", "StartConfigurationSession", {})
22
- .n("AppConfigDataClient", "StartConfigurationSessionCommand")
23
- .f(void 0, void 0)
24
- .ser(Aws_restJson1_1.se_StartConfigurationSessionCommand)
25
- .de(Aws_restJson1_1.de_StartConfigurationSessionCommand)
26
- .build() {
27
- }
28
- exports.StartConfigurationSessionCommand = StartConfigurationSessionCommand;
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("./GetLatestConfigurationCommand"), exports);
5
- tslib_1.__exportStar(require("./StartConfigurationSessionCommand"), 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: "appconfig",
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,579 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppConfigDataServiceException = void 0;
4
- const tslib_1 = require("tslib");
5
- tslib_1.__exportStar(require("./AppConfigDataClient"), exports);
6
- tslib_1.__exportStar(require("./AppConfigData"), exports);
7
- tslib_1.__exportStar(require("./commands"), exports);
8
- tslib_1.__exportStar(require("./models"), exports);
9
- require("@aws-sdk/util-endpoints");
10
- var AppConfigDataServiceException_1 = require("./models/AppConfigDataServiceException");
11
- Object.defineProperty(exports, "AppConfigDataServiceException", { enumerable: true, get: function () { return AppConfigDataServiceException_1.AppConfigDataServiceException; } });
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
+ AppConfigData: () => AppConfigData,
25
+ AppConfigDataClient: () => AppConfigDataClient,
26
+ AppConfigDataServiceException: () => AppConfigDataServiceException,
27
+ BadRequestDetails: () => BadRequestDetails,
28
+ BadRequestException: () => BadRequestException,
29
+ BadRequestReason: () => BadRequestReason,
30
+ GetLatestConfigurationCommand: () => GetLatestConfigurationCommand,
31
+ GetLatestConfigurationResponseFilterSensitiveLog: () => GetLatestConfigurationResponseFilterSensitiveLog,
32
+ InternalServerException: () => InternalServerException,
33
+ InvalidParameterProblem: () => InvalidParameterProblem,
34
+ ResourceNotFoundException: () => ResourceNotFoundException,
35
+ ResourceType: () => ResourceType,
36
+ StartConfigurationSessionCommand: () => StartConfigurationSessionCommand,
37
+ ThrottlingException: () => ThrottlingException,
38
+ __Client: () => import_smithy_client.Client
39
+ });
40
+ module.exports = __toCommonJS(src_exports);
41
+
42
+ // src/AppConfigDataClient.ts
43
+ var import_middleware_host_header = require("@aws-sdk/middleware-host-header");
44
+ var import_middleware_logger = require("@aws-sdk/middleware-logger");
45
+ var import_middleware_recursion_detection = require("@aws-sdk/middleware-recursion-detection");
46
+ var import_middleware_signing = require("@aws-sdk/middleware-signing");
47
+ var import_middleware_user_agent = require("@aws-sdk/middleware-user-agent");
48
+ var import_config_resolver = require("@smithy/config-resolver");
49
+ var import_middleware_content_length = require("@smithy/middleware-content-length");
50
+ var import_middleware_endpoint = require("@smithy/middleware-endpoint");
51
+ var import_middleware_retry = require("@smithy/middleware-retry");
52
+
53
+
54
+ // src/endpoint/EndpointParameters.ts
55
+ var resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {
56
+ return {
57
+ ...options,
58
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
59
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
60
+ defaultSigningName: "appconfig"
61
+ };
62
+ }, "resolveClientEndpointParameters");
63
+ var commonParams = {
64
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
65
+ Endpoint: { type: "builtInParams", name: "endpoint" },
66
+ Region: { type: "builtInParams", name: "region" },
67
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
68
+ };
69
+
70
+ // src/AppConfigDataClient.ts
71
+ var import_runtimeConfig = require("././runtimeConfig");
72
+
73
+ // src/runtimeExtensions.ts
74
+ var import_region_config_resolver = require("@aws-sdk/region-config-resolver");
75
+ var import_protocol_http = require("@smithy/protocol-http");
76
+ var import_smithy_client = require("@smithy/smithy-client");
77
+ var asPartial = /* @__PURE__ */ __name((t) => t, "asPartial");
78
+ var resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {
79
+ const extensionConfiguration = {
80
+ ...asPartial((0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig)),
81
+ ...asPartial((0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig)),
82
+ ...asPartial((0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig))
83
+ };
84
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
85
+ return {
86
+ ...runtimeConfig,
87
+ ...(0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
88
+ ...(0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),
89
+ ...(0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration)
90
+ };
91
+ }, "resolveRuntimeExtensions");
92
+
93
+ // src/AppConfigDataClient.ts
94
+ var _AppConfigDataClient = class _AppConfigDataClient extends import_smithy_client.Client {
95
+ constructor(...[configuration]) {
96
+ const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});
97
+ const _config_1 = resolveClientEndpointParameters(_config_0);
98
+ const _config_2 = (0, import_config_resolver.resolveRegionConfig)(_config_1);
99
+ const _config_3 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_2);
100
+ const _config_4 = (0, import_middleware_retry.resolveRetryConfig)(_config_3);
101
+ const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);
102
+ const _config_6 = (0, import_middleware_signing.resolveAwsAuthConfig)(_config_5);
103
+ const _config_7 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_6);
104
+ const _config_8 = resolveRuntimeExtensions(_config_7, (configuration == null ? void 0 : configuration.extensions) || []);
105
+ super(_config_8);
106
+ this.config = _config_8;
107
+ this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));
108
+ this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));
109
+ this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));
110
+ this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));
111
+ this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));
112
+ this.middlewareStack.use((0, import_middleware_signing.getAwsAuthPlugin)(this.config));
113
+ this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));
114
+ }
115
+ /**
116
+ * Destroy underlying resources, like sockets. It's usually not necessary to do this.
117
+ * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.
118
+ * Otherwise, sockets might stay open for quite a long time before the server terminates them.
119
+ */
120
+ destroy() {
121
+ super.destroy();
122
+ }
123
+ };
124
+ __name(_AppConfigDataClient, "AppConfigDataClient");
125
+ var AppConfigDataClient = _AppConfigDataClient;
126
+
127
+ // src/AppConfigData.ts
128
+
129
+
130
+ // src/commands/GetLatestConfigurationCommand.ts
131
+
132
+ var import_middleware_serde = require("@smithy/middleware-serde");
133
+
134
+ var import_types = require("@smithy/types");
135
+
136
+ // src/models/models_0.ts
137
+
138
+
139
+ // src/models/AppConfigDataServiceException.ts
140
+
141
+ var _AppConfigDataServiceException = class _AppConfigDataServiceException extends import_smithy_client.ServiceException {
142
+ /**
143
+ * @internal
144
+ */
145
+ constructor(options) {
146
+ super(options);
147
+ Object.setPrototypeOf(this, _AppConfigDataServiceException.prototype);
148
+ }
149
+ };
150
+ __name(_AppConfigDataServiceException, "AppConfigDataServiceException");
151
+ var AppConfigDataServiceException = _AppConfigDataServiceException;
152
+
153
+ // src/models/models_0.ts
154
+ var InvalidParameterProblem = {
155
+ /**
156
+ * The parameter was corrupted and could not be understood by the service.
157
+ */
158
+ CORRUPTED: "Corrupted",
159
+ /**
160
+ * The parameter was expired and can no longer be used.
161
+ */
162
+ EXPIRED: "Expired",
163
+ /**
164
+ * The client called the service before the time specified in the poll interval.
165
+ */
166
+ POLL_INTERVAL_NOT_SATISFIED: "PollIntervalNotSatisfied"
167
+ };
168
+ var BadRequestDetails;
169
+ ((BadRequestDetails2) => {
170
+ BadRequestDetails2.visit = /* @__PURE__ */ __name((value, visitor) => {
171
+ if (value.InvalidParameters !== void 0)
172
+ return visitor.InvalidParameters(value.InvalidParameters);
173
+ return visitor._(value.$unknown[0], value.$unknown[1]);
174
+ }, "visit");
175
+ })(BadRequestDetails || (BadRequestDetails = {}));
176
+ var BadRequestReason = {
177
+ /**
178
+ * Indicates there was a problem with one or more of the parameters.
179
+ * See InvalidParameters in the BadRequestDetails for more information.
180
+ */
181
+ INVALID_PARAMETERS: "InvalidParameters"
182
+ };
183
+ var _BadRequestException = class _BadRequestException extends AppConfigDataServiceException {
184
+ /**
185
+ * @internal
186
+ */
187
+ constructor(opts) {
188
+ super({
189
+ name: "BadRequestException",
190
+ $fault: "client",
191
+ ...opts
192
+ });
193
+ this.name = "BadRequestException";
194
+ this.$fault = "client";
195
+ Object.setPrototypeOf(this, _BadRequestException.prototype);
196
+ this.Message = opts.Message;
197
+ this.Reason = opts.Reason;
198
+ this.Details = opts.Details;
199
+ }
200
+ };
201
+ __name(_BadRequestException, "BadRequestException");
202
+ var BadRequestException = _BadRequestException;
203
+ var _InternalServerException = class _InternalServerException extends AppConfigDataServiceException {
204
+ /**
205
+ * @internal
206
+ */
207
+ constructor(opts) {
208
+ super({
209
+ name: "InternalServerException",
210
+ $fault: "server",
211
+ ...opts
212
+ });
213
+ this.name = "InternalServerException";
214
+ this.$fault = "server";
215
+ Object.setPrototypeOf(this, _InternalServerException.prototype);
216
+ this.Message = opts.Message;
217
+ }
218
+ };
219
+ __name(_InternalServerException, "InternalServerException");
220
+ var InternalServerException = _InternalServerException;
221
+ var ResourceType = {
222
+ /**
223
+ * Resource type value for the Application resource.
224
+ */
225
+ APPLICATION: "Application",
226
+ /**
227
+ * Resource type value for the Configuration resource.
228
+ */
229
+ CONFIGURATION: "Configuration",
230
+ /**
231
+ * Resource type value for the ConfigurationProfile resource.
232
+ */
233
+ CONFIGURATION_PROFILE: "ConfigurationProfile",
234
+ /**
235
+ * Resource type value for the Deployment resource.
236
+ */
237
+ DEPLOYMENT: "Deployment",
238
+ /**
239
+ * Resource type value for the Environment resource.
240
+ */
241
+ ENVIRONMENT: "Environment"
242
+ };
243
+ var _ResourceNotFoundException = class _ResourceNotFoundException extends AppConfigDataServiceException {
244
+ /**
245
+ * @internal
246
+ */
247
+ constructor(opts) {
248
+ super({
249
+ name: "ResourceNotFoundException",
250
+ $fault: "client",
251
+ ...opts
252
+ });
253
+ this.name = "ResourceNotFoundException";
254
+ this.$fault = "client";
255
+ Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);
256
+ this.Message = opts.Message;
257
+ this.ResourceType = opts.ResourceType;
258
+ this.ReferencedBy = opts.ReferencedBy;
259
+ }
260
+ };
261
+ __name(_ResourceNotFoundException, "ResourceNotFoundException");
262
+ var ResourceNotFoundException = _ResourceNotFoundException;
263
+ var _ThrottlingException = class _ThrottlingException extends AppConfigDataServiceException {
264
+ /**
265
+ * @internal
266
+ */
267
+ constructor(opts) {
268
+ super({
269
+ name: "ThrottlingException",
270
+ $fault: "client",
271
+ ...opts
272
+ });
273
+ this.name = "ThrottlingException";
274
+ this.$fault = "client";
275
+ Object.setPrototypeOf(this, _ThrottlingException.prototype);
276
+ this.Message = opts.Message;
277
+ }
278
+ };
279
+ __name(_ThrottlingException, "ThrottlingException");
280
+ var ThrottlingException = _ThrottlingException;
281
+ var GetLatestConfigurationResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
282
+ ...obj,
283
+ ...obj.Configuration && { Configuration: import_smithy_client.SENSITIVE_STRING }
284
+ }), "GetLatestConfigurationResponseFilterSensitiveLog");
285
+
286
+ // src/protocols/Aws_restJson1.ts
287
+ var import_core = require("@aws-sdk/core");
288
+ var import_core2 = require("@smithy/core");
289
+
290
+ var se_GetLatestConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {
291
+ const b = (0, import_core2.requestBuilder)(input, context);
292
+ const headers = {};
293
+ b.bp("/configuration");
294
+ const query = (0, import_smithy_client.map)({
295
+ [_ct]: [, (0, import_smithy_client.expectNonNull)(input[_CT], `ConfigurationToken`)]
296
+ });
297
+ let body;
298
+ b.m("GET").h(headers).q(query).b(body);
299
+ return b.build();
300
+ }, "se_GetLatestConfigurationCommand");
301
+ var se_StartConfigurationSessionCommand = /* @__PURE__ */ __name(async (input, context) => {
302
+ const b = (0, import_core2.requestBuilder)(input, context);
303
+ const headers = {
304
+ "content-type": "application/json"
305
+ };
306
+ b.bp("/configurationsessions");
307
+ let body;
308
+ body = JSON.stringify(
309
+ (0, import_smithy_client.take)(input, {
310
+ ApplicationIdentifier: [],
311
+ ConfigurationProfileIdentifier: [],
312
+ EnvironmentIdentifier: [],
313
+ RequiredMinimumPollIntervalInSeconds: []
314
+ })
315
+ );
316
+ b.m("POST").h(headers).b(body);
317
+ return b.build();
318
+ }, "se_StartConfigurationSessionCommand");
319
+ var de_GetLatestConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {
320
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
321
+ return de_GetLatestConfigurationCommandError(output, context);
322
+ }
323
+ const contents = (0, import_smithy_client.map)({
324
+ $metadata: deserializeMetadata(output),
325
+ [_NPCT]: [, output.headers[_npct]],
326
+ [_NPIIS]: [() => void 0 !== output.headers[_npiis], () => (0, import_smithy_client.strictParseInt32)(output.headers[_npiis])],
327
+ [_CTo]: [, output.headers[_ct_]],
328
+ [_VL]: [, output.headers[_vl]]
329
+ });
330
+ const data = await (0, import_smithy_client.collectBody)(output.body, context);
331
+ contents.Configuration = data;
332
+ return contents;
333
+ }, "de_GetLatestConfigurationCommand");
334
+ var de_GetLatestConfigurationCommandError = /* @__PURE__ */ __name(async (output, context) => {
335
+ const parsedOutput = {
336
+ ...output,
337
+ body: await parseErrorBody(output.body, context)
338
+ };
339
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
340
+ switch (errorCode) {
341
+ case "BadRequestException":
342
+ case "com.amazonaws.appconfigdata#BadRequestException":
343
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
344
+ case "InternalServerException":
345
+ case "com.amazonaws.appconfigdata#InternalServerException":
346
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
347
+ case "ResourceNotFoundException":
348
+ case "com.amazonaws.appconfigdata#ResourceNotFoundException":
349
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
350
+ case "ThrottlingException":
351
+ case "com.amazonaws.appconfigdata#ThrottlingException":
352
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
353
+ default:
354
+ const parsedBody = parsedOutput.body;
355
+ return throwDefaultError({
356
+ output,
357
+ parsedBody,
358
+ errorCode
359
+ });
360
+ }
361
+ }, "de_GetLatestConfigurationCommandError");
362
+ var de_StartConfigurationSessionCommand = /* @__PURE__ */ __name(async (output, context) => {
363
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
364
+ return de_StartConfigurationSessionCommandError(output, context);
365
+ }
366
+ const contents = (0, import_smithy_client.map)({
367
+ $metadata: deserializeMetadata(output)
368
+ });
369
+ const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
370
+ const doc = (0, import_smithy_client.take)(data, {
371
+ InitialConfigurationToken: import_smithy_client.expectString
372
+ });
373
+ Object.assign(contents, doc);
374
+ return contents;
375
+ }, "de_StartConfigurationSessionCommand");
376
+ var de_StartConfigurationSessionCommandError = /* @__PURE__ */ __name(async (output, context) => {
377
+ const parsedOutput = {
378
+ ...output,
379
+ body: await parseErrorBody(output.body, context)
380
+ };
381
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
382
+ switch (errorCode) {
383
+ case "BadRequestException":
384
+ case "com.amazonaws.appconfigdata#BadRequestException":
385
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
386
+ case "InternalServerException":
387
+ case "com.amazonaws.appconfigdata#InternalServerException":
388
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
389
+ case "ResourceNotFoundException":
390
+ case "com.amazonaws.appconfigdata#ResourceNotFoundException":
391
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
392
+ case "ThrottlingException":
393
+ case "com.amazonaws.appconfigdata#ThrottlingException":
394
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
395
+ default:
396
+ const parsedBody = parsedOutput.body;
397
+ return throwDefaultError({
398
+ output,
399
+ parsedBody,
400
+ errorCode
401
+ });
402
+ }
403
+ }, "de_StartConfigurationSessionCommandError");
404
+ var throwDefaultError = (0, import_smithy_client.withBaseException)(AppConfigDataServiceException);
405
+ var de_BadRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
406
+ const contents = (0, import_smithy_client.map)({});
407
+ const data = parsedOutput.body;
408
+ const doc = (0, import_smithy_client.take)(data, {
409
+ Details: (_) => (0, import_smithy_client._json)((0, import_core.awsExpectUnion)(_)),
410
+ Message: import_smithy_client.expectString,
411
+ Reason: import_smithy_client.expectString
412
+ });
413
+ Object.assign(contents, doc);
414
+ const exception = new BadRequestException({
415
+ $metadata: deserializeMetadata(parsedOutput),
416
+ ...contents
417
+ });
418
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
419
+ }, "de_BadRequestExceptionRes");
420
+ var de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
421
+ const contents = (0, import_smithy_client.map)({});
422
+ const data = parsedOutput.body;
423
+ const doc = (0, import_smithy_client.take)(data, {
424
+ Message: import_smithy_client.expectString
425
+ });
426
+ Object.assign(contents, doc);
427
+ const exception = new InternalServerException({
428
+ $metadata: deserializeMetadata(parsedOutput),
429
+ ...contents
430
+ });
431
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
432
+ }, "de_InternalServerExceptionRes");
433
+ var de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
434
+ const contents = (0, import_smithy_client.map)({});
435
+ const data = parsedOutput.body;
436
+ const doc = (0, import_smithy_client.take)(data, {
437
+ Message: import_smithy_client.expectString,
438
+ ReferencedBy: import_smithy_client._json,
439
+ ResourceType: import_smithy_client.expectString
440
+ });
441
+ Object.assign(contents, doc);
442
+ const exception = new ResourceNotFoundException({
443
+ $metadata: deserializeMetadata(parsedOutput),
444
+ ...contents
445
+ });
446
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
447
+ }, "de_ResourceNotFoundExceptionRes");
448
+ var de_ThrottlingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
449
+ const contents = (0, import_smithy_client.map)({});
450
+ const data = parsedOutput.body;
451
+ const doc = (0, import_smithy_client.take)(data, {
452
+ Message: import_smithy_client.expectString
453
+ });
454
+ Object.assign(contents, doc);
455
+ const exception = new ThrottlingException({
456
+ $metadata: deserializeMetadata(parsedOutput),
457
+ ...contents
458
+ });
459
+ return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);
460
+ }, "de_ThrottlingExceptionRes");
461
+ var deserializeMetadata = /* @__PURE__ */ __name((output) => ({
462
+ httpStatusCode: output.statusCode,
463
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
464
+ extendedRequestId: output.headers["x-amz-id-2"],
465
+ cfId: output.headers["x-amz-cf-id"]
466
+ }), "deserializeMetadata");
467
+ var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString");
468
+ var _CT = "ConfigurationToken";
469
+ var _CTo = "ContentType";
470
+ var _NPCT = "NextPollConfigurationToken";
471
+ var _NPIIS = "NextPollIntervalInSeconds";
472
+ var _VL = "VersionLabel";
473
+ var _ct = "configuration_token";
474
+ var _ct_ = "content-type";
475
+ var _npct = "next-poll-configuration-token";
476
+ var _npiis = "next-poll-interval-in-seconds";
477
+ var _vl = "version-label";
478
+ var parseBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
479
+ if (encoded.length) {
480
+ return JSON.parse(encoded);
481
+ }
482
+ return {};
483
+ }), "parseBody");
484
+ var parseErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {
485
+ const value = await parseBody(errorBody, context);
486
+ value.message = value.message ?? value.Message;
487
+ return value;
488
+ }, "parseErrorBody");
489
+ var loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {
490
+ const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), "findKey");
491
+ const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {
492
+ let cleanValue = rawValue;
493
+ if (typeof cleanValue === "number") {
494
+ cleanValue = cleanValue.toString();
495
+ }
496
+ if (cleanValue.indexOf(",") >= 0) {
497
+ cleanValue = cleanValue.split(",")[0];
498
+ }
499
+ if (cleanValue.indexOf(":") >= 0) {
500
+ cleanValue = cleanValue.split(":")[0];
501
+ }
502
+ if (cleanValue.indexOf("#") >= 0) {
503
+ cleanValue = cleanValue.split("#")[1];
504
+ }
505
+ return cleanValue;
506
+ }, "sanitizeErrorCode");
507
+ const headerKey = findKey(output.headers, "x-amzn-errortype");
508
+ if (headerKey !== void 0) {
509
+ return sanitizeErrorCode(output.headers[headerKey]);
510
+ }
511
+ if (data.code !== void 0) {
512
+ return sanitizeErrorCode(data.code);
513
+ }
514
+ if (data["__type"] !== void 0) {
515
+ return sanitizeErrorCode(data["__type"]);
516
+ }
517
+ }, "loadRestJsonErrorCode");
518
+
519
+ // src/commands/GetLatestConfigurationCommand.ts
520
+ var _GetLatestConfigurationCommand = class _GetLatestConfigurationCommand extends import_smithy_client.Command.classBuilder().ep({
521
+ ...commonParams
522
+ }).m(function(Command, cs, config, o) {
523
+ return [
524
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
525
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
526
+ ];
527
+ }).s("AppConfigData", "GetLatestConfiguration", {}).n("AppConfigDataClient", "GetLatestConfigurationCommand").f(void 0, GetLatestConfigurationResponseFilterSensitiveLog).ser(se_GetLatestConfigurationCommand).de(de_GetLatestConfigurationCommand).build() {
528
+ };
529
+ __name(_GetLatestConfigurationCommand, "GetLatestConfigurationCommand");
530
+ var GetLatestConfigurationCommand = _GetLatestConfigurationCommand;
531
+
532
+ // src/commands/StartConfigurationSessionCommand.ts
533
+
534
+
535
+
536
+
537
+ var _StartConfigurationSessionCommand = class _StartConfigurationSessionCommand extends import_smithy_client.Command.classBuilder().ep({
538
+ ...commonParams
539
+ }).m(function(Command, cs, config, o) {
540
+ return [
541
+ (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
542
+ (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
543
+ ];
544
+ }).s("AppConfigData", "StartConfigurationSession", {}).n("AppConfigDataClient", "StartConfigurationSessionCommand").f(void 0, void 0).ser(se_StartConfigurationSessionCommand).de(de_StartConfigurationSessionCommand).build() {
545
+ };
546
+ __name(_StartConfigurationSessionCommand, "StartConfigurationSessionCommand");
547
+ var StartConfigurationSessionCommand = _StartConfigurationSessionCommand;
548
+
549
+ // src/AppConfigData.ts
550
+ var commands = {
551
+ GetLatestConfigurationCommand,
552
+ StartConfigurationSessionCommand
553
+ };
554
+ var _AppConfigData = class _AppConfigData extends AppConfigDataClient {
555
+ };
556
+ __name(_AppConfigData, "AppConfigData");
557
+ var AppConfigData = _AppConfigData;
558
+ (0, import_smithy_client.createAggregatedClient)(commands, AppConfigData);
559
+
560
+ // src/index.ts
561
+ var import_util_endpoints = require("@aws-sdk/util-endpoints");
562
+ // Annotate the CommonJS export names for ESM import in node:
563
+ 0 && (module.exports = {
564
+ AppConfigData,
565
+ AppConfigDataClient,
566
+ AppConfigDataServiceException,
567
+ BadRequestDetails,
568
+ BadRequestException,
569
+ BadRequestReason,
570
+ GetLatestConfigurationCommand,
571
+ GetLatestConfigurationResponseFilterSensitiveLog,
572
+ InternalServerException,
573
+ InvalidParameterProblem,
574
+ ResourceNotFoundException,
575
+ ResourceType,
576
+ StartConfigurationSessionCommand,
577
+ ThrottlingException,
578
+ __Client
579
+ });
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppConfigDataServiceException = 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 AppConfigDataServiceException extends smithy_client_1.ServiceException {
7
- constructor(options) {
8
- super(options);
9
- Object.setPrototypeOf(this, AppConfigDataServiceException.prototype);
10
- }
11
- }
12
- exports.AppConfigDataServiceException = AppConfigDataServiceException;
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,93 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetLatestConfigurationResponseFilterSensitiveLog = exports.ThrottlingException = exports.ResourceNotFoundException = exports.ResourceType = exports.InternalServerException = exports.BadRequestException = exports.BadRequestReason = exports.BadRequestDetails = exports.InvalidParameterProblem = void 0;
4
- const smithy_client_1 = require("@smithy/smithy-client");
5
- const AppConfigDataServiceException_1 = require("./AppConfigDataServiceException");
6
- exports.InvalidParameterProblem = {
7
- CORRUPTED: "Corrupted",
8
- EXPIRED: "Expired",
9
- POLL_INTERVAL_NOT_SATISFIED: "PollIntervalNotSatisfied",
10
- };
11
- var BadRequestDetails;
12
- (function (BadRequestDetails) {
13
- BadRequestDetails.visit = (value, visitor) => {
14
- if (value.InvalidParameters !== undefined)
15
- return visitor.InvalidParameters(value.InvalidParameters);
16
- return visitor._(value.$unknown[0], value.$unknown[1]);
17
- };
18
- })(BadRequestDetails = exports.BadRequestDetails || (exports.BadRequestDetails = {}));
19
- exports.BadRequestReason = {
20
- INVALID_PARAMETERS: "InvalidParameters",
21
- };
22
- class BadRequestException extends AppConfigDataServiceException_1.AppConfigDataServiceException {
23
- constructor(opts) {
24
- super({
25
- name: "BadRequestException",
26
- $fault: "client",
27
- ...opts,
28
- });
29
- this.name = "BadRequestException";
30
- this.$fault = "client";
31
- Object.setPrototypeOf(this, BadRequestException.prototype);
32
- this.Message = opts.Message;
33
- this.Reason = opts.Reason;
34
- this.Details = opts.Details;
35
- }
36
- }
37
- exports.BadRequestException = BadRequestException;
38
- class InternalServerException extends AppConfigDataServiceException_1.AppConfigDataServiceException {
39
- constructor(opts) {
40
- super({
41
- name: "InternalServerException",
42
- $fault: "server",
43
- ...opts,
44
- });
45
- this.name = "InternalServerException";
46
- this.$fault = "server";
47
- Object.setPrototypeOf(this, InternalServerException.prototype);
48
- this.Message = opts.Message;
49
- }
50
- }
51
- exports.InternalServerException = InternalServerException;
52
- exports.ResourceType = {
53
- APPLICATION: "Application",
54
- CONFIGURATION: "Configuration",
55
- CONFIGURATION_PROFILE: "ConfigurationProfile",
56
- DEPLOYMENT: "Deployment",
57
- ENVIRONMENT: "Environment",
58
- };
59
- class ResourceNotFoundException extends AppConfigDataServiceException_1.AppConfigDataServiceException {
60
- constructor(opts) {
61
- super({
62
- name: "ResourceNotFoundException",
63
- $fault: "client",
64
- ...opts,
65
- });
66
- this.name = "ResourceNotFoundException";
67
- this.$fault = "client";
68
- Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
69
- this.Message = opts.Message;
70
- this.ResourceType = opts.ResourceType;
71
- this.ReferencedBy = opts.ReferencedBy;
72
- }
73
- }
74
- exports.ResourceNotFoundException = ResourceNotFoundException;
75
- class ThrottlingException extends AppConfigDataServiceException_1.AppConfigDataServiceException {
76
- constructor(opts) {
77
- super({
78
- name: "ThrottlingException",
79
- $fault: "client",
80
- ...opts,
81
- });
82
- this.name = "ThrottlingException";
83
- this.$fault = "client";
84
- Object.setPrototypeOf(this, ThrottlingException.prototype);
85
- this.Message = opts.Message;
86
- }
87
- }
88
- exports.ThrottlingException = ThrottlingException;
89
- const GetLatestConfigurationResponseFilterSensitiveLog = (obj) => ({
90
- ...obj,
91
- ...(obj.Configuration && { Configuration: smithy_client_1.SENSITIVE_STRING }),
92
- });
93
- exports.GetLatestConfigurationResponseFilterSensitiveLog = GetLatestConfigurationResponseFilterSensitiveLog;
1
+ module.exports = require("../index.js");
@@ -1,243 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_StartConfigurationSessionCommand = exports.de_GetLatestConfigurationCommand = exports.se_StartConfigurationSessionCommand = exports.se_GetLatestConfigurationCommand = void 0;
4
- const core_1 = require("@aws-sdk/core");
5
- const core_2 = require("@smithy/core");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const AppConfigDataServiceException_1 = require("../models/AppConfigDataServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_GetLatestConfigurationCommand = async (input, context) => {
10
- const b = (0, core_2.requestBuilder)(input, context);
11
- const headers = {};
12
- b.bp("/configuration");
13
- const query = (0, smithy_client_1.map)({
14
- [_ct]: [, (0, smithy_client_1.expectNonNull)(input[_CT], `ConfigurationToken`)],
15
- });
16
- let body;
17
- b.m("GET").h(headers).q(query).b(body);
18
- return b.build();
19
- };
20
- exports.se_GetLatestConfigurationCommand = se_GetLatestConfigurationCommand;
21
- const se_StartConfigurationSessionCommand = async (input, context) => {
22
- const b = (0, core_2.requestBuilder)(input, context);
23
- const headers = {
24
- "content-type": "application/json",
25
- };
26
- b.bp("/configurationsessions");
27
- let body;
28
- body = JSON.stringify((0, smithy_client_1.take)(input, {
29
- ApplicationIdentifier: [],
30
- ConfigurationProfileIdentifier: [],
31
- EnvironmentIdentifier: [],
32
- RequiredMinimumPollIntervalInSeconds: [],
33
- }));
34
- b.m("POST").h(headers).b(body);
35
- return b.build();
36
- };
37
- exports.se_StartConfigurationSessionCommand = se_StartConfigurationSessionCommand;
38
- const de_GetLatestConfigurationCommand = async (output, context) => {
39
- if (output.statusCode !== 200 && output.statusCode >= 300) {
40
- return de_GetLatestConfigurationCommandError(output, context);
41
- }
42
- const contents = (0, smithy_client_1.map)({
43
- $metadata: deserializeMetadata(output),
44
- [_NPCT]: [, output.headers[_npct]],
45
- [_NPIIS]: [() => void 0 !== output.headers[_npiis], () => (0, smithy_client_1.strictParseInt32)(output.headers[_npiis])],
46
- [_CTo]: [, output.headers[_ct_]],
47
- [_VL]: [, output.headers[_vl]],
48
- });
49
- const data = await (0, smithy_client_1.collectBody)(output.body, context);
50
- contents.Configuration = data;
51
- return contents;
52
- };
53
- exports.de_GetLatestConfigurationCommand = de_GetLatestConfigurationCommand;
54
- const de_GetLatestConfigurationCommandError = async (output, context) => {
55
- const parsedOutput = {
56
- ...output,
57
- body: await parseErrorBody(output.body, context),
58
- };
59
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
60
- switch (errorCode) {
61
- case "BadRequestException":
62
- case "com.amazonaws.appconfigdata#BadRequestException":
63
- throw await de_BadRequestExceptionRes(parsedOutput, context);
64
- case "InternalServerException":
65
- case "com.amazonaws.appconfigdata#InternalServerException":
66
- throw await de_InternalServerExceptionRes(parsedOutput, context);
67
- case "ResourceNotFoundException":
68
- case "com.amazonaws.appconfigdata#ResourceNotFoundException":
69
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
70
- case "ThrottlingException":
71
- case "com.amazonaws.appconfigdata#ThrottlingException":
72
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
73
- default:
74
- const parsedBody = parsedOutput.body;
75
- return throwDefaultError({
76
- output,
77
- parsedBody,
78
- errorCode,
79
- });
80
- }
81
- };
82
- const de_StartConfigurationSessionCommand = async (output, context) => {
83
- if (output.statusCode !== 201 && output.statusCode >= 300) {
84
- return de_StartConfigurationSessionCommandError(output, context);
85
- }
86
- const contents = (0, smithy_client_1.map)({
87
- $metadata: deserializeMetadata(output),
88
- });
89
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
90
- const doc = (0, smithy_client_1.take)(data, {
91
- InitialConfigurationToken: smithy_client_1.expectString,
92
- });
93
- Object.assign(contents, doc);
94
- return contents;
95
- };
96
- exports.de_StartConfigurationSessionCommand = de_StartConfigurationSessionCommand;
97
- const de_StartConfigurationSessionCommandError = async (output, context) => {
98
- const parsedOutput = {
99
- ...output,
100
- body: await parseErrorBody(output.body, context),
101
- };
102
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
103
- switch (errorCode) {
104
- case "BadRequestException":
105
- case "com.amazonaws.appconfigdata#BadRequestException":
106
- throw await de_BadRequestExceptionRes(parsedOutput, context);
107
- case "InternalServerException":
108
- case "com.amazonaws.appconfigdata#InternalServerException":
109
- throw await de_InternalServerExceptionRes(parsedOutput, context);
110
- case "ResourceNotFoundException":
111
- case "com.amazonaws.appconfigdata#ResourceNotFoundException":
112
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
113
- case "ThrottlingException":
114
- case "com.amazonaws.appconfigdata#ThrottlingException":
115
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
116
- default:
117
- const parsedBody = parsedOutput.body;
118
- return throwDefaultError({
119
- output,
120
- parsedBody,
121
- errorCode,
122
- });
123
- }
124
- };
125
- const throwDefaultError = (0, smithy_client_1.withBaseException)(AppConfigDataServiceException_1.AppConfigDataServiceException);
126
- const de_BadRequestExceptionRes = async (parsedOutput, context) => {
127
- const contents = (0, smithy_client_1.map)({});
128
- const data = parsedOutput.body;
129
- const doc = (0, smithy_client_1.take)(data, {
130
- Details: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
131
- Message: smithy_client_1.expectString,
132
- Reason: smithy_client_1.expectString,
133
- });
134
- Object.assign(contents, doc);
135
- const exception = new models_0_1.BadRequestException({
136
- $metadata: deserializeMetadata(parsedOutput),
137
- ...contents,
138
- });
139
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
140
- };
141
- const de_InternalServerExceptionRes = 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.InternalServerException({
149
- $metadata: deserializeMetadata(parsedOutput),
150
- ...contents,
151
- });
152
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
153
- };
154
- const de_ResourceNotFoundExceptionRes = 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
- ReferencedBy: smithy_client_1._json,
160
- ResourceType: smithy_client_1.expectString,
161
- });
162
- Object.assign(contents, doc);
163
- const exception = new models_0_1.ResourceNotFoundException({
164
- $metadata: deserializeMetadata(parsedOutput),
165
- ...contents,
166
- });
167
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
168
- };
169
- const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
170
- const contents = (0, smithy_client_1.map)({});
171
- const data = parsedOutput.body;
172
- const doc = (0, smithy_client_1.take)(data, {
173
- Message: smithy_client_1.expectString,
174
- });
175
- Object.assign(contents, doc);
176
- const exception = new models_0_1.ThrottlingException({
177
- $metadata: deserializeMetadata(parsedOutput),
178
- ...contents,
179
- });
180
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
181
- };
182
- const deserializeMetadata = (output) => ({
183
- httpStatusCode: output.statusCode,
184
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
185
- extendedRequestId: output.headers["x-amz-id-2"],
186
- cfId: output.headers["x-amz-cf-id"],
187
- });
188
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
189
- const isSerializableHeaderValue = (value) => value !== undefined &&
190
- value !== null &&
191
- value !== "" &&
192
- (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
193
- (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
194
- const _CT = "ConfigurationToken";
195
- const _CTo = "ContentType";
196
- const _NPCT = "NextPollConfigurationToken";
197
- const _NPIIS = "NextPollIntervalInSeconds";
198
- const _VL = "VersionLabel";
199
- const _ct = "configuration_token";
200
- const _ct_ = "content-type";
201
- const _npct = "next-poll-configuration-token";
202
- const _npiis = "next-poll-interval-in-seconds";
203
- const _vl = "version-label";
204
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
205
- if (encoded.length) {
206
- return JSON.parse(encoded);
207
- }
208
- return {};
209
- });
210
- const parseErrorBody = async (errorBody, context) => {
211
- const value = await parseBody(errorBody, context);
212
- value.message = value.message ?? value.Message;
213
- return value;
214
- };
215
- const loadRestJsonErrorCode = (output, data) => {
216
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
217
- const sanitizeErrorCode = (rawValue) => {
218
- let cleanValue = rawValue;
219
- if (typeof cleanValue === "number") {
220
- cleanValue = cleanValue.toString();
221
- }
222
- if (cleanValue.indexOf(",") >= 0) {
223
- cleanValue = cleanValue.split(",")[0];
224
- }
225
- if (cleanValue.indexOf(":") >= 0) {
226
- cleanValue = cleanValue.split(":")[0];
227
- }
228
- if (cleanValue.indexOf("#") >= 0) {
229
- cleanValue = cleanValue.split("#")[1];
230
- }
231
- return cleanValue;
232
- };
233
- const headerKey = findKey(output.headers, "x-amzn-errortype");
234
- if (headerKey !== undefined) {
235
- return sanitizeErrorCode(output.headers[headerKey]);
236
- }
237
- if (data.code !== undefined) {
238
- return sanitizeErrorCode(data.code);
239
- }
240
- if (data["__type"] !== undefined) {
241
- return sanitizeErrorCode(data["__type"]);
242
- }
243
- };
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-appconfigdata",
3
3
  "description": "AWS SDK for JavaScript Appconfigdata 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-appconfigdata",
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.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-stream": "^2.0.24",
60
- "@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-stream": "^2.1.0",
60
+ "@smithy/util-utf8": "^2.1.0",
61
61
  "tslib": "^2.5.0"
62
62
  },
63
63
  "devDependencies": {
64
- "@smithy/service-client-documentation-generator": "^2.0.0",
64
+ "@smithy/service-client-documentation-generator": "^2.1.0",
65
65
  "@tsconfig/node14": "1.0.3",
66
66
  "@types/node": "^14.14.31",
67
67
  "concurrently": "7.0.0",