@aws-sdk/client-wellarchitected 3.200.0 → 3.201.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.201.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.200.0...v3.201.0) (2022-11-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * end support for Node.js 12.x ([#4123](https://github.com/aws/aws-sdk-js-v3/issues/4123)) ([83f913e](https://github.com/aws/aws-sdk-js-v3/commit/83f913ec2ac3878d8726c6964f585550dc5caf3e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-wellarchitected
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveClientEndpointParameters = void 0;
4
4
  const resolveClientEndpointParameters = (options) => {
5
- var _a, _b;
6
5
  return {
7
6
  ...options,
8
- useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false,
9
- useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false,
7
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
8
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
10
9
  defaultSigningName: "wellarchitected",
11
10
  };
12
11
  };
@@ -12,7 +12,7 @@ const serializeAws_restJson1AssociateLensesCommand = async (input, context) => {
12
12
  const headers = {
13
13
  "content-type": "application/json",
14
14
  };
15
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/associateLenses";
15
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/associateLenses";
16
16
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
17
17
  let body;
18
18
  body = JSON.stringify({
@@ -30,16 +30,15 @@ const serializeAws_restJson1AssociateLensesCommand = async (input, context) => {
30
30
  };
31
31
  exports.serializeAws_restJson1AssociateLensesCommand = serializeAws_restJson1AssociateLensesCommand;
32
32
  const serializeAws_restJson1CreateLensShareCommand = async (input, context) => {
33
- var _a;
34
33
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
35
34
  const headers = {
36
35
  "content-type": "application/json",
37
36
  };
38
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
37
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
39
38
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
40
39
  let body;
41
40
  body = JSON.stringify({
42
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
41
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
43
42
  ...(input.SharedWith != null && { SharedWith: input.SharedWith }),
44
43
  });
45
44
  return new protocol_http_1.HttpRequest({
@@ -54,16 +53,15 @@ const serializeAws_restJson1CreateLensShareCommand = async (input, context) => {
54
53
  };
55
54
  exports.serializeAws_restJson1CreateLensShareCommand = serializeAws_restJson1CreateLensShareCommand;
56
55
  const serializeAws_restJson1CreateLensVersionCommand = async (input, context) => {
57
- var _a;
58
56
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
59
57
  const headers = {
60
58
  "content-type": "application/json",
61
59
  };
62
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versions";
60
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versions";
63
61
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
64
62
  let body;
65
63
  body = JSON.stringify({
66
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
64
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
67
65
  ...(input.IsMajorVersion != null && { IsMajorVersion: input.IsMajorVersion }),
68
66
  ...(input.LensVersion != null && { LensVersion: input.LensVersion }),
69
67
  });
@@ -79,16 +77,15 @@ const serializeAws_restJson1CreateLensVersionCommand = async (input, context) =>
79
77
  };
80
78
  exports.serializeAws_restJson1CreateLensVersionCommand = serializeAws_restJson1CreateLensVersionCommand;
81
79
  const serializeAws_restJson1CreateMilestoneCommand = async (input, context) => {
82
- var _a;
83
80
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
81
  const headers = {
85
82
  "content-type": "application/json",
86
83
  };
87
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/milestones";
84
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/milestones";
88
85
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
89
86
  let body;
90
87
  body = JSON.stringify({
91
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
88
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
92
89
  ...(input.MilestoneName != null && { MilestoneName: input.MilestoneName }),
93
90
  });
94
91
  return new protocol_http_1.HttpRequest({
@@ -103,12 +100,11 @@ const serializeAws_restJson1CreateMilestoneCommand = async (input, context) => {
103
100
  };
104
101
  exports.serializeAws_restJson1CreateMilestoneCommand = serializeAws_restJson1CreateMilestoneCommand;
105
102
  const serializeAws_restJson1CreateWorkloadCommand = async (input, context) => {
106
- var _a;
107
103
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
104
  const headers = {
109
105
  "content-type": "application/json",
110
106
  };
111
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads";
107
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads";
112
108
  let body;
113
109
  body = JSON.stringify({
114
110
  ...(input.AccountIds != null && {
@@ -118,7 +114,7 @@ const serializeAws_restJson1CreateWorkloadCommand = async (input, context) => {
118
114
  ...(input.AwsRegions != null && {
119
115
  AwsRegions: serializeAws_restJson1WorkloadAwsRegions(input.AwsRegions, context),
120
116
  }),
121
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
117
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
122
118
  ...(input.Description != null && { Description: input.Description }),
123
119
  ...(input.Environment != null && { Environment: input.Environment }),
124
120
  ...(input.Industry != null && { Industry: input.Industry }),
@@ -147,16 +143,15 @@ const serializeAws_restJson1CreateWorkloadCommand = async (input, context) => {
147
143
  };
148
144
  exports.serializeAws_restJson1CreateWorkloadCommand = serializeAws_restJson1CreateWorkloadCommand;
149
145
  const serializeAws_restJson1CreateWorkloadShareCommand = async (input, context) => {
150
- var _a;
151
146
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
147
  const headers = {
153
148
  "content-type": "application/json",
154
149
  };
155
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
150
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
156
151
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
157
152
  let body;
158
153
  body = JSON.stringify({
159
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
154
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
160
155
  ...(input.PermissionType != null && { PermissionType: input.PermissionType }),
161
156
  ...(input.SharedWith != null && { SharedWith: input.SharedWith }),
162
157
  });
@@ -174,7 +169,7 @@ exports.serializeAws_restJson1CreateWorkloadShareCommand = serializeAws_restJson
174
169
  const serializeAws_restJson1DeleteLensCommand = async (input, context) => {
175
170
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
176
171
  const headers = {};
177
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
172
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
178
173
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
179
174
  const query = map({
180
175
  ClientRequestToken: [, input.ClientRequestToken],
@@ -196,7 +191,7 @@ exports.serializeAws_restJson1DeleteLensCommand = serializeAws_restJson1DeleteLe
196
191
  const serializeAws_restJson1DeleteLensShareCommand = async (input, context) => {
197
192
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
193
  const headers = {};
199
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares/{ShareId}";
194
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares/{ShareId}";
200
195
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
201
196
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
202
197
  const query = map({
@@ -218,7 +213,7 @@ exports.serializeAws_restJson1DeleteLensShareCommand = serializeAws_restJson1Del
218
213
  const serializeAws_restJson1DeleteWorkloadCommand = async (input, context) => {
219
214
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
220
215
  const headers = {};
221
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
216
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
222
217
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
223
218
  const query = map({
224
219
  ClientRequestToken: [, input.ClientRequestToken],
@@ -239,7 +234,7 @@ exports.serializeAws_restJson1DeleteWorkloadCommand = serializeAws_restJson1Dele
239
234
  const serializeAws_restJson1DeleteWorkloadShareCommand = async (input, context) => {
240
235
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
241
236
  const headers = {};
242
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares/{ShareId}";
237
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares/{ShareId}";
243
238
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
244
239
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
245
240
  const query = map({
@@ -263,7 +258,7 @@ const serializeAws_restJson1DisassociateLensesCommand = async (input, context) =
263
258
  const headers = {
264
259
  "content-type": "application/json",
265
260
  };
266
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
261
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
267
262
  "/workloads/{WorkloadId}/disassociateLenses";
268
263
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
269
264
  let body;
@@ -284,7 +279,7 @@ exports.serializeAws_restJson1DisassociateLensesCommand = serializeAws_restJson1
284
279
  const serializeAws_restJson1ExportLensCommand = async (input, context) => {
285
280
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
286
281
  const headers = {};
287
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/export";
282
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/export";
288
283
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
289
284
  const query = map({
290
285
  LensVersion: [, input.LensVersion],
@@ -305,7 +300,7 @@ exports.serializeAws_restJson1ExportLensCommand = serializeAws_restJson1ExportLe
305
300
  const serializeAws_restJson1GetAnswerCommand = async (input, context) => {
306
301
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
307
302
  const headers = {};
308
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
303
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
309
304
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/answers/{QuestionId}";
310
305
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
311
306
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -329,7 +324,7 @@ exports.serializeAws_restJson1GetAnswerCommand = serializeAws_restJson1GetAnswer
329
324
  const serializeAws_restJson1GetLensCommand = async (input, context) => {
330
325
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
331
326
  const headers = {};
332
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
327
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}";
333
328
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
334
329
  const query = map({
335
330
  LensVersion: [, input.LensVersion],
@@ -350,7 +345,7 @@ exports.serializeAws_restJson1GetLensCommand = serializeAws_restJson1GetLensComm
350
345
  const serializeAws_restJson1GetLensReviewCommand = async (input, context) => {
351
346
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
352
347
  const headers = {};
353
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
348
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
354
349
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}";
355
350
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
356
351
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -373,7 +368,7 @@ exports.serializeAws_restJson1GetLensReviewCommand = serializeAws_restJson1GetLe
373
368
  const serializeAws_restJson1GetLensReviewReportCommand = async (input, context) => {
374
369
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
375
370
  const headers = {};
376
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
371
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
377
372
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/report";
378
373
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
379
374
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -396,7 +391,7 @@ exports.serializeAws_restJson1GetLensReviewReportCommand = serializeAws_restJson
396
391
  const serializeAws_restJson1GetLensVersionDifferenceCommand = async (input, context) => {
397
392
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
398
393
  const headers = {};
399
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versionDifference";
394
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/versionDifference";
400
395
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
401
396
  const query = map({
402
397
  BaseLensVersion: [, input.BaseLensVersion],
@@ -418,7 +413,7 @@ exports.serializeAws_restJson1GetLensVersionDifferenceCommand = serializeAws_res
418
413
  const serializeAws_restJson1GetMilestoneCommand = async (input, context) => {
419
414
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
420
415
  const headers = {};
421
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
416
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
422
417
  "/workloads/{WorkloadId}/milestones/{MilestoneNumber}";
423
418
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
424
419
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MilestoneNumber", () => input.MilestoneNumber.toString(), "{MilestoneNumber}", false);
@@ -437,7 +432,7 @@ exports.serializeAws_restJson1GetMilestoneCommand = serializeAws_restJson1GetMil
437
432
  const serializeAws_restJson1GetWorkloadCommand = async (input, context) => {
438
433
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
439
434
  const headers = {};
440
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
435
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
441
436
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
442
437
  let body;
443
438
  return new protocol_http_1.HttpRequest({
@@ -452,15 +447,14 @@ const serializeAws_restJson1GetWorkloadCommand = async (input, context) => {
452
447
  };
453
448
  exports.serializeAws_restJson1GetWorkloadCommand = serializeAws_restJson1GetWorkloadCommand;
454
449
  const serializeAws_restJson1ImportLensCommand = async (input, context) => {
455
- var _a;
456
450
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
457
451
  const headers = {
458
452
  "content-type": "application/json",
459
453
  };
460
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/importLens";
454
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/importLens";
461
455
  let body;
462
456
  body = JSON.stringify({
463
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
457
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
464
458
  ...(input.JSONString != null && { JSONString: input.JSONString }),
465
459
  ...(input.LensAlias != null && { LensAlias: input.LensAlias }),
466
460
  ...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
@@ -479,7 +473,7 @@ exports.serializeAws_restJson1ImportLensCommand = serializeAws_restJson1ImportLe
479
473
  const serializeAws_restJson1ListAnswersCommand = async (input, context) => {
480
474
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
481
475
  const headers = {};
482
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
476
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
483
477
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/answers";
484
478
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
485
479
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -505,7 +499,7 @@ exports.serializeAws_restJson1ListAnswersCommand = serializeAws_restJson1ListAns
505
499
  const serializeAws_restJson1ListLensesCommand = async (input, context) => {
506
500
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
507
501
  const headers = {};
508
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses";
502
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses";
509
503
  const query = map({
510
504
  NextToken: [, input.NextToken],
511
505
  MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -529,7 +523,7 @@ exports.serializeAws_restJson1ListLensesCommand = serializeAws_restJson1ListLens
529
523
  const serializeAws_restJson1ListLensReviewImprovementsCommand = async (input, context) => {
530
524
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
531
525
  const headers = {};
532
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
526
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
533
527
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/improvements";
534
528
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
535
529
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -555,7 +549,7 @@ exports.serializeAws_restJson1ListLensReviewImprovementsCommand = serializeAws_r
555
549
  const serializeAws_restJson1ListLensReviewsCommand = async (input, context) => {
556
550
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
557
551
  const headers = {};
558
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/lensReviews";
552
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/lensReviews";
559
553
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
560
554
  const query = map({
561
555
  MilestoneNumber: [() => input.MilestoneNumber !== void 0, () => input.MilestoneNumber.toString()],
@@ -578,7 +572,7 @@ exports.serializeAws_restJson1ListLensReviewsCommand = serializeAws_restJson1Lis
578
572
  const serializeAws_restJson1ListLensSharesCommand = async (input, context) => {
579
573
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
580
574
  const headers = {};
581
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
575
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/lenses/{LensAlias}/shares";
582
576
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
583
577
  const query = map({
584
578
  SharedWithPrefix: [, input.SharedWithPrefix],
@@ -604,7 +598,7 @@ const serializeAws_restJson1ListMilestonesCommand = async (input, context) => {
604
598
  const headers = {
605
599
  "content-type": "application/json",
606
600
  };
607
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
601
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
608
602
  "/workloads/{WorkloadId}/milestonesSummaries";
609
603
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
610
604
  let body;
@@ -628,7 +622,7 @@ const serializeAws_restJson1ListNotificationsCommand = async (input, context) =>
628
622
  const headers = {
629
623
  "content-type": "application/json",
630
624
  };
631
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/notifications";
625
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/notifications";
632
626
  let body;
633
627
  body = JSON.stringify({
634
628
  ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
@@ -649,7 +643,7 @@ exports.serializeAws_restJson1ListNotificationsCommand = serializeAws_restJson1L
649
643
  const serializeAws_restJson1ListShareInvitationsCommand = async (input, context) => {
650
644
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
651
645
  const headers = {};
652
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations";
646
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations";
653
647
  const query = map({
654
648
  WorkloadNamePrefix: [, input.WorkloadNamePrefix],
655
649
  LensNamePrefix: [, input.LensNamePrefix],
@@ -673,7 +667,7 @@ exports.serializeAws_restJson1ListShareInvitationsCommand = serializeAws_restJso
673
667
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
674
668
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
675
669
  const headers = {};
676
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
670
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
677
671
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn, "{WorkloadArn}", false);
678
672
  let body;
679
673
  return new protocol_http_1.HttpRequest({
@@ -692,7 +686,7 @@ const serializeAws_restJson1ListWorkloadsCommand = async (input, context) => {
692
686
  const headers = {
693
687
  "content-type": "application/json",
694
688
  };
695
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries";
689
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloadsSummaries";
696
690
  let body;
697
691
  body = JSON.stringify({
698
692
  ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
@@ -713,7 +707,7 @@ exports.serializeAws_restJson1ListWorkloadsCommand = serializeAws_restJson1ListW
713
707
  const serializeAws_restJson1ListWorkloadSharesCommand = async (input, context) => {
714
708
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
715
709
  const headers = {};
716
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
710
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares";
717
711
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
718
712
  const query = map({
719
713
  SharedWithPrefix: [, input.SharedWithPrefix],
@@ -739,7 +733,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
739
733
  const headers = {
740
734
  "content-type": "application/json",
741
735
  };
742
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
736
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
743
737
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn, "{WorkloadArn}", false);
744
738
  let body;
745
739
  body = JSON.stringify({
@@ -759,7 +753,7 @@ exports.serializeAws_restJson1TagResourceCommand = serializeAws_restJson1TagReso
759
753
  const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
760
754
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
761
755
  const headers = {};
762
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
756
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{WorkloadArn}";
763
757
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadArn", () => input.WorkloadArn, "{WorkloadArn}", false);
764
758
  const query = map({
765
759
  tagKeys: [() => input.TagKeys !== void 0, () => (input.TagKeys || []).map((_entry) => _entry)],
@@ -782,7 +776,7 @@ const serializeAws_restJson1UpdateAnswerCommand = async (input, context) => {
782
776
  const headers = {
783
777
  "content-type": "application/json",
784
778
  };
785
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
779
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
786
780
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/answers/{QuestionId}";
787
781
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
788
782
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -815,7 +809,7 @@ const serializeAws_restJson1UpdateGlobalSettingsCommand = async (input, context)
815
809
  const headers = {
816
810
  "content-type": "application/json",
817
811
  };
818
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/global-settings";
812
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/global-settings";
819
813
  let body;
820
814
  body = JSON.stringify({
821
815
  ...(input.OrganizationSharingStatus != null && { OrganizationSharingStatus: input.OrganizationSharingStatus }),
@@ -836,7 +830,7 @@ const serializeAws_restJson1UpdateLensReviewCommand = async (input, context) =>
836
830
  const headers = {
837
831
  "content-type": "application/json",
838
832
  };
839
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
833
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
840
834
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}";
841
835
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
842
836
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -861,7 +855,7 @@ const serializeAws_restJson1UpdateShareInvitationCommand = async (input, context
861
855
  const headers = {
862
856
  "content-type": "application/json",
863
857
  };
864
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations/{ShareInvitationId}";
858
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/shareInvitations/{ShareInvitationId}";
865
859
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareInvitationId", () => input.ShareInvitationId, "{ShareInvitationId}", false);
866
860
  let body;
867
861
  body = JSON.stringify({
@@ -883,7 +877,7 @@ const serializeAws_restJson1UpdateWorkloadCommand = async (input, context) => {
883
877
  const headers = {
884
878
  "content-type": "application/json",
885
879
  };
886
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
880
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}";
887
881
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
888
882
  let body;
889
883
  body = JSON.stringify({
@@ -928,7 +922,7 @@ const serializeAws_restJson1UpdateWorkloadShareCommand = async (input, context)
928
922
  const headers = {
929
923
  "content-type": "application/json",
930
924
  };
931
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares/{ShareId}";
925
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/workloads/{WorkloadId}/shares/{ShareId}";
932
926
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ShareId", () => input.ShareId, "{ShareId}", false);
933
927
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
934
928
  let body;
@@ -951,7 +945,7 @@ const serializeAws_restJson1UpgradeLensReviewCommand = async (input, context) =>
951
945
  const headers = {
952
946
  "content-type": "application/json",
953
947
  };
954
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
948
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
955
949
  "/workloads/{WorkloadId}/lensReviews/{LensAlias}/upgrade";
956
950
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "WorkloadId", () => input.WorkloadId, "{WorkloadId}", false);
957
951
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "LensAlias", () => input.LensAlias, "{LensAlias}", false);
@@ -3794,15 +3788,12 @@ const deserializeAws_restJson1WorkloadSummary = (output, context) => {
3794
3788
  WorkloadName: (0, smithy_client_1.expectString)(output.WorkloadName),
3795
3789
  };
3796
3790
  };
3797
- const deserializeMetadata = (output) => {
3798
- var _a, _b;
3799
- return ({
3800
- httpStatusCode: output.statusCode,
3801
- requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
3802
- extendedRequestId: output.headers["x-amz-id-2"],
3803
- cfId: output.headers["x-amz-cf-id"],
3804
- });
3805
- };
3791
+ const deserializeMetadata = (output) => ({
3792
+ httpStatusCode: output.statusCode,
3793
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
3794
+ extendedRequestId: output.headers["x-amz-id-2"],
3795
+ cfId: output.headers["x-amz-cf-id"],
3796
+ });
3806
3797
  const collectBody = (streamBody = new Uint8Array(), context) => {
3807
3798
  if (streamBody instanceof Uint8Array) {
3808
3799
  return Promise.resolve(streamBody);
@@ -3822,9 +3813,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
3822
3813
  return {};
3823
3814
  });
3824
3815
  const parseErrorBody = async (errorBody, context) => {
3825
- var _a;
3826
3816
  const value = await parseBody(errorBody, context);
3827
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
3817
+ value.message = value.message ?? value.Message;
3828
3818
  return value;
3829
3819
  };
3830
3820
  const loadRestJsonErrorCode = (output, data) => {
@@ -16,7 +16,6 @@ const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
16
16
  const smithy_client_1 = require("@aws-sdk/smithy-client");
17
17
  const util_defaults_mode_browser_1 = require("@aws-sdk/util-defaults-mode-browser");
18
18
  const getRuntimeConfig = (config) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
20
19
  const defaultsMode = (0, util_defaults_mode_browser_1.resolveDefaultsModeConfig)(config);
21
20
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
22
21
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
@@ -25,21 +24,22 @@ const getRuntimeConfig = (config) => {
25
24
  ...config,
26
25
  runtime: "browser",
27
26
  defaultsMode,
28
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_browser_1.fromBase64,
29
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_browser_1.toBase64,
30
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_browser_1.calculateBodyLength,
31
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : ((_) => () => Promise.reject(new Error("Credential is missing"))),
32
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : sha256_browser_1.Sha256,
38
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : fetch_http_handler_1.streamCollector,
39
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_browser_1.fromUtf8,
42
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_browser_1.toUtf8,
27
+ base64Decoder: config?.base64Decoder ?? util_base64_browser_1.fromBase64,
28
+ base64Encoder: config?.base64Encoder ?? util_base64_browser_1.toBase64,
29
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
30
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ (0, util_user_agent_browser_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
33
+ maxAttempts: config?.maxAttempts ?? middleware_retry_1.DEFAULT_MAX_ATTEMPTS,
34
+ region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
35
+ requestHandler: config?.requestHandler ?? new fetch_http_handler_1.FetchHttpHandler(defaultConfigProvider),
36
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE),
37
+ sha256: config?.sha256 ?? sha256_browser_1.Sha256,
38
+ streamCollector: config?.streamCollector ?? fetch_http_handler_1.streamCollector,
39
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_DUALSTACK_ENDPOINT)),
40
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(config_resolver_1.DEFAULT_USE_FIPS_ENDPOINT)),
41
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_browser_1.fromUtf8,
42
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_browser_1.toUtf8,
43
43
  };
44
44
  };
45
45
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -19,7 +19,6 @@ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
19
  const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
20
20
  const smithy_client_2 = require("@aws-sdk/smithy-client");
21
21
  const getRuntimeConfig = (config) => {
22
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
23
22
  (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);
24
23
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
25
24
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
@@ -29,24 +28,26 @@ const getRuntimeConfig = (config) => {
29
28
  ...config,
30
29
  runtime: "node",
31
30
  defaultsMode,
32
- base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
33
- base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
34
- bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
35
- credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
36
- defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
- maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
- region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)({
41
- ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
42
- default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
43
- }),
44
- sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
45
- streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
46
- useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
47
- useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
48
- utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8,
49
- utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8,
31
+ base64Decoder: config?.base64Decoder ?? util_base64_node_1.fromBase64,
32
+ base64Encoder: config?.base64Encoder ?? util_base64_node_1.toBase64,
33
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
34
+ credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider),
35
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
36
+ (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
38
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
39
+ requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
40
+ retryMode: config?.retryMode ??
41
+ (0, node_config_provider_1.loadConfig)({
42
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
43
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
44
+ }),
45
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
46
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
47
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
48
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
49
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_node_1.fromUtf8,
50
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_node_1.toUtf8,
50
51
  };
51
52
  };
52
53
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -4,13 +4,12 @@ exports.getRuntimeConfig = void 0;
4
4
  const sha256_js_1 = require("@aws-crypto/sha256-js");
5
5
  const runtimeConfig_browser_1 = require("./runtimeConfig.browser");
6
6
  const getRuntimeConfig = (config) => {
7
- var _a;
8
7
  const browserDefaults = (0, runtimeConfig_browser_1.getRuntimeConfig)(config);
9
8
  return {
10
9
  ...browserDefaults,
11
10
  ...config,
12
11
  runtime: "react-native",
13
- sha256: (_a = config === null || config === void 0 ? void 0 : config.sha256) !== null && _a !== void 0 ? _a : sha256_js_1.Sha256,
12
+ sha256: config?.sha256 ?? sha256_js_1.Sha256,
14
13
  };
15
14
  };
16
15
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -3,15 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
4
  const url_parser_1 = require("@aws-sdk/url-parser");
5
5
  const endpointResolver_1 = require("./endpoint/endpointResolver");
6
- const getRuntimeConfig = (config) => {
7
- var _a, _b, _c, _d, _e;
8
- return ({
9
- apiVersion: "2020-03-31",
10
- disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false,
11
- endpointProvider: (_b = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _b !== void 0 ? _b : endpointResolver_1.defaultEndpointResolver,
12
- logger: (_c = config === null || config === void 0 ? void 0 : config.logger) !== null && _c !== void 0 ? _c : {},
13
- serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "WellArchitected",
14
- urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl,
15
- });
16
- };
6
+ const getRuntimeConfig = (config) => ({
7
+ apiVersion: "2020-03-31",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "WellArchitected",
12
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
13
+ });
17
14
  exports.getRuntimeConfig = getRuntimeConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-wellarchitected",
3
3
  "description": "AWS SDK for JavaScript Wellarchitected Client for Node.js, Browser and React Native",
4
- "version": "3.200.0",
4
+ "version": "3.201.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,45 +19,45 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.200.0",
23
- "@aws-sdk/config-resolver": "3.200.0",
24
- "@aws-sdk/credential-provider-node": "3.200.0",
25
- "@aws-sdk/fetch-http-handler": "3.200.0",
26
- "@aws-sdk/hash-node": "3.200.0",
27
- "@aws-sdk/invalid-dependency": "3.200.0",
28
- "@aws-sdk/middleware-content-length": "3.200.0",
29
- "@aws-sdk/middleware-endpoint": "3.200.0",
30
- "@aws-sdk/middleware-host-header": "3.200.0",
31
- "@aws-sdk/middleware-logger": "3.200.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.200.0",
33
- "@aws-sdk/middleware-retry": "3.200.0",
34
- "@aws-sdk/middleware-serde": "3.200.0",
35
- "@aws-sdk/middleware-signing": "3.200.0",
36
- "@aws-sdk/middleware-stack": "3.200.0",
37
- "@aws-sdk/middleware-user-agent": "3.200.0",
38
- "@aws-sdk/node-config-provider": "3.200.0",
39
- "@aws-sdk/node-http-handler": "3.200.0",
40
- "@aws-sdk/protocol-http": "3.200.0",
41
- "@aws-sdk/smithy-client": "3.200.0",
42
- "@aws-sdk/types": "3.200.0",
43
- "@aws-sdk/url-parser": "3.200.0",
22
+ "@aws-sdk/client-sts": "3.201.0",
23
+ "@aws-sdk/config-resolver": "3.201.0",
24
+ "@aws-sdk/credential-provider-node": "3.201.0",
25
+ "@aws-sdk/fetch-http-handler": "3.201.0",
26
+ "@aws-sdk/hash-node": "3.201.0",
27
+ "@aws-sdk/invalid-dependency": "3.201.0",
28
+ "@aws-sdk/middleware-content-length": "3.201.0",
29
+ "@aws-sdk/middleware-endpoint": "3.201.0",
30
+ "@aws-sdk/middleware-host-header": "3.201.0",
31
+ "@aws-sdk/middleware-logger": "3.201.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.201.0",
33
+ "@aws-sdk/middleware-retry": "3.201.0",
34
+ "@aws-sdk/middleware-serde": "3.201.0",
35
+ "@aws-sdk/middleware-signing": "3.201.0",
36
+ "@aws-sdk/middleware-stack": "3.201.0",
37
+ "@aws-sdk/middleware-user-agent": "3.201.0",
38
+ "@aws-sdk/node-config-provider": "3.201.0",
39
+ "@aws-sdk/node-http-handler": "3.201.0",
40
+ "@aws-sdk/protocol-http": "3.201.0",
41
+ "@aws-sdk/smithy-client": "3.201.0",
42
+ "@aws-sdk/types": "3.201.0",
43
+ "@aws-sdk/url-parser": "3.201.0",
44
44
  "@aws-sdk/util-base64-browser": "3.188.0",
45
- "@aws-sdk/util-base64-node": "3.188.0",
45
+ "@aws-sdk/util-base64-node": "3.201.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
- "@aws-sdk/util-body-length-node": "3.188.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.200.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.200.0",
50
- "@aws-sdk/util-endpoints": "3.200.0",
51
- "@aws-sdk/util-user-agent-browser": "3.200.0",
52
- "@aws-sdk/util-user-agent-node": "3.200.0",
47
+ "@aws-sdk/util-body-length-node": "3.201.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.201.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.201.0",
50
+ "@aws-sdk/util-endpoints": "3.201.0",
51
+ "@aws-sdk/util-user-agent-browser": "3.201.0",
52
+ "@aws-sdk/util-user-agent-node": "3.201.0",
53
53
  "@aws-sdk/util-utf8-browser": "3.188.0",
54
- "@aws-sdk/util-utf8-node": "3.199.0",
54
+ "@aws-sdk/util-utf8-node": "3.201.0",
55
55
  "tslib": "^2.3.1",
56
56
  "uuid": "^8.3.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@aws-sdk/service-client-documentation-generator": "3.188.0",
60
- "@tsconfig/recommended": "1.0.1",
60
+ "@tsconfig/node14": "1.0.3",
61
61
  "@types/node": "^12.7.5",
62
62
  "@types/uuid": "^8.3.0",
63
63
  "concurrently": "7.0.0",
@@ -72,7 +72,7 @@
72
72
  }
73
73
  },
74
74
  "engines": {
75
- "node": ">=12.0.0"
75
+ "node": ">=14.0.0"
76
76
  },
77
77
  "typesVersions": {
78
78
  "<4.0": {