@aws-sdk/client-chime-sdk-messaging 3.200.0 → 3.202.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,25 @@
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.202.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.201.0...v3.202.0) (2022-11-02)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-chime-sdk-messaging
9
+
10
+
11
+
12
+
13
+
14
+ # [3.201.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.200.0...v3.201.0) (2022-11-01)
15
+
16
+
17
+ ### Features
18
+
19
+ * 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))
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.200.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.199.0...v3.200.0) (2022-10-31)
7
26
 
8
27
  **Note:** Version bump only for package @aws-sdk/client-chime-sdk-messaging
@@ -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: "chime",
11
10
  };
12
11
  };
@@ -13,7 +13,7 @@ const serializeAws_restJson1AssociateChannelFlowCommand = async (input, context)
13
13
  "content-type": "application/json",
14
14
  "x-amz-chime-bearer": input.ChimeBearer,
15
15
  });
16
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/channel-flow";
16
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/channel-flow";
17
17
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
18
18
  let body;
19
19
  body = JSON.stringify({
@@ -36,7 +36,7 @@ const serializeAws_restJson1BatchCreateChannelMembershipCommand = async (input,
36
36
  "content-type": "application/json",
37
37
  "x-amz-chime-bearer": input.ChimeBearer,
38
38
  });
39
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
39
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
40
40
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
41
41
  const query = map({
42
42
  operation: [, "batch-create"],
@@ -60,19 +60,18 @@ const serializeAws_restJson1BatchCreateChannelMembershipCommand = async (input,
60
60
  };
61
61
  exports.serializeAws_restJson1BatchCreateChannelMembershipCommand = serializeAws_restJson1BatchCreateChannelMembershipCommand;
62
62
  const serializeAws_restJson1ChannelFlowCallbackCommand = async (input, context) => {
63
- var _a;
64
63
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
65
64
  const headers = {
66
65
  "content-type": "application/json",
67
66
  };
68
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
67
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
69
68
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
70
69
  const query = map({
71
70
  operation: [, "channel-flow-callback"],
72
71
  });
73
72
  let body;
74
73
  body = JSON.stringify({
75
- CallbackId: (_a = input.CallbackId) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
74
+ CallbackId: input.CallbackId ?? (0, uuid_1.v4)(),
76
75
  ...(input.ChannelMessage != null && {
77
76
  ChannelMessage: serializeAws_restJson1ChannelMessageCallback(input.ChannelMessage, context),
78
77
  }),
@@ -91,18 +90,17 @@ const serializeAws_restJson1ChannelFlowCallbackCommand = async (input, context)
91
90
  };
92
91
  exports.serializeAws_restJson1ChannelFlowCallbackCommand = serializeAws_restJson1ChannelFlowCallbackCommand;
93
92
  const serializeAws_restJson1CreateChannelCommand = async (input, context) => {
94
- var _a;
95
93
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
96
94
  const headers = map({}, isSerializableHeaderValue, {
97
95
  "content-type": "application/json",
98
96
  "x-amz-chime-bearer": input.ChimeBearer,
99
97
  });
100
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
98
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
101
99
  let body;
102
100
  body = JSON.stringify({
103
101
  ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
104
102
  ...(input.ChannelId != null && { ChannelId: input.ChannelId }),
105
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
103
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
106
104
  ...(input.ElasticChannelConfiguration != null && {
107
105
  ElasticChannelConfiguration: serializeAws_restJson1ElasticChannelConfiguration(input.ElasticChannelConfiguration, context),
108
106
  }),
@@ -133,7 +131,7 @@ const serializeAws_restJson1CreateChannelBanCommand = async (input, context) =>
133
131
  "content-type": "application/json",
134
132
  "x-amz-chime-bearer": input.ChimeBearer,
135
133
  });
136
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
134
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
137
135
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
138
136
  let body;
139
137
  body = JSON.stringify({
@@ -155,7 +153,7 @@ const serializeAws_restJson1CreateChannelFlowCommand = async (input, context) =>
155
153
  const headers = {
156
154
  "content-type": "application/json",
157
155
  };
158
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows";
156
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows";
159
157
  let body;
160
158
  body = JSON.stringify({
161
159
  ...(input.AppInstanceArn != null && { AppInstanceArn: input.AppInstanceArn }),
@@ -181,7 +179,7 @@ const serializeAws_restJson1CreateChannelMembershipCommand = async (input, conte
181
179
  "content-type": "application/json",
182
180
  "x-amz-chime-bearer": input.ChimeBearer,
183
181
  });
184
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
182
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
185
183
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
186
184
  let body;
187
185
  body = JSON.stringify({
@@ -206,7 +204,7 @@ const serializeAws_restJson1CreateChannelModeratorCommand = async (input, contex
206
204
  "content-type": "application/json",
207
205
  "x-amz-chime-bearer": input.ChimeBearer,
208
206
  });
209
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
207
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
210
208
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
211
209
  let body;
212
210
  body = JSON.stringify({
@@ -228,7 +226,7 @@ const serializeAws_restJson1DeleteChannelCommand = async (input, context) => {
228
226
  const headers = map({}, isSerializableHeaderValue, {
229
227
  "x-amz-chime-bearer": input.ChimeBearer,
230
228
  });
231
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
229
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
232
230
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
233
231
  const query = map({
234
232
  "sub-channel-id": [, input.SubChannelId],
@@ -251,7 +249,7 @@ const serializeAws_restJson1DeleteChannelBanCommand = async (input, context) =>
251
249
  const headers = map({}, isSerializableHeaderValue, {
252
250
  "x-amz-chime-bearer": input.ChimeBearer,
253
251
  });
254
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
252
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
255
253
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
256
254
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
257
255
  let body;
@@ -269,7 +267,7 @@ exports.serializeAws_restJson1DeleteChannelBanCommand = serializeAws_restJson1De
269
267
  const serializeAws_restJson1DeleteChannelFlowCommand = async (input, context) => {
270
268
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
271
269
  const headers = {};
272
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
270
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
273
271
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
274
272
  let body;
275
273
  return new protocol_http_1.HttpRequest({
@@ -288,7 +286,7 @@ const serializeAws_restJson1DeleteChannelMembershipCommand = async (input, conte
288
286
  const headers = map({}, isSerializableHeaderValue, {
289
287
  "x-amz-chime-bearer": input.ChimeBearer,
290
288
  });
291
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
289
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
292
290
  "/channels/{ChannelArn}/memberships/{MemberArn}";
293
291
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
294
292
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
@@ -313,7 +311,7 @@ const serializeAws_restJson1DeleteChannelMessageCommand = async (input, context)
313
311
  const headers = map({}, isSerializableHeaderValue, {
314
312
  "x-amz-chime-bearer": input.ChimeBearer,
315
313
  });
316
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
314
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
317
315
  "/channels/{ChannelArn}/messages/{MessageId}";
318
316
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
319
317
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -338,7 +336,7 @@ const serializeAws_restJson1DeleteChannelModeratorCommand = async (input, contex
338
336
  const headers = map({}, isSerializableHeaderValue, {
339
337
  "x-amz-chime-bearer": input.ChimeBearer,
340
338
  });
341
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
339
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
342
340
  "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}";
343
341
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
344
342
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelModeratorArn", () => input.ChannelModeratorArn, "{ChannelModeratorArn}", false);
@@ -359,7 +357,7 @@ const serializeAws_restJson1DescribeChannelCommand = async (input, context) => {
359
357
  const headers = map({}, isSerializableHeaderValue, {
360
358
  "x-amz-chime-bearer": input.ChimeBearer,
361
359
  });
362
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
360
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
363
361
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
364
362
  let body;
365
363
  return new protocol_http_1.HttpRequest({
@@ -378,7 +376,7 @@ const serializeAws_restJson1DescribeChannelBanCommand = async (input, context) =
378
376
  const headers = map({}, isSerializableHeaderValue, {
379
377
  "x-amz-chime-bearer": input.ChimeBearer,
380
378
  });
381
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
379
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans/{MemberArn}";
382
380
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
383
381
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
384
382
  let body;
@@ -396,7 +394,7 @@ exports.serializeAws_restJson1DescribeChannelBanCommand = serializeAws_restJson1
396
394
  const serializeAws_restJson1DescribeChannelFlowCommand = async (input, context) => {
397
395
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
398
396
  const headers = {};
399
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
397
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
400
398
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
401
399
  let body;
402
400
  return new protocol_http_1.HttpRequest({
@@ -415,7 +413,7 @@ const serializeAws_restJson1DescribeChannelMembershipCommand = async (input, con
415
413
  const headers = map({}, isSerializableHeaderValue, {
416
414
  "x-amz-chime-bearer": input.ChimeBearer,
417
415
  });
418
- 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 || ""}` +
419
417
  "/channels/{ChannelArn}/memberships/{MemberArn}";
420
418
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
421
419
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
@@ -440,7 +438,7 @@ const serializeAws_restJson1DescribeChannelMembershipForAppInstanceUserCommand =
440
438
  const headers = map({}, isSerializableHeaderValue, {
441
439
  "x-amz-chime-bearer": input.ChimeBearer,
442
440
  });
443
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
441
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
444
442
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
445
443
  const query = map({
446
444
  scope: [, "app-instance-user-membership"],
@@ -464,7 +462,7 @@ const serializeAws_restJson1DescribeChannelModeratedByAppInstanceUserCommand = a
464
462
  const headers = map({}, isSerializableHeaderValue, {
465
463
  "x-amz-chime-bearer": input.ChimeBearer,
466
464
  });
467
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
465
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
468
466
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
469
467
  const query = map({
470
468
  scope: [, "app-instance-user-moderated-channel"],
@@ -488,7 +486,7 @@ const serializeAws_restJson1DescribeChannelModeratorCommand = async (input, cont
488
486
  const headers = map({}, isSerializableHeaderValue, {
489
487
  "x-amz-chime-bearer": input.ChimeBearer,
490
488
  });
491
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
489
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
492
490
  "/channels/{ChannelArn}/moderators/{ChannelModeratorArn}";
493
491
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
494
492
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelModeratorArn", () => input.ChannelModeratorArn, "{ChannelModeratorArn}", false);
@@ -509,7 +507,7 @@ const serializeAws_restJson1DisassociateChannelFlowCommand = async (input, conte
509
507
  const headers = map({}, isSerializableHeaderValue, {
510
508
  "x-amz-chime-bearer": input.ChimeBearer,
511
509
  });
512
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
510
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
513
511
  "/channels/{ChannelArn}/channel-flow/{ChannelFlowArn}";
514
512
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
515
513
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
@@ -530,7 +528,7 @@ const serializeAws_restJson1GetChannelMembershipPreferencesCommand = async (inpu
530
528
  const headers = map({}, isSerializableHeaderValue, {
531
529
  "x-amz-chime-bearer": input.ChimeBearer,
532
530
  });
533
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
531
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
534
532
  "/channels/{ChannelArn}/memberships/{MemberArn}/preferences";
535
533
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
536
534
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
@@ -551,7 +549,7 @@ const serializeAws_restJson1GetChannelMessageCommand = async (input, context) =>
551
549
  const headers = map({}, isSerializableHeaderValue, {
552
550
  "x-amz-chime-bearer": input.ChimeBearer,
553
551
  });
554
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
552
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
555
553
  "/channels/{ChannelArn}/messages/{MessageId}";
556
554
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
557
555
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -576,7 +574,7 @@ const serializeAws_restJson1GetChannelMessageStatusCommand = async (input, conte
576
574
  const headers = map({}, isSerializableHeaderValue, {
577
575
  "x-amz-chime-bearer": input.ChimeBearer,
578
576
  });
579
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
577
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
580
578
  "/channels/{ChannelArn}/messages/{MessageId}";
581
579
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
582
580
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -602,7 +600,7 @@ const serializeAws_restJson1GetMessagingSessionEndpointCommand = async (input, c
602
600
  const headers = {
603
601
  "content-type": "application/json",
604
602
  };
605
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/messaging-session";
603
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/endpoints/messaging-session";
606
604
  let body;
607
605
  body = "";
608
606
  return new protocol_http_1.HttpRequest({
@@ -621,7 +619,7 @@ const serializeAws_restJson1ListChannelBansCommand = async (input, context) => {
621
619
  const headers = map({}, isSerializableHeaderValue, {
622
620
  "x-amz-chime-bearer": input.ChimeBearer,
623
621
  });
624
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
622
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/bans";
625
623
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
626
624
  const query = map({
627
625
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -643,7 +641,7 @@ exports.serializeAws_restJson1ListChannelBansCommand = serializeAws_restJson1Lis
643
641
  const serializeAws_restJson1ListChannelFlowsCommand = async (input, context) => {
644
642
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
645
643
  const headers = {};
646
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows";
644
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows";
647
645
  const query = map({
648
646
  "app-instance-arn": [, input.AppInstanceArn],
649
647
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -667,7 +665,7 @@ const serializeAws_restJson1ListChannelMembershipsCommand = async (input, contex
667
665
  const headers = map({}, isSerializableHeaderValue, {
668
666
  "x-amz-chime-bearer": input.ChimeBearer,
669
667
  });
670
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
668
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/memberships";
671
669
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
672
670
  const query = map({
673
671
  type: [, input.Type],
@@ -693,7 +691,7 @@ const serializeAws_restJson1ListChannelMembershipsForAppInstanceUserCommand = as
693
691
  const headers = map({}, isSerializableHeaderValue, {
694
692
  "x-amz-chime-bearer": input.ChimeBearer,
695
693
  });
696
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
694
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
697
695
  const query = map({
698
696
  scope: [, "app-instance-user-memberships"],
699
697
  "app-instance-user-arn": [, input.AppInstanceUserArn],
@@ -718,7 +716,7 @@ const serializeAws_restJson1ListChannelMessagesCommand = async (input, context)
718
716
  const headers = map({}, isSerializableHeaderValue, {
719
717
  "x-amz-chime-bearer": input.ChimeBearer,
720
718
  });
721
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
719
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
722
720
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
723
721
  const query = map({
724
722
  "sort-order": [, input.SortOrder],
@@ -752,7 +750,7 @@ const serializeAws_restJson1ListChannelModeratorsCommand = async (input, context
752
750
  const headers = map({}, isSerializableHeaderValue, {
753
751
  "x-amz-chime-bearer": input.ChimeBearer,
754
752
  });
755
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
753
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/moderators";
756
754
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
757
755
  const query = map({
758
756
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -776,7 +774,7 @@ const serializeAws_restJson1ListChannelsCommand = async (input, context) => {
776
774
  const headers = map({}, isSerializableHeaderValue, {
777
775
  "x-amz-chime-bearer": input.ChimeBearer,
778
776
  });
779
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
777
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
780
778
  const query = map({
781
779
  "app-instance-arn": [, input.AppInstanceArn],
782
780
  privacy: [, input.Privacy],
@@ -799,7 +797,7 @@ exports.serializeAws_restJson1ListChannelsCommand = serializeAws_restJson1ListCh
799
797
  const serializeAws_restJson1ListChannelsAssociatedWithChannelFlowCommand = async (input, context) => {
800
798
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
801
799
  const headers = {};
802
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
800
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
803
801
  const query = map({
804
802
  scope: [, "channel-flow-associations"],
805
803
  "channel-flow-arn": [, input.ChannelFlowArn],
@@ -824,7 +822,7 @@ const serializeAws_restJson1ListChannelsModeratedByAppInstanceUserCommand = asyn
824
822
  const headers = map({}, isSerializableHeaderValue, {
825
823
  "x-amz-chime-bearer": input.ChimeBearer,
826
824
  });
827
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
825
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
828
826
  const query = map({
829
827
  scope: [, "app-instance-user-moderated-channels"],
830
828
  "app-instance-user-arn": [, input.AppInstanceUserArn],
@@ -849,7 +847,7 @@ const serializeAws_restJson1ListSubChannelsCommand = async (input, context) => {
849
847
  const headers = map({}, isSerializableHeaderValue, {
850
848
  "x-amz-chime-bearer": input.ChimeBearer,
851
849
  });
852
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/subchannels";
850
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/subchannels";
853
851
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
854
852
  const query = map({
855
853
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -871,7 +869,7 @@ exports.serializeAws_restJson1ListSubChannelsCommand = serializeAws_restJson1Lis
871
869
  const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
872
870
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
873
871
  const headers = {};
874
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
872
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
875
873
  const query = map({
876
874
  arn: [, input.ResourceARN],
877
875
  });
@@ -894,7 +892,7 @@ const serializeAws_restJson1PutChannelMembershipPreferencesCommand = async (inpu
894
892
  "content-type": "application/json",
895
893
  "x-amz-chime-bearer": input.ChimeBearer,
896
894
  });
897
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
895
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
898
896
  "/channels/{ChannelArn}/memberships/{MemberArn}/preferences";
899
897
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
900
898
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MemberArn", () => input.MemberArn, "{MemberArn}", false);
@@ -921,7 +919,7 @@ const serializeAws_restJson1RedactChannelMessageCommand = async (input, context)
921
919
  "content-type": "application/json",
922
920
  "x-amz-chime-bearer": input.ChimeBearer,
923
921
  });
924
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
922
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
925
923
  "/channels/{ChannelArn}/messages/{MessageId}";
926
924
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
927
925
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -950,7 +948,7 @@ const serializeAws_restJson1SearchChannelsCommand = async (input, context) => {
950
948
  "content-type": "application/json",
951
949
  "x-amz-chime-bearer": input.ChimeBearer,
952
950
  });
953
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
951
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels";
954
952
  const query = map({
955
953
  operation: [, "search"],
956
954
  "max-results": [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
@@ -973,17 +971,16 @@ const serializeAws_restJson1SearchChannelsCommand = async (input, context) => {
973
971
  };
974
972
  exports.serializeAws_restJson1SearchChannelsCommand = serializeAws_restJson1SearchChannelsCommand;
975
973
  const serializeAws_restJson1SendChannelMessageCommand = async (input, context) => {
976
- var _a;
977
974
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
978
975
  const headers = map({}, isSerializableHeaderValue, {
979
976
  "content-type": "application/json",
980
977
  "x-amz-chime-bearer": input.ChimeBearer,
981
978
  });
982
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
979
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/messages";
983
980
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
984
981
  let body;
985
982
  body = JSON.stringify({
986
- ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
983
+ ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
987
984
  ...(input.Content != null && { Content: input.Content }),
988
985
  ...(input.MessageAttributes != null && {
989
986
  MessageAttributes: serializeAws_restJson1MessageAttributeMap(input.MessageAttributes, context),
@@ -1012,7 +1009,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
1012
1009
  const headers = {
1013
1010
  "content-type": "application/json",
1014
1011
  };
1015
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1012
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1016
1013
  const query = map({
1017
1014
  operation: [, "tag-resource"],
1018
1015
  });
@@ -1038,7 +1035,7 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
1038
1035
  const headers = {
1039
1036
  "content-type": "application/json",
1040
1037
  };
1041
- const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1038
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags";
1042
1039
  const query = map({
1043
1040
  operation: [, "untag-resource"],
1044
1041
  });
@@ -1065,7 +1062,7 @@ const serializeAws_restJson1UpdateChannelCommand = async (input, context) => {
1065
1062
  "content-type": "application/json",
1066
1063
  "x-amz-chime-bearer": input.ChimeBearer,
1067
1064
  });
1068
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1065
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}";
1069
1066
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1070
1067
  let body;
1071
1068
  body = JSON.stringify({
@@ -1089,7 +1086,7 @@ const serializeAws_restJson1UpdateChannelFlowCommand = async (input, context) =>
1089
1086
  const headers = {
1090
1087
  "content-type": "application/json",
1091
1088
  };
1092
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
1089
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channel-flows/{ChannelFlowArn}";
1093
1090
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelFlowArn", () => input.ChannelFlowArn, "{ChannelFlowArn}", false);
1094
1091
  let body;
1095
1092
  body = JSON.stringify({
@@ -1113,7 +1110,7 @@ const serializeAws_restJson1UpdateChannelMessageCommand = async (input, context)
1113
1110
  "content-type": "application/json",
1114
1111
  "x-amz-chime-bearer": input.ChimeBearer,
1115
1112
  });
1116
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` +
1113
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
1117
1114
  "/channels/{ChannelArn}/messages/{MessageId}";
1118
1115
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1119
1116
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "MessageId", () => input.MessageId, "{MessageId}", false);
@@ -1140,7 +1137,7 @@ const serializeAws_restJson1UpdateChannelReadMarkerCommand = async (input, conte
1140
1137
  "content-type": "application/json",
1141
1138
  "x-amz-chime-bearer": input.ChimeBearer,
1142
1139
  });
1143
- let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/readMarker";
1140
+ let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/channels/{ChannelArn}/readMarker";
1144
1141
  resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "ChannelArn", () => input.ChannelArn, "{ChannelArn}", false);
1145
1142
  let body;
1146
1143
  body = JSON.stringify({
@@ -4385,15 +4382,12 @@ const deserializeAws_restJson1TagList = (output, context) => {
4385
4382
  });
4386
4383
  return retVal;
4387
4384
  };
4388
- const deserializeMetadata = (output) => {
4389
- var _a, _b;
4390
- return ({
4391
- httpStatusCode: output.statusCode,
4392
- 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"],
4393
- extendedRequestId: output.headers["x-amz-id-2"],
4394
- cfId: output.headers["x-amz-cf-id"],
4395
- });
4396
- };
4385
+ const deserializeMetadata = (output) => ({
4386
+ httpStatusCode: output.statusCode,
4387
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
4388
+ extendedRequestId: output.headers["x-amz-id-2"],
4389
+ cfId: output.headers["x-amz-cf-id"],
4390
+ });
4397
4391
  const collectBody = (streamBody = new Uint8Array(), context) => {
4398
4392
  if (streamBody instanceof Uint8Array) {
4399
4393
  return Promise.resolve(streamBody);
@@ -4413,9 +4407,8 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
4413
4407
  return {};
4414
4408
  });
4415
4409
  const parseErrorBody = async (errorBody, context) => {
4416
- var _a;
4417
4410
  const value = await parseBody(errorBody, context);
4418
- value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
4411
+ value.message = value.message ?? value.Message;
4419
4412
  return value;
4420
4413
  };
4421
4414
  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: "2021-05-15",
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 : "Chime SDK Messaging",
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: "2021-05-15",
8
+ disableHostPrefix: config?.disableHostPrefix ?? false,
9
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
10
+ logger: config?.logger ?? {},
11
+ serviceId: config?.serviceId ?? "Chime SDK Messaging",
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-chime-sdk-messaging",
3
3
  "description": "AWS SDK for JavaScript Chime Sdk Messaging Client for Node.js, Browser and React Native",
4
- "version": "3.200.0",
4
+ "version": "3.202.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.202.0",
23
+ "@aws-sdk/config-resolver": "3.201.0",
24
+ "@aws-sdk/credential-provider-node": "3.202.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.202.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": {