@aws-sdk/client-chatbot 3.517.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.
Files changed (207) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +389 -0
  3. package/dist-cjs/Chatbot.js +57 -0
  4. package/dist-cjs/ChatbotClient.js +56 -0
  5. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  6. package/dist-cjs/auth/httpAuthSchemeProvider.js +47 -0
  7. package/dist-cjs/commands/CreateChimeWebhookConfigurationCommand.js +28 -0
  8. package/dist-cjs/commands/CreateMicrosoftTeamsChannelConfigurationCommand.js +28 -0
  9. package/dist-cjs/commands/CreateSlackChannelConfigurationCommand.js +28 -0
  10. package/dist-cjs/commands/DeleteChimeWebhookConfigurationCommand.js +28 -0
  11. package/dist-cjs/commands/DeleteMicrosoftTeamsChannelConfigurationCommand.js +28 -0
  12. package/dist-cjs/commands/DeleteMicrosoftTeamsConfiguredTeamCommand.js +28 -0
  13. package/dist-cjs/commands/DeleteMicrosoftTeamsUserIdentityCommand.js +28 -0
  14. package/dist-cjs/commands/DeleteSlackChannelConfigurationCommand.js +28 -0
  15. package/dist-cjs/commands/DeleteSlackUserIdentityCommand.js +28 -0
  16. package/dist-cjs/commands/DeleteSlackWorkspaceAuthorizationCommand.js +28 -0
  17. package/dist-cjs/commands/DescribeChimeWebhookConfigurationsCommand.js +28 -0
  18. package/dist-cjs/commands/DescribeSlackChannelConfigurationsCommand.js +28 -0
  19. package/dist-cjs/commands/DescribeSlackUserIdentitiesCommand.js +28 -0
  20. package/dist-cjs/commands/DescribeSlackWorkspacesCommand.js +28 -0
  21. package/dist-cjs/commands/GetAccountPreferencesCommand.js +28 -0
  22. package/dist-cjs/commands/GetMicrosoftTeamsChannelConfigurationCommand.js +28 -0
  23. package/dist-cjs/commands/ListMicrosoftTeamsChannelConfigurationsCommand.js +28 -0
  24. package/dist-cjs/commands/ListMicrosoftTeamsConfiguredTeamsCommand.js +28 -0
  25. package/dist-cjs/commands/ListMicrosoftTeamsUserIdentitiesCommand.js +28 -0
  26. package/dist-cjs/commands/UpdateAccountPreferencesCommand.js +28 -0
  27. package/dist-cjs/commands/UpdateChimeWebhookConfigurationCommand.js +28 -0
  28. package/dist-cjs/commands/UpdateMicrosoftTeamsChannelConfigurationCommand.js +28 -0
  29. package/dist-cjs/commands/UpdateSlackChannelConfigurationCommand.js +28 -0
  30. package/dist-cjs/commands/index.js +26 -0
  31. package/dist-cjs/endpoint/EndpointParameters.js +18 -0
  32. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  33. package/dist-cjs/endpoint/ruleset.js +7 -0
  34. package/dist-cjs/extensionConfiguration.js +2 -0
  35. package/dist-cjs/index.js +12 -0
  36. package/dist-cjs/models/ChatbotServiceException.js +12 -0
  37. package/dist-cjs/models/index.js +4 -0
  38. package/dist-cjs/models/models_0.js +392 -0
  39. package/dist-cjs/pagination/DescribeChimeWebhookConfigurationsPaginator.js +7 -0
  40. package/dist-cjs/pagination/DescribeSlackChannelConfigurationsPaginator.js +7 -0
  41. package/dist-cjs/pagination/DescribeSlackUserIdentitiesPaginator.js +7 -0
  42. package/dist-cjs/pagination/DescribeSlackWorkspacesPaginator.js +7 -0
  43. package/dist-cjs/pagination/Interfaces.js +2 -0
  44. package/dist-cjs/pagination/ListMicrosoftTeamsChannelConfigurationsPaginator.js +7 -0
  45. package/dist-cjs/pagination/ListMicrosoftTeamsConfiguredTeamsPaginator.js +7 -0
  46. package/dist-cjs/pagination/ListMicrosoftTeamsUserIdentitiesPaginator.js +7 -0
  47. package/dist-cjs/pagination/index.js +11 -0
  48. package/dist-cjs/protocols/Aws_restJson1.js +1226 -0
  49. package/dist-cjs/runtimeConfig.browser.js +39 -0
  50. package/dist-cjs/runtimeConfig.js +49 -0
  51. package/dist-cjs/runtimeConfig.native.js +15 -0
  52. package/dist-cjs/runtimeConfig.shared.js +34 -0
  53. package/dist-cjs/runtimeExtensions.js +25 -0
  54. package/dist-es/Chatbot.js +53 -0
  55. package/dist-es/ChatbotClient.js +52 -0
  56. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  57. package/dist-es/auth/httpAuthSchemeProvider.js +41 -0
  58. package/dist-es/commands/CreateChimeWebhookConfigurationCommand.js +24 -0
  59. package/dist-es/commands/CreateMicrosoftTeamsChannelConfigurationCommand.js +24 -0
  60. package/dist-es/commands/CreateSlackChannelConfigurationCommand.js +24 -0
  61. package/dist-es/commands/DeleteChimeWebhookConfigurationCommand.js +24 -0
  62. package/dist-es/commands/DeleteMicrosoftTeamsChannelConfigurationCommand.js +24 -0
  63. package/dist-es/commands/DeleteMicrosoftTeamsConfiguredTeamCommand.js +24 -0
  64. package/dist-es/commands/DeleteMicrosoftTeamsUserIdentityCommand.js +24 -0
  65. package/dist-es/commands/DeleteSlackChannelConfigurationCommand.js +24 -0
  66. package/dist-es/commands/DeleteSlackUserIdentityCommand.js +24 -0
  67. package/dist-es/commands/DeleteSlackWorkspaceAuthorizationCommand.js +24 -0
  68. package/dist-es/commands/DescribeChimeWebhookConfigurationsCommand.js +24 -0
  69. package/dist-es/commands/DescribeSlackChannelConfigurationsCommand.js +24 -0
  70. package/dist-es/commands/DescribeSlackUserIdentitiesCommand.js +24 -0
  71. package/dist-es/commands/DescribeSlackWorkspacesCommand.js +24 -0
  72. package/dist-es/commands/GetAccountPreferencesCommand.js +24 -0
  73. package/dist-es/commands/GetMicrosoftTeamsChannelConfigurationCommand.js +24 -0
  74. package/dist-es/commands/ListMicrosoftTeamsChannelConfigurationsCommand.js +24 -0
  75. package/dist-es/commands/ListMicrosoftTeamsConfiguredTeamsCommand.js +24 -0
  76. package/dist-es/commands/ListMicrosoftTeamsUserIdentitiesCommand.js +24 -0
  77. package/dist-es/commands/UpdateAccountPreferencesCommand.js +24 -0
  78. package/dist-es/commands/UpdateChimeWebhookConfigurationCommand.js +24 -0
  79. package/dist-es/commands/UpdateMicrosoftTeamsChannelConfigurationCommand.js +24 -0
  80. package/dist-es/commands/UpdateSlackChannelConfigurationCommand.js +24 -0
  81. package/dist-es/commands/index.js +23 -0
  82. package/dist-es/endpoint/EndpointParameters.js +14 -0
  83. package/dist-es/endpoint/endpointResolver.js +8 -0
  84. package/dist-es/endpoint/ruleset.js +4 -0
  85. package/dist-es/extensionConfiguration.js +1 -0
  86. package/dist-es/index.js +7 -0
  87. package/dist-es/models/ChatbotServiceException.js +8 -0
  88. package/dist-es/models/index.js +1 -0
  89. package/dist-es/models/models_0.js +361 -0
  90. package/dist-es/pagination/DescribeChimeWebhookConfigurationsPaginator.js +4 -0
  91. package/dist-es/pagination/DescribeSlackChannelConfigurationsPaginator.js +4 -0
  92. package/dist-es/pagination/DescribeSlackUserIdentitiesPaginator.js +4 -0
  93. package/dist-es/pagination/DescribeSlackWorkspacesPaginator.js +4 -0
  94. package/dist-es/pagination/Interfaces.js +1 -0
  95. package/dist-es/pagination/ListMicrosoftTeamsChannelConfigurationsPaginator.js +4 -0
  96. package/dist-es/pagination/ListMicrosoftTeamsConfiguredTeamsPaginator.js +4 -0
  97. package/dist-es/pagination/ListMicrosoftTeamsUserIdentitiesPaginator.js +4 -0
  98. package/dist-es/pagination/index.js +8 -0
  99. package/dist-es/protocols/Aws_restJson1.js +1177 -0
  100. package/dist-es/runtimeConfig.browser.js +34 -0
  101. package/dist-es/runtimeConfig.js +44 -0
  102. package/dist-es/runtimeConfig.native.js +11 -0
  103. package/dist-es/runtimeConfig.shared.js +30 -0
  104. package/dist-es/runtimeExtensions.js +21 -0
  105. package/dist-types/Chatbot.d.ts +171 -0
  106. package/dist-types/ChatbotClient.d.ts +194 -0
  107. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  108. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  109. package/dist-types/commands/CreateChimeWebhookConfigurationCommand.d.ts +89 -0
  110. package/dist-types/commands/CreateMicrosoftTeamsChannelConfigurationCommand.d.ts +104 -0
  111. package/dist-types/commands/CreateSlackChannelConfigurationCommand.d.ts +101 -0
  112. package/dist-types/commands/DeleteChimeWebhookConfigurationCommand.d.ts +68 -0
  113. package/dist-types/commands/DeleteMicrosoftTeamsChannelConfigurationCommand.d.ts +68 -0
  114. package/dist-types/commands/DeleteMicrosoftTeamsConfiguredTeamCommand.d.ts +62 -0
  115. package/dist-types/commands/DeleteMicrosoftTeamsUserIdentityCommand.d.ts +66 -0
  116. package/dist-types/commands/DeleteSlackChannelConfigurationCommand.d.ts +68 -0
  117. package/dist-types/commands/DeleteSlackUserIdentityCommand.d.ts +67 -0
  118. package/dist-types/commands/DeleteSlackWorkspaceAuthorizationCommand.d.ts +62 -0
  119. package/dist-types/commands/DescribeChimeWebhookConfigurationsCommand.d.ts +81 -0
  120. package/dist-types/commands/DescribeSlackChannelConfigurationsCommand.d.ts +88 -0
  121. package/dist-types/commands/DescribeSlackUserIdentitiesCommand.d.ts +78 -0
  122. package/dist-types/commands/DescribeSlackWorkspacesCommand.d.ts +74 -0
  123. package/dist-types/commands/GetAccountPreferencesCommand.d.ts +65 -0
  124. package/dist-types/commands/GetMicrosoftTeamsChannelConfigurationCommand.d.ts +84 -0
  125. package/dist-types/commands/ListMicrosoftTeamsChannelConfigurationsCommand.d.ts +89 -0
  126. package/dist-types/commands/ListMicrosoftTeamsConfiguredTeamsCommand.d.ts +75 -0
  127. package/dist-types/commands/ListMicrosoftTeamsUserIdentitiesCommand.d.ts +80 -0
  128. package/dist-types/commands/UpdateAccountPreferencesCommand.d.ts +71 -0
  129. package/dist-types/commands/UpdateChimeWebhookConfigurationCommand.d.ts +86 -0
  130. package/dist-types/commands/UpdateMicrosoftTeamsChannelConfigurationCommand.d.ts +98 -0
  131. package/dist-types/commands/UpdateSlackChannelConfigurationCommand.d.ts +97 -0
  132. package/dist-types/commands/index.d.ts +23 -0
  133. package/dist-types/endpoint/EndpointParameters.d.ts +40 -0
  134. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  135. package/dist-types/endpoint/ruleset.d.ts +2 -0
  136. package/dist-types/extensionConfiguration.d.ts +9 -0
  137. package/dist-types/index.d.ts +15 -0
  138. package/dist-types/models/ChatbotServiceException.d.ts +13 -0
  139. package/dist-types/models/index.d.ts +1 -0
  140. package/dist-types/models/models_0.d.ts +1395 -0
  141. package/dist-types/pagination/DescribeChimeWebhookConfigurationsPaginator.d.ts +7 -0
  142. package/dist-types/pagination/DescribeSlackChannelConfigurationsPaginator.d.ts +7 -0
  143. package/dist-types/pagination/DescribeSlackUserIdentitiesPaginator.d.ts +7 -0
  144. package/dist-types/pagination/DescribeSlackWorkspacesPaginator.d.ts +7 -0
  145. package/dist-types/pagination/Interfaces.d.ts +8 -0
  146. package/dist-types/pagination/ListMicrosoftTeamsChannelConfigurationsPaginator.d.ts +7 -0
  147. package/dist-types/pagination/ListMicrosoftTeamsConfiguredTeamsPaginator.d.ts +7 -0
  148. package/dist-types/pagination/ListMicrosoftTeamsUserIdentitiesPaginator.d.ts +7 -0
  149. package/dist-types/pagination/index.d.ts +8 -0
  150. package/dist-types/protocols/Aws_restJson1.d.ts +209 -0
  151. package/dist-types/runtimeConfig.browser.d.ts +48 -0
  152. package/dist-types/runtimeConfig.d.ts +48 -0
  153. package/dist-types/runtimeConfig.native.d.ts +47 -0
  154. package/dist-types/runtimeConfig.shared.d.ts +21 -0
  155. package/dist-types/runtimeExtensions.d.ts +17 -0
  156. package/dist-types/ts3.4/Chatbot.d.ts +456 -0
  157. package/dist-types/ts3.4/ChatbotClient.d.ts +258 -0
  158. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  159. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  160. package/dist-types/ts3.4/commands/CreateChimeWebhookConfigurationCommand.d.ts +30 -0
  161. package/dist-types/ts3.4/commands/CreateMicrosoftTeamsChannelConfigurationCommand.d.ts +30 -0
  162. package/dist-types/ts3.4/commands/CreateSlackChannelConfigurationCommand.d.ts +30 -0
  163. package/dist-types/ts3.4/commands/DeleteChimeWebhookConfigurationCommand.d.ts +30 -0
  164. package/dist-types/ts3.4/commands/DeleteMicrosoftTeamsChannelConfigurationCommand.d.ts +30 -0
  165. package/dist-types/ts3.4/commands/DeleteMicrosoftTeamsConfiguredTeamCommand.d.ts +30 -0
  166. package/dist-types/ts3.4/commands/DeleteMicrosoftTeamsUserIdentityCommand.d.ts +30 -0
  167. package/dist-types/ts3.4/commands/DeleteSlackChannelConfigurationCommand.d.ts +30 -0
  168. package/dist-types/ts3.4/commands/DeleteSlackUserIdentityCommand.d.ts +30 -0
  169. package/dist-types/ts3.4/commands/DeleteSlackWorkspaceAuthorizationCommand.d.ts +30 -0
  170. package/dist-types/ts3.4/commands/DescribeChimeWebhookConfigurationsCommand.d.ts +30 -0
  171. package/dist-types/ts3.4/commands/DescribeSlackChannelConfigurationsCommand.d.ts +30 -0
  172. package/dist-types/ts3.4/commands/DescribeSlackUserIdentitiesCommand.d.ts +30 -0
  173. package/dist-types/ts3.4/commands/DescribeSlackWorkspacesCommand.d.ts +30 -0
  174. package/dist-types/ts3.4/commands/GetAccountPreferencesCommand.d.ts +30 -0
  175. package/dist-types/ts3.4/commands/GetMicrosoftTeamsChannelConfigurationCommand.d.ts +30 -0
  176. package/dist-types/ts3.4/commands/ListMicrosoftTeamsChannelConfigurationsCommand.d.ts +30 -0
  177. package/dist-types/ts3.4/commands/ListMicrosoftTeamsConfiguredTeamsCommand.d.ts +30 -0
  178. package/dist-types/ts3.4/commands/ListMicrosoftTeamsUserIdentitiesCommand.d.ts +30 -0
  179. package/dist-types/ts3.4/commands/UpdateAccountPreferencesCommand.d.ts +30 -0
  180. package/dist-types/ts3.4/commands/UpdateChimeWebhookConfigurationCommand.d.ts +30 -0
  181. package/dist-types/ts3.4/commands/UpdateMicrosoftTeamsChannelConfigurationCommand.d.ts +30 -0
  182. package/dist-types/ts3.4/commands/UpdateSlackChannelConfigurationCommand.d.ts +30 -0
  183. package/dist-types/ts3.4/commands/index.d.ts +23 -0
  184. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
  185. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  186. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  187. package/dist-types/ts3.4/extensionConfiguration.d.ts +9 -0
  188. package/dist-types/ts3.4/index.d.ts +10 -0
  189. package/dist-types/ts3.4/models/ChatbotServiceException.d.ts +8 -0
  190. package/dist-types/ts3.4/models/index.d.ts +1 -0
  191. package/dist-types/ts3.4/models/models_0.d.ts +537 -0
  192. package/dist-types/ts3.4/pagination/DescribeChimeWebhookConfigurationsPaginator.d.ts +11 -0
  193. package/dist-types/ts3.4/pagination/DescribeSlackChannelConfigurationsPaginator.d.ts +11 -0
  194. package/dist-types/ts3.4/pagination/DescribeSlackUserIdentitiesPaginator.d.ts +11 -0
  195. package/dist-types/ts3.4/pagination/DescribeSlackWorkspacesPaginator.d.ts +11 -0
  196. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  197. package/dist-types/ts3.4/pagination/ListMicrosoftTeamsChannelConfigurationsPaginator.d.ts +11 -0
  198. package/dist-types/ts3.4/pagination/ListMicrosoftTeamsConfiguredTeamsPaginator.d.ts +11 -0
  199. package/dist-types/ts3.4/pagination/ListMicrosoftTeamsUserIdentitiesPaginator.d.ts +11 -0
  200. package/dist-types/ts3.4/pagination/index.d.ts +8 -0
  201. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +281 -0
  202. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +97 -0
  203. package/dist-types/ts3.4/runtimeConfig.d.ts +101 -0
  204. package/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -0
  205. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +21 -0
  206. package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
  207. package/package.json +101 -0
@@ -0,0 +1,1226 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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");
5
+ const smithy_client_1 = require("@smithy/smithy-client");
6
+ const ChatbotServiceException_1 = require("../models/ChatbotServiceException");
7
+ const models_0_1 = require("../models/models_0");
8
+ const se_CreateChimeWebhookConfigurationCommand = async (input, context) => {
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
+ const headers = {
11
+ "content-type": "application/json",
12
+ };
13
+ b.bp("/create-chime-webhook-configuration");
14
+ let body;
15
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
16
+ ConfigurationName: [],
17
+ IamRoleArn: [],
18
+ LoggingLevel: [],
19
+ SnsTopicArns: (_) => (0, smithy_client_1._json)(_),
20
+ WebhookDescription: [],
21
+ WebhookUrl: [],
22
+ }));
23
+ b.m("POST").h(headers).b(body);
24
+ return b.build();
25
+ };
26
+ exports.se_CreateChimeWebhookConfigurationCommand = se_CreateChimeWebhookConfigurationCommand;
27
+ const se_CreateMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
28
+ const b = (0, core_1.requestBuilder)(input, context);
29
+ const headers = {
30
+ "content-type": "application/json",
31
+ };
32
+ b.bp("/create-ms-teams-channel-configuration");
33
+ let body;
34
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
35
+ ChannelId: [],
36
+ ChannelName: [],
37
+ ConfigurationName: [],
38
+ GuardrailPolicyArns: (_) => (0, smithy_client_1._json)(_),
39
+ IamRoleArn: [],
40
+ LoggingLevel: [],
41
+ SnsTopicArns: (_) => (0, smithy_client_1._json)(_),
42
+ TeamId: [],
43
+ TeamName: [],
44
+ TenantId: [],
45
+ UserAuthorizationRequired: [],
46
+ }));
47
+ b.m("POST").h(headers).b(body);
48
+ return b.build();
49
+ };
50
+ exports.se_CreateMicrosoftTeamsChannelConfigurationCommand = se_CreateMicrosoftTeamsChannelConfigurationCommand;
51
+ const se_CreateSlackChannelConfigurationCommand = async (input, context) => {
52
+ const b = (0, core_1.requestBuilder)(input, context);
53
+ const headers = {
54
+ "content-type": "application/json",
55
+ };
56
+ b.bp("/create-slack-channel-configuration");
57
+ let body;
58
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
59
+ ConfigurationName: [],
60
+ GuardrailPolicyArns: (_) => (0, smithy_client_1._json)(_),
61
+ IamRoleArn: [],
62
+ LoggingLevel: [],
63
+ SlackChannelId: [],
64
+ SlackChannelName: [],
65
+ SlackTeamId: [],
66
+ SnsTopicArns: (_) => (0, smithy_client_1._json)(_),
67
+ UserAuthorizationRequired: [],
68
+ }));
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
71
+ };
72
+ exports.se_CreateSlackChannelConfigurationCommand = se_CreateSlackChannelConfigurationCommand;
73
+ const se_DeleteChimeWebhookConfigurationCommand = async (input, context) => {
74
+ const b = (0, core_1.requestBuilder)(input, context);
75
+ const headers = {
76
+ "content-type": "application/json",
77
+ };
78
+ b.bp("/delete-chime-webhook-configuration");
79
+ let body;
80
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
81
+ ChatConfigurationArn: [],
82
+ }));
83
+ b.m("POST").h(headers).b(body);
84
+ return b.build();
85
+ };
86
+ exports.se_DeleteChimeWebhookConfigurationCommand = se_DeleteChimeWebhookConfigurationCommand;
87
+ const se_DeleteMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
88
+ const b = (0, core_1.requestBuilder)(input, context);
89
+ const headers = {
90
+ "content-type": "application/json",
91
+ };
92
+ b.bp("/delete-ms-teams-channel-configuration");
93
+ let body;
94
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
95
+ ChatConfigurationArn: [],
96
+ }));
97
+ b.m("POST").h(headers).b(body);
98
+ return b.build();
99
+ };
100
+ exports.se_DeleteMicrosoftTeamsChannelConfigurationCommand = se_DeleteMicrosoftTeamsChannelConfigurationCommand;
101
+ const se_DeleteMicrosoftTeamsConfiguredTeamCommand = async (input, context) => {
102
+ const b = (0, core_1.requestBuilder)(input, context);
103
+ const headers = {
104
+ "content-type": "application/json",
105
+ };
106
+ b.bp("/delete-ms-teams-configured-teams");
107
+ let body;
108
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
109
+ TeamId: [],
110
+ }));
111
+ b.m("POST").h(headers).b(body);
112
+ return b.build();
113
+ };
114
+ exports.se_DeleteMicrosoftTeamsConfiguredTeamCommand = se_DeleteMicrosoftTeamsConfiguredTeamCommand;
115
+ const se_DeleteMicrosoftTeamsUserIdentityCommand = async (input, context) => {
116
+ const b = (0, core_1.requestBuilder)(input, context);
117
+ const headers = {
118
+ "content-type": "application/json",
119
+ };
120
+ b.bp("/delete-ms-teams-user-identity");
121
+ let body;
122
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
123
+ ChatConfigurationArn: [],
124
+ UserId: [],
125
+ }));
126
+ b.m("POST").h(headers).b(body);
127
+ return b.build();
128
+ };
129
+ exports.se_DeleteMicrosoftTeamsUserIdentityCommand = se_DeleteMicrosoftTeamsUserIdentityCommand;
130
+ const se_DeleteSlackChannelConfigurationCommand = async (input, context) => {
131
+ const b = (0, core_1.requestBuilder)(input, context);
132
+ const headers = {
133
+ "content-type": "application/json",
134
+ };
135
+ b.bp("/delete-slack-channel-configuration");
136
+ let body;
137
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
138
+ ChatConfigurationArn: [],
139
+ }));
140
+ b.m("POST").h(headers).b(body);
141
+ return b.build();
142
+ };
143
+ exports.se_DeleteSlackChannelConfigurationCommand = se_DeleteSlackChannelConfigurationCommand;
144
+ const se_DeleteSlackUserIdentityCommand = async (input, context) => {
145
+ const b = (0, core_1.requestBuilder)(input, context);
146
+ const headers = {
147
+ "content-type": "application/json",
148
+ };
149
+ b.bp("/delete-slack-user-identity");
150
+ let body;
151
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
152
+ ChatConfigurationArn: [],
153
+ SlackTeamId: [],
154
+ SlackUserId: [],
155
+ }));
156
+ b.m("POST").h(headers).b(body);
157
+ return b.build();
158
+ };
159
+ exports.se_DeleteSlackUserIdentityCommand = se_DeleteSlackUserIdentityCommand;
160
+ const se_DeleteSlackWorkspaceAuthorizationCommand = async (input, context) => {
161
+ const b = (0, core_1.requestBuilder)(input, context);
162
+ const headers = {
163
+ "content-type": "application/json",
164
+ };
165
+ b.bp("/delete-slack-workspace-authorization");
166
+ let body;
167
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
168
+ SlackTeamId: [],
169
+ }));
170
+ b.m("POST").h(headers).b(body);
171
+ return b.build();
172
+ };
173
+ exports.se_DeleteSlackWorkspaceAuthorizationCommand = se_DeleteSlackWorkspaceAuthorizationCommand;
174
+ const se_DescribeChimeWebhookConfigurationsCommand = async (input, context) => {
175
+ const b = (0, core_1.requestBuilder)(input, context);
176
+ const headers = {
177
+ "content-type": "application/json",
178
+ };
179
+ b.bp("/describe-chime-webhook-configurations");
180
+ let body;
181
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
182
+ ChatConfigurationArn: [],
183
+ MaxResults: [],
184
+ NextToken: [],
185
+ }));
186
+ b.m("POST").h(headers).b(body);
187
+ return b.build();
188
+ };
189
+ exports.se_DescribeChimeWebhookConfigurationsCommand = se_DescribeChimeWebhookConfigurationsCommand;
190
+ const se_DescribeSlackChannelConfigurationsCommand = async (input, context) => {
191
+ const b = (0, core_1.requestBuilder)(input, context);
192
+ const headers = {
193
+ "content-type": "application/json",
194
+ };
195
+ b.bp("/describe-slack-channel-configurations");
196
+ let body;
197
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
198
+ ChatConfigurationArn: [],
199
+ MaxResults: [],
200
+ NextToken: [],
201
+ }));
202
+ b.m("POST").h(headers).b(body);
203
+ return b.build();
204
+ };
205
+ exports.se_DescribeSlackChannelConfigurationsCommand = se_DescribeSlackChannelConfigurationsCommand;
206
+ const se_DescribeSlackUserIdentitiesCommand = async (input, context) => {
207
+ const b = (0, core_1.requestBuilder)(input, context);
208
+ const headers = {
209
+ "content-type": "application/json",
210
+ };
211
+ b.bp("/describe-slack-user-identities");
212
+ let body;
213
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
214
+ ChatConfigurationArn: [],
215
+ MaxResults: [],
216
+ NextToken: [],
217
+ }));
218
+ b.m("POST").h(headers).b(body);
219
+ return b.build();
220
+ };
221
+ exports.se_DescribeSlackUserIdentitiesCommand = se_DescribeSlackUserIdentitiesCommand;
222
+ const se_DescribeSlackWorkspacesCommand = async (input, context) => {
223
+ const b = (0, core_1.requestBuilder)(input, context);
224
+ const headers = {
225
+ "content-type": "application/json",
226
+ };
227
+ b.bp("/describe-slack-workspaces");
228
+ let body;
229
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
230
+ MaxResults: [],
231
+ NextToken: [],
232
+ }));
233
+ b.m("POST").h(headers).b(body);
234
+ return b.build();
235
+ };
236
+ exports.se_DescribeSlackWorkspacesCommand = se_DescribeSlackWorkspacesCommand;
237
+ const se_GetAccountPreferencesCommand = async (input, context) => {
238
+ const b = (0, core_1.requestBuilder)(input, context);
239
+ const headers = {
240
+ "content-type": "application/json",
241
+ };
242
+ b.bp("/get-account-preferences");
243
+ let body;
244
+ body = "";
245
+ b.m("POST").h(headers).b(body);
246
+ return b.build();
247
+ };
248
+ exports.se_GetAccountPreferencesCommand = se_GetAccountPreferencesCommand;
249
+ const se_GetMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
250
+ const b = (0, core_1.requestBuilder)(input, context);
251
+ const headers = {
252
+ "content-type": "application/json",
253
+ };
254
+ b.bp("/get-ms-teams-channel-configuration");
255
+ let body;
256
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
257
+ ChatConfigurationArn: [],
258
+ }));
259
+ b.m("POST").h(headers).b(body);
260
+ return b.build();
261
+ };
262
+ exports.se_GetMicrosoftTeamsChannelConfigurationCommand = se_GetMicrosoftTeamsChannelConfigurationCommand;
263
+ const se_ListMicrosoftTeamsChannelConfigurationsCommand = async (input, context) => {
264
+ const b = (0, core_1.requestBuilder)(input, context);
265
+ const headers = {
266
+ "content-type": "application/json",
267
+ };
268
+ b.bp("/list-ms-teams-channel-configurations");
269
+ let body;
270
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
271
+ MaxResults: [],
272
+ NextToken: [],
273
+ TeamId: [],
274
+ }));
275
+ b.m("POST").h(headers).b(body);
276
+ return b.build();
277
+ };
278
+ exports.se_ListMicrosoftTeamsChannelConfigurationsCommand = se_ListMicrosoftTeamsChannelConfigurationsCommand;
279
+ const se_ListMicrosoftTeamsConfiguredTeamsCommand = async (input, context) => {
280
+ const b = (0, core_1.requestBuilder)(input, context);
281
+ const headers = {
282
+ "content-type": "application/json",
283
+ };
284
+ b.bp("/list-ms-teams-configured-teams");
285
+ let body;
286
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
287
+ MaxResults: [],
288
+ NextToken: [],
289
+ }));
290
+ b.m("POST").h(headers).b(body);
291
+ return b.build();
292
+ };
293
+ exports.se_ListMicrosoftTeamsConfiguredTeamsCommand = se_ListMicrosoftTeamsConfiguredTeamsCommand;
294
+ const se_ListMicrosoftTeamsUserIdentitiesCommand = async (input, context) => {
295
+ const b = (0, core_1.requestBuilder)(input, context);
296
+ const headers = {
297
+ "content-type": "application/json",
298
+ };
299
+ b.bp("/list-ms-teams-user-identities");
300
+ let body;
301
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
302
+ ChatConfigurationArn: [],
303
+ MaxResults: [],
304
+ NextToken: [],
305
+ }));
306
+ b.m("POST").h(headers).b(body);
307
+ return b.build();
308
+ };
309
+ exports.se_ListMicrosoftTeamsUserIdentitiesCommand = se_ListMicrosoftTeamsUserIdentitiesCommand;
310
+ const se_UpdateAccountPreferencesCommand = async (input, context) => {
311
+ const b = (0, core_1.requestBuilder)(input, context);
312
+ const headers = {
313
+ "content-type": "application/json",
314
+ };
315
+ b.bp("/update-account-preferences");
316
+ let body;
317
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
318
+ TrainingDataCollectionEnabled: [],
319
+ UserAuthorizationRequired: [],
320
+ }));
321
+ b.m("POST").h(headers).b(body);
322
+ return b.build();
323
+ };
324
+ exports.se_UpdateAccountPreferencesCommand = se_UpdateAccountPreferencesCommand;
325
+ const se_UpdateChimeWebhookConfigurationCommand = async (input, context) => {
326
+ const b = (0, core_1.requestBuilder)(input, context);
327
+ const headers = {
328
+ "content-type": "application/json",
329
+ };
330
+ b.bp("/update-chime-webhook-configuration");
331
+ let body;
332
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
333
+ ChatConfigurationArn: [],
334
+ IamRoleArn: [],
335
+ LoggingLevel: [],
336
+ SnsTopicArns: (_) => (0, smithy_client_1._json)(_),
337
+ WebhookDescription: [],
338
+ WebhookUrl: [],
339
+ }));
340
+ b.m("POST").h(headers).b(body);
341
+ return b.build();
342
+ };
343
+ exports.se_UpdateChimeWebhookConfigurationCommand = se_UpdateChimeWebhookConfigurationCommand;
344
+ const se_UpdateMicrosoftTeamsChannelConfigurationCommand = async (input, context) => {
345
+ const b = (0, core_1.requestBuilder)(input, context);
346
+ const headers = {
347
+ "content-type": "application/json",
348
+ };
349
+ b.bp("/update-ms-teams-channel-configuration");
350
+ let body;
351
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
352
+ ChannelId: [],
353
+ ChannelName: [],
354
+ ChatConfigurationArn: [],
355
+ GuardrailPolicyArns: (_) => (0, smithy_client_1._json)(_),
356
+ IamRoleArn: [],
357
+ LoggingLevel: [],
358
+ SnsTopicArns: (_) => (0, smithy_client_1._json)(_),
359
+ UserAuthorizationRequired: [],
360
+ }));
361
+ b.m("POST").h(headers).b(body);
362
+ return b.build();
363
+ };
364
+ exports.se_UpdateMicrosoftTeamsChannelConfigurationCommand = se_UpdateMicrosoftTeamsChannelConfigurationCommand;
365
+ const se_UpdateSlackChannelConfigurationCommand = async (input, context) => {
366
+ const b = (0, core_1.requestBuilder)(input, context);
367
+ const headers = {
368
+ "content-type": "application/json",
369
+ };
370
+ b.bp("/update-slack-channel-configuration");
371
+ let body;
372
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
373
+ ChatConfigurationArn: [],
374
+ GuardrailPolicyArns: (_) => (0, smithy_client_1._json)(_),
375
+ IamRoleArn: [],
376
+ LoggingLevel: [],
377
+ SlackChannelId: [],
378
+ SlackChannelName: [],
379
+ SnsTopicArns: (_) => (0, smithy_client_1._json)(_),
380
+ UserAuthorizationRequired: [],
381
+ }));
382
+ b.m("POST").h(headers).b(body);
383
+ return b.build();
384
+ };
385
+ exports.se_UpdateSlackChannelConfigurationCommand = se_UpdateSlackChannelConfigurationCommand;
386
+ const de_CreateChimeWebhookConfigurationCommand = async (output, context) => {
387
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
388
+ return de_CommandError(output, context);
389
+ }
390
+ const contents = (0, smithy_client_1.map)({
391
+ $metadata: deserializeMetadata(output),
392
+ });
393
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
394
+ const doc = (0, smithy_client_1.take)(data, {
395
+ WebhookConfiguration: smithy_client_1._json,
396
+ });
397
+ Object.assign(contents, doc);
398
+ return contents;
399
+ };
400
+ exports.de_CreateChimeWebhookConfigurationCommand = de_CreateChimeWebhookConfigurationCommand;
401
+ const de_CreateMicrosoftTeamsChannelConfigurationCommand = async (output, context) => {
402
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
403
+ return de_CommandError(output, context);
404
+ }
405
+ const contents = (0, smithy_client_1.map)({
406
+ $metadata: deserializeMetadata(output),
407
+ });
408
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
409
+ const doc = (0, smithy_client_1.take)(data, {
410
+ ChannelConfiguration: smithy_client_1._json,
411
+ });
412
+ Object.assign(contents, doc);
413
+ return contents;
414
+ };
415
+ exports.de_CreateMicrosoftTeamsChannelConfigurationCommand = de_CreateMicrosoftTeamsChannelConfigurationCommand;
416
+ const de_CreateSlackChannelConfigurationCommand = async (output, context) => {
417
+ if (output.statusCode !== 201 && output.statusCode >= 300) {
418
+ return de_CommandError(output, context);
419
+ }
420
+ const contents = (0, smithy_client_1.map)({
421
+ $metadata: deserializeMetadata(output),
422
+ });
423
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
424
+ const doc = (0, smithy_client_1.take)(data, {
425
+ ChannelConfiguration: smithy_client_1._json,
426
+ });
427
+ Object.assign(contents, doc);
428
+ return contents;
429
+ };
430
+ exports.de_CreateSlackChannelConfigurationCommand = de_CreateSlackChannelConfigurationCommand;
431
+ const de_DeleteChimeWebhookConfigurationCommand = async (output, context) => {
432
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
433
+ return de_CommandError(output, context);
434
+ }
435
+ const contents = (0, smithy_client_1.map)({
436
+ $metadata: deserializeMetadata(output),
437
+ });
438
+ await (0, smithy_client_1.collectBody)(output.body, context);
439
+ return contents;
440
+ };
441
+ exports.de_DeleteChimeWebhookConfigurationCommand = de_DeleteChimeWebhookConfigurationCommand;
442
+ const de_DeleteMicrosoftTeamsChannelConfigurationCommand = async (output, context) => {
443
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
444
+ return de_CommandError(output, context);
445
+ }
446
+ const contents = (0, smithy_client_1.map)({
447
+ $metadata: deserializeMetadata(output),
448
+ });
449
+ await (0, smithy_client_1.collectBody)(output.body, context);
450
+ return contents;
451
+ };
452
+ exports.de_DeleteMicrosoftTeamsChannelConfigurationCommand = de_DeleteMicrosoftTeamsChannelConfigurationCommand;
453
+ const de_DeleteMicrosoftTeamsConfiguredTeamCommand = async (output, context) => {
454
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
455
+ return de_CommandError(output, context);
456
+ }
457
+ const contents = (0, smithy_client_1.map)({
458
+ $metadata: deserializeMetadata(output),
459
+ });
460
+ await (0, smithy_client_1.collectBody)(output.body, context);
461
+ return contents;
462
+ };
463
+ exports.de_DeleteMicrosoftTeamsConfiguredTeamCommand = de_DeleteMicrosoftTeamsConfiguredTeamCommand;
464
+ const de_DeleteMicrosoftTeamsUserIdentityCommand = async (output, context) => {
465
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
466
+ return de_CommandError(output, context);
467
+ }
468
+ const contents = (0, smithy_client_1.map)({
469
+ $metadata: deserializeMetadata(output),
470
+ });
471
+ await (0, smithy_client_1.collectBody)(output.body, context);
472
+ return contents;
473
+ };
474
+ exports.de_DeleteMicrosoftTeamsUserIdentityCommand = de_DeleteMicrosoftTeamsUserIdentityCommand;
475
+ const de_DeleteSlackChannelConfigurationCommand = async (output, context) => {
476
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
477
+ return de_CommandError(output, context);
478
+ }
479
+ const contents = (0, smithy_client_1.map)({
480
+ $metadata: deserializeMetadata(output),
481
+ });
482
+ await (0, smithy_client_1.collectBody)(output.body, context);
483
+ return contents;
484
+ };
485
+ exports.de_DeleteSlackChannelConfigurationCommand = de_DeleteSlackChannelConfigurationCommand;
486
+ const de_DeleteSlackUserIdentityCommand = async (output, context) => {
487
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
488
+ return de_CommandError(output, context);
489
+ }
490
+ const contents = (0, smithy_client_1.map)({
491
+ $metadata: deserializeMetadata(output),
492
+ });
493
+ await (0, smithy_client_1.collectBody)(output.body, context);
494
+ return contents;
495
+ };
496
+ exports.de_DeleteSlackUserIdentityCommand = de_DeleteSlackUserIdentityCommand;
497
+ const de_DeleteSlackWorkspaceAuthorizationCommand = async (output, context) => {
498
+ if (output.statusCode !== 204 && output.statusCode >= 300) {
499
+ return de_CommandError(output, context);
500
+ }
501
+ const contents = (0, smithy_client_1.map)({
502
+ $metadata: deserializeMetadata(output),
503
+ });
504
+ await (0, smithy_client_1.collectBody)(output.body, context);
505
+ return contents;
506
+ };
507
+ exports.de_DeleteSlackWorkspaceAuthorizationCommand = de_DeleteSlackWorkspaceAuthorizationCommand;
508
+ const de_DescribeChimeWebhookConfigurationsCommand = async (output, context) => {
509
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
510
+ return de_CommandError(output, context);
511
+ }
512
+ const contents = (0, smithy_client_1.map)({
513
+ $metadata: deserializeMetadata(output),
514
+ });
515
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
516
+ const doc = (0, smithy_client_1.take)(data, {
517
+ NextToken: smithy_client_1.expectString,
518
+ WebhookConfigurations: smithy_client_1._json,
519
+ });
520
+ Object.assign(contents, doc);
521
+ return contents;
522
+ };
523
+ exports.de_DescribeChimeWebhookConfigurationsCommand = de_DescribeChimeWebhookConfigurationsCommand;
524
+ const de_DescribeSlackChannelConfigurationsCommand = async (output, context) => {
525
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
526
+ return de_CommandError(output, context);
527
+ }
528
+ const contents = (0, smithy_client_1.map)({
529
+ $metadata: deserializeMetadata(output),
530
+ });
531
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
532
+ const doc = (0, smithy_client_1.take)(data, {
533
+ NextToken: smithy_client_1.expectString,
534
+ SlackChannelConfigurations: smithy_client_1._json,
535
+ });
536
+ Object.assign(contents, doc);
537
+ return contents;
538
+ };
539
+ exports.de_DescribeSlackChannelConfigurationsCommand = de_DescribeSlackChannelConfigurationsCommand;
540
+ const de_DescribeSlackUserIdentitiesCommand = async (output, context) => {
541
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
542
+ return de_CommandError(output, context);
543
+ }
544
+ const contents = (0, smithy_client_1.map)({
545
+ $metadata: deserializeMetadata(output),
546
+ });
547
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
548
+ const doc = (0, smithy_client_1.take)(data, {
549
+ NextToken: smithy_client_1.expectString,
550
+ SlackUserIdentities: smithy_client_1._json,
551
+ });
552
+ Object.assign(contents, doc);
553
+ return contents;
554
+ };
555
+ exports.de_DescribeSlackUserIdentitiesCommand = de_DescribeSlackUserIdentitiesCommand;
556
+ const de_DescribeSlackWorkspacesCommand = async (output, context) => {
557
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
558
+ return de_CommandError(output, context);
559
+ }
560
+ const contents = (0, smithy_client_1.map)({
561
+ $metadata: deserializeMetadata(output),
562
+ });
563
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
564
+ const doc = (0, smithy_client_1.take)(data, {
565
+ NextToken: smithy_client_1.expectString,
566
+ SlackWorkspaces: smithy_client_1._json,
567
+ });
568
+ Object.assign(contents, doc);
569
+ return contents;
570
+ };
571
+ exports.de_DescribeSlackWorkspacesCommand = de_DescribeSlackWorkspacesCommand;
572
+ const de_GetAccountPreferencesCommand = async (output, context) => {
573
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
574
+ return de_CommandError(output, context);
575
+ }
576
+ const contents = (0, smithy_client_1.map)({
577
+ $metadata: deserializeMetadata(output),
578
+ });
579
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
580
+ const doc = (0, smithy_client_1.take)(data, {
581
+ AccountPreferences: smithy_client_1._json,
582
+ });
583
+ Object.assign(contents, doc);
584
+ return contents;
585
+ };
586
+ exports.de_GetAccountPreferencesCommand = de_GetAccountPreferencesCommand;
587
+ const de_GetMicrosoftTeamsChannelConfigurationCommand = async (output, context) => {
588
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
589
+ return de_CommandError(output, context);
590
+ }
591
+ const contents = (0, smithy_client_1.map)({
592
+ $metadata: deserializeMetadata(output),
593
+ });
594
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
595
+ const doc = (0, smithy_client_1.take)(data, {
596
+ ChannelConfiguration: smithy_client_1._json,
597
+ });
598
+ Object.assign(contents, doc);
599
+ return contents;
600
+ };
601
+ exports.de_GetMicrosoftTeamsChannelConfigurationCommand = de_GetMicrosoftTeamsChannelConfigurationCommand;
602
+ const de_ListMicrosoftTeamsChannelConfigurationsCommand = async (output, context) => {
603
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
604
+ return de_CommandError(output, context);
605
+ }
606
+ const contents = (0, smithy_client_1.map)({
607
+ $metadata: deserializeMetadata(output),
608
+ });
609
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
610
+ const doc = (0, smithy_client_1.take)(data, {
611
+ NextToken: smithy_client_1.expectString,
612
+ TeamChannelConfigurations: smithy_client_1._json,
613
+ });
614
+ Object.assign(contents, doc);
615
+ return contents;
616
+ };
617
+ exports.de_ListMicrosoftTeamsChannelConfigurationsCommand = de_ListMicrosoftTeamsChannelConfigurationsCommand;
618
+ const de_ListMicrosoftTeamsConfiguredTeamsCommand = async (output, context) => {
619
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
620
+ return de_CommandError(output, context);
621
+ }
622
+ const contents = (0, smithy_client_1.map)({
623
+ $metadata: deserializeMetadata(output),
624
+ });
625
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
626
+ const doc = (0, smithy_client_1.take)(data, {
627
+ ConfiguredTeams: smithy_client_1._json,
628
+ NextToken: smithy_client_1.expectString,
629
+ });
630
+ Object.assign(contents, doc);
631
+ return contents;
632
+ };
633
+ exports.de_ListMicrosoftTeamsConfiguredTeamsCommand = de_ListMicrosoftTeamsConfiguredTeamsCommand;
634
+ const de_ListMicrosoftTeamsUserIdentitiesCommand = async (output, context) => {
635
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
636
+ return de_CommandError(output, context);
637
+ }
638
+ const contents = (0, smithy_client_1.map)({
639
+ $metadata: deserializeMetadata(output),
640
+ });
641
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
642
+ const doc = (0, smithy_client_1.take)(data, {
643
+ NextToken: smithy_client_1.expectString,
644
+ TeamsUserIdentities: smithy_client_1._json,
645
+ });
646
+ Object.assign(contents, doc);
647
+ return contents;
648
+ };
649
+ exports.de_ListMicrosoftTeamsUserIdentitiesCommand = de_ListMicrosoftTeamsUserIdentitiesCommand;
650
+ const de_UpdateAccountPreferencesCommand = async (output, context) => {
651
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
652
+ return de_CommandError(output, context);
653
+ }
654
+ const contents = (0, smithy_client_1.map)({
655
+ $metadata: deserializeMetadata(output),
656
+ });
657
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
658
+ const doc = (0, smithy_client_1.take)(data, {
659
+ AccountPreferences: smithy_client_1._json,
660
+ });
661
+ Object.assign(contents, doc);
662
+ return contents;
663
+ };
664
+ exports.de_UpdateAccountPreferencesCommand = de_UpdateAccountPreferencesCommand;
665
+ const de_UpdateChimeWebhookConfigurationCommand = async (output, context) => {
666
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
667
+ return de_CommandError(output, context);
668
+ }
669
+ const contents = (0, smithy_client_1.map)({
670
+ $metadata: deserializeMetadata(output),
671
+ });
672
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
673
+ const doc = (0, smithy_client_1.take)(data, {
674
+ WebhookConfiguration: smithy_client_1._json,
675
+ });
676
+ Object.assign(contents, doc);
677
+ return contents;
678
+ };
679
+ exports.de_UpdateChimeWebhookConfigurationCommand = de_UpdateChimeWebhookConfigurationCommand;
680
+ const de_UpdateMicrosoftTeamsChannelConfigurationCommand = async (output, context) => {
681
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
682
+ return de_CommandError(output, context);
683
+ }
684
+ const contents = (0, smithy_client_1.map)({
685
+ $metadata: deserializeMetadata(output),
686
+ });
687
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
688
+ const doc = (0, smithy_client_1.take)(data, {
689
+ ChannelConfiguration: smithy_client_1._json,
690
+ });
691
+ Object.assign(contents, doc);
692
+ return contents;
693
+ };
694
+ exports.de_UpdateMicrosoftTeamsChannelConfigurationCommand = de_UpdateMicrosoftTeamsChannelConfigurationCommand;
695
+ const de_UpdateSlackChannelConfigurationCommand = async (output, context) => {
696
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
697
+ return de_CommandError(output, context);
698
+ }
699
+ const contents = (0, smithy_client_1.map)({
700
+ $metadata: deserializeMetadata(output),
701
+ });
702
+ const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
703
+ const doc = (0, smithy_client_1.take)(data, {
704
+ ChannelConfiguration: smithy_client_1._json,
705
+ });
706
+ Object.assign(contents, doc);
707
+ return contents;
708
+ };
709
+ exports.de_UpdateSlackChannelConfigurationCommand = de_UpdateSlackChannelConfigurationCommand;
710
+ const de_CommandError = async (output, context) => {
711
+ const parsedOutput = {
712
+ ...output,
713
+ body: await parseErrorBody(output.body, context),
714
+ };
715
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
716
+ switch (errorCode) {
717
+ case "ConflictException":
718
+ case "com.amazonaws.chatbot#ConflictException":
719
+ throw await de_ConflictExceptionRes(parsedOutput, context);
720
+ case "CreateChimeWebhookConfigurationException":
721
+ case "com.amazonaws.chatbot#CreateChimeWebhookConfigurationException":
722
+ throw await de_CreateChimeWebhookConfigurationExceptionRes(parsedOutput, context);
723
+ case "InvalidParameterException":
724
+ case "com.amazonaws.chatbot#InvalidParameterException":
725
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
726
+ case "InvalidRequestException":
727
+ case "com.amazonaws.chatbot#InvalidRequestException":
728
+ throw await de_InvalidRequestExceptionRes(parsedOutput, context);
729
+ case "LimitExceededException":
730
+ case "com.amazonaws.chatbot#LimitExceededException":
731
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
732
+ case "CreateTeamsChannelConfigurationException":
733
+ case "com.amazonaws.chatbot#CreateTeamsChannelConfigurationException":
734
+ throw await de_CreateTeamsChannelConfigurationExceptionRes(parsedOutput, context);
735
+ case "CreateSlackChannelConfigurationException":
736
+ case "com.amazonaws.chatbot#CreateSlackChannelConfigurationException":
737
+ throw await de_CreateSlackChannelConfigurationExceptionRes(parsedOutput, context);
738
+ case "DeleteChimeWebhookConfigurationException":
739
+ case "com.amazonaws.chatbot#DeleteChimeWebhookConfigurationException":
740
+ throw await de_DeleteChimeWebhookConfigurationExceptionRes(parsedOutput, context);
741
+ case "ResourceNotFoundException":
742
+ case "com.amazonaws.chatbot#ResourceNotFoundException":
743
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
744
+ case "DeleteTeamsChannelConfigurationException":
745
+ case "com.amazonaws.chatbot#DeleteTeamsChannelConfigurationException":
746
+ throw await de_DeleteTeamsChannelConfigurationExceptionRes(parsedOutput, context);
747
+ case "DeleteTeamsConfiguredTeamException":
748
+ case "com.amazonaws.chatbot#DeleteTeamsConfiguredTeamException":
749
+ throw await de_DeleteTeamsConfiguredTeamExceptionRes(parsedOutput, context);
750
+ case "DeleteMicrosoftTeamsUserIdentityException":
751
+ case "com.amazonaws.chatbot#DeleteMicrosoftTeamsUserIdentityException":
752
+ throw await de_DeleteMicrosoftTeamsUserIdentityExceptionRes(parsedOutput, context);
753
+ case "DeleteSlackChannelConfigurationException":
754
+ case "com.amazonaws.chatbot#DeleteSlackChannelConfigurationException":
755
+ throw await de_DeleteSlackChannelConfigurationExceptionRes(parsedOutput, context);
756
+ case "DeleteSlackUserIdentityException":
757
+ case "com.amazonaws.chatbot#DeleteSlackUserIdentityException":
758
+ throw await de_DeleteSlackUserIdentityExceptionRes(parsedOutput, context);
759
+ case "DeleteSlackWorkspaceAuthorizationFault":
760
+ case "com.amazonaws.chatbot#DeleteSlackWorkspaceAuthorizationFault":
761
+ throw await de_DeleteSlackWorkspaceAuthorizationFaultRes(parsedOutput, context);
762
+ case "DescribeChimeWebhookConfigurationsException":
763
+ case "com.amazonaws.chatbot#DescribeChimeWebhookConfigurationsException":
764
+ throw await de_DescribeChimeWebhookConfigurationsExceptionRes(parsedOutput, context);
765
+ case "DescribeSlackChannelConfigurationsException":
766
+ case "com.amazonaws.chatbot#DescribeSlackChannelConfigurationsException":
767
+ throw await de_DescribeSlackChannelConfigurationsExceptionRes(parsedOutput, context);
768
+ case "DescribeSlackUserIdentitiesException":
769
+ case "com.amazonaws.chatbot#DescribeSlackUserIdentitiesException":
770
+ throw await de_DescribeSlackUserIdentitiesExceptionRes(parsedOutput, context);
771
+ case "DescribeSlackWorkspacesException":
772
+ case "com.amazonaws.chatbot#DescribeSlackWorkspacesException":
773
+ throw await de_DescribeSlackWorkspacesExceptionRes(parsedOutput, context);
774
+ case "GetAccountPreferencesException":
775
+ case "com.amazonaws.chatbot#GetAccountPreferencesException":
776
+ throw await de_GetAccountPreferencesExceptionRes(parsedOutput, context);
777
+ case "GetTeamsChannelConfigurationException":
778
+ case "com.amazonaws.chatbot#GetTeamsChannelConfigurationException":
779
+ throw await de_GetTeamsChannelConfigurationExceptionRes(parsedOutput, context);
780
+ case "ListTeamsChannelConfigurationsException":
781
+ case "com.amazonaws.chatbot#ListTeamsChannelConfigurationsException":
782
+ throw await de_ListTeamsChannelConfigurationsExceptionRes(parsedOutput, context);
783
+ case "ListMicrosoftTeamsConfiguredTeamsException":
784
+ case "com.amazonaws.chatbot#ListMicrosoftTeamsConfiguredTeamsException":
785
+ throw await de_ListMicrosoftTeamsConfiguredTeamsExceptionRes(parsedOutput, context);
786
+ case "ListMicrosoftTeamsUserIdentitiesException":
787
+ case "com.amazonaws.chatbot#ListMicrosoftTeamsUserIdentitiesException":
788
+ throw await de_ListMicrosoftTeamsUserIdentitiesExceptionRes(parsedOutput, context);
789
+ case "UpdateAccountPreferencesException":
790
+ case "com.amazonaws.chatbot#UpdateAccountPreferencesException":
791
+ throw await de_UpdateAccountPreferencesExceptionRes(parsedOutput, context);
792
+ case "UpdateChimeWebhookConfigurationException":
793
+ case "com.amazonaws.chatbot#UpdateChimeWebhookConfigurationException":
794
+ throw await de_UpdateChimeWebhookConfigurationExceptionRes(parsedOutput, context);
795
+ case "UpdateTeamsChannelConfigurationException":
796
+ case "com.amazonaws.chatbot#UpdateTeamsChannelConfigurationException":
797
+ throw await de_UpdateTeamsChannelConfigurationExceptionRes(parsedOutput, context);
798
+ case "UpdateSlackChannelConfigurationException":
799
+ case "com.amazonaws.chatbot#UpdateSlackChannelConfigurationException":
800
+ throw await de_UpdateSlackChannelConfigurationExceptionRes(parsedOutput, context);
801
+ default:
802
+ const parsedBody = parsedOutput.body;
803
+ return throwDefaultError({
804
+ output,
805
+ parsedBody,
806
+ errorCode,
807
+ });
808
+ }
809
+ };
810
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ChatbotServiceException_1.ChatbotServiceException);
811
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
812
+ const contents = (0, smithy_client_1.map)({});
813
+ const data = parsedOutput.body;
814
+ const doc = (0, smithy_client_1.take)(data, {
815
+ message: smithy_client_1.expectString,
816
+ });
817
+ Object.assign(contents, doc);
818
+ const exception = new models_0_1.ConflictException({
819
+ $metadata: deserializeMetadata(parsedOutput),
820
+ ...contents,
821
+ });
822
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
823
+ };
824
+ const de_CreateChimeWebhookConfigurationExceptionRes = async (parsedOutput, context) => {
825
+ const contents = (0, smithy_client_1.map)({});
826
+ const data = parsedOutput.body;
827
+ const doc = (0, smithy_client_1.take)(data, {
828
+ Message: smithy_client_1.expectString,
829
+ });
830
+ Object.assign(contents, doc);
831
+ const exception = new models_0_1.CreateChimeWebhookConfigurationException({
832
+ $metadata: deserializeMetadata(parsedOutput),
833
+ ...contents,
834
+ });
835
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
836
+ };
837
+ const de_CreateSlackChannelConfigurationExceptionRes = async (parsedOutput, context) => {
838
+ const contents = (0, smithy_client_1.map)({});
839
+ const data = parsedOutput.body;
840
+ const doc = (0, smithy_client_1.take)(data, {
841
+ Message: smithy_client_1.expectString,
842
+ });
843
+ Object.assign(contents, doc);
844
+ const exception = new models_0_1.CreateSlackChannelConfigurationException({
845
+ $metadata: deserializeMetadata(parsedOutput),
846
+ ...contents,
847
+ });
848
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
849
+ };
850
+ const de_CreateTeamsChannelConfigurationExceptionRes = async (parsedOutput, context) => {
851
+ const contents = (0, smithy_client_1.map)({});
852
+ const data = parsedOutput.body;
853
+ const doc = (0, smithy_client_1.take)(data, {
854
+ Message: smithy_client_1.expectString,
855
+ });
856
+ Object.assign(contents, doc);
857
+ const exception = new models_0_1.CreateTeamsChannelConfigurationException({
858
+ $metadata: deserializeMetadata(parsedOutput),
859
+ ...contents,
860
+ });
861
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
862
+ };
863
+ const de_DeleteChimeWebhookConfigurationExceptionRes = async (parsedOutput, context) => {
864
+ const contents = (0, smithy_client_1.map)({});
865
+ const data = parsedOutput.body;
866
+ const doc = (0, smithy_client_1.take)(data, {
867
+ Message: smithy_client_1.expectString,
868
+ });
869
+ Object.assign(contents, doc);
870
+ const exception = new models_0_1.DeleteChimeWebhookConfigurationException({
871
+ $metadata: deserializeMetadata(parsedOutput),
872
+ ...contents,
873
+ });
874
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
875
+ };
876
+ const de_DeleteMicrosoftTeamsUserIdentityExceptionRes = async (parsedOutput, context) => {
877
+ const contents = (0, smithy_client_1.map)({});
878
+ const data = parsedOutput.body;
879
+ const doc = (0, smithy_client_1.take)(data, {
880
+ Message: smithy_client_1.expectString,
881
+ });
882
+ Object.assign(contents, doc);
883
+ const exception = new models_0_1.DeleteMicrosoftTeamsUserIdentityException({
884
+ $metadata: deserializeMetadata(parsedOutput),
885
+ ...contents,
886
+ });
887
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
888
+ };
889
+ const de_DeleteSlackChannelConfigurationExceptionRes = async (parsedOutput, context) => {
890
+ const contents = (0, smithy_client_1.map)({});
891
+ const data = parsedOutput.body;
892
+ const doc = (0, smithy_client_1.take)(data, {
893
+ Message: smithy_client_1.expectString,
894
+ });
895
+ Object.assign(contents, doc);
896
+ const exception = new models_0_1.DeleteSlackChannelConfigurationException({
897
+ $metadata: deserializeMetadata(parsedOutput),
898
+ ...contents,
899
+ });
900
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
901
+ };
902
+ const de_DeleteSlackUserIdentityExceptionRes = async (parsedOutput, context) => {
903
+ const contents = (0, smithy_client_1.map)({});
904
+ const data = parsedOutput.body;
905
+ const doc = (0, smithy_client_1.take)(data, {
906
+ Message: smithy_client_1.expectString,
907
+ });
908
+ Object.assign(contents, doc);
909
+ const exception = new models_0_1.DeleteSlackUserIdentityException({
910
+ $metadata: deserializeMetadata(parsedOutput),
911
+ ...contents,
912
+ });
913
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
914
+ };
915
+ const de_DeleteSlackWorkspaceAuthorizationFaultRes = async (parsedOutput, context) => {
916
+ const contents = (0, smithy_client_1.map)({});
917
+ const data = parsedOutput.body;
918
+ const doc = (0, smithy_client_1.take)(data, {
919
+ Message: smithy_client_1.expectString,
920
+ });
921
+ Object.assign(contents, doc);
922
+ const exception = new models_0_1.DeleteSlackWorkspaceAuthorizationFault({
923
+ $metadata: deserializeMetadata(parsedOutput),
924
+ ...contents,
925
+ });
926
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
927
+ };
928
+ const de_DeleteTeamsChannelConfigurationExceptionRes = async (parsedOutput, context) => {
929
+ const contents = (0, smithy_client_1.map)({});
930
+ const data = parsedOutput.body;
931
+ const doc = (0, smithy_client_1.take)(data, {
932
+ Message: smithy_client_1.expectString,
933
+ });
934
+ Object.assign(contents, doc);
935
+ const exception = new models_0_1.DeleteTeamsChannelConfigurationException({
936
+ $metadata: deserializeMetadata(parsedOutput),
937
+ ...contents,
938
+ });
939
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
940
+ };
941
+ const de_DeleteTeamsConfiguredTeamExceptionRes = async (parsedOutput, context) => {
942
+ const contents = (0, smithy_client_1.map)({});
943
+ const data = parsedOutput.body;
944
+ const doc = (0, smithy_client_1.take)(data, {
945
+ Message: smithy_client_1.expectString,
946
+ });
947
+ Object.assign(contents, doc);
948
+ const exception = new models_0_1.DeleteTeamsConfiguredTeamException({
949
+ $metadata: deserializeMetadata(parsedOutput),
950
+ ...contents,
951
+ });
952
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
953
+ };
954
+ const de_DescribeChimeWebhookConfigurationsExceptionRes = async (parsedOutput, context) => {
955
+ const contents = (0, smithy_client_1.map)({});
956
+ const data = parsedOutput.body;
957
+ const doc = (0, smithy_client_1.take)(data, {
958
+ Message: smithy_client_1.expectString,
959
+ });
960
+ Object.assign(contents, doc);
961
+ const exception = new models_0_1.DescribeChimeWebhookConfigurationsException({
962
+ $metadata: deserializeMetadata(parsedOutput),
963
+ ...contents,
964
+ });
965
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
966
+ };
967
+ const de_DescribeSlackChannelConfigurationsExceptionRes = async (parsedOutput, context) => {
968
+ const contents = (0, smithy_client_1.map)({});
969
+ const data = parsedOutput.body;
970
+ const doc = (0, smithy_client_1.take)(data, {
971
+ Message: smithy_client_1.expectString,
972
+ });
973
+ Object.assign(contents, doc);
974
+ const exception = new models_0_1.DescribeSlackChannelConfigurationsException({
975
+ $metadata: deserializeMetadata(parsedOutput),
976
+ ...contents,
977
+ });
978
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
979
+ };
980
+ const de_DescribeSlackUserIdentitiesExceptionRes = async (parsedOutput, context) => {
981
+ const contents = (0, smithy_client_1.map)({});
982
+ const data = parsedOutput.body;
983
+ const doc = (0, smithy_client_1.take)(data, {
984
+ Message: smithy_client_1.expectString,
985
+ });
986
+ Object.assign(contents, doc);
987
+ const exception = new models_0_1.DescribeSlackUserIdentitiesException({
988
+ $metadata: deserializeMetadata(parsedOutput),
989
+ ...contents,
990
+ });
991
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
992
+ };
993
+ const de_DescribeSlackWorkspacesExceptionRes = async (parsedOutput, context) => {
994
+ const contents = (0, smithy_client_1.map)({});
995
+ const data = parsedOutput.body;
996
+ const doc = (0, smithy_client_1.take)(data, {
997
+ Message: smithy_client_1.expectString,
998
+ });
999
+ Object.assign(contents, doc);
1000
+ const exception = new models_0_1.DescribeSlackWorkspacesException({
1001
+ $metadata: deserializeMetadata(parsedOutput),
1002
+ ...contents,
1003
+ });
1004
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1005
+ };
1006
+ const de_GetAccountPreferencesExceptionRes = async (parsedOutput, context) => {
1007
+ const contents = (0, smithy_client_1.map)({});
1008
+ const data = parsedOutput.body;
1009
+ const doc = (0, smithy_client_1.take)(data, {
1010
+ Message: smithy_client_1.expectString,
1011
+ });
1012
+ Object.assign(contents, doc);
1013
+ const exception = new models_0_1.GetAccountPreferencesException({
1014
+ $metadata: deserializeMetadata(parsedOutput),
1015
+ ...contents,
1016
+ });
1017
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1018
+ };
1019
+ const de_GetTeamsChannelConfigurationExceptionRes = async (parsedOutput, context) => {
1020
+ const contents = (0, smithy_client_1.map)({});
1021
+ const data = parsedOutput.body;
1022
+ const doc = (0, smithy_client_1.take)(data, {
1023
+ Message: smithy_client_1.expectString,
1024
+ });
1025
+ Object.assign(contents, doc);
1026
+ const exception = new models_0_1.GetTeamsChannelConfigurationException({
1027
+ $metadata: deserializeMetadata(parsedOutput),
1028
+ ...contents,
1029
+ });
1030
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1031
+ };
1032
+ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
1033
+ const contents = (0, smithy_client_1.map)({});
1034
+ const data = parsedOutput.body;
1035
+ const doc = (0, smithy_client_1.take)(data, {
1036
+ message: smithy_client_1.expectString,
1037
+ });
1038
+ Object.assign(contents, doc);
1039
+ const exception = new models_0_1.InvalidParameterException({
1040
+ $metadata: deserializeMetadata(parsedOutput),
1041
+ ...contents,
1042
+ });
1043
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1044
+ };
1045
+ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1046
+ const contents = (0, smithy_client_1.map)({});
1047
+ const data = parsedOutput.body;
1048
+ const doc = (0, smithy_client_1.take)(data, {
1049
+ message: smithy_client_1.expectString,
1050
+ });
1051
+ Object.assign(contents, doc);
1052
+ const exception = new models_0_1.InvalidRequestException({
1053
+ $metadata: deserializeMetadata(parsedOutput),
1054
+ ...contents,
1055
+ });
1056
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1057
+ };
1058
+ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
1059
+ const contents = (0, smithy_client_1.map)({});
1060
+ const data = parsedOutput.body;
1061
+ const doc = (0, smithy_client_1.take)(data, {
1062
+ message: smithy_client_1.expectString,
1063
+ });
1064
+ Object.assign(contents, doc);
1065
+ const exception = new models_0_1.LimitExceededException({
1066
+ $metadata: deserializeMetadata(parsedOutput),
1067
+ ...contents,
1068
+ });
1069
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1070
+ };
1071
+ const de_ListMicrosoftTeamsConfiguredTeamsExceptionRes = async (parsedOutput, context) => {
1072
+ const contents = (0, smithy_client_1.map)({});
1073
+ const data = parsedOutput.body;
1074
+ const doc = (0, smithy_client_1.take)(data, {
1075
+ Message: smithy_client_1.expectString,
1076
+ });
1077
+ Object.assign(contents, doc);
1078
+ const exception = new models_0_1.ListMicrosoftTeamsConfiguredTeamsException({
1079
+ $metadata: deserializeMetadata(parsedOutput),
1080
+ ...contents,
1081
+ });
1082
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1083
+ };
1084
+ const de_ListMicrosoftTeamsUserIdentitiesExceptionRes = async (parsedOutput, context) => {
1085
+ const contents = (0, smithy_client_1.map)({});
1086
+ const data = parsedOutput.body;
1087
+ const doc = (0, smithy_client_1.take)(data, {
1088
+ Message: smithy_client_1.expectString,
1089
+ });
1090
+ Object.assign(contents, doc);
1091
+ const exception = new models_0_1.ListMicrosoftTeamsUserIdentitiesException({
1092
+ $metadata: deserializeMetadata(parsedOutput),
1093
+ ...contents,
1094
+ });
1095
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1096
+ };
1097
+ const de_ListTeamsChannelConfigurationsExceptionRes = async (parsedOutput, context) => {
1098
+ const contents = (0, smithy_client_1.map)({});
1099
+ const data = parsedOutput.body;
1100
+ const doc = (0, smithy_client_1.take)(data, {
1101
+ Message: smithy_client_1.expectString,
1102
+ });
1103
+ Object.assign(contents, doc);
1104
+ const exception = new models_0_1.ListTeamsChannelConfigurationsException({
1105
+ $metadata: deserializeMetadata(parsedOutput),
1106
+ ...contents,
1107
+ });
1108
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1109
+ };
1110
+ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1111
+ const contents = (0, smithy_client_1.map)({});
1112
+ const data = parsedOutput.body;
1113
+ const doc = (0, smithy_client_1.take)(data, {
1114
+ Message: smithy_client_1.expectString,
1115
+ });
1116
+ Object.assign(contents, doc);
1117
+ const exception = new models_0_1.ResourceNotFoundException({
1118
+ $metadata: deserializeMetadata(parsedOutput),
1119
+ ...contents,
1120
+ });
1121
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1122
+ };
1123
+ const de_UpdateAccountPreferencesExceptionRes = async (parsedOutput, context) => {
1124
+ const contents = (0, smithy_client_1.map)({});
1125
+ const data = parsedOutput.body;
1126
+ const doc = (0, smithy_client_1.take)(data, {
1127
+ Message: smithy_client_1.expectString,
1128
+ });
1129
+ Object.assign(contents, doc);
1130
+ const exception = new models_0_1.UpdateAccountPreferencesException({
1131
+ $metadata: deserializeMetadata(parsedOutput),
1132
+ ...contents,
1133
+ });
1134
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1135
+ };
1136
+ const de_UpdateChimeWebhookConfigurationExceptionRes = async (parsedOutput, context) => {
1137
+ const contents = (0, smithy_client_1.map)({});
1138
+ const data = parsedOutput.body;
1139
+ const doc = (0, smithy_client_1.take)(data, {
1140
+ Message: smithy_client_1.expectString,
1141
+ });
1142
+ Object.assign(contents, doc);
1143
+ const exception = new models_0_1.UpdateChimeWebhookConfigurationException({
1144
+ $metadata: deserializeMetadata(parsedOutput),
1145
+ ...contents,
1146
+ });
1147
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1148
+ };
1149
+ const de_UpdateSlackChannelConfigurationExceptionRes = async (parsedOutput, context) => {
1150
+ const contents = (0, smithy_client_1.map)({});
1151
+ const data = parsedOutput.body;
1152
+ const doc = (0, smithy_client_1.take)(data, {
1153
+ Message: smithy_client_1.expectString,
1154
+ });
1155
+ Object.assign(contents, doc);
1156
+ const exception = new models_0_1.UpdateSlackChannelConfigurationException({
1157
+ $metadata: deserializeMetadata(parsedOutput),
1158
+ ...contents,
1159
+ });
1160
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1161
+ };
1162
+ const de_UpdateTeamsChannelConfigurationExceptionRes = async (parsedOutput, context) => {
1163
+ const contents = (0, smithy_client_1.map)({});
1164
+ const data = parsedOutput.body;
1165
+ const doc = (0, smithy_client_1.take)(data, {
1166
+ Message: smithy_client_1.expectString,
1167
+ });
1168
+ Object.assign(contents, doc);
1169
+ const exception = new models_0_1.UpdateTeamsChannelConfigurationException({
1170
+ $metadata: deserializeMetadata(parsedOutput),
1171
+ ...contents,
1172
+ });
1173
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1174
+ };
1175
+ const deserializeMetadata = (output) => ({
1176
+ httpStatusCode: output.statusCode,
1177
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
1178
+ extendedRequestId: output.headers["x-amz-id-2"],
1179
+ cfId: output.headers["x-amz-cf-id"],
1180
+ });
1181
+ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
1182
+ const isSerializableHeaderValue = (value) => value !== undefined &&
1183
+ value !== null &&
1184
+ value !== "" &&
1185
+ (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1186
+ (!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
+ };