@aws-sdk/client-chatbot 3.525.0 → 3.529.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateSlackChannelConfigurationCommand = exports.de_UpdateMicrosoftTeamsChannelConfigurationCommand = exports.de_UpdateChimeWebhookConfigurationCommand = exports.de_UpdateAccountPreferencesCommand = exports.de_ListMicrosoftTeamsUserIdentitiesCommand = exports.de_ListMicrosoftTeamsConfiguredTeamsCommand = exports.de_ListMicrosoftTeamsChannelConfigurationsCommand = exports.de_GetMicrosoftTeamsChannelConfigurationCommand = exports.de_GetAccountPreferencesCommand = exports.de_DescribeSlackWorkspacesCommand = exports.de_DescribeSlackUserIdentitiesCommand = exports.de_DescribeSlackChannelConfigurationsCommand = exports.de_DescribeChimeWebhookConfigurationsCommand = exports.de_DeleteSlackWorkspaceAuthorizationCommand = exports.de_DeleteSlackUserIdentityCommand = exports.de_DeleteSlackChannelConfigurationCommand = exports.de_DeleteMicrosoftTeamsUserIdentityCommand = exports.de_DeleteMicrosoftTeamsConfiguredTeamCommand = exports.de_DeleteMicrosoftTeamsChannelConfigurationCommand = exports.de_DeleteChimeWebhookConfigurationCommand = exports.de_CreateSlackChannelConfigurationCommand = exports.de_CreateMicrosoftTeamsChannelConfigurationCommand = exports.de_CreateChimeWebhookConfigurationCommand = exports.se_UpdateSlackChannelConfigurationCommand = exports.se_UpdateMicrosoftTeamsChannelConfigurationCommand = exports.se_UpdateChimeWebhookConfigurationCommand = exports.se_UpdateAccountPreferencesCommand = exports.se_ListMicrosoftTeamsUserIdentitiesCommand = exports.se_ListMicrosoftTeamsConfiguredTeamsCommand = exports.se_ListMicrosoftTeamsChannelConfigurationsCommand = exports.se_GetMicrosoftTeamsChannelConfigurationCommand = exports.se_GetAccountPreferencesCommand = exports.se_DescribeSlackWorkspacesCommand = exports.se_DescribeSlackUserIdentitiesCommand = exports.se_DescribeSlackChannelConfigurationsCommand = exports.se_DescribeChimeWebhookConfigurationsCommand = exports.se_DeleteSlackWorkspaceAuthorizationCommand = exports.se_DeleteSlackUserIdentityCommand = exports.se_DeleteSlackChannelConfigurationCommand = exports.se_DeleteMicrosoftTeamsUserIdentityCommand = exports.se_DeleteMicrosoftTeamsConfiguredTeamCommand = exports.se_DeleteMicrosoftTeamsChannelConfigurationCommand = exports.se_DeleteChimeWebhookConfigurationCommand = exports.se_CreateSlackChannelConfigurationCommand = exports.se_CreateMicrosoftTeamsChannelConfigurationCommand = exports.se_CreateChimeWebhookConfigurationCommand = void 0;
4
- const core_1 = require("@smithy/core");
4
+ const core_1 = require("@aws-sdk/core");
5
+ const core_2 = require("@smithy/core");
5
6
  const smithy_client_1 = require("@smithy/smithy-client");
6
7
  const ChatbotServiceException_1 = require("../models/ChatbotServiceException");
7
8
  const models_0_1 = require("../models/models_0");
8
9
  const se_CreateChimeWebhookConfigurationCommand = async (input, context) => {
9
- const b = (0, core_1.requestBuilder)(input, context);
10
+ const b = (0, core_2.requestBuilder)(input, context);
10
11
  const headers = {
11
12
  "content-type": "application/json",
12
13
  };
@@ -25,7 +26,7 @@ const se_CreateChimeWebhookConfigurationCommand = async (input, context) => {
25
26
  };
26
27
  exports.se_CreateChimeWebhookConfigurationCommand = se_CreateChimeWebhookConfigurationCommand;
27
28
  const se_CreateMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
28
- const b = (0, core_1.requestBuilder)(input, context);
29
+ const b = (0, core_2.requestBuilder)(input, context);
29
30
  const headers = {
30
31
  "content-type": "application/json",
31
32
  };
@@ -49,7 +50,7 @@ const se_CreateMicrosoftTeamsChannelConfigurationCommand = async (input, context
49
50
  };
50
51
  exports.se_CreateMicrosoftTeamsChannelConfigurationCommand = se_CreateMicrosoftTeamsChannelConfigurationCommand;
51
52
  const se_CreateSlackChannelConfigurationCommand = async (input, context) => {
52
- const b = (0, core_1.requestBuilder)(input, context);
53
+ const b = (0, core_2.requestBuilder)(input, context);
53
54
  const headers = {
54
55
  "content-type": "application/json",
55
56
  };
@@ -71,7 +72,7 @@ const se_CreateSlackChannelConfigurationCommand = async (input, context) => {
71
72
  };
72
73
  exports.se_CreateSlackChannelConfigurationCommand = se_CreateSlackChannelConfigurationCommand;
73
74
  const se_DeleteChimeWebhookConfigurationCommand = async (input, context) => {
74
- const b = (0, core_1.requestBuilder)(input, context);
75
+ const b = (0, core_2.requestBuilder)(input, context);
75
76
  const headers = {
76
77
  "content-type": "application/json",
77
78
  };
@@ -85,7 +86,7 @@ const se_DeleteChimeWebhookConfigurationCommand = async (input, context) => {
85
86
  };
86
87
  exports.se_DeleteChimeWebhookConfigurationCommand = se_DeleteChimeWebhookConfigurationCommand;
87
88
  const se_DeleteMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
88
- const b = (0, core_1.requestBuilder)(input, context);
89
+ const b = (0, core_2.requestBuilder)(input, context);
89
90
  const headers = {
90
91
  "content-type": "application/json",
91
92
  };
@@ -99,7 +100,7 @@ const se_DeleteMicrosoftTeamsChannelConfigurationCommand = async (input, context
99
100
  };
100
101
  exports.se_DeleteMicrosoftTeamsChannelConfigurationCommand = se_DeleteMicrosoftTeamsChannelConfigurationCommand;
101
102
  const se_DeleteMicrosoftTeamsConfiguredTeamCommand = async (input, context) => {
102
- const b = (0, core_1.requestBuilder)(input, context);
103
+ const b = (0, core_2.requestBuilder)(input, context);
103
104
  const headers = {
104
105
  "content-type": "application/json",
105
106
  };
@@ -113,7 +114,7 @@ const se_DeleteMicrosoftTeamsConfiguredTeamCommand = async (input, context) => {
113
114
  };
114
115
  exports.se_DeleteMicrosoftTeamsConfiguredTeamCommand = se_DeleteMicrosoftTeamsConfiguredTeamCommand;
115
116
  const se_DeleteMicrosoftTeamsUserIdentityCommand = async (input, context) => {
116
- const b = (0, core_1.requestBuilder)(input, context);
117
+ const b = (0, core_2.requestBuilder)(input, context);
117
118
  const headers = {
118
119
  "content-type": "application/json",
119
120
  };
@@ -128,7 +129,7 @@ const se_DeleteMicrosoftTeamsUserIdentityCommand = async (input, context) => {
128
129
  };
129
130
  exports.se_DeleteMicrosoftTeamsUserIdentityCommand = se_DeleteMicrosoftTeamsUserIdentityCommand;
130
131
  const se_DeleteSlackChannelConfigurationCommand = async (input, context) => {
131
- const b = (0, core_1.requestBuilder)(input, context);
132
+ const b = (0, core_2.requestBuilder)(input, context);
132
133
  const headers = {
133
134
  "content-type": "application/json",
134
135
  };
@@ -142,7 +143,7 @@ const se_DeleteSlackChannelConfigurationCommand = async (input, context) => {
142
143
  };
143
144
  exports.se_DeleteSlackChannelConfigurationCommand = se_DeleteSlackChannelConfigurationCommand;
144
145
  const se_DeleteSlackUserIdentityCommand = async (input, context) => {
145
- const b = (0, core_1.requestBuilder)(input, context);
146
+ const b = (0, core_2.requestBuilder)(input, context);
146
147
  const headers = {
147
148
  "content-type": "application/json",
148
149
  };
@@ -158,7 +159,7 @@ const se_DeleteSlackUserIdentityCommand = async (input, context) => {
158
159
  };
159
160
  exports.se_DeleteSlackUserIdentityCommand = se_DeleteSlackUserIdentityCommand;
160
161
  const se_DeleteSlackWorkspaceAuthorizationCommand = async (input, context) => {
161
- const b = (0, core_1.requestBuilder)(input, context);
162
+ const b = (0, core_2.requestBuilder)(input, context);
162
163
  const headers = {
163
164
  "content-type": "application/json",
164
165
  };
@@ -172,7 +173,7 @@ const se_DeleteSlackWorkspaceAuthorizationCommand = async (input, context) => {
172
173
  };
173
174
  exports.se_DeleteSlackWorkspaceAuthorizationCommand = se_DeleteSlackWorkspaceAuthorizationCommand;
174
175
  const se_DescribeChimeWebhookConfigurationsCommand = async (input, context) => {
175
- const b = (0, core_1.requestBuilder)(input, context);
176
+ const b = (0, core_2.requestBuilder)(input, context);
176
177
  const headers = {
177
178
  "content-type": "application/json",
178
179
  };
@@ -188,7 +189,7 @@ const se_DescribeChimeWebhookConfigurationsCommand = async (input, context) => {
188
189
  };
189
190
  exports.se_DescribeChimeWebhookConfigurationsCommand = se_DescribeChimeWebhookConfigurationsCommand;
190
191
  const se_DescribeSlackChannelConfigurationsCommand = async (input, context) => {
191
- const b = (0, core_1.requestBuilder)(input, context);
192
+ const b = (0, core_2.requestBuilder)(input, context);
192
193
  const headers = {
193
194
  "content-type": "application/json",
194
195
  };
@@ -204,7 +205,7 @@ const se_DescribeSlackChannelConfigurationsCommand = async (input, context) => {
204
205
  };
205
206
  exports.se_DescribeSlackChannelConfigurationsCommand = se_DescribeSlackChannelConfigurationsCommand;
206
207
  const se_DescribeSlackUserIdentitiesCommand = async (input, context) => {
207
- const b = (0, core_1.requestBuilder)(input, context);
208
+ const b = (0, core_2.requestBuilder)(input, context);
208
209
  const headers = {
209
210
  "content-type": "application/json",
210
211
  };
@@ -220,7 +221,7 @@ const se_DescribeSlackUserIdentitiesCommand = async (input, context) => {
220
221
  };
221
222
  exports.se_DescribeSlackUserIdentitiesCommand = se_DescribeSlackUserIdentitiesCommand;
222
223
  const se_DescribeSlackWorkspacesCommand = async (input, context) => {
223
- const b = (0, core_1.requestBuilder)(input, context);
224
+ const b = (0, core_2.requestBuilder)(input, context);
224
225
  const headers = {
225
226
  "content-type": "application/json",
226
227
  };
@@ -235,7 +236,7 @@ const se_DescribeSlackWorkspacesCommand = async (input, context) => {
235
236
  };
236
237
  exports.se_DescribeSlackWorkspacesCommand = se_DescribeSlackWorkspacesCommand;
237
238
  const se_GetAccountPreferencesCommand = async (input, context) => {
238
- const b = (0, core_1.requestBuilder)(input, context);
239
+ const b = (0, core_2.requestBuilder)(input, context);
239
240
  const headers = {
240
241
  "content-type": "application/json",
241
242
  };
@@ -247,7 +248,7 @@ const se_GetAccountPreferencesCommand = async (input, context) => {
247
248
  };
248
249
  exports.se_GetAccountPreferencesCommand = se_GetAccountPreferencesCommand;
249
250
  const se_GetMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
250
- const b = (0, core_1.requestBuilder)(input, context);
251
+ const b = (0, core_2.requestBuilder)(input, context);
251
252
  const headers = {
252
253
  "content-type": "application/json",
253
254
  };
@@ -261,7 +262,7 @@ const se_GetMicrosoftTeamsChannelConfigurationCommand = async (input, context) =
261
262
  };
262
263
  exports.se_GetMicrosoftTeamsChannelConfigurationCommand = se_GetMicrosoftTeamsChannelConfigurationCommand;
263
264
  const se_ListMicrosoftTeamsChannelConfigurationsCommand = async (input, context) => {
264
- const b = (0, core_1.requestBuilder)(input, context);
265
+ const b = (0, core_2.requestBuilder)(input, context);
265
266
  const headers = {
266
267
  "content-type": "application/json",
267
268
  };
@@ -277,7 +278,7 @@ const se_ListMicrosoftTeamsChannelConfigurationsCommand = async (input, context)
277
278
  };
278
279
  exports.se_ListMicrosoftTeamsChannelConfigurationsCommand = se_ListMicrosoftTeamsChannelConfigurationsCommand;
279
280
  const se_ListMicrosoftTeamsConfiguredTeamsCommand = async (input, context) => {
280
- const b = (0, core_1.requestBuilder)(input, context);
281
+ const b = (0, core_2.requestBuilder)(input, context);
281
282
  const headers = {
282
283
  "content-type": "application/json",
283
284
  };
@@ -292,7 +293,7 @@ const se_ListMicrosoftTeamsConfiguredTeamsCommand = async (input, context) => {
292
293
  };
293
294
  exports.se_ListMicrosoftTeamsConfiguredTeamsCommand = se_ListMicrosoftTeamsConfiguredTeamsCommand;
294
295
  const se_ListMicrosoftTeamsUserIdentitiesCommand = async (input, context) => {
295
- const b = (0, core_1.requestBuilder)(input, context);
296
+ const b = (0, core_2.requestBuilder)(input, context);
296
297
  const headers = {
297
298
  "content-type": "application/json",
298
299
  };
@@ -308,7 +309,7 @@ const se_ListMicrosoftTeamsUserIdentitiesCommand = async (input, context) => {
308
309
  };
309
310
  exports.se_ListMicrosoftTeamsUserIdentitiesCommand = se_ListMicrosoftTeamsUserIdentitiesCommand;
310
311
  const se_UpdateAccountPreferencesCommand = async (input, context) => {
311
- const b = (0, core_1.requestBuilder)(input, context);
312
+ const b = (0, core_2.requestBuilder)(input, context);
312
313
  const headers = {
313
314
  "content-type": "application/json",
314
315
  };
@@ -323,7 +324,7 @@ const se_UpdateAccountPreferencesCommand = async (input, context) => {
323
324
  };
324
325
  exports.se_UpdateAccountPreferencesCommand = se_UpdateAccountPreferencesCommand;
325
326
  const se_UpdateChimeWebhookConfigurationCommand = async (input, context) => {
326
- const b = (0, core_1.requestBuilder)(input, context);
327
+ const b = (0, core_2.requestBuilder)(input, context);
327
328
  const headers = {
328
329
  "content-type": "application/json",
329
330
  };
@@ -342,7 +343,7 @@ const se_UpdateChimeWebhookConfigurationCommand = async (input, context) => {
342
343
  };
343
344
  exports.se_UpdateChimeWebhookConfigurationCommand = se_UpdateChimeWebhookConfigurationCommand;
344
345
  const se_UpdateMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
345
- const b = (0, core_1.requestBuilder)(input, context);
346
+ const b = (0, core_2.requestBuilder)(input, context);
346
347
  const headers = {
347
348
  "content-type": "application/json",
348
349
  };
@@ -363,7 +364,7 @@ const se_UpdateMicrosoftTeamsChannelConfigurationCommand = async (input, context
363
364
  };
364
365
  exports.se_UpdateMicrosoftTeamsChannelConfigurationCommand = se_UpdateMicrosoftTeamsChannelConfigurationCommand;
365
366
  const se_UpdateSlackChannelConfigurationCommand = async (input, context) => {
366
- const b = (0, core_1.requestBuilder)(input, context);
367
+ const b = (0, core_2.requestBuilder)(input, context);
367
368
  const headers = {
368
369
  "content-type": "application/json",
369
370
  };
@@ -390,7 +391,7 @@ const de_CreateChimeWebhookConfigurationCommand = async (output, context) => {
390
391
  const contents = (0, smithy_client_1.map)({
391
392
  $metadata: deserializeMetadata(output),
392
393
  });
393
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
394
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
394
395
  const doc = (0, smithy_client_1.take)(data, {
395
396
  WebhookConfiguration: smithy_client_1._json,
396
397
  });
@@ -405,7 +406,7 @@ const de_CreateMicrosoftTeamsChannelConfigurationCommand = async (output, contex
405
406
  const contents = (0, smithy_client_1.map)({
406
407
  $metadata: deserializeMetadata(output),
407
408
  });
408
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
409
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
409
410
  const doc = (0, smithy_client_1.take)(data, {
410
411
  ChannelConfiguration: smithy_client_1._json,
411
412
  });
@@ -420,7 +421,7 @@ const de_CreateSlackChannelConfigurationCommand = async (output, context) => {
420
421
  const contents = (0, smithy_client_1.map)({
421
422
  $metadata: deserializeMetadata(output),
422
423
  });
423
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
424
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
424
425
  const doc = (0, smithy_client_1.take)(data, {
425
426
  ChannelConfiguration: smithy_client_1._json,
426
427
  });
@@ -512,7 +513,7 @@ const de_DescribeChimeWebhookConfigurationsCommand = async (output, context) =>
512
513
  const contents = (0, smithy_client_1.map)({
513
514
  $metadata: deserializeMetadata(output),
514
515
  });
515
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
516
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
516
517
  const doc = (0, smithy_client_1.take)(data, {
517
518
  NextToken: smithy_client_1.expectString,
518
519
  WebhookConfigurations: smithy_client_1._json,
@@ -528,7 +529,7 @@ const de_DescribeSlackChannelConfigurationsCommand = async (output, context) =>
528
529
  const contents = (0, smithy_client_1.map)({
529
530
  $metadata: deserializeMetadata(output),
530
531
  });
531
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
532
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
532
533
  const doc = (0, smithy_client_1.take)(data, {
533
534
  NextToken: smithy_client_1.expectString,
534
535
  SlackChannelConfigurations: smithy_client_1._json,
@@ -544,7 +545,7 @@ const de_DescribeSlackUserIdentitiesCommand = async (output, context) => {
544
545
  const contents = (0, smithy_client_1.map)({
545
546
  $metadata: deserializeMetadata(output),
546
547
  });
547
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
548
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
548
549
  const doc = (0, smithy_client_1.take)(data, {
549
550
  NextToken: smithy_client_1.expectString,
550
551
  SlackUserIdentities: smithy_client_1._json,
@@ -560,7 +561,7 @@ const de_DescribeSlackWorkspacesCommand = async (output, context) => {
560
561
  const contents = (0, smithy_client_1.map)({
561
562
  $metadata: deserializeMetadata(output),
562
563
  });
563
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
564
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
564
565
  const doc = (0, smithy_client_1.take)(data, {
565
566
  NextToken: smithy_client_1.expectString,
566
567
  SlackWorkspaces: smithy_client_1._json,
@@ -576,7 +577,7 @@ const de_GetAccountPreferencesCommand = async (output, context) => {
576
577
  const contents = (0, smithy_client_1.map)({
577
578
  $metadata: deserializeMetadata(output),
578
579
  });
579
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
580
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
580
581
  const doc = (0, smithy_client_1.take)(data, {
581
582
  AccountPreferences: smithy_client_1._json,
582
583
  });
@@ -591,7 +592,7 @@ const de_GetMicrosoftTeamsChannelConfigurationCommand = async (output, context)
591
592
  const contents = (0, smithy_client_1.map)({
592
593
  $metadata: deserializeMetadata(output),
593
594
  });
594
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
595
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
595
596
  const doc = (0, smithy_client_1.take)(data, {
596
597
  ChannelConfiguration: smithy_client_1._json,
597
598
  });
@@ -606,7 +607,7 @@ const de_ListMicrosoftTeamsChannelConfigurationsCommand = async (output, context
606
607
  const contents = (0, smithy_client_1.map)({
607
608
  $metadata: deserializeMetadata(output),
608
609
  });
609
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
610
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
610
611
  const doc = (0, smithy_client_1.take)(data, {
611
612
  NextToken: smithy_client_1.expectString,
612
613
  TeamChannelConfigurations: smithy_client_1._json,
@@ -622,7 +623,7 @@ const de_ListMicrosoftTeamsConfiguredTeamsCommand = async (output, context) => {
622
623
  const contents = (0, smithy_client_1.map)({
623
624
  $metadata: deserializeMetadata(output),
624
625
  });
625
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
626
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
626
627
  const doc = (0, smithy_client_1.take)(data, {
627
628
  ConfiguredTeams: smithy_client_1._json,
628
629
  NextToken: smithy_client_1.expectString,
@@ -638,7 +639,7 @@ const de_ListMicrosoftTeamsUserIdentitiesCommand = async (output, context) => {
638
639
  const contents = (0, smithy_client_1.map)({
639
640
  $metadata: deserializeMetadata(output),
640
641
  });
641
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
642
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
642
643
  const doc = (0, smithy_client_1.take)(data, {
643
644
  NextToken: smithy_client_1.expectString,
644
645
  TeamsUserIdentities: smithy_client_1._json,
@@ -654,7 +655,7 @@ const de_UpdateAccountPreferencesCommand = async (output, context) => {
654
655
  const contents = (0, smithy_client_1.map)({
655
656
  $metadata: deserializeMetadata(output),
656
657
  });
657
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
658
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
658
659
  const doc = (0, smithy_client_1.take)(data, {
659
660
  AccountPreferences: smithy_client_1._json,
660
661
  });
@@ -669,7 +670,7 @@ const de_UpdateChimeWebhookConfigurationCommand = async (output, context) => {
669
670
  const contents = (0, smithy_client_1.map)({
670
671
  $metadata: deserializeMetadata(output),
671
672
  });
672
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
673
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
673
674
  const doc = (0, smithy_client_1.take)(data, {
674
675
  WebhookConfiguration: smithy_client_1._json,
675
676
  });
@@ -684,7 +685,7 @@ const de_UpdateMicrosoftTeamsChannelConfigurationCommand = async (output, contex
684
685
  const contents = (0, smithy_client_1.map)({
685
686
  $metadata: deserializeMetadata(output),
686
687
  });
687
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
688
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
688
689
  const doc = (0, smithy_client_1.take)(data, {
689
690
  ChannelConfiguration: smithy_client_1._json,
690
691
  });
@@ -699,7 +700,7 @@ const de_UpdateSlackChannelConfigurationCommand = async (output, context) => {
699
700
  const contents = (0, smithy_client_1.map)({
700
701
  $metadata: deserializeMetadata(output),
701
702
  });
702
- const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
703
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context)), "body");
703
704
  const doc = (0, smithy_client_1.take)(data, {
704
705
  ChannelConfiguration: smithy_client_1._json,
705
706
  });
@@ -710,9 +711,9 @@ exports.de_UpdateSlackChannelConfigurationCommand = de_UpdateSlackChannelConfigu
710
711
  const de_CommandError = async (output, context) => {
711
712
  const parsedOutput = {
712
713
  ...output,
713
- body: await parseErrorBody(output.body, context),
714
+ body: await (0, core_1.parseJsonErrorBody)(output.body, context),
714
715
  };
715
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
716
+ const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
716
717
  switch (errorCode) {
717
718
  case "ConflictException":
718
719
  case "com.amazonaws.chatbot#ConflictException":
@@ -1184,43 +1185,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1184
1185
  value !== "" &&
1185
1186
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1186
1187
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1187
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1188
- if (encoded.length) {
1189
- return JSON.parse(encoded);
1190
- }
1191
- return {};
1192
- });
1193
- const parseErrorBody = async (errorBody, context) => {
1194
- const value = await parseBody(errorBody, context);
1195
- value.message = value.message ?? value.Message;
1196
- return value;
1197
- };
1198
- const loadRestJsonErrorCode = (output, data) => {
1199
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1200
- const sanitizeErrorCode = (rawValue) => {
1201
- let cleanValue = rawValue;
1202
- if (typeof cleanValue === "number") {
1203
- cleanValue = cleanValue.toString();
1204
- }
1205
- if (cleanValue.indexOf(",") >= 0) {
1206
- cleanValue = cleanValue.split(",")[0];
1207
- }
1208
- if (cleanValue.indexOf(":") >= 0) {
1209
- cleanValue = cleanValue.split(":")[0];
1210
- }
1211
- if (cleanValue.indexOf("#") >= 0) {
1212
- cleanValue = cleanValue.split("#")[1];
1213
- }
1214
- return cleanValue;
1215
- };
1216
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1217
- if (headerKey !== undefined) {
1218
- return sanitizeErrorCode(output.headers[headerKey]);
1219
- }
1220
- if (data.code !== undefined) {
1221
- return sanitizeErrorCode(data.code);
1222
- }
1223
- if (data["__type"] !== undefined) {
1224
- return sanitizeErrorCode(data["__type"]);
1225
- }
1226
- };
@@ -1,3 +1,4 @@
1
+ import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
1
2
  import { requestBuilder as rb } from "@smithy/core";
2
3
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map, take, withBaseException, } from "@smithy/smithy-client";
3
4
  import { ChatbotServiceException as __BaseException } from "../models/ChatbotServiceException";
@@ -1135,43 +1136,3 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1135
1136
  value !== "" &&
1136
1137
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1137
1138
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1138
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1139
- if (encoded.length) {
1140
- return JSON.parse(encoded);
1141
- }
1142
- return {};
1143
- });
1144
- const parseErrorBody = async (errorBody, context) => {
1145
- const value = await parseBody(errorBody, context);
1146
- value.message = value.message ?? value.Message;
1147
- return value;
1148
- };
1149
- const loadRestJsonErrorCode = (output, data) => {
1150
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1151
- const sanitizeErrorCode = (rawValue) => {
1152
- let cleanValue = rawValue;
1153
- if (typeof cleanValue === "number") {
1154
- cleanValue = cleanValue.toString();
1155
- }
1156
- if (cleanValue.indexOf(",") >= 0) {
1157
- cleanValue = cleanValue.split(",")[0];
1158
- }
1159
- if (cleanValue.indexOf(":") >= 0) {
1160
- cleanValue = cleanValue.split(":")[0];
1161
- }
1162
- if (cleanValue.indexOf("#") >= 0) {
1163
- cleanValue = cleanValue.split("#")[1];
1164
- }
1165
- return cleanValue;
1166
- };
1167
- const headerKey = findKey(output.headers, "x-amzn-errortype");
1168
- if (headerKey !== undefined) {
1169
- return sanitizeErrorCode(output.headers[headerKey]);
1170
- }
1171
- if (data.code !== undefined) {
1172
- return sanitizeErrorCode(data.code);
1173
- }
1174
- if (data["__type"] !== undefined) {
1175
- return sanitizeErrorCode(data["__type"]);
1176
- }
1177
- };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-chatbot",
3
3
  "description": "AWS SDK for JavaScript Chatbot Client for Node.js, Browser and React Native",
4
- "version": "3.525.0",
4
+ "version": "3.529.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.525.0",
24
- "@aws-sdk/core": "3.525.0",
25
- "@aws-sdk/credential-provider-node": "3.525.0",
23
+ "@aws-sdk/client-sts": "3.529.0",
24
+ "@aws-sdk/core": "3.529.0",
25
+ "@aws-sdk/credential-provider-node": "3.529.0",
26
26
  "@aws-sdk/middleware-host-header": "3.523.0",
27
27
  "@aws-sdk/middleware-logger": "3.523.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.523.0",