@wildix/xbees-conversations-client 1.5.0 → 4.0.1

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 (257) hide show
  1. package/dist-cjs/Conversations.js +3 -3
  2. package/dist-cjs/ConversationsClient.js +34 -26
  3. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +43 -0
  4. package/dist-cjs/auth/httpAuthSchemeProvider.js +183 -0
  5. package/dist-cjs/commands/AddChannelMemberCommand.js +10 -11
  6. package/dist-cjs/commands/AddChannelMembersCommand.js +10 -11
  7. package/dist-cjs/commands/AssignChannelCommand.js +10 -11
  8. package/dist-cjs/commands/CreateGroupChannelCommand.js +10 -11
  9. package/dist-cjs/commands/CreateInboxTagCommand.js +10 -11
  10. package/dist-cjs/commands/CreateKiteChannelCommand.js +10 -11
  11. package/dist-cjs/commands/DeleteChannelCommand.js +10 -11
  12. package/dist-cjs/commands/DeleteChannelMemberCommand.js +10 -11
  13. package/dist-cjs/commands/DeleteInboxTagCommand.js +10 -11
  14. package/dist-cjs/commands/DeleteMessageCommand.js +10 -11
  15. package/dist-cjs/commands/DeleteMessageReactionCommand.js +10 -11
  16. package/dist-cjs/commands/DescribeEventCommand.js +10 -11
  17. package/dist-cjs/commands/GetActionTriggerResultCommand.js +10 -11
  18. package/dist-cjs/commands/GetChannelCommand.js +10 -11
  19. package/dist-cjs/commands/GetChannelMemberCommand.js +10 -11
  20. package/dist-cjs/commands/GetDirectChannelIdCommand.js +10 -11
  21. package/dist-cjs/commands/GetFilePresignedDownloadUrlCommand.js +10 -11
  22. package/dist-cjs/commands/GetInboxStateCommand.js +10 -11
  23. package/dist-cjs/commands/GetMessageCommand.js +10 -11
  24. package/dist-cjs/commands/GetOrCreateDirectChannelCommand.js +10 -11
  25. package/dist-cjs/commands/GetOrCreateSmsChannelCommand.js +10 -11
  26. package/dist-cjs/commands/GetOrCreateTelephonyChannelCommand.js +10 -11
  27. package/dist-cjs/commands/GetOrCreateWhatsAppChannelCommand.js +10 -11
  28. package/dist-cjs/commands/GetSmsChannelIdCommand.js +10 -11
  29. package/dist-cjs/commands/GetTelephonyChannelIdCommand.js +10 -11
  30. package/dist-cjs/commands/GetTokenCommand.js +10 -11
  31. package/dist-cjs/commands/GetUploadedFileInfoCommand.js +10 -11
  32. package/dist-cjs/commands/GetWhatsAppChannelIdCommand.js +10 -11
  33. package/dist-cjs/commands/HideChannelCommand.js +10 -11
  34. package/dist-cjs/commands/InviteCommand.js +10 -11
  35. package/dist-cjs/commands/JoinChannelCommand.js +10 -11
  36. package/dist-cjs/commands/LeaveChannelCommand.js +10 -11
  37. package/dist-cjs/commands/ListChannelMembersCommand.js +10 -11
  38. package/dist-cjs/commands/ListChannelMembersReadStatusCommand.js +10 -11
  39. package/dist-cjs/commands/ListChannelsCommand.js +10 -11
  40. package/dist-cjs/commands/ListInboxTaggedChannelsCommand.js +10 -11
  41. package/dist-cjs/commands/ListInboxTagsCommand.js +10 -11
  42. package/dist-cjs/commands/ListMessageReactionsCommand.js +10 -11
  43. package/dist-cjs/commands/ListMessagesCommand.js +10 -11
  44. package/dist-cjs/commands/ListPinnedMessagesCommand.js +10 -11
  45. package/dist-cjs/commands/MarkReadCommand.js +10 -11
  46. package/dist-cjs/commands/MarkUnreadCommand.js +10 -11
  47. package/dist-cjs/commands/PartialUpdateChannelCommand.js +10 -11
  48. package/dist-cjs/commands/PartialUpdateMessageCommand.js +10 -11
  49. package/dist-cjs/commands/PinChannelCommand.js +10 -11
  50. package/dist-cjs/commands/PinMessageCommand.js +10 -11
  51. package/dist-cjs/commands/QueryChannelsCommand.js +10 -11
  52. package/dist-cjs/commands/ScheduleExternalFlagAdjustmentJobCommand.js +10 -11
  53. package/dist-cjs/commands/SendActionTriggerResultCommand.js +10 -11
  54. package/dist-cjs/commands/SendGiphyCommand.js +10 -11
  55. package/dist-cjs/commands/SendMessageCommand.js +10 -11
  56. package/dist-cjs/commands/SendMessageReactionCommand.js +10 -11
  57. package/dist-cjs/commands/SendSystemMessageCommand.js +10 -11
  58. package/dist-cjs/commands/SendTypingStartCommand.js +10 -11
  59. package/dist-cjs/commands/SendTypingStopCommand.js +10 -11
  60. package/dist-cjs/commands/ShowChannelCommand.js +10 -11
  61. package/dist-cjs/commands/TagChannelCommand.js +10 -11
  62. package/dist-cjs/commands/TriggerMessageActionCommand.js +10 -11
  63. package/dist-cjs/commands/UnpinChannelCommand.js +10 -11
  64. package/dist-cjs/commands/UnpinMessageCommand.js +10 -11
  65. package/dist-cjs/commands/UntagChannelCommand.js +10 -11
  66. package/dist-cjs/commands/UpdateChannelCommand.js +10 -11
  67. package/dist-cjs/commands/UpdateInboxTagCommand.js +10 -11
  68. package/dist-cjs/commands/UpdateMessageCommand.js +10 -11
  69. package/dist-cjs/commands/UploadFileCommand.js +10 -11
  70. package/dist-cjs/endpoint/EndpointParameters.js +16 -0
  71. package/dist-cjs/endpoint/bdd.js +28 -0
  72. package/dist-cjs/endpoint/endpointResolver.js +16 -0
  73. package/dist-cjs/index.js +7 -4
  74. package/dist-cjs/models/ConversationsSyntheticServiceException.js +12 -0
  75. package/dist-cjs/models/enums.js +124 -0
  76. package/dist-cjs/models/errors.js +274 -0
  77. package/dist-cjs/models/models_0.js +0 -451
  78. package/dist-cjs/runtimeConfig.browser.js +11 -11
  79. package/dist-cjs/runtimeConfig.js +22 -18
  80. package/dist-cjs/runtimeConfig.shared.js +30 -10
  81. package/dist-cjs/runtimeExtensions.js +6 -5
  82. package/dist-cjs/schemas/schemas_0.js +1854 -0
  83. package/dist-es/Conversations.js +6 -6
  84. package/dist-es/ConversationsClient.js +30 -22
  85. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  86. package/dist-es/auth/httpAuthSchemeProvider.js +177 -0
  87. package/dist-es/commands/AddChannelMemberCommand.js +9 -10
  88. package/dist-es/commands/AddChannelMembersCommand.js +9 -10
  89. package/dist-es/commands/AssignChannelCommand.js +9 -10
  90. package/dist-es/commands/CreateGroupChannelCommand.js +9 -10
  91. package/dist-es/commands/CreateInboxTagCommand.js +9 -10
  92. package/dist-es/commands/CreateKiteChannelCommand.js +9 -10
  93. package/dist-es/commands/DeleteChannelCommand.js +9 -10
  94. package/dist-es/commands/DeleteChannelMemberCommand.js +9 -10
  95. package/dist-es/commands/DeleteInboxTagCommand.js +9 -10
  96. package/dist-es/commands/DeleteMessageCommand.js +9 -10
  97. package/dist-es/commands/DeleteMessageReactionCommand.js +9 -10
  98. package/dist-es/commands/DescribeEventCommand.js +9 -10
  99. package/dist-es/commands/GetActionTriggerResultCommand.js +9 -10
  100. package/dist-es/commands/GetChannelCommand.js +9 -10
  101. package/dist-es/commands/GetChannelMemberCommand.js +9 -10
  102. package/dist-es/commands/GetDirectChannelIdCommand.js +9 -10
  103. package/dist-es/commands/GetFilePresignedDownloadUrlCommand.js +9 -10
  104. package/dist-es/commands/GetInboxStateCommand.js +9 -10
  105. package/dist-es/commands/GetMessageCommand.js +9 -10
  106. package/dist-es/commands/GetOrCreateDirectChannelCommand.js +9 -10
  107. package/dist-es/commands/GetOrCreateSmsChannelCommand.js +9 -10
  108. package/dist-es/commands/GetOrCreateTelephonyChannelCommand.js +9 -10
  109. package/dist-es/commands/GetOrCreateWhatsAppChannelCommand.js +9 -10
  110. package/dist-es/commands/GetSmsChannelIdCommand.js +9 -10
  111. package/dist-es/commands/GetTelephonyChannelIdCommand.js +9 -10
  112. package/dist-es/commands/GetTokenCommand.js +9 -10
  113. package/dist-es/commands/GetUploadedFileInfoCommand.js +9 -10
  114. package/dist-es/commands/GetWhatsAppChannelIdCommand.js +9 -10
  115. package/dist-es/commands/HideChannelCommand.js +9 -10
  116. package/dist-es/commands/InviteCommand.js +9 -10
  117. package/dist-es/commands/JoinChannelCommand.js +9 -10
  118. package/dist-es/commands/LeaveChannelCommand.js +9 -10
  119. package/dist-es/commands/ListChannelMembersCommand.js +9 -10
  120. package/dist-es/commands/ListChannelMembersReadStatusCommand.js +9 -10
  121. package/dist-es/commands/ListChannelsCommand.js +9 -10
  122. package/dist-es/commands/ListInboxTaggedChannelsCommand.js +9 -10
  123. package/dist-es/commands/ListInboxTagsCommand.js +9 -10
  124. package/dist-es/commands/ListMessageReactionsCommand.js +9 -10
  125. package/dist-es/commands/ListMessagesCommand.js +9 -10
  126. package/dist-es/commands/ListPinnedMessagesCommand.js +9 -10
  127. package/dist-es/commands/MarkReadCommand.js +9 -10
  128. package/dist-es/commands/MarkUnreadCommand.js +9 -10
  129. package/dist-es/commands/PartialUpdateChannelCommand.js +9 -10
  130. package/dist-es/commands/PartialUpdateMessageCommand.js +9 -10
  131. package/dist-es/commands/PinChannelCommand.js +9 -10
  132. package/dist-es/commands/PinMessageCommand.js +9 -10
  133. package/dist-es/commands/QueryChannelsCommand.js +9 -10
  134. package/dist-es/commands/ScheduleExternalFlagAdjustmentJobCommand.js +9 -10
  135. package/dist-es/commands/SendActionTriggerResultCommand.js +9 -10
  136. package/dist-es/commands/SendGiphyCommand.js +9 -10
  137. package/dist-es/commands/SendMessageCommand.js +9 -10
  138. package/dist-es/commands/SendMessageReactionCommand.js +9 -10
  139. package/dist-es/commands/SendSystemMessageCommand.js +9 -10
  140. package/dist-es/commands/SendTypingStartCommand.js +9 -10
  141. package/dist-es/commands/SendTypingStopCommand.js +9 -10
  142. package/dist-es/commands/ShowChannelCommand.js +9 -10
  143. package/dist-es/commands/TagChannelCommand.js +9 -10
  144. package/dist-es/commands/TriggerMessageActionCommand.js +9 -10
  145. package/dist-es/commands/UnpinChannelCommand.js +9 -10
  146. package/dist-es/commands/UnpinMessageCommand.js +9 -10
  147. package/dist-es/commands/UntagChannelCommand.js +9 -10
  148. package/dist-es/commands/UpdateChannelCommand.js +9 -10
  149. package/dist-es/commands/UpdateInboxTagCommand.js +9 -10
  150. package/dist-es/commands/UpdateMessageCommand.js +9 -10
  151. package/dist-es/commands/UploadFileCommand.js +9 -10
  152. package/dist-es/endpoint/EndpointParameters.js +12 -0
  153. package/dist-es/endpoint/bdd.js +25 -0
  154. package/dist-es/endpoint/endpointResolver.js +12 -0
  155. package/dist-es/index.js +5 -2
  156. package/dist-es/models/ConversationsSyntheticServiceException.js +8 -0
  157. package/dist-es/models/enums.js +121 -0
  158. package/dist-es/models/errors.js +251 -0
  159. package/dist-es/models/models_0.js +1 -430
  160. package/dist-es/runtimeConfig.browser.js +7 -7
  161. package/dist-es/runtimeConfig.js +17 -13
  162. package/dist-es/runtimeConfig.shared.js +24 -4
  163. package/dist-es/runtimeExtensions.js +6 -5
  164. package/dist-es/schemas/schemas_0.js +1846 -0
  165. package/dist-types/Conversations.d.ts +66 -66
  166. package/dist-types/ConversationsClient.d.ts +95 -77
  167. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  168. package/dist-types/auth/httpAuthSchemeProvider.d.ts +81 -0
  169. package/dist-types/commands/AddChannelMemberCommand.d.ts +12 -8
  170. package/dist-types/commands/AddChannelMembersCommand.d.ts +12 -8
  171. package/dist-types/commands/AssignChannelCommand.d.ts +12 -8
  172. package/dist-types/commands/CreateGroupChannelCommand.d.ts +12 -8
  173. package/dist-types/commands/CreateInboxTagCommand.d.ts +12 -8
  174. package/dist-types/commands/CreateKiteChannelCommand.d.ts +12 -8
  175. package/dist-types/commands/DeleteChannelCommand.d.ts +12 -8
  176. package/dist-types/commands/DeleteChannelMemberCommand.d.ts +12 -8
  177. package/dist-types/commands/DeleteInboxTagCommand.d.ts +12 -8
  178. package/dist-types/commands/DeleteMessageCommand.d.ts +12 -8
  179. package/dist-types/commands/DeleteMessageReactionCommand.d.ts +12 -8
  180. package/dist-types/commands/DescribeEventCommand.d.ts +12 -8
  181. package/dist-types/commands/GetActionTriggerResultCommand.d.ts +12 -8
  182. package/dist-types/commands/GetChannelCommand.d.ts +12 -8
  183. package/dist-types/commands/GetChannelMemberCommand.d.ts +12 -8
  184. package/dist-types/commands/GetDirectChannelIdCommand.d.ts +12 -8
  185. package/dist-types/commands/GetFilePresignedDownloadUrlCommand.d.ts +12 -8
  186. package/dist-types/commands/GetInboxStateCommand.d.ts +12 -8
  187. package/dist-types/commands/GetMessageCommand.d.ts +12 -8
  188. package/dist-types/commands/GetOrCreateDirectChannelCommand.d.ts +12 -8
  189. package/dist-types/commands/GetOrCreateSmsChannelCommand.d.ts +12 -8
  190. package/dist-types/commands/GetOrCreateTelephonyChannelCommand.d.ts +12 -8
  191. package/dist-types/commands/GetOrCreateWhatsAppChannelCommand.d.ts +12 -8
  192. package/dist-types/commands/GetSmsChannelIdCommand.d.ts +12 -8
  193. package/dist-types/commands/GetTelephonyChannelIdCommand.d.ts +12 -8
  194. package/dist-types/commands/GetTokenCommand.d.ts +12 -8
  195. package/dist-types/commands/GetUploadedFileInfoCommand.d.ts +12 -8
  196. package/dist-types/commands/GetWhatsAppChannelIdCommand.d.ts +12 -8
  197. package/dist-types/commands/HideChannelCommand.d.ts +12 -8
  198. package/dist-types/commands/InviteCommand.d.ts +12 -8
  199. package/dist-types/commands/JoinChannelCommand.d.ts +12 -8
  200. package/dist-types/commands/LeaveChannelCommand.d.ts +12 -8
  201. package/dist-types/commands/ListChannelMembersCommand.d.ts +12 -8
  202. package/dist-types/commands/ListChannelMembersReadStatusCommand.d.ts +12 -8
  203. package/dist-types/commands/ListChannelsCommand.d.ts +12 -8
  204. package/dist-types/commands/ListInboxTaggedChannelsCommand.d.ts +12 -8
  205. package/dist-types/commands/ListInboxTagsCommand.d.ts +12 -8
  206. package/dist-types/commands/ListMessageReactionsCommand.d.ts +12 -8
  207. package/dist-types/commands/ListMessagesCommand.d.ts +12 -8
  208. package/dist-types/commands/ListPinnedMessagesCommand.d.ts +12 -8
  209. package/dist-types/commands/MarkReadCommand.d.ts +12 -8
  210. package/dist-types/commands/MarkUnreadCommand.d.ts +12 -8
  211. package/dist-types/commands/PartialUpdateChannelCommand.d.ts +12 -8
  212. package/dist-types/commands/PartialUpdateMessageCommand.d.ts +12 -8
  213. package/dist-types/commands/PinChannelCommand.d.ts +12 -8
  214. package/dist-types/commands/PinMessageCommand.d.ts +12 -8
  215. package/dist-types/commands/QueryChannelsCommand.d.ts +12 -8
  216. package/dist-types/commands/ScheduleExternalFlagAdjustmentJobCommand.d.ts +12 -8
  217. package/dist-types/commands/SendActionTriggerResultCommand.d.ts +12 -8
  218. package/dist-types/commands/SendGiphyCommand.d.ts +12 -8
  219. package/dist-types/commands/SendMessageCommand.d.ts +12 -8
  220. package/dist-types/commands/SendMessageReactionCommand.d.ts +12 -8
  221. package/dist-types/commands/SendSystemMessageCommand.d.ts +12 -8
  222. package/dist-types/commands/SendTypingStartCommand.d.ts +12 -8
  223. package/dist-types/commands/SendTypingStopCommand.d.ts +12 -8
  224. package/dist-types/commands/ShowChannelCommand.d.ts +12 -8
  225. package/dist-types/commands/TagChannelCommand.d.ts +12 -8
  226. package/dist-types/commands/TriggerMessageActionCommand.d.ts +12 -8
  227. package/dist-types/commands/UnpinChannelCommand.d.ts +12 -8
  228. package/dist-types/commands/UnpinMessageCommand.d.ts +12 -8
  229. package/dist-types/commands/UntagChannelCommand.d.ts +12 -8
  230. package/dist-types/commands/UpdateChannelCommand.d.ts +12 -8
  231. package/dist-types/commands/UpdateInboxTagCommand.d.ts +12 -8
  232. package/dist-types/commands/UpdateMessageCommand.d.ts +12 -8
  233. package/dist-types/commands/UploadFileCommand.d.ts +12 -8
  234. package/dist-types/endpoint/EndpointParameters.d.ts +41 -0
  235. package/dist-types/endpoint/bdd.d.ts +2 -0
  236. package/dist-types/endpoint/endpointResolver.d.ts +8 -0
  237. package/dist-types/extensionConfiguration.d.ts +4 -3
  238. package/dist-types/index.d.ts +6 -2
  239. package/dist-types/models/{ConversationsServiceException.d.ts → ConversationsSyntheticServiceException.d.ts} +2 -2
  240. package/dist-types/models/enums.d.ts +285 -0
  241. package/dist-types/models/errors.d.ts +244 -0
  242. package/dist-types/models/models_0.d.ts +85 -594
  243. package/dist-types/runtimeConfig.browser.d.ts +35 -16
  244. package/dist-types/runtimeConfig.d.ts +34 -15
  245. package/dist-types/runtimeConfig.native.d.ts +36 -17
  246. package/dist-types/runtimeConfig.shared.d.ts +20 -3
  247. package/dist-types/runtimeExtensions.d.ts +1 -1
  248. package/dist-types/schemas/schemas_0.d.ts +286 -0
  249. package/package.json +13 -39
  250. package/dist-cjs/models/ConversationsServiceException.js +0 -12
  251. package/dist-cjs/models/index.js +0 -4
  252. package/dist-cjs/protocols/Aws_restJson1.js +0 -2574
  253. package/dist-es/models/ConversationsServiceException.js +0 -8
  254. package/dist-es/models/index.js +0 -1
  255. package/dist-es/protocols/Aws_restJson1.js +0 -2439
  256. package/dist-types/models/index.d.ts +0 -1
  257. package/dist-types/protocols/Aws_restJson1.d.ts +0 -587
@@ -1,2574 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.se_SendGiphyCommand = exports.se_SendActionTriggerResultCommand = exports.se_ScheduleExternalFlagAdjustmentJobCommand = exports.se_QueryChannelsCommand = exports.se_PinMessageCommand = exports.se_PinChannelCommand = exports.se_PartialUpdateMessageCommand = exports.se_PartialUpdateChannelCommand = exports.se_MarkUnreadCommand = exports.se_MarkReadCommand = exports.se_ListPinnedMessagesCommand = exports.se_ListMessagesCommand = exports.se_ListMessageReactionsCommand = exports.se_ListInboxTagsCommand = exports.se_ListInboxTaggedChannelsCommand = exports.se_ListChannelsCommand = exports.se_ListChannelMembersReadStatusCommand = exports.se_ListChannelMembersCommand = exports.se_LeaveChannelCommand = exports.se_JoinChannelCommand = exports.se_InviteCommand = exports.se_HideChannelCommand = exports.se_GetWhatsAppChannelIdCommand = exports.se_GetUploadedFileInfoCommand = exports.se_GetTokenCommand = exports.se_GetTelephonyChannelIdCommand = exports.se_GetSmsChannelIdCommand = exports.se_GetOrCreateWhatsAppChannelCommand = exports.se_GetOrCreateTelephonyChannelCommand = exports.se_GetOrCreateSmsChannelCommand = exports.se_GetOrCreateDirectChannelCommand = exports.se_GetMessageCommand = exports.se_GetInboxStateCommand = exports.se_GetFilePresignedDownloadUrlCommand = exports.se_GetDirectChannelIdCommand = exports.se_GetChannelMemberCommand = exports.se_GetChannelCommand = exports.se_GetActionTriggerResultCommand = exports.se_DescribeEventCommand = exports.se_DeleteMessageReactionCommand = exports.se_DeleteMessageCommand = exports.se_DeleteInboxTagCommand = exports.se_DeleteChannelMemberCommand = exports.se_DeleteChannelCommand = exports.se_CreateKiteChannelCommand = exports.se_CreateInboxTagCommand = exports.se_CreateGroupChannelCommand = exports.se_AssignChannelCommand = exports.se_AddChannelMembersCommand = exports.se_AddChannelMemberCommand = void 0;
4
- exports.de_ListChannelsCommand = exports.de_ListChannelMembersReadStatusCommand = exports.de_ListChannelMembersCommand = exports.de_LeaveChannelCommand = exports.de_JoinChannelCommand = exports.de_InviteCommand = exports.de_HideChannelCommand = exports.de_GetWhatsAppChannelIdCommand = exports.de_GetUploadedFileInfoCommand = exports.de_GetTokenCommand = exports.de_GetTelephonyChannelIdCommand = exports.de_GetSmsChannelIdCommand = exports.de_GetOrCreateWhatsAppChannelCommand = exports.de_GetOrCreateTelephonyChannelCommand = exports.de_GetOrCreateSmsChannelCommand = exports.de_GetOrCreateDirectChannelCommand = exports.de_GetMessageCommand = exports.de_GetInboxStateCommand = exports.de_GetFilePresignedDownloadUrlCommand = exports.de_GetDirectChannelIdCommand = exports.de_GetChannelMemberCommand = exports.de_GetChannelCommand = exports.de_GetActionTriggerResultCommand = exports.de_DescribeEventCommand = exports.de_DeleteMessageReactionCommand = exports.de_DeleteMessageCommand = exports.de_DeleteInboxTagCommand = exports.de_DeleteChannelMemberCommand = exports.de_DeleteChannelCommand = exports.de_CreateKiteChannelCommand = exports.de_CreateInboxTagCommand = exports.de_CreateGroupChannelCommand = exports.de_AssignChannelCommand = exports.de_AddChannelMembersCommand = exports.de_AddChannelMemberCommand = exports.se_UploadFileCommand = exports.se_UpdateMessageCommand = exports.se_UpdateInboxTagCommand = exports.se_UpdateChannelCommand = exports.se_UntagChannelCommand = exports.se_UnpinMessageCommand = exports.se_UnpinChannelCommand = exports.se_TriggerMessageActionCommand = exports.se_TagChannelCommand = exports.se_ShowChannelCommand = exports.se_SendTypingStopCommand = exports.se_SendTypingStartCommand = exports.se_SendSystemMessageCommand = exports.se_SendMessageReactionCommand = exports.se_SendMessageCommand = void 0;
5
- exports.de_UploadFileCommand = exports.de_UpdateMessageCommand = exports.de_UpdateInboxTagCommand = exports.de_UpdateChannelCommand = exports.de_UntagChannelCommand = exports.de_UnpinMessageCommand = exports.de_UnpinChannelCommand = exports.de_TriggerMessageActionCommand = exports.de_TagChannelCommand = exports.de_ShowChannelCommand = exports.de_SendTypingStopCommand = exports.de_SendTypingStartCommand = exports.de_SendSystemMessageCommand = exports.de_SendMessageReactionCommand = exports.de_SendMessageCommand = exports.de_SendGiphyCommand = exports.de_SendActionTriggerResultCommand = exports.de_ScheduleExternalFlagAdjustmentJobCommand = exports.de_QueryChannelsCommand = exports.de_PinMessageCommand = exports.de_PinChannelCommand = exports.de_PartialUpdateMessageCommand = exports.de_PartialUpdateChannelCommand = exports.de_MarkUnreadCommand = exports.de_MarkReadCommand = exports.de_ListPinnedMessagesCommand = exports.de_ListMessagesCommand = exports.de_ListMessageReactionsCommand = exports.de_ListInboxTagsCommand = exports.de_ListInboxTaggedChannelsCommand = void 0;
6
- const ConversationsServiceException_1 = require("../models/ConversationsServiceException");
7
- const models_0_1 = require("../models/models_0");
8
- const core_1 = require("@aws-sdk/core");
9
- const core_2 = require("@smithy/core");
10
- const smithy_client_1 = require("@smithy/smithy-client");
11
- const se_AddChannelMemberCommand = async (input, context) => {
12
- const b = (0, core_2.requestBuilder)(input, context);
13
- const headers = {
14
- 'content-type': 'application/json',
15
- };
16
- b.bp("/v2/conversations/channels/{channelId}/members");
17
- b.p('channelId', () => input.channelId, '{channelId}', false);
18
- const query = (0, smithy_client_1.map)({
19
- [_u]: [, input[_uI]],
20
- });
21
- let body;
22
- body = JSON.stringify((0, smithy_client_1.take)(input, {
23
- 'hideHistory': [],
24
- 'memberId': [],
25
- 'memberToInvite': _ => (0, smithy_client_1._json)(_),
26
- 'silent': [],
27
- }));
28
- b.m("POST")
29
- .h(headers)
30
- .q(query)
31
- .b(body);
32
- return b.build();
33
- };
34
- exports.se_AddChannelMemberCommand = se_AddChannelMemberCommand;
35
- const se_AddChannelMembersCommand = async (input, context) => {
36
- const b = (0, core_2.requestBuilder)(input, context);
37
- const headers = {
38
- 'content-type': 'application/json',
39
- };
40
- b.bp("/v2/conversations/channels/{channelId}/members");
41
- b.p('channelId', () => input.channelId, '{channelId}', false);
42
- const query = (0, smithy_client_1.map)({
43
- [_u]: [, input[_uI]],
44
- });
45
- let body;
46
- body = JSON.stringify((0, smithy_client_1.take)(input, {
47
- 'hideHistory': [],
48
- 'members': _ => (0, smithy_client_1._json)(_),
49
- 'membersToInvite': _ => (0, smithy_client_1._json)(_),
50
- 'silent': [],
51
- 'unreadMessageId': [],
52
- }));
53
- b.m("PUT")
54
- .h(headers)
55
- .q(query)
56
- .b(body);
57
- return b.build();
58
- };
59
- exports.se_AddChannelMembersCommand = se_AddChannelMembersCommand;
60
- const se_AssignChannelCommand = async (input, context) => {
61
- const b = (0, core_2.requestBuilder)(input, context);
62
- const headers = {
63
- 'content-type': 'application/json',
64
- };
65
- b.bp("/v2/conversations/channels/{channelId}/assign");
66
- b.p('channelId', () => input.channelId, '{channelId}', false);
67
- const query = (0, smithy_client_1.map)({
68
- [_u]: [, input[_uI]],
69
- });
70
- let body;
71
- body = JSON.stringify((0, smithy_client_1.take)(input, {
72
- 'assignee': _ => (0, smithy_client_1._json)(_),
73
- 'service': _ => (0, smithy_client_1._json)(_),
74
- 'silent': [],
75
- 'variant': [],
76
- }));
77
- b.m("POST")
78
- .h(headers)
79
- .q(query)
80
- .b(body);
81
- return b.build();
82
- };
83
- exports.se_AssignChannelCommand = se_AssignChannelCommand;
84
- const se_CreateGroupChannelCommand = async (input, context) => {
85
- const b = (0, core_2.requestBuilder)(input, context);
86
- const headers = {
87
- 'content-type': 'application/json',
88
- };
89
- b.bp("/v2/conversations/group");
90
- const query = (0, smithy_client_1.map)({
91
- [_u]: [, input[_uI]],
92
- });
93
- let body;
94
- body = JSON.stringify((0, smithy_client_1.take)(input, {
95
- 'access': [],
96
- 'assignee': _ => (0, smithy_client_1._json)(_),
97
- 'autoRecord': [],
98
- 'broadcast': [],
99
- 'channelId': [],
100
- 'context': _ => (0, smithy_client_1._json)(_),
101
- 'creationEventType': [],
102
- 'description': [],
103
- 'kiteAssign': [],
104
- 'members': _ => (0, smithy_client_1._json)(_),
105
- 'membersToInvite': _ => (0, smithy_client_1._json)(_),
106
- 'mms': [],
107
- 'picture': [],
108
- 'pictureColor': [],
109
- 'serviceTitle': [],
110
- 'sms': [],
111
- 'subject': [],
112
- 'transcriptionLanguage': [],
113
- 'whatsapp': [],
114
- 'whatsappStatus': [],
115
- 'wizyGuestViewOnly': [],
116
- }));
117
- b.m("POST")
118
- .h(headers)
119
- .q(query)
120
- .b(body);
121
- return b.build();
122
- };
123
- exports.se_CreateGroupChannelCommand = se_CreateGroupChannelCommand;
124
- const se_CreateInboxTagCommand = async (input, context) => {
125
- const b = (0, core_2.requestBuilder)(input, context);
126
- const headers = {
127
- 'content-type': 'application/json',
128
- };
129
- b.bp("/v2/conversations/inbox/tags");
130
- const query = (0, smithy_client_1.map)({
131
- [_u]: [, input[_uI]],
132
- });
133
- let body;
134
- body = JSON.stringify((0, smithy_client_1.take)(input, {
135
- 'name': [],
136
- 'tagId': [],
137
- }));
138
- b.m("POST")
139
- .h(headers)
140
- .q(query)
141
- .b(body);
142
- return b.build();
143
- };
144
- exports.se_CreateInboxTagCommand = se_CreateInboxTagCommand;
145
- const se_CreateKiteChannelCommand = async (input, context) => {
146
- const b = (0, core_2.requestBuilder)(input, context);
147
- const headers = {
148
- 'content-type': 'application/json',
149
- };
150
- b.bp("/v2/conversations/kite");
151
- const query = (0, smithy_client_1.map)({
152
- [_u]: [, input[_uI]],
153
- });
154
- let body;
155
- body = JSON.stringify((0, smithy_client_1.take)(input, {
156
- 'channelId': [],
157
- 'initialMessage': _ => (0, smithy_client_1._json)(_),
158
- 'targetId': [],
159
- 'targetRouteId': [],
160
- 'welcomeMessages': _ => (0, smithy_client_1._json)(_),
161
- }));
162
- b.m("POST")
163
- .h(headers)
164
- .q(query)
165
- .b(body);
166
- return b.build();
167
- };
168
- exports.se_CreateKiteChannelCommand = se_CreateKiteChannelCommand;
169
- const se_DeleteChannelCommand = async (input, context) => {
170
- const b = (0, core_2.requestBuilder)(input, context);
171
- const headers = {};
172
- b.bp("/v2/conversations/channels/{channelId}");
173
- b.p('channelId', () => input.channelId, '{channelId}', false);
174
- let body;
175
- b.m("DELETE")
176
- .h(headers)
177
- .b(body);
178
- return b.build();
179
- };
180
- exports.se_DeleteChannelCommand = se_DeleteChannelCommand;
181
- const se_DeleteChannelMemberCommand = async (input, context) => {
182
- const b = (0, core_2.requestBuilder)(input, context);
183
- const headers = {};
184
- b.bp("/v2/conversations/channels/{channelId}/members/{memberId}");
185
- b.p('channelId', () => input.channelId, '{channelId}', false);
186
- b.p('memberId', () => input.memberId, '{memberId}', false);
187
- const query = (0, smithy_client_1.map)({
188
- [_u]: [, input[_uI]],
189
- [_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
190
- });
191
- let body;
192
- b.m("DELETE")
193
- .h(headers)
194
- .q(query)
195
- .b(body);
196
- return b.build();
197
- };
198
- exports.se_DeleteChannelMemberCommand = se_DeleteChannelMemberCommand;
199
- const se_DeleteInboxTagCommand = async (input, context) => {
200
- const b = (0, core_2.requestBuilder)(input, context);
201
- const headers = {};
202
- b.bp("/v2/conversations/inbox/tags/{tagId}");
203
- b.p('tagId', () => input.tagId, '{tagId}', false);
204
- const query = (0, smithy_client_1.map)({
205
- [_u]: [, input[_uI]],
206
- });
207
- let body;
208
- b.m("DELETE")
209
- .h(headers)
210
- .q(query)
211
- .b(body);
212
- return b.build();
213
- };
214
- exports.se_DeleteInboxTagCommand = se_DeleteInboxTagCommand;
215
- const se_DeleteMessageCommand = async (input, context) => {
216
- const b = (0, core_2.requestBuilder)(input, context);
217
- const headers = {};
218
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
219
- b.p('channelId', () => input.channelId, '{channelId}', false);
220
- b.p('messageId', () => input.messageId, '{messageId}', false);
221
- const query = (0, smithy_client_1.map)({
222
- [_u]: [, input[_uI]],
223
- });
224
- let body;
225
- b.m("DELETE")
226
- .h(headers)
227
- .q(query)
228
- .b(body);
229
- return b.build();
230
- };
231
- exports.se_DeleteMessageCommand = se_DeleteMessageCommand;
232
- const se_DeleteMessageReactionCommand = async (input, context) => {
233
- const b = (0, core_2.requestBuilder)(input, context);
234
- const headers = {};
235
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions/{reactionType}");
236
- b.p('channelId', () => input.channelId, '{channelId}', false);
237
- b.p('messageId', () => input.messageId, '{messageId}', false);
238
- b.p('reactionType', () => input.reactionType, '{reactionType}', false);
239
- const query = (0, smithy_client_1.map)({
240
- [_u]: [, input[_uI]],
241
- });
242
- let body;
243
- b.m("DELETE")
244
- .h(headers)
245
- .q(query)
246
- .b(body);
247
- return b.build();
248
- };
249
- exports.se_DeleteMessageReactionCommand = se_DeleteMessageReactionCommand;
250
- const se_DescribeEventCommand = async (input, context) => {
251
- const b = (0, core_2.requestBuilder)(input, context);
252
- const headers = {};
253
- b.bp("/v2/conversations/describe");
254
- let body;
255
- b.m("POST")
256
- .h(headers)
257
- .b(body);
258
- return b.build();
259
- };
260
- exports.se_DescribeEventCommand = se_DescribeEventCommand;
261
- const se_GetActionTriggerResultCommand = async (input, context) => {
262
- const b = (0, core_2.requestBuilder)(input, context);
263
- const headers = {};
264
- b.bp("/v2/conversations/triggers/{triggerId}/result");
265
- b.p('triggerId', () => input.triggerId, '{triggerId}', false);
266
- const query = (0, smithy_client_1.map)({
267
- [_u]: [, input[_uI]],
268
- });
269
- let body;
270
- b.m("GET")
271
- .h(headers)
272
- .q(query)
273
- .b(body);
274
- return b.build();
275
- };
276
- exports.se_GetActionTriggerResultCommand = se_GetActionTriggerResultCommand;
277
- const se_GetChannelCommand = async (input, context) => {
278
- const b = (0, core_2.requestBuilder)(input, context);
279
- const headers = {};
280
- b.bp("/v2/conversations/channels/{channelId}");
281
- b.p('channelId', () => input.channelId, '{channelId}', false);
282
- let body;
283
- b.m("GET")
284
- .h(headers)
285
- .b(body);
286
- return b.build();
287
- };
288
- exports.se_GetChannelCommand = se_GetChannelCommand;
289
- const se_GetChannelMemberCommand = async (input, context) => {
290
- const b = (0, core_2.requestBuilder)(input, context);
291
- const headers = {};
292
- b.bp("/v2/conversations/channels/{channelId}/members/{memberId}");
293
- b.p('channelId', () => input.channelId, '{channelId}', false);
294
- b.p('memberId', () => input.memberId, '{memberId}', false);
295
- let body;
296
- b.m("GET")
297
- .h(headers)
298
- .b(body);
299
- return b.build();
300
- };
301
- exports.se_GetChannelMemberCommand = se_GetChannelMemberCommand;
302
- const se_GetDirectChannelIdCommand = async (input, context) => {
303
- const b = (0, core_2.requestBuilder)(input, context);
304
- const headers = {
305
- 'content-type': 'application/json',
306
- };
307
- b.bp("/v2/conversations/direct/get_channel_id");
308
- const query = (0, smithy_client_1.map)({
309
- [_u]: [, input[_uI]],
310
- });
311
- let body;
312
- body = JSON.stringify((0, smithy_client_1.take)(input, {
313
- 'memberId': [],
314
- 'memberToInvite': _ => (0, smithy_client_1._json)(_),
315
- }));
316
- b.m("POST")
317
- .h(headers)
318
- .q(query)
319
- .b(body);
320
- return b.build();
321
- };
322
- exports.se_GetDirectChannelIdCommand = se_GetDirectChannelIdCommand;
323
- const se_GetFilePresignedDownloadUrlCommand = async (input, context) => {
324
- const b = (0, core_2.requestBuilder)(input, context);
325
- const headers = {};
326
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/files/{fileId}/download_url");
327
- b.p('channelId', () => input.channelId, '{channelId}', false);
328
- b.p('messageId', () => input.messageId, '{messageId}', false);
329
- b.p('fileId', () => input.fileId, '{fileId}', false);
330
- const query = (0, smithy_client_1.map)({
331
- [_c]: [, input[_c]],
332
- [_d]: [() => input.download !== void 0, () => (input[_d].toString())],
333
- });
334
- let body;
335
- b.m("GET")
336
- .h(headers)
337
- .q(query)
338
- .b(body);
339
- return b.build();
340
- };
341
- exports.se_GetFilePresignedDownloadUrlCommand = se_GetFilePresignedDownloadUrlCommand;
342
- const se_GetInboxStateCommand = async (input, context) => {
343
- const b = (0, core_2.requestBuilder)(input, context);
344
- const headers = {};
345
- b.bp("/v2/conversations/inbox/state");
346
- const query = (0, smithy_client_1.map)({
347
- [_u]: [, input[_uI]],
348
- });
349
- let body;
350
- b.m("GET")
351
- .h(headers)
352
- .q(query)
353
- .b(body);
354
- return b.build();
355
- };
356
- exports.se_GetInboxStateCommand = se_GetInboxStateCommand;
357
- const se_GetMessageCommand = async (input, context) => {
358
- const b = (0, core_2.requestBuilder)(input, context);
359
- const headers = {};
360
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
361
- b.p('channelId', () => input.channelId, '{channelId}', false);
362
- b.p('messageId', () => input.messageId, '{messageId}', false);
363
- let body;
364
- b.m("GET")
365
- .h(headers)
366
- .b(body);
367
- return b.build();
368
- };
369
- exports.se_GetMessageCommand = se_GetMessageCommand;
370
- const se_GetOrCreateDirectChannelCommand = async (input, context) => {
371
- const b = (0, core_2.requestBuilder)(input, context);
372
- const headers = {
373
- 'content-type': 'application/json',
374
- };
375
- b.bp("/v2/conversations/direct/get_or_create_channel");
376
- const query = (0, smithy_client_1.map)({
377
- [_u]: [, input[_uI]],
378
- });
379
- let body;
380
- body = JSON.stringify((0, smithy_client_1.take)(input, {
381
- 'memberId': [],
382
- 'memberToInvite': _ => (0, smithy_client_1._json)(_),
383
- }));
384
- b.m("POST")
385
- .h(headers)
386
- .q(query)
387
- .b(body);
388
- return b.build();
389
- };
390
- exports.se_GetOrCreateDirectChannelCommand = se_GetOrCreateDirectChannelCommand;
391
- const se_GetOrCreateSmsChannelCommand = async (input, context) => {
392
- const b = (0, core_2.requestBuilder)(input, context);
393
- const headers = {
394
- 'content-type': 'application/json',
395
- };
396
- b.bp("/v2/conversations/sms/get_or_create_channel");
397
- const query = (0, smithy_client_1.map)({
398
- [_u]: [, input[_uI]],
399
- });
400
- let body;
401
- body = JSON.stringify((0, smithy_client_1.take)(input, {
402
- 'outgoing': [],
403
- 'recipientId': [],
404
- 'recipientNumber': [],
405
- 'serviceUri': [],
406
- }));
407
- b.m("POST")
408
- .h(headers)
409
- .q(query)
410
- .b(body);
411
- return b.build();
412
- };
413
- exports.se_GetOrCreateSmsChannelCommand = se_GetOrCreateSmsChannelCommand;
414
- const se_GetOrCreateTelephonyChannelCommand = async (input, context) => {
415
- const b = (0, core_2.requestBuilder)(input, context);
416
- const headers = {
417
- 'content-type': 'application/json',
418
- };
419
- b.bp("/v2/conversations/telephony/get_or_create_channel");
420
- const query = (0, smithy_client_1.map)({
421
- [_u]: [, input[_uI]],
422
- });
423
- let body;
424
- body = JSON.stringify((0, smithy_client_1.take)(input, {
425
- 'recipientId': [],
426
- 'recipientNumber': [],
427
- 'serviceUri': [],
428
- }));
429
- b.m("POST")
430
- .h(headers)
431
- .q(query)
432
- .b(body);
433
- return b.build();
434
- };
435
- exports.se_GetOrCreateTelephonyChannelCommand = se_GetOrCreateTelephonyChannelCommand;
436
- const se_GetOrCreateWhatsAppChannelCommand = async (input, context) => {
437
- const b = (0, core_2.requestBuilder)(input, context);
438
- const headers = {
439
- 'content-type': 'application/json',
440
- };
441
- b.bp("/v2/conversations/whatsapp/get_or_create_channel");
442
- const query = (0, smithy_client_1.map)({
443
- [_u]: [, input[_uI]],
444
- });
445
- let body;
446
- body = JSON.stringify((0, smithy_client_1.take)(input, {
447
- 'outgoing': [],
448
- 'recipientId': [],
449
- 'recipientNumber': [],
450
- 'serviceUri': [],
451
- }));
452
- b.m("POST")
453
- .h(headers)
454
- .q(query)
455
- .b(body);
456
- return b.build();
457
- };
458
- exports.se_GetOrCreateWhatsAppChannelCommand = se_GetOrCreateWhatsAppChannelCommand;
459
- const se_GetSmsChannelIdCommand = async (input, context) => {
460
- const b = (0, core_2.requestBuilder)(input, context);
461
- const headers = {
462
- 'content-type': 'application/json',
463
- };
464
- b.bp("/v2/conversations/sms/get_channel_id");
465
- const query = (0, smithy_client_1.map)({
466
- [_u]: [, input[_uI]],
467
- });
468
- let body;
469
- body = JSON.stringify((0, smithy_client_1.take)(input, {
470
- 'recipientId': [],
471
- 'recipientNumber': [],
472
- 'serviceUri': [],
473
- }));
474
- b.m("POST")
475
- .h(headers)
476
- .q(query)
477
- .b(body);
478
- return b.build();
479
- };
480
- exports.se_GetSmsChannelIdCommand = se_GetSmsChannelIdCommand;
481
- const se_GetTelephonyChannelIdCommand = async (input, context) => {
482
- const b = (0, core_2.requestBuilder)(input, context);
483
- const headers = {
484
- 'content-type': 'application/json',
485
- };
486
- b.bp("/v2/conversations/telephony/get_channel_id");
487
- const query = (0, smithy_client_1.map)({
488
- [_u]: [, input[_uI]],
489
- });
490
- let body;
491
- body = JSON.stringify((0, smithy_client_1.take)(input, {
492
- 'recipientId': [],
493
- 'recipientNumber': [],
494
- 'serviceUri': [],
495
- }));
496
- b.m("POST")
497
- .h(headers)
498
- .q(query)
499
- .b(body);
500
- return b.build();
501
- };
502
- exports.se_GetTelephonyChannelIdCommand = se_GetTelephonyChannelIdCommand;
503
- const se_GetTokenCommand = async (input, context) => {
504
- const b = (0, core_2.requestBuilder)(input, context);
505
- const headers = {};
506
- b.bp("/v2/conversations/token");
507
- const query = (0, smithy_client_1.map)({
508
- [_cI]: [, input[_cI]],
509
- });
510
- let body;
511
- b.m("GET")
512
- .h(headers)
513
- .q(query)
514
- .b(body);
515
- return b.build();
516
- };
517
- exports.se_GetTokenCommand = se_GetTokenCommand;
518
- const se_GetUploadedFileInfoCommand = async (input, context) => {
519
- const b = (0, core_2.requestBuilder)(input, context);
520
- const headers = {};
521
- b.bp("/v2/conversations/channels/{channelId}/files/{fileId}");
522
- b.p('channelId', () => input.channelId, '{channelId}', false);
523
- b.p('fileId', () => input.fileId, '{fileId}', false);
524
- const query = (0, smithy_client_1.map)({
525
- [_c]: [, input[_c]],
526
- });
527
- let body;
528
- b.m("GET")
529
- .h(headers)
530
- .q(query)
531
- .b(body);
532
- return b.build();
533
- };
534
- exports.se_GetUploadedFileInfoCommand = se_GetUploadedFileInfoCommand;
535
- const se_GetWhatsAppChannelIdCommand = async (input, context) => {
536
- const b = (0, core_2.requestBuilder)(input, context);
537
- const headers = {
538
- 'content-type': 'application/json',
539
- };
540
- b.bp("/v2/conversations/whatsapp/get_channel_id");
541
- const query = (0, smithy_client_1.map)({
542
- [_u]: [, input[_uI]],
543
- });
544
- let body;
545
- body = JSON.stringify((0, smithy_client_1.take)(input, {
546
- 'recipientId': [],
547
- 'recipientNumber': [],
548
- 'serviceUri': [],
549
- }));
550
- b.m("POST")
551
- .h(headers)
552
- .q(query)
553
- .b(body);
554
- return b.build();
555
- };
556
- exports.se_GetWhatsAppChannelIdCommand = se_GetWhatsAppChannelIdCommand;
557
- const se_HideChannelCommand = async (input, context) => {
558
- const b = (0, core_2.requestBuilder)(input, context);
559
- const headers = {};
560
- b.bp("/v2/conversations/channels/{channelId}/hide");
561
- b.p('channelId', () => input.channelId, '{channelId}', false);
562
- const query = (0, smithy_client_1.map)({
563
- [_u]: [, input[_uI]],
564
- });
565
- let body;
566
- b.m("POST")
567
- .h(headers)
568
- .q(query)
569
- .b(body);
570
- return b.build();
571
- };
572
- exports.se_HideChannelCommand = se_HideChannelCommand;
573
- const se_InviteCommand = async (input, context) => {
574
- const b = (0, core_2.requestBuilder)(input, context);
575
- const headers = {
576
- 'content-type': 'application/json',
577
- };
578
- b.bp("/v2/conversations/invite");
579
- const query = (0, smithy_client_1.map)({
580
- [_co]: [, input[_cIo]],
581
- });
582
- let body;
583
- body = JSON.stringify((0, smithy_client_1.take)(input, {
584
- 'invitees': _ => (0, smithy_client_1._json)(_),
585
- }));
586
- b.m("POST")
587
- .h(headers)
588
- .q(query)
589
- .b(body);
590
- return b.build();
591
- };
592
- exports.se_InviteCommand = se_InviteCommand;
593
- const se_JoinChannelCommand = async (input, context) => {
594
- const b = (0, core_2.requestBuilder)(input, context);
595
- const headers = {
596
- 'content-type': 'application/json',
597
- };
598
- b.bp("/v2/conversations/channels/{channelId}/join");
599
- b.p('channelId', () => input.channelId, '{channelId}', false);
600
- const query = (0, smithy_client_1.map)({
601
- [_u]: [, input[_uI]],
602
- });
603
- let body;
604
- body = JSON.stringify((0, smithy_client_1.take)(input, {
605
- 'silent': [],
606
- }));
607
- b.m("POST")
608
- .h(headers)
609
- .q(query)
610
- .b(body);
611
- return b.build();
612
- };
613
- exports.se_JoinChannelCommand = se_JoinChannelCommand;
614
- const se_LeaveChannelCommand = async (input, context) => {
615
- const b = (0, core_2.requestBuilder)(input, context);
616
- const headers = {
617
- 'content-type': 'application/json',
618
- };
619
- b.bp("/v2/conversations/channels/{channelId}/leave");
620
- b.p('channelId', () => input.channelId, '{channelId}', false);
621
- const query = (0, smithy_client_1.map)({
622
- [_u]: [, input[_uI]],
623
- });
624
- let body;
625
- body = JSON.stringify((0, smithy_client_1.take)(input, {
626
- 'silent': [],
627
- }));
628
- b.m("POST")
629
- .h(headers)
630
- .q(query)
631
- .b(body);
632
- return b.build();
633
- };
634
- exports.se_LeaveChannelCommand = se_LeaveChannelCommand;
635
- const se_ListChannelMembersCommand = async (input, context) => {
636
- const b = (0, core_2.requestBuilder)(input, context);
637
- const headers = {};
638
- b.bp("/v2/conversations/channels/{channelId}/members");
639
- b.p('channelId', () => input.channelId, '{channelId}', false);
640
- const query = (0, smithy_client_1.map)({
641
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
642
- [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
643
- });
644
- let body;
645
- b.m("GET")
646
- .h(headers)
647
- .q(query)
648
- .b(body);
649
- return b.build();
650
- };
651
- exports.se_ListChannelMembersCommand = se_ListChannelMembersCommand;
652
- const se_ListChannelMembersReadStatusCommand = async (input, context) => {
653
- const b = (0, core_2.requestBuilder)(input, context);
654
- const headers = {};
655
- b.bp("/v2/conversations/channels/{channelId}/read");
656
- b.p('channelId', () => input.channelId, '{channelId}', false);
657
- let body;
658
- b.m("GET")
659
- .h(headers)
660
- .b(body);
661
- return b.build();
662
- };
663
- exports.se_ListChannelMembersReadStatusCommand = se_ListChannelMembersReadStatusCommand;
664
- const se_ListChannelsCommand = async (input, context) => {
665
- const b = (0, core_2.requestBuilder)(input, context);
666
- const headers = {};
667
- b.bp("/v2/conversations/channels");
668
- const query = (0, smithy_client_1.map)({
669
- [_co]: [, input[_cIo]],
670
- [_u]: [, input[_uI]],
671
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
672
- [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
673
- });
674
- let body;
675
- b.m("GET")
676
- .h(headers)
677
- .q(query)
678
- .b(body);
679
- return b.build();
680
- };
681
- exports.se_ListChannelsCommand = se_ListChannelsCommand;
682
- const se_ListInboxTaggedChannelsCommand = async (input, context) => {
683
- const b = (0, core_2.requestBuilder)(input, context);
684
- const headers = {};
685
- b.bp("/v2/conversations/inbox/tags/{tagId}");
686
- b.p('tagId', () => input.tagId, '{tagId}', false);
687
- const query = (0, smithy_client_1.map)({
688
- [_u]: [, input[_uI]],
689
- });
690
- let body;
691
- b.m("GET")
692
- .h(headers)
693
- .q(query)
694
- .b(body);
695
- return b.build();
696
- };
697
- exports.se_ListInboxTaggedChannelsCommand = se_ListInboxTaggedChannelsCommand;
698
- const se_ListInboxTagsCommand = async (input, context) => {
699
- const b = (0, core_2.requestBuilder)(input, context);
700
- const headers = {};
701
- b.bp("/v2/conversations/inbox/tags");
702
- const query = (0, smithy_client_1.map)({
703
- [_u]: [, input[_uI]],
704
- });
705
- let body;
706
- b.m("GET")
707
- .h(headers)
708
- .q(query)
709
- .b(body);
710
- return b.build();
711
- };
712
- exports.se_ListInboxTagsCommand = se_ListInboxTagsCommand;
713
- const se_ListMessageReactionsCommand = async (input, context) => {
714
- const b = (0, core_2.requestBuilder)(input, context);
715
- const headers = {};
716
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions");
717
- b.p('channelId', () => input.channelId, '{channelId}', false);
718
- b.p('messageId', () => input.messageId, '{messageId}', false);
719
- const query = (0, smithy_client_1.map)({
720
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
721
- [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
722
- });
723
- let body;
724
- b.m("GET")
725
- .h(headers)
726
- .q(query)
727
- .b(body);
728
- return b.build();
729
- };
730
- exports.se_ListMessageReactionsCommand = se_ListMessageReactionsCommand;
731
- const se_ListMessagesCommand = async (input, context) => {
732
- const b = (0, core_2.requestBuilder)(input, context);
733
- const headers = {};
734
- b.bp("/v2/conversations/channels/{channelId}/messages");
735
- b.p('channelId', () => input.channelId, '{channelId}', false);
736
- const query = (0, smithy_client_1.map)({
737
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
738
- [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
739
- });
740
- let body;
741
- b.m("GET")
742
- .h(headers)
743
- .q(query)
744
- .b(body);
745
- return b.build();
746
- };
747
- exports.se_ListMessagesCommand = se_ListMessagesCommand;
748
- const se_ListPinnedMessagesCommand = async (input, context) => {
749
- const b = (0, core_2.requestBuilder)(input, context);
750
- const headers = {};
751
- b.bp("/v2/conversations/channels/{channelId}/pinned_messages");
752
- b.p('channelId', () => input.channelId, '{channelId}', false);
753
- const query = (0, smithy_client_1.map)({
754
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
755
- [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
756
- });
757
- let body;
758
- b.m("GET")
759
- .h(headers)
760
- .q(query)
761
- .b(body);
762
- return b.build();
763
- };
764
- exports.se_ListPinnedMessagesCommand = se_ListPinnedMessagesCommand;
765
- const se_MarkReadCommand = async (input, context) => {
766
- const b = (0, core_2.requestBuilder)(input, context);
767
- const headers = {};
768
- b.bp("/v2/conversations/channels/{channelId}/read");
769
- b.p('channelId', () => input.channelId, '{channelId}', false);
770
- const query = (0, smithy_client_1.map)({
771
- [_u]: [, input[_uI]],
772
- });
773
- let body;
774
- b.m("POST")
775
- .h(headers)
776
- .q(query)
777
- .b(body);
778
- return b.build();
779
- };
780
- exports.se_MarkReadCommand = se_MarkReadCommand;
781
- const se_MarkUnreadCommand = async (input, context) => {
782
- const b = (0, core_2.requestBuilder)(input, context);
783
- const headers = {
784
- 'content-type': 'application/json',
785
- };
786
- b.bp("/v2/conversations/channels/{channelId}/unread");
787
- b.p('channelId', () => input.channelId, '{channelId}', false);
788
- const query = (0, smithy_client_1.map)({
789
- [_u]: [, input[_uI]],
790
- [_f]: [() => input.force !== void 0, () => (input[_f].toString())],
791
- });
792
- let body;
793
- body = JSON.stringify((0, smithy_client_1.take)(input, {
794
- 'messageId': [],
795
- }));
796
- b.m("PUT")
797
- .h(headers)
798
- .q(query)
799
- .b(body);
800
- return b.build();
801
- };
802
- exports.se_MarkUnreadCommand = se_MarkUnreadCommand;
803
- const se_PartialUpdateChannelCommand = async (input, context) => {
804
- const b = (0, core_2.requestBuilder)(input, context);
805
- const headers = {
806
- 'content-type': 'application/json',
807
- };
808
- b.bp("/v2/conversations/channels/{channelId}");
809
- b.p('channelId', () => input.channelId, '{channelId}', false);
810
- const query = (0, smithy_client_1.map)({
811
- [_u]: [, input[_uI]],
812
- });
813
- let body;
814
- body = JSON.stringify((0, smithy_client_1.take)(input, {
815
- 'set': _ => (0, smithy_client_1._json)(_),
816
- 'silent': [],
817
- 'unset': _ => (0, smithy_client_1._json)(_),
818
- }));
819
- b.m("PATCH")
820
- .h(headers)
821
- .q(query)
822
- .b(body);
823
- return b.build();
824
- };
825
- exports.se_PartialUpdateChannelCommand = se_PartialUpdateChannelCommand;
826
- const se_PartialUpdateMessageCommand = async (input, context) => {
827
- const b = (0, core_2.requestBuilder)(input, context);
828
- const headers = {
829
- 'content-type': 'application/json',
830
- };
831
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
832
- b.p('channelId', () => input.channelId, '{channelId}', false);
833
- b.p('messageId', () => input.messageId, '{messageId}', false);
834
- const query = (0, smithy_client_1.map)({
835
- [_u]: [, input[_uI]],
836
- });
837
- let body;
838
- body = JSON.stringify((0, smithy_client_1.take)(input, {
839
- 'set': _ => (0, smithy_client_1._json)(_),
840
- 'silent': [],
841
- 'unset': _ => (0, smithy_client_1._json)(_),
842
- }));
843
- b.m("PATCH")
844
- .h(headers)
845
- .q(query)
846
- .b(body);
847
- return b.build();
848
- };
849
- exports.se_PartialUpdateMessageCommand = se_PartialUpdateMessageCommand;
850
- const se_PinChannelCommand = async (input, context) => {
851
- const b = (0, core_2.requestBuilder)(input, context);
852
- const headers = {};
853
- b.bp("/v2/conversations/channels/{channelId}/pin");
854
- b.p('channelId', () => input.channelId, '{channelId}', false);
855
- const query = (0, smithy_client_1.map)({
856
- [_u]: [, input[_uI]],
857
- [_f]: [() => input.force !== void 0, () => (input[_f].toString())],
858
- });
859
- let body;
860
- b.m("POST")
861
- .h(headers)
862
- .q(query)
863
- .b(body);
864
- return b.build();
865
- };
866
- exports.se_PinChannelCommand = se_PinChannelCommand;
867
- const se_PinMessageCommand = async (input, context) => {
868
- const b = (0, core_2.requestBuilder)(input, context);
869
- const headers = {
870
- 'content-type': 'application/json',
871
- };
872
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/pin");
873
- b.p('channelId', () => input.channelId, '{channelId}', false);
874
- b.p('messageId', () => input.messageId, '{messageId}', false);
875
- const query = (0, smithy_client_1.map)({
876
- [_u]: [, input[_uI]],
877
- });
878
- let body;
879
- body = JSON.stringify((0, smithy_client_1.take)(input, {
880
- 'expiresAfter': [],
881
- 'expiresAt': [],
882
- 'silent': [],
883
- }));
884
- b.m("PUT")
885
- .h(headers)
886
- .q(query)
887
- .b(body);
888
- return b.build();
889
- };
890
- exports.se_PinMessageCommand = se_PinMessageCommand;
891
- const se_QueryChannelsCommand = async (input, context) => {
892
- const b = (0, core_2.requestBuilder)(input, context);
893
- const headers = {
894
- 'content-type': 'application/json',
895
- };
896
- b.bp("/v2/conversations/query-channels");
897
- const query = (0, smithy_client_1.map)({
898
- [_co]: [, input[_cIo]],
899
- [_u]: [, input[_uI]],
900
- [_l]: [() => input.limit !== void 0, () => (input[_l].toString())],
901
- [_o]: [() => input.offset !== void 0, () => (input[_o].toString())],
902
- });
903
- let body;
904
- body = JSON.stringify((0, smithy_client_1.take)(input, {
905
- 'query': _ => (0, smithy_client_1._json)(_),
906
- }));
907
- b.m("POST")
908
- .h(headers)
909
- .q(query)
910
- .b(body);
911
- return b.build();
912
- };
913
- exports.se_QueryChannelsCommand = se_QueryChannelsCommand;
914
- const se_ScheduleExternalFlagAdjustmentJobCommand = async (input, context) => {
915
- const b = (0, core_2.requestBuilder)(input, context);
916
- const headers = {
917
- 'content-type': 'application/json',
918
- };
919
- b.bp("/v2/conversations/schedule_external_flag_adjustment_job");
920
- let body;
921
- body = JSON.stringify((0, smithy_client_1.take)(input, {
922
- 'userId': [],
923
- }));
924
- b.m("POST")
925
- .h(headers)
926
- .b(body);
927
- return b.build();
928
- };
929
- exports.se_ScheduleExternalFlagAdjustmentJobCommand = se_ScheduleExternalFlagAdjustmentJobCommand;
930
- const se_SendActionTriggerResultCommand = async (input, context) => {
931
- const b = (0, core_2.requestBuilder)(input, context);
932
- const headers = {
933
- 'content-type': 'application/json',
934
- };
935
- b.bp("/v2/conversations/triggers/{triggerId}/result");
936
- b.p('triggerId', () => input.triggerId, '{triggerId}', false);
937
- let body;
938
- body = JSON.stringify((0, smithy_client_1.take)(input, {
939
- 'result': _ => (0, smithy_client_1._json)(_),
940
- 'status': [],
941
- }));
942
- b.m("POST")
943
- .h(headers)
944
- .b(body);
945
- return b.build();
946
- };
947
- exports.se_SendActionTriggerResultCommand = se_SendActionTriggerResultCommand;
948
- const se_SendGiphyCommand = async (input, context) => {
949
- const b = (0, core_2.requestBuilder)(input, context);
950
- const headers = {
951
- 'content-type': 'application/json',
952
- };
953
- b.bp("/v2/conversations/channels/{channelId}/send_giphy");
954
- b.p('channelId', () => input.channelId, '{channelId}', false);
955
- const query = (0, smithy_client_1.map)({
956
- [_u]: [, input[_uI]],
957
- });
958
- let body;
959
- body = JSON.stringify((0, smithy_client_1.take)(input, {
960
- 'giphy': _ => (0, smithy_client_1._json)(_),
961
- 'messageId': [],
962
- }));
963
- b.m("POST")
964
- .h(headers)
965
- .q(query)
966
- .b(body);
967
- return b.build();
968
- };
969
- exports.se_SendGiphyCommand = se_SendGiphyCommand;
970
- const se_SendMessageCommand = async (input, context) => {
971
- const b = (0, core_2.requestBuilder)(input, context);
972
- const headers = {
973
- 'content-type': 'application/json',
974
- };
975
- b.bp("/v2/conversations/channels/{channelId}/messages");
976
- b.p('channelId', () => input.channelId, '{channelId}', false);
977
- const query = (0, smithy_client_1.map)({
978
- [_u]: [, input[_uI]],
979
- });
980
- let body;
981
- body = JSON.stringify((0, smithy_client_1.take)(input, {
982
- 'attachments': _ => (0, smithy_client_1._json)(_),
983
- 'elements': _ => (0, smithy_client_1._json)(_),
984
- 'forward': _ => (0, smithy_client_1._json)(_),
985
- 'markdown': [],
986
- 'mentions': _ => (0, smithy_client_1._json)(_),
987
- 'messageId': [],
988
- 'quote': _ => (0, smithy_client_1._json)(_),
989
- 'sms': [],
990
- 'smsStatus': [],
991
- 'text': [],
992
- 'whatsapp': [],
993
- 'whatsappStatus': [],
994
- }));
995
- b.m("POST")
996
- .h(headers)
997
- .q(query)
998
- .b(body);
999
- return b.build();
1000
- };
1001
- exports.se_SendMessageCommand = se_SendMessageCommand;
1002
- const se_SendMessageReactionCommand = async (input, context) => {
1003
- const b = (0, core_2.requestBuilder)(input, context);
1004
- const headers = {
1005
- 'content-type': 'application/json',
1006
- };
1007
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/reactions");
1008
- b.p('channelId', () => input.channelId, '{channelId}', false);
1009
- b.p('messageId', () => input.messageId, '{messageId}', false);
1010
- const query = (0, smithy_client_1.map)({
1011
- [_u]: [, input[_uI]],
1012
- });
1013
- let body;
1014
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1015
- 'reactionType': [],
1016
- }));
1017
- b.m("POST")
1018
- .h(headers)
1019
- .q(query)
1020
- .b(body);
1021
- return b.build();
1022
- };
1023
- exports.se_SendMessageReactionCommand = se_SendMessageReactionCommand;
1024
- const se_SendSystemMessageCommand = async (input, context) => {
1025
- const b = (0, core_2.requestBuilder)(input, context);
1026
- const headers = {
1027
- 'content-type': 'application/json',
1028
- };
1029
- b.bp("/v2/conversations/channels/{channelId}/system-messages");
1030
- b.p('channelId', () => input.channelId, '{channelId}', false);
1031
- let body;
1032
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1033
- 'message': _ => (0, smithy_client_1._json)(_),
1034
- 'userId': [],
1035
- }));
1036
- b.m("POST")
1037
- .h(headers)
1038
- .b(body);
1039
- return b.build();
1040
- };
1041
- exports.se_SendSystemMessageCommand = se_SendSystemMessageCommand;
1042
- const se_SendTypingStartCommand = async (input, context) => {
1043
- const b = (0, core_2.requestBuilder)(input, context);
1044
- const headers = {};
1045
- b.bp("/v2/conversations/channels/{channelId}/send_typing_start");
1046
- b.p('channelId', () => input.channelId, '{channelId}', false);
1047
- const query = (0, smithy_client_1.map)({
1048
- [_u]: [, input[_uI]],
1049
- });
1050
- let body;
1051
- b.m("POST")
1052
- .h(headers)
1053
- .q(query)
1054
- .b(body);
1055
- return b.build();
1056
- };
1057
- exports.se_SendTypingStartCommand = se_SendTypingStartCommand;
1058
- const se_SendTypingStopCommand = async (input, context) => {
1059
- const b = (0, core_2.requestBuilder)(input, context);
1060
- const headers = {};
1061
- b.bp("/v2/conversations/channels/{channelId}/send_typing_stop");
1062
- b.p('channelId', () => input.channelId, '{channelId}', false);
1063
- const query = (0, smithy_client_1.map)({
1064
- [_u]: [, input[_uI]],
1065
- });
1066
- let body;
1067
- b.m("POST")
1068
- .h(headers)
1069
- .q(query)
1070
- .b(body);
1071
- return b.build();
1072
- };
1073
- exports.se_SendTypingStopCommand = se_SendTypingStopCommand;
1074
- const se_ShowChannelCommand = async (input, context) => {
1075
- const b = (0, core_2.requestBuilder)(input, context);
1076
- const headers = {};
1077
- b.bp("/v2/conversations/channels/{channelId}/show");
1078
- b.p('channelId', () => input.channelId, '{channelId}', false);
1079
- const query = (0, smithy_client_1.map)({
1080
- [_u]: [, input[_uI]],
1081
- });
1082
- let body;
1083
- b.m("POST")
1084
- .h(headers)
1085
- .q(query)
1086
- .b(body);
1087
- return b.build();
1088
- };
1089
- exports.se_ShowChannelCommand = se_ShowChannelCommand;
1090
- const se_TagChannelCommand = async (input, context) => {
1091
- const b = (0, core_2.requestBuilder)(input, context);
1092
- const headers = {};
1093
- b.bp("/v2/conversations/channels/{channelId}/tags/{tagId}");
1094
- b.p('channelId', () => input.channelId, '{channelId}', false);
1095
- b.p('tagId', () => input.tagId, '{tagId}', false);
1096
- const query = (0, smithy_client_1.map)({
1097
- [_u]: [, input[_uI]],
1098
- [_f]: [() => input.force !== void 0, () => (input[_f].toString())],
1099
- });
1100
- let body;
1101
- b.m("PUT")
1102
- .h(headers)
1103
- .q(query)
1104
- .b(body);
1105
- return b.build();
1106
- };
1107
- exports.se_TagChannelCommand = se_TagChannelCommand;
1108
- const se_TriggerMessageActionCommand = async (input, context) => {
1109
- const b = (0, core_2.requestBuilder)(input, context);
1110
- const headers = {};
1111
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/actions/{actionId}/trigger");
1112
- b.p('channelId', () => input.channelId, '{channelId}', false);
1113
- b.p('messageId', () => input.messageId, '{messageId}', false);
1114
- b.p('actionId', () => input.actionId, '{actionId}', false);
1115
- const query = (0, smithy_client_1.map)({
1116
- [_u]: [, input[_uI]],
1117
- });
1118
- let body;
1119
- b.m("POST")
1120
- .h(headers)
1121
- .q(query)
1122
- .b(body);
1123
- return b.build();
1124
- };
1125
- exports.se_TriggerMessageActionCommand = se_TriggerMessageActionCommand;
1126
- const se_UnpinChannelCommand = async (input, context) => {
1127
- const b = (0, core_2.requestBuilder)(input, context);
1128
- const headers = {};
1129
- b.bp("/v2/conversations/channels/{channelId}/pin");
1130
- b.p('channelId', () => input.channelId, '{channelId}', false);
1131
- const query = (0, smithy_client_1.map)({
1132
- [_u]: [, input[_uI]],
1133
- });
1134
- let body;
1135
- b.m("DELETE")
1136
- .h(headers)
1137
- .q(query)
1138
- .b(body);
1139
- return b.build();
1140
- };
1141
- exports.se_UnpinChannelCommand = se_UnpinChannelCommand;
1142
- const se_UnpinMessageCommand = async (input, context) => {
1143
- const b = (0, core_2.requestBuilder)(input, context);
1144
- const headers = {};
1145
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}/pin");
1146
- b.p('channelId', () => input.channelId, '{channelId}', false);
1147
- b.p('messageId', () => input.messageId, '{messageId}', false);
1148
- const query = (0, smithy_client_1.map)({
1149
- [_u]: [, input[_uI]],
1150
- [_s]: [() => input.silent !== void 0, () => (input[_s].toString())],
1151
- });
1152
- let body;
1153
- b.m("DELETE")
1154
- .h(headers)
1155
- .q(query)
1156
- .b(body);
1157
- return b.build();
1158
- };
1159
- exports.se_UnpinMessageCommand = se_UnpinMessageCommand;
1160
- const se_UntagChannelCommand = async (input, context) => {
1161
- const b = (0, core_2.requestBuilder)(input, context);
1162
- const headers = {
1163
- 'content-type': 'application/json',
1164
- };
1165
- b.bp("/v2/conversations/channels/{channelId}/untag");
1166
- b.p('channelId', () => input.channelId, '{channelId}', false);
1167
- const query = (0, smithy_client_1.map)({
1168
- [_u]: [, input[_uI]],
1169
- });
1170
- let body;
1171
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1172
- 'tagId': [],
1173
- }));
1174
- b.m("POST")
1175
- .h(headers)
1176
- .q(query)
1177
- .b(body);
1178
- return b.build();
1179
- };
1180
- exports.se_UntagChannelCommand = se_UntagChannelCommand;
1181
- const se_UpdateChannelCommand = async (input, context) => {
1182
- const b = (0, core_2.requestBuilder)(input, context);
1183
- const headers = {
1184
- 'content-type': 'application/json',
1185
- };
1186
- b.bp("/v2/conversations/channels/{channelId}");
1187
- b.p('channelId', () => input.channelId, '{channelId}', false);
1188
- const query = (0, smithy_client_1.map)({
1189
- [_u]: [, input[_uI]],
1190
- });
1191
- let body;
1192
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1193
- 'access': [],
1194
- 'assignee': _ => (0, smithy_client_1._json)(_),
1195
- 'autoRecord': [],
1196
- 'broadcast': [],
1197
- 'context': _ => (0, smithy_client_1._json)(_),
1198
- 'description': [],
1199
- 'kiteAssign': [],
1200
- 'mms': [],
1201
- 'picture': [],
1202
- 'pictureColor': [],
1203
- 'serviceTitle': [],
1204
- 'silent': [],
1205
- 'sms': [],
1206
- 'subject': [],
1207
- 'transcriptionLanguage': [],
1208
- 'whatsapp': [],
1209
- 'whatsappStatus': [],
1210
- 'wizyGuestViewOnly': [],
1211
- }));
1212
- b.m("PUT")
1213
- .h(headers)
1214
- .q(query)
1215
- .b(body);
1216
- return b.build();
1217
- };
1218
- exports.se_UpdateChannelCommand = se_UpdateChannelCommand;
1219
- const se_UpdateInboxTagCommand = async (input, context) => {
1220
- const b = (0, core_2.requestBuilder)(input, context);
1221
- const headers = {
1222
- 'content-type': 'application/json',
1223
- };
1224
- b.bp("/v2/conversations/inbox/tags/{tagId}");
1225
- b.p('tagId', () => input.tagId, '{tagId}', false);
1226
- const query = (0, smithy_client_1.map)({
1227
- [_u]: [, input[_uI]],
1228
- });
1229
- let body;
1230
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1231
- 'name': [],
1232
- }));
1233
- b.m("PUT")
1234
- .h(headers)
1235
- .q(query)
1236
- .b(body);
1237
- return b.build();
1238
- };
1239
- exports.se_UpdateInboxTagCommand = se_UpdateInboxTagCommand;
1240
- const se_UpdateMessageCommand = async (input, context) => {
1241
- const b = (0, core_2.requestBuilder)(input, context);
1242
- const headers = {
1243
- 'content-type': 'application/json',
1244
- };
1245
- b.bp("/v2/conversations/channels/{channelId}/messages/{messageId}");
1246
- b.p('messageId', () => input.messageId, '{messageId}', false);
1247
- b.p('channelId', () => input.channelId, '{channelId}', false);
1248
- const query = (0, smithy_client_1.map)({
1249
- [_u]: [, input[_uI]],
1250
- });
1251
- let body;
1252
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1253
- 'attachments': _ => (0, smithy_client_1._json)(_),
1254
- 'elements': _ => (0, smithy_client_1._json)(_),
1255
- 'forward': _ => (0, smithy_client_1._json)(_),
1256
- 'markdown': [],
1257
- 'mentions': _ => (0, smithy_client_1._json)(_),
1258
- 'quote': _ => (0, smithy_client_1._json)(_),
1259
- 'silent': [],
1260
- 'sms': [],
1261
- 'smsStatus': [],
1262
- 'text': [],
1263
- 'whatsapp': [],
1264
- 'whatsappStatus': [],
1265
- }));
1266
- b.m("PUT")
1267
- .h(headers)
1268
- .q(query)
1269
- .b(body);
1270
- return b.build();
1271
- };
1272
- exports.se_UpdateMessageCommand = se_UpdateMessageCommand;
1273
- const se_UploadFileCommand = async (input, context) => {
1274
- const b = (0, core_2.requestBuilder)(input, context);
1275
- const headers = {
1276
- 'content-type': 'application/json',
1277
- };
1278
- b.bp("/v2/conversations/channels/{channelId}/files");
1279
- b.p('channelId', () => input.channelId, '{channelId}', false);
1280
- const query = (0, smithy_client_1.map)({
1281
- [_u]: [, input[_uI]],
1282
- });
1283
- let body;
1284
- body = JSON.stringify((0, smithy_client_1.take)(input, {
1285
- 'name': [],
1286
- 'options': _ => (0, smithy_client_1._json)(_),
1287
- }));
1288
- b.m("POST")
1289
- .h(headers)
1290
- .q(query)
1291
- .b(body);
1292
- return b.build();
1293
- };
1294
- exports.se_UploadFileCommand = se_UploadFileCommand;
1295
- const de_AddChannelMemberCommand = async (output, context) => {
1296
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1297
- return de_CommandError(output, context);
1298
- }
1299
- const contents = (0, smithy_client_1.map)({
1300
- $metadata: deserializeMetadata(output),
1301
- });
1302
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1303
- const doc = (0, smithy_client_1.take)(data, {
1304
- 'member': smithy_client_1._json,
1305
- 'user': smithy_client_1._json,
1306
- });
1307
- Object.assign(contents, doc);
1308
- return contents;
1309
- };
1310
- exports.de_AddChannelMemberCommand = de_AddChannelMemberCommand;
1311
- const de_AddChannelMembersCommand = async (output, context) => {
1312
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1313
- return de_CommandError(output, context);
1314
- }
1315
- const contents = (0, smithy_client_1.map)({
1316
- $metadata: deserializeMetadata(output),
1317
- });
1318
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1319
- const doc = (0, smithy_client_1.take)(data, {
1320
- 'members': smithy_client_1._json,
1321
- 'skippedMembers': smithy_client_1._json,
1322
- 'users': smithy_client_1._json,
1323
- });
1324
- Object.assign(contents, doc);
1325
- return contents;
1326
- };
1327
- exports.de_AddChannelMembersCommand = de_AddChannelMembersCommand;
1328
- const de_AssignChannelCommand = async (output, context) => {
1329
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1330
- return de_CommandError(output, context);
1331
- }
1332
- const contents = (0, smithy_client_1.map)({
1333
- $metadata: deserializeMetadata(output),
1334
- });
1335
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1336
- const doc = (0, smithy_client_1.take)(data, {
1337
- 'assignee': smithy_client_1._json,
1338
- 'service': smithy_client_1._json,
1339
- });
1340
- Object.assign(contents, doc);
1341
- return contents;
1342
- };
1343
- exports.de_AssignChannelCommand = de_AssignChannelCommand;
1344
- const de_CreateGroupChannelCommand = async (output, context) => {
1345
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1346
- return de_CommandError(output, context);
1347
- }
1348
- const contents = (0, smithy_client_1.map)({
1349
- $metadata: deserializeMetadata(output),
1350
- });
1351
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1352
- const doc = (0, smithy_client_1.take)(data, {
1353
- 'channel': smithy_client_1._json,
1354
- });
1355
- Object.assign(contents, doc);
1356
- return contents;
1357
- };
1358
- exports.de_CreateGroupChannelCommand = de_CreateGroupChannelCommand;
1359
- const de_CreateInboxTagCommand = async (output, context) => {
1360
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1361
- return de_CommandError(output, context);
1362
- }
1363
- const contents = (0, smithy_client_1.map)({
1364
- $metadata: deserializeMetadata(output),
1365
- });
1366
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1367
- const doc = (0, smithy_client_1.take)(data, {
1368
- 'tag': smithy_client_1._json,
1369
- });
1370
- Object.assign(contents, doc);
1371
- return contents;
1372
- };
1373
- exports.de_CreateInboxTagCommand = de_CreateInboxTagCommand;
1374
- const de_CreateKiteChannelCommand = async (output, context) => {
1375
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1376
- return de_CommandError(output, context);
1377
- }
1378
- const contents = (0, smithy_client_1.map)({
1379
- $metadata: deserializeMetadata(output),
1380
- });
1381
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1382
- const doc = (0, smithy_client_1.take)(data, {
1383
- 'channel': smithy_client_1._json,
1384
- });
1385
- Object.assign(contents, doc);
1386
- return contents;
1387
- };
1388
- exports.de_CreateKiteChannelCommand = de_CreateKiteChannelCommand;
1389
- const de_DeleteChannelCommand = async (output, context) => {
1390
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1391
- return de_CommandError(output, context);
1392
- }
1393
- const contents = (0, smithy_client_1.map)({
1394
- $metadata: deserializeMetadata(output),
1395
- });
1396
- await (0, smithy_client_1.collectBody)(output.body, context);
1397
- return contents;
1398
- };
1399
- exports.de_DeleteChannelCommand = de_DeleteChannelCommand;
1400
- const de_DeleteChannelMemberCommand = async (output, context) => {
1401
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1402
- return de_CommandError(output, context);
1403
- }
1404
- const contents = (0, smithy_client_1.map)({
1405
- $metadata: deserializeMetadata(output),
1406
- });
1407
- await (0, smithy_client_1.collectBody)(output.body, context);
1408
- return contents;
1409
- };
1410
- exports.de_DeleteChannelMemberCommand = de_DeleteChannelMemberCommand;
1411
- const de_DeleteInboxTagCommand = async (output, context) => {
1412
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1413
- return de_CommandError(output, context);
1414
- }
1415
- const contents = (0, smithy_client_1.map)({
1416
- $metadata: deserializeMetadata(output),
1417
- });
1418
- await (0, smithy_client_1.collectBody)(output.body, context);
1419
- return contents;
1420
- };
1421
- exports.de_DeleteInboxTagCommand = de_DeleteInboxTagCommand;
1422
- const de_DeleteMessageCommand = async (output, context) => {
1423
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1424
- return de_CommandError(output, context);
1425
- }
1426
- const contents = (0, smithy_client_1.map)({
1427
- $metadata: deserializeMetadata(output),
1428
- });
1429
- await (0, smithy_client_1.collectBody)(output.body, context);
1430
- return contents;
1431
- };
1432
- exports.de_DeleteMessageCommand = de_DeleteMessageCommand;
1433
- const de_DeleteMessageReactionCommand = async (output, context) => {
1434
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1435
- return de_CommandError(output, context);
1436
- }
1437
- const contents = (0, smithy_client_1.map)({
1438
- $metadata: deserializeMetadata(output),
1439
- });
1440
- await (0, smithy_client_1.collectBody)(output.body, context);
1441
- return contents;
1442
- };
1443
- exports.de_DeleteMessageReactionCommand = de_DeleteMessageReactionCommand;
1444
- const de_DescribeEventCommand = async (output, context) => {
1445
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1446
- return de_CommandError(output, context);
1447
- }
1448
- const contents = (0, smithy_client_1.map)({
1449
- $metadata: deserializeMetadata(output),
1450
- });
1451
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1452
- const doc = (0, smithy_client_1.take)(data, {
1453
- 'WebhookChatActionTriggeredEvent': smithy_client_1._json,
1454
- 'WebhookChatChannelCreatedEvent': smithy_client_1._json,
1455
- 'WebhookChatChannelUpdatedEvent': smithy_client_1._json,
1456
- 'WebhookChatMemberAddedEvent': smithy_client_1._json,
1457
- 'WebhookChatMemberRemovedEvent': smithy_client_1._json,
1458
- 'WebhookChatMessageDeletedEvent': smithy_client_1._json,
1459
- 'WebhookChatMessageNewEvent': smithy_client_1._json,
1460
- 'WebhookChatMessageUpdatedEvent': smithy_client_1._json,
1461
- 'WebhookChatReactionDeletedEvent': smithy_client_1._json,
1462
- 'WebhookChatReactionNewEvent': smithy_client_1._json,
1463
- });
1464
- Object.assign(contents, doc);
1465
- return contents;
1466
- };
1467
- exports.de_DescribeEventCommand = de_DescribeEventCommand;
1468
- const de_GetActionTriggerResultCommand = async (output, context) => {
1469
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1470
- return de_CommandError(output, context);
1471
- }
1472
- const contents = (0, smithy_client_1.map)({
1473
- $metadata: deserializeMetadata(output),
1474
- });
1475
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1476
- const doc = (0, smithy_client_1.take)(data, {
1477
- 'result': smithy_client_1._json,
1478
- 'status': smithy_client_1.expectString,
1479
- });
1480
- Object.assign(contents, doc);
1481
- return contents;
1482
- };
1483
- exports.de_GetActionTriggerResultCommand = de_GetActionTriggerResultCommand;
1484
- const de_GetChannelCommand = async (output, context) => {
1485
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1486
- return de_CommandError(output, context);
1487
- }
1488
- const contents = (0, smithy_client_1.map)({
1489
- $metadata: deserializeMetadata(output),
1490
- });
1491
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1492
- const doc = (0, smithy_client_1.take)(data, {
1493
- 'channel': smithy_client_1._json,
1494
- });
1495
- Object.assign(contents, doc);
1496
- return contents;
1497
- };
1498
- exports.de_GetChannelCommand = de_GetChannelCommand;
1499
- const de_GetChannelMemberCommand = async (output, context) => {
1500
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1501
- return de_CommandError(output, context);
1502
- }
1503
- const contents = (0, smithy_client_1.map)({
1504
- $metadata: deserializeMetadata(output),
1505
- });
1506
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1507
- const doc = (0, smithy_client_1.take)(data, {
1508
- 'member': smithy_client_1._json,
1509
- 'user': smithy_client_1._json,
1510
- });
1511
- Object.assign(contents, doc);
1512
- return contents;
1513
- };
1514
- exports.de_GetChannelMemberCommand = de_GetChannelMemberCommand;
1515
- const de_GetDirectChannelIdCommand = async (output, context) => {
1516
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1517
- return de_CommandError(output, context);
1518
- }
1519
- const contents = (0, smithy_client_1.map)({
1520
- $metadata: deserializeMetadata(output),
1521
- });
1522
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1523
- const doc = (0, smithy_client_1.take)(data, {
1524
- 'channelId': smithy_client_1.expectString,
1525
- });
1526
- Object.assign(contents, doc);
1527
- return contents;
1528
- };
1529
- exports.de_GetDirectChannelIdCommand = de_GetDirectChannelIdCommand;
1530
- const de_GetFilePresignedDownloadUrlCommand = async (output, context) => {
1531
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1532
- return de_CommandError(output, context);
1533
- }
1534
- const contents = (0, smithy_client_1.map)({
1535
- $metadata: deserializeMetadata(output),
1536
- });
1537
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1538
- const doc = (0, smithy_client_1.take)(data, {
1539
- 'presignedDownloadUrl': smithy_client_1.expectString,
1540
- });
1541
- Object.assign(contents, doc);
1542
- return contents;
1543
- };
1544
- exports.de_GetFilePresignedDownloadUrlCommand = de_GetFilePresignedDownloadUrlCommand;
1545
- const de_GetInboxStateCommand = async (output, context) => {
1546
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1547
- return de_CommandError(output, context);
1548
- }
1549
- const contents = (0, smithy_client_1.map)({
1550
- $metadata: deserializeMetadata(output),
1551
- });
1552
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1553
- const doc = (0, smithy_client_1.take)(data, {
1554
- 'channels': smithy_client_1._json,
1555
- 'tags': smithy_client_1._json,
1556
- });
1557
- Object.assign(contents, doc);
1558
- return contents;
1559
- };
1560
- exports.de_GetInboxStateCommand = de_GetInboxStateCommand;
1561
- const de_GetMessageCommand = async (output, context) => {
1562
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1563
- return de_CommandError(output, context);
1564
- }
1565
- const contents = (0, smithy_client_1.map)({
1566
- $metadata: deserializeMetadata(output),
1567
- });
1568
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1569
- const doc = (0, smithy_client_1.take)(data, {
1570
- 'message': smithy_client_1._json,
1571
- });
1572
- Object.assign(contents, doc);
1573
- return contents;
1574
- };
1575
- exports.de_GetMessageCommand = de_GetMessageCommand;
1576
- const de_GetOrCreateDirectChannelCommand = async (output, context) => {
1577
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1578
- return de_CommandError(output, context);
1579
- }
1580
- const contents = (0, smithy_client_1.map)({
1581
- $metadata: deserializeMetadata(output),
1582
- });
1583
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1584
- const doc = (0, smithy_client_1.take)(data, {
1585
- 'channel': smithy_client_1._json,
1586
- });
1587
- Object.assign(contents, doc);
1588
- return contents;
1589
- };
1590
- exports.de_GetOrCreateDirectChannelCommand = de_GetOrCreateDirectChannelCommand;
1591
- const de_GetOrCreateSmsChannelCommand = async (output, context) => {
1592
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1593
- return de_CommandError(output, context);
1594
- }
1595
- const contents = (0, smithy_client_1.map)({
1596
- $metadata: deserializeMetadata(output),
1597
- });
1598
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1599
- const doc = (0, smithy_client_1.take)(data, {
1600
- 'channel': smithy_client_1._json,
1601
- });
1602
- Object.assign(contents, doc);
1603
- return contents;
1604
- };
1605
- exports.de_GetOrCreateSmsChannelCommand = de_GetOrCreateSmsChannelCommand;
1606
- const de_GetOrCreateTelephonyChannelCommand = async (output, context) => {
1607
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1608
- return de_CommandError(output, context);
1609
- }
1610
- const contents = (0, smithy_client_1.map)({
1611
- $metadata: deserializeMetadata(output),
1612
- });
1613
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1614
- const doc = (0, smithy_client_1.take)(data, {
1615
- 'channel': smithy_client_1._json,
1616
- });
1617
- Object.assign(contents, doc);
1618
- return contents;
1619
- };
1620
- exports.de_GetOrCreateTelephonyChannelCommand = de_GetOrCreateTelephonyChannelCommand;
1621
- const de_GetOrCreateWhatsAppChannelCommand = async (output, context) => {
1622
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1623
- return de_CommandError(output, context);
1624
- }
1625
- const contents = (0, smithy_client_1.map)({
1626
- $metadata: deserializeMetadata(output),
1627
- });
1628
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1629
- const doc = (0, smithy_client_1.take)(data, {
1630
- 'channel': smithy_client_1._json,
1631
- });
1632
- Object.assign(contents, doc);
1633
- return contents;
1634
- };
1635
- exports.de_GetOrCreateWhatsAppChannelCommand = de_GetOrCreateWhatsAppChannelCommand;
1636
- const de_GetSmsChannelIdCommand = async (output, context) => {
1637
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1638
- return de_CommandError(output, context);
1639
- }
1640
- const contents = (0, smithy_client_1.map)({
1641
- $metadata: deserializeMetadata(output),
1642
- });
1643
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1644
- const doc = (0, smithy_client_1.take)(data, {
1645
- 'channelId': smithy_client_1.expectString,
1646
- });
1647
- Object.assign(contents, doc);
1648
- return contents;
1649
- };
1650
- exports.de_GetSmsChannelIdCommand = de_GetSmsChannelIdCommand;
1651
- const de_GetTelephonyChannelIdCommand = async (output, context) => {
1652
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1653
- return de_CommandError(output, context);
1654
- }
1655
- const contents = (0, smithy_client_1.map)({
1656
- $metadata: deserializeMetadata(output),
1657
- });
1658
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1659
- const doc = (0, smithy_client_1.take)(data, {
1660
- 'channelId': smithy_client_1.expectString,
1661
- });
1662
- Object.assign(contents, doc);
1663
- return contents;
1664
- };
1665
- exports.de_GetTelephonyChannelIdCommand = de_GetTelephonyChannelIdCommand;
1666
- const de_GetTokenCommand = async (output, context) => {
1667
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1668
- return de_CommandError(output, context);
1669
- }
1670
- const contents = (0, smithy_client_1.map)({
1671
- $metadata: deserializeMetadata(output),
1672
- });
1673
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1674
- const doc = (0, smithy_client_1.take)(data, {
1675
- 'expires': smithy_client_1.expectInt32,
1676
- 'token': smithy_client_1.expectString,
1677
- });
1678
- Object.assign(contents, doc);
1679
- return contents;
1680
- };
1681
- exports.de_GetTokenCommand = de_GetTokenCommand;
1682
- const de_GetUploadedFileInfoCommand = async (output, context) => {
1683
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1684
- return de_CommandError(output, context);
1685
- }
1686
- const contents = (0, smithy_client_1.map)({
1687
- $metadata: deserializeMetadata(output),
1688
- });
1689
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1690
- const doc = (0, smithy_client_1.take)(data, {
1691
- 'file': smithy_client_1._json,
1692
- });
1693
- Object.assign(contents, doc);
1694
- return contents;
1695
- };
1696
- exports.de_GetUploadedFileInfoCommand = de_GetUploadedFileInfoCommand;
1697
- const de_GetWhatsAppChannelIdCommand = async (output, context) => {
1698
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1699
- return de_CommandError(output, context);
1700
- }
1701
- const contents = (0, smithy_client_1.map)({
1702
- $metadata: deserializeMetadata(output),
1703
- });
1704
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1705
- const doc = (0, smithy_client_1.take)(data, {
1706
- 'channelId': smithy_client_1.expectString,
1707
- });
1708
- Object.assign(contents, doc);
1709
- return contents;
1710
- };
1711
- exports.de_GetWhatsAppChannelIdCommand = de_GetWhatsAppChannelIdCommand;
1712
- const de_HideChannelCommand = async (output, context) => {
1713
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1714
- return de_CommandError(output, context);
1715
- }
1716
- const contents = (0, smithy_client_1.map)({
1717
- $metadata: deserializeMetadata(output),
1718
- });
1719
- await (0, smithy_client_1.collectBody)(output.body, context);
1720
- return contents;
1721
- };
1722
- exports.de_HideChannelCommand = de_HideChannelCommand;
1723
- const de_InviteCommand = async (output, context) => {
1724
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1725
- return de_CommandError(output, context);
1726
- }
1727
- const contents = (0, smithy_client_1.map)({
1728
- $metadata: deserializeMetadata(output),
1729
- });
1730
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1731
- const doc = (0, smithy_client_1.take)(data, {
1732
- 'skippedInvitees': smithy_client_1._json,
1733
- 'users': smithy_client_1._json,
1734
- });
1735
- Object.assign(contents, doc);
1736
- return contents;
1737
- };
1738
- exports.de_InviteCommand = de_InviteCommand;
1739
- const de_JoinChannelCommand = async (output, context) => {
1740
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1741
- return de_CommandError(output, context);
1742
- }
1743
- const contents = (0, smithy_client_1.map)({
1744
- $metadata: deserializeMetadata(output),
1745
- });
1746
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1747
- const doc = (0, smithy_client_1.take)(data, {
1748
- 'channel': smithy_client_1._json,
1749
- });
1750
- Object.assign(contents, doc);
1751
- return contents;
1752
- };
1753
- exports.de_JoinChannelCommand = de_JoinChannelCommand;
1754
- const de_LeaveChannelCommand = async (output, context) => {
1755
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1756
- return de_CommandError(output, context);
1757
- }
1758
- const contents = (0, smithy_client_1.map)({
1759
- $metadata: deserializeMetadata(output),
1760
- });
1761
- await (0, smithy_client_1.collectBody)(output.body, context);
1762
- return contents;
1763
- };
1764
- exports.de_LeaveChannelCommand = de_LeaveChannelCommand;
1765
- const de_ListChannelMembersCommand = async (output, context) => {
1766
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1767
- return de_CommandError(output, context);
1768
- }
1769
- const contents = (0, smithy_client_1.map)({
1770
- $metadata: deserializeMetadata(output),
1771
- });
1772
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1773
- const doc = (0, smithy_client_1.take)(data, {
1774
- 'members': smithy_client_1._json,
1775
- 'users': smithy_client_1._json,
1776
- });
1777
- Object.assign(contents, doc);
1778
- return contents;
1779
- };
1780
- exports.de_ListChannelMembersCommand = de_ListChannelMembersCommand;
1781
- const de_ListChannelMembersReadStatusCommand = async (output, context) => {
1782
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1783
- return de_CommandError(output, context);
1784
- }
1785
- const contents = (0, smithy_client_1.map)({
1786
- $metadata: deserializeMetadata(output),
1787
- });
1788
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1789
- const doc = (0, smithy_client_1.take)(data, {
1790
- 'members': smithy_client_1._json,
1791
- });
1792
- Object.assign(contents, doc);
1793
- return contents;
1794
- };
1795
- exports.de_ListChannelMembersReadStatusCommand = de_ListChannelMembersReadStatusCommand;
1796
- const de_ListChannelsCommand = async (output, context) => {
1797
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1798
- return de_CommandError(output, context);
1799
- }
1800
- const contents = (0, smithy_client_1.map)({
1801
- $metadata: deserializeMetadata(output),
1802
- });
1803
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1804
- const doc = (0, smithy_client_1.take)(data, {
1805
- 'channels': smithy_client_1._json,
1806
- });
1807
- Object.assign(contents, doc);
1808
- return contents;
1809
- };
1810
- exports.de_ListChannelsCommand = de_ListChannelsCommand;
1811
- const de_ListInboxTaggedChannelsCommand = async (output, context) => {
1812
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1813
- return de_CommandError(output, context);
1814
- }
1815
- const contents = (0, smithy_client_1.map)({
1816
- $metadata: deserializeMetadata(output),
1817
- });
1818
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1819
- const doc = (0, smithy_client_1.take)(data, {
1820
- 'channels': smithy_client_1._json,
1821
- });
1822
- Object.assign(contents, doc);
1823
- return contents;
1824
- };
1825
- exports.de_ListInboxTaggedChannelsCommand = de_ListInboxTaggedChannelsCommand;
1826
- const de_ListInboxTagsCommand = async (output, context) => {
1827
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1828
- return de_CommandError(output, context);
1829
- }
1830
- const contents = (0, smithy_client_1.map)({
1831
- $metadata: deserializeMetadata(output),
1832
- });
1833
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1834
- const doc = (0, smithy_client_1.take)(data, {
1835
- 'tags': smithy_client_1._json,
1836
- });
1837
- Object.assign(contents, doc);
1838
- return contents;
1839
- };
1840
- exports.de_ListInboxTagsCommand = de_ListInboxTagsCommand;
1841
- const de_ListMessageReactionsCommand = async (output, context) => {
1842
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1843
- return de_CommandError(output, context);
1844
- }
1845
- const contents = (0, smithy_client_1.map)({
1846
- $metadata: deserializeMetadata(output),
1847
- });
1848
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1849
- const doc = (0, smithy_client_1.take)(data, {
1850
- 'reactions': smithy_client_1._json,
1851
- });
1852
- Object.assign(contents, doc);
1853
- return contents;
1854
- };
1855
- exports.de_ListMessageReactionsCommand = de_ListMessageReactionsCommand;
1856
- const de_ListMessagesCommand = async (output, context) => {
1857
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1858
- return de_CommandError(output, context);
1859
- }
1860
- const contents = (0, smithy_client_1.map)({
1861
- $metadata: deserializeMetadata(output),
1862
- });
1863
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1864
- const doc = (0, smithy_client_1.take)(data, {
1865
- 'messages': smithy_client_1._json,
1866
- });
1867
- Object.assign(contents, doc);
1868
- return contents;
1869
- };
1870
- exports.de_ListMessagesCommand = de_ListMessagesCommand;
1871
- const de_ListPinnedMessagesCommand = async (output, context) => {
1872
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1873
- return de_CommandError(output, context);
1874
- }
1875
- const contents = (0, smithy_client_1.map)({
1876
- $metadata: deserializeMetadata(output),
1877
- });
1878
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1879
- const doc = (0, smithy_client_1.take)(data, {
1880
- 'messages': smithy_client_1._json,
1881
- });
1882
- Object.assign(contents, doc);
1883
- return contents;
1884
- };
1885
- exports.de_ListPinnedMessagesCommand = de_ListPinnedMessagesCommand;
1886
- const de_MarkReadCommand = async (output, context) => {
1887
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1888
- return de_CommandError(output, context);
1889
- }
1890
- const contents = (0, smithy_client_1.map)({
1891
- $metadata: deserializeMetadata(output),
1892
- });
1893
- await (0, smithy_client_1.collectBody)(output.body, context);
1894
- return contents;
1895
- };
1896
- exports.de_MarkReadCommand = de_MarkReadCommand;
1897
- const de_MarkUnreadCommand = async (output, context) => {
1898
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1899
- return de_CommandError(output, context);
1900
- }
1901
- const contents = (0, smithy_client_1.map)({
1902
- $metadata: deserializeMetadata(output),
1903
- });
1904
- await (0, smithy_client_1.collectBody)(output.body, context);
1905
- return contents;
1906
- };
1907
- exports.de_MarkUnreadCommand = de_MarkUnreadCommand;
1908
- const de_PartialUpdateChannelCommand = async (output, context) => {
1909
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1910
- return de_CommandError(output, context);
1911
- }
1912
- const contents = (0, smithy_client_1.map)({
1913
- $metadata: deserializeMetadata(output),
1914
- });
1915
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1916
- const doc = (0, smithy_client_1.take)(data, {
1917
- 'channel': smithy_client_1._json,
1918
- });
1919
- Object.assign(contents, doc);
1920
- return contents;
1921
- };
1922
- exports.de_PartialUpdateChannelCommand = de_PartialUpdateChannelCommand;
1923
- const de_PartialUpdateMessageCommand = async (output, context) => {
1924
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1925
- return de_CommandError(output, context);
1926
- }
1927
- const contents = (0, smithy_client_1.map)({
1928
- $metadata: deserializeMetadata(output),
1929
- });
1930
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1931
- const doc = (0, smithy_client_1.take)(data, {
1932
- 'message': smithy_client_1._json,
1933
- });
1934
- Object.assign(contents, doc);
1935
- return contents;
1936
- };
1937
- exports.de_PartialUpdateMessageCommand = de_PartialUpdateMessageCommand;
1938
- const de_PinChannelCommand = async (output, context) => {
1939
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1940
- return de_CommandError(output, context);
1941
- }
1942
- const contents = (0, smithy_client_1.map)({
1943
- $metadata: deserializeMetadata(output),
1944
- });
1945
- await (0, smithy_client_1.collectBody)(output.body, context);
1946
- return contents;
1947
- };
1948
- exports.de_PinChannelCommand = de_PinChannelCommand;
1949
- const de_PinMessageCommand = async (output, context) => {
1950
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1951
- return de_CommandError(output, context);
1952
- }
1953
- const contents = (0, smithy_client_1.map)({
1954
- $metadata: deserializeMetadata(output),
1955
- });
1956
- await (0, smithy_client_1.collectBody)(output.body, context);
1957
- return contents;
1958
- };
1959
- exports.de_PinMessageCommand = de_PinMessageCommand;
1960
- const de_QueryChannelsCommand = async (output, context) => {
1961
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1962
- return de_CommandError(output, context);
1963
- }
1964
- const contents = (0, smithy_client_1.map)({
1965
- $metadata: deserializeMetadata(output),
1966
- });
1967
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
1968
- const doc = (0, smithy_client_1.take)(data, {
1969
- 'channels': smithy_client_1._json,
1970
- });
1971
- Object.assign(contents, doc);
1972
- return contents;
1973
- };
1974
- exports.de_QueryChannelsCommand = de_QueryChannelsCommand;
1975
- const de_ScheduleExternalFlagAdjustmentJobCommand = async (output, context) => {
1976
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1977
- return de_CommandError(output, context);
1978
- }
1979
- const contents = (0, smithy_client_1.map)({
1980
- $metadata: deserializeMetadata(output),
1981
- });
1982
- await (0, smithy_client_1.collectBody)(output.body, context);
1983
- return contents;
1984
- };
1985
- exports.de_ScheduleExternalFlagAdjustmentJobCommand = de_ScheduleExternalFlagAdjustmentJobCommand;
1986
- const de_SendActionTriggerResultCommand = async (output, context) => {
1987
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1988
- return de_CommandError(output, context);
1989
- }
1990
- const contents = (0, smithy_client_1.map)({
1991
- $metadata: deserializeMetadata(output),
1992
- });
1993
- await (0, smithy_client_1.collectBody)(output.body, context);
1994
- return contents;
1995
- };
1996
- exports.de_SendActionTriggerResultCommand = de_SendActionTriggerResultCommand;
1997
- const de_SendGiphyCommand = async (output, context) => {
1998
- if (output.statusCode !== 200 && output.statusCode >= 300) {
1999
- return de_CommandError(output, context);
2000
- }
2001
- const contents = (0, smithy_client_1.map)({
2002
- $metadata: deserializeMetadata(output),
2003
- });
2004
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2005
- const doc = (0, smithy_client_1.take)(data, {
2006
- 'message': smithy_client_1._json,
2007
- });
2008
- Object.assign(contents, doc);
2009
- return contents;
2010
- };
2011
- exports.de_SendGiphyCommand = de_SendGiphyCommand;
2012
- const de_SendMessageCommand = async (output, context) => {
2013
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2014
- return de_CommandError(output, context);
2015
- }
2016
- const contents = (0, smithy_client_1.map)({
2017
- $metadata: deserializeMetadata(output),
2018
- });
2019
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2020
- const doc = (0, smithy_client_1.take)(data, {
2021
- 'message': smithy_client_1._json,
2022
- });
2023
- Object.assign(contents, doc);
2024
- return contents;
2025
- };
2026
- exports.de_SendMessageCommand = de_SendMessageCommand;
2027
- const de_SendMessageReactionCommand = async (output, context) => {
2028
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2029
- return de_CommandError(output, context);
2030
- }
2031
- const contents = (0, smithy_client_1.map)({
2032
- $metadata: deserializeMetadata(output),
2033
- });
2034
- await (0, smithy_client_1.collectBody)(output.body, context);
2035
- return contents;
2036
- };
2037
- exports.de_SendMessageReactionCommand = de_SendMessageReactionCommand;
2038
- const de_SendSystemMessageCommand = async (output, context) => {
2039
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2040
- return de_CommandError(output, context);
2041
- }
2042
- const contents = (0, smithy_client_1.map)({
2043
- $metadata: deserializeMetadata(output),
2044
- });
2045
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2046
- const doc = (0, smithy_client_1.take)(data, {
2047
- 'message': smithy_client_1._json,
2048
- });
2049
- Object.assign(contents, doc);
2050
- return contents;
2051
- };
2052
- exports.de_SendSystemMessageCommand = de_SendSystemMessageCommand;
2053
- const de_SendTypingStartCommand = async (output, context) => {
2054
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2055
- return de_CommandError(output, context);
2056
- }
2057
- const contents = (0, smithy_client_1.map)({
2058
- $metadata: deserializeMetadata(output),
2059
- });
2060
- await (0, smithy_client_1.collectBody)(output.body, context);
2061
- return contents;
2062
- };
2063
- exports.de_SendTypingStartCommand = de_SendTypingStartCommand;
2064
- const de_SendTypingStopCommand = async (output, context) => {
2065
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2066
- return de_CommandError(output, context);
2067
- }
2068
- const contents = (0, smithy_client_1.map)({
2069
- $metadata: deserializeMetadata(output),
2070
- });
2071
- await (0, smithy_client_1.collectBody)(output.body, context);
2072
- return contents;
2073
- };
2074
- exports.de_SendTypingStopCommand = de_SendTypingStopCommand;
2075
- const de_ShowChannelCommand = async (output, context) => {
2076
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2077
- return de_CommandError(output, context);
2078
- }
2079
- const contents = (0, smithy_client_1.map)({
2080
- $metadata: deserializeMetadata(output),
2081
- });
2082
- await (0, smithy_client_1.collectBody)(output.body, context);
2083
- return contents;
2084
- };
2085
- exports.de_ShowChannelCommand = de_ShowChannelCommand;
2086
- const de_TagChannelCommand = async (output, context) => {
2087
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2088
- return de_CommandError(output, context);
2089
- }
2090
- const contents = (0, smithy_client_1.map)({
2091
- $metadata: deserializeMetadata(output),
2092
- });
2093
- await (0, smithy_client_1.collectBody)(output.body, context);
2094
- return contents;
2095
- };
2096
- exports.de_TagChannelCommand = de_TagChannelCommand;
2097
- const de_TriggerMessageActionCommand = async (output, context) => {
2098
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2099
- return de_CommandError(output, context);
2100
- }
2101
- const contents = (0, smithy_client_1.map)({
2102
- $metadata: deserializeMetadata(output),
2103
- });
2104
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2105
- const doc = (0, smithy_client_1.take)(data, {
2106
- 'triggerId': smithy_client_1.expectString,
2107
- });
2108
- Object.assign(contents, doc);
2109
- return contents;
2110
- };
2111
- exports.de_TriggerMessageActionCommand = de_TriggerMessageActionCommand;
2112
- const de_UnpinChannelCommand = async (output, context) => {
2113
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2114
- return de_CommandError(output, context);
2115
- }
2116
- const contents = (0, smithy_client_1.map)({
2117
- $metadata: deserializeMetadata(output),
2118
- });
2119
- await (0, smithy_client_1.collectBody)(output.body, context);
2120
- return contents;
2121
- };
2122
- exports.de_UnpinChannelCommand = de_UnpinChannelCommand;
2123
- const de_UnpinMessageCommand = async (output, context) => {
2124
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2125
- return de_CommandError(output, context);
2126
- }
2127
- const contents = (0, smithy_client_1.map)({
2128
- $metadata: deserializeMetadata(output),
2129
- });
2130
- await (0, smithy_client_1.collectBody)(output.body, context);
2131
- return contents;
2132
- };
2133
- exports.de_UnpinMessageCommand = de_UnpinMessageCommand;
2134
- const de_UntagChannelCommand = async (output, context) => {
2135
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2136
- return de_CommandError(output, context);
2137
- }
2138
- const contents = (0, smithy_client_1.map)({
2139
- $metadata: deserializeMetadata(output),
2140
- });
2141
- await (0, smithy_client_1.collectBody)(output.body, context);
2142
- return contents;
2143
- };
2144
- exports.de_UntagChannelCommand = de_UntagChannelCommand;
2145
- const de_UpdateChannelCommand = async (output, context) => {
2146
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2147
- return de_CommandError(output, context);
2148
- }
2149
- const contents = (0, smithy_client_1.map)({
2150
- $metadata: deserializeMetadata(output),
2151
- });
2152
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2153
- const doc = (0, smithy_client_1.take)(data, {
2154
- 'channel': smithy_client_1._json,
2155
- });
2156
- Object.assign(contents, doc);
2157
- return contents;
2158
- };
2159
- exports.de_UpdateChannelCommand = de_UpdateChannelCommand;
2160
- const de_UpdateInboxTagCommand = async (output, context) => {
2161
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2162
- return de_CommandError(output, context);
2163
- }
2164
- const contents = (0, smithy_client_1.map)({
2165
- $metadata: deserializeMetadata(output),
2166
- });
2167
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2168
- const doc = (0, smithy_client_1.take)(data, {
2169
- 'tag': smithy_client_1._json,
2170
- });
2171
- Object.assign(contents, doc);
2172
- return contents;
2173
- };
2174
- exports.de_UpdateInboxTagCommand = de_UpdateInboxTagCommand;
2175
- const de_UpdateMessageCommand = async (output, context) => {
2176
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2177
- return de_CommandError(output, context);
2178
- }
2179
- const contents = (0, smithy_client_1.map)({
2180
- $metadata: deserializeMetadata(output),
2181
- });
2182
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2183
- const doc = (0, smithy_client_1.take)(data, {
2184
- 'message': smithy_client_1._json,
2185
- });
2186
- Object.assign(contents, doc);
2187
- return contents;
2188
- };
2189
- exports.de_UpdateMessageCommand = de_UpdateMessageCommand;
2190
- const de_UploadFileCommand = async (output, context) => {
2191
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2192
- return de_CommandError(output, context);
2193
- }
2194
- const contents = (0, smithy_client_1.map)({
2195
- $metadata: deserializeMetadata(output),
2196
- });
2197
- const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
2198
- const doc = (0, smithy_client_1.take)(data, {
2199
- 'fileId': smithy_client_1.expectString,
2200
- 'presignedUploadUrl': smithy_client_1.expectString,
2201
- });
2202
- Object.assign(contents, doc);
2203
- return contents;
2204
- };
2205
- exports.de_UploadFileCommand = de_UploadFileCommand;
2206
- const de_CommandError = async (output, context) => {
2207
- const parsedOutput = {
2208
- ...output,
2209
- body: await (0, core_1.parseJsonErrorBody)(output.body, context)
2210
- };
2211
- const errorCode = (0, core_1.loadRestJsonErrorCode)(output, parsedOutput.body);
2212
- switch (errorCode) {
2213
- case "ChannelNotFoundException":
2214
- case "wildix.xbees.conversations#ChannelNotFoundException":
2215
- throw await de_ChannelNotFoundExceptionRes(parsedOutput, context);
2216
- case "ForbiddenException":
2217
- case "smithy.framework#ForbiddenException":
2218
- throw await de_ForbiddenExceptionRes(parsedOutput, context);
2219
- case "MemberAlreadyExistException":
2220
- case "wildix.xbees.conversations#MemberAlreadyExistException":
2221
- throw await de_MemberAlreadyExistExceptionRes(parsedOutput, context);
2222
- case "MemberDeactivatedException":
2223
- case "wildix.xbees.conversations#MemberDeactivatedException":
2224
- throw await de_MemberDeactivatedExceptionRes(parsedOutput, context);
2225
- case "RateLimitExceededException":
2226
- case "smithy.framework#RateLimitExceededException":
2227
- throw await de_RateLimitExceededExceptionRes(parsedOutput, context);
2228
- case "ValidationException":
2229
- case "smithy.framework#ValidationException":
2230
- throw await de_ValidationExceptionRes(parsedOutput, context);
2231
- case "ChannelAlreadyExistException":
2232
- case "wildix.xbees.conversations#ChannelAlreadyExistException":
2233
- throw await de_ChannelAlreadyExistExceptionRes(parsedOutput, context);
2234
- case "TagsLimitReachedException":
2235
- case "wildix.xbees.conversations#TagsLimitReachedException":
2236
- throw await de_TagsLimitReachedExceptionRes(parsedOutput, context);
2237
- case "TargetNotEligibleException":
2238
- case "wildix.xbees.kite#TargetNotEligibleException":
2239
- throw await de_TargetNotEligibleExceptionRes(parsedOutput, context);
2240
- case "TargetNotFoundException":
2241
- case "wildix.xbees.kite#TargetNotFoundException":
2242
- throw await de_TargetNotFoundExceptionRes(parsedOutput, context);
2243
- case "MemberNotFoundException":
2244
- case "wildix.xbees.conversations#MemberNotFoundException":
2245
- throw await de_MemberNotFoundExceptionRes(parsedOutput, context);
2246
- case "MessageNotFoundException":
2247
- case "wildix.xbees.conversations#MessageNotFoundException":
2248
- throw await de_MessageNotFoundExceptionRes(parsedOutput, context);
2249
- case "TriggerNotFoundException":
2250
- case "wildix.xbees.conversations#TriggerNotFoundException":
2251
- throw await de_TriggerNotFoundExceptionRes(parsedOutput, context);
2252
- case "FileNotFoundException":
2253
- case "wildix.xbees.conversations#FileNotFoundException":
2254
- throw await de_FileNotFoundExceptionRes(parsedOutput, context);
2255
- case "TagNotFoundException":
2256
- case "wildix.xbees.conversations#TagNotFoundException":
2257
- throw await de_TagNotFoundExceptionRes(parsedOutput, context);
2258
- case "MarkUnreadChannelsLimitReachedException":
2259
- case "wildix.xbees.conversations#MarkUnreadChannelsLimitReachedException":
2260
- throw await de_MarkUnreadChannelsLimitReachedExceptionRes(parsedOutput, context);
2261
- case "PinnedChannelsLimitReachedException":
2262
- case "wildix.xbees.conversations#PinnedChannelsLimitReachedException":
2263
- throw await de_PinnedChannelsLimitReachedExceptionRes(parsedOutput, context);
2264
- case "ConversationsServiceException":
2265
- case "wildix.xbees.conversations#ConversationsServiceException":
2266
- throw await de_ConversationsServiceExceptionRes(parsedOutput, context);
2267
- case "TaggedChannelsLimitReachedException":
2268
- case "wildix.xbees.conversations#TaggedChannelsLimitReachedException":
2269
- throw await de_TaggedChannelsLimitReachedExceptionRes(parsedOutput, context);
2270
- case "MessageActionNotFoundException":
2271
- case "wildix.xbees.conversations#MessageActionNotFoundException":
2272
- throw await de_MessageActionNotFoundExceptionRes(parsedOutput, context);
2273
- default:
2274
- const parsedBody = parsedOutput.body;
2275
- return throwDefaultError({
2276
- output,
2277
- parsedBody,
2278
- errorCode
2279
- });
2280
- }
2281
- };
2282
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ConversationsServiceException_1.ConversationsServiceException);
2283
- const de_ForbiddenExceptionRes = async (parsedOutput, context) => {
2284
- const contents = (0, smithy_client_1.map)({});
2285
- const data = parsedOutput.body;
2286
- const doc = (0, smithy_client_1.take)(data, {
2287
- 'message': smithy_client_1.expectString,
2288
- });
2289
- Object.assign(contents, doc);
2290
- const exception = new models_0_1.ForbiddenException({
2291
- $metadata: deserializeMetadata(parsedOutput),
2292
- ...contents
2293
- });
2294
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2295
- };
2296
- const de_RateLimitExceededExceptionRes = async (parsedOutput, context) => {
2297
- const contents = (0, smithy_client_1.map)({
2298
- [_rL]: [, parsedOutput.headers[_xrl]],
2299
- [_rLR]: [() => void 0 !== parsedOutput.headers[_xrr], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_xrr])],
2300
- [_rLRa]: [() => void 0 !== parsedOutput.headers[_xrr_], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_xrr_])],
2301
- [_rA]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
2302
- });
2303
- const data = parsedOutput.body;
2304
- const doc = (0, smithy_client_1.take)(data, {
2305
- 'message': smithy_client_1.expectString,
2306
- });
2307
- Object.assign(contents, doc);
2308
- const exception = new models_0_1.RateLimitExceededException({
2309
- $metadata: deserializeMetadata(parsedOutput),
2310
- ...contents
2311
- });
2312
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2313
- };
2314
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2315
- const contents = (0, smithy_client_1.map)({});
2316
- const data = parsedOutput.body;
2317
- const doc = (0, smithy_client_1.take)(data, {
2318
- 'message': smithy_client_1.expectString,
2319
- });
2320
- Object.assign(contents, doc);
2321
- const exception = new models_0_1.ValidationException({
2322
- $metadata: deserializeMetadata(parsedOutput),
2323
- ...contents
2324
- });
2325
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2326
- };
2327
- const de_ChannelAlreadyExistExceptionRes = async (parsedOutput, context) => {
2328
- const contents = (0, smithy_client_1.map)({});
2329
- const data = parsedOutput.body;
2330
- const doc = (0, smithy_client_1.take)(data, {
2331
- 'message': smithy_client_1.expectString,
2332
- });
2333
- Object.assign(contents, doc);
2334
- const exception = new models_0_1.ChannelAlreadyExistException({
2335
- $metadata: deserializeMetadata(parsedOutput),
2336
- ...contents
2337
- });
2338
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2339
- };
2340
- const de_ChannelNotFoundExceptionRes = async (parsedOutput, context) => {
2341
- const contents = (0, smithy_client_1.map)({});
2342
- const data = parsedOutput.body;
2343
- const doc = (0, smithy_client_1.take)(data, {
2344
- 'message': smithy_client_1.expectString,
2345
- });
2346
- Object.assign(contents, doc);
2347
- const exception = new models_0_1.ChannelNotFoundException({
2348
- $metadata: deserializeMetadata(parsedOutput),
2349
- ...contents
2350
- });
2351
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2352
- };
2353
- const de_ConversationsServiceExceptionRes = async (parsedOutput, context) => {
2354
- const contents = (0, smithy_client_1.map)({});
2355
- const data = parsedOutput.body;
2356
- const doc = (0, smithy_client_1.take)(data, {
2357
- 'message': smithy_client_1.expectString,
2358
- });
2359
- Object.assign(contents, doc);
2360
- const exception = new models_0_1.ConversationsServiceException({
2361
- $metadata: deserializeMetadata(parsedOutput),
2362
- ...contents
2363
- });
2364
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2365
- };
2366
- const de_FileNotFoundExceptionRes = async (parsedOutput, context) => {
2367
- const contents = (0, smithy_client_1.map)({});
2368
- const data = parsedOutput.body;
2369
- const doc = (0, smithy_client_1.take)(data, {
2370
- 'message': smithy_client_1.expectString,
2371
- });
2372
- Object.assign(contents, doc);
2373
- const exception = new models_0_1.FileNotFoundException({
2374
- $metadata: deserializeMetadata(parsedOutput),
2375
- ...contents
2376
- });
2377
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2378
- };
2379
- const de_MarkUnreadChannelsLimitReachedExceptionRes = async (parsedOutput, context) => {
2380
- const contents = (0, smithy_client_1.map)({});
2381
- const data = parsedOutput.body;
2382
- const doc = (0, smithy_client_1.take)(data, {
2383
- 'message': smithy_client_1.expectString,
2384
- });
2385
- Object.assign(contents, doc);
2386
- const exception = new models_0_1.MarkUnreadChannelsLimitReachedException({
2387
- $metadata: deserializeMetadata(parsedOutput),
2388
- ...contents
2389
- });
2390
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2391
- };
2392
- const de_MemberAlreadyExistExceptionRes = async (parsedOutput, context) => {
2393
- const contents = (0, smithy_client_1.map)({});
2394
- const data = parsedOutput.body;
2395
- const doc = (0, smithy_client_1.take)(data, {
2396
- 'message': smithy_client_1.expectString,
2397
- });
2398
- Object.assign(contents, doc);
2399
- const exception = new models_0_1.MemberAlreadyExistException({
2400
- $metadata: deserializeMetadata(parsedOutput),
2401
- ...contents
2402
- });
2403
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2404
- };
2405
- const de_MemberDeactivatedExceptionRes = async (parsedOutput, context) => {
2406
- const contents = (0, smithy_client_1.map)({});
2407
- const data = parsedOutput.body;
2408
- const doc = (0, smithy_client_1.take)(data, {
2409
- 'message': smithy_client_1.expectString,
2410
- });
2411
- Object.assign(contents, doc);
2412
- const exception = new models_0_1.MemberDeactivatedException({
2413
- $metadata: deserializeMetadata(parsedOutput),
2414
- ...contents
2415
- });
2416
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2417
- };
2418
- const de_MemberNotFoundExceptionRes = async (parsedOutput, context) => {
2419
- const contents = (0, smithy_client_1.map)({});
2420
- const data = parsedOutput.body;
2421
- const doc = (0, smithy_client_1.take)(data, {
2422
- 'message': smithy_client_1.expectString,
2423
- });
2424
- Object.assign(contents, doc);
2425
- const exception = new models_0_1.MemberNotFoundException({
2426
- $metadata: deserializeMetadata(parsedOutput),
2427
- ...contents
2428
- });
2429
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2430
- };
2431
- const de_MessageActionNotFoundExceptionRes = async (parsedOutput, context) => {
2432
- const contents = (0, smithy_client_1.map)({});
2433
- const data = parsedOutput.body;
2434
- const doc = (0, smithy_client_1.take)(data, {
2435
- 'message': smithy_client_1.expectString,
2436
- });
2437
- Object.assign(contents, doc);
2438
- const exception = new models_0_1.MessageActionNotFoundException({
2439
- $metadata: deserializeMetadata(parsedOutput),
2440
- ...contents
2441
- });
2442
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2443
- };
2444
- const de_MessageNotFoundExceptionRes = async (parsedOutput, context) => {
2445
- const contents = (0, smithy_client_1.map)({});
2446
- const data = parsedOutput.body;
2447
- const doc = (0, smithy_client_1.take)(data, {
2448
- 'message': smithy_client_1.expectString,
2449
- });
2450
- Object.assign(contents, doc);
2451
- const exception = new models_0_1.MessageNotFoundException({
2452
- $metadata: deserializeMetadata(parsedOutput),
2453
- ...contents
2454
- });
2455
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2456
- };
2457
- const de_PinnedChannelsLimitReachedExceptionRes = async (parsedOutput, context) => {
2458
- const contents = (0, smithy_client_1.map)({});
2459
- const data = parsedOutput.body;
2460
- const doc = (0, smithy_client_1.take)(data, {
2461
- 'message': smithy_client_1.expectString,
2462
- });
2463
- Object.assign(contents, doc);
2464
- const exception = new models_0_1.PinnedChannelsLimitReachedException({
2465
- $metadata: deserializeMetadata(parsedOutput),
2466
- ...contents
2467
- });
2468
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2469
- };
2470
- const de_TaggedChannelsLimitReachedExceptionRes = async (parsedOutput, context) => {
2471
- const contents = (0, smithy_client_1.map)({});
2472
- const data = parsedOutput.body;
2473
- const doc = (0, smithy_client_1.take)(data, {
2474
- 'message': smithy_client_1.expectString,
2475
- });
2476
- Object.assign(contents, doc);
2477
- const exception = new models_0_1.TaggedChannelsLimitReachedException({
2478
- $metadata: deserializeMetadata(parsedOutput),
2479
- ...contents
2480
- });
2481
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2482
- };
2483
- const de_TagNotFoundExceptionRes = async (parsedOutput, context) => {
2484
- const contents = (0, smithy_client_1.map)({});
2485
- const data = parsedOutput.body;
2486
- const doc = (0, smithy_client_1.take)(data, {
2487
- 'message': smithy_client_1.expectString,
2488
- });
2489
- Object.assign(contents, doc);
2490
- const exception = new models_0_1.TagNotFoundException({
2491
- $metadata: deserializeMetadata(parsedOutput),
2492
- ...contents
2493
- });
2494
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2495
- };
2496
- const de_TagsLimitReachedExceptionRes = async (parsedOutput, context) => {
2497
- const contents = (0, smithy_client_1.map)({});
2498
- const data = parsedOutput.body;
2499
- const doc = (0, smithy_client_1.take)(data, {
2500
- 'message': smithy_client_1.expectString,
2501
- });
2502
- Object.assign(contents, doc);
2503
- const exception = new models_0_1.TagsLimitReachedException({
2504
- $metadata: deserializeMetadata(parsedOutput),
2505
- ...contents
2506
- });
2507
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2508
- };
2509
- const de_TriggerNotFoundExceptionRes = async (parsedOutput, context) => {
2510
- const contents = (0, smithy_client_1.map)({});
2511
- const data = parsedOutput.body;
2512
- const doc = (0, smithy_client_1.take)(data, {
2513
- 'message': smithy_client_1.expectString,
2514
- });
2515
- Object.assign(contents, doc);
2516
- const exception = new models_0_1.TriggerNotFoundException({
2517
- $metadata: deserializeMetadata(parsedOutput),
2518
- ...contents
2519
- });
2520
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2521
- };
2522
- const de_TargetNotEligibleExceptionRes = async (parsedOutput, context) => {
2523
- const contents = (0, smithy_client_1.map)({});
2524
- const data = parsedOutput.body;
2525
- const doc = (0, smithy_client_1.take)(data, {
2526
- 'message': smithy_client_1.expectString,
2527
- 'reason': smithy_client_1.expectString,
2528
- });
2529
- Object.assign(contents, doc);
2530
- const exception = new models_0_1.TargetNotEligibleException({
2531
- $metadata: deserializeMetadata(parsedOutput),
2532
- ...contents
2533
- });
2534
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2535
- };
2536
- const de_TargetNotFoundExceptionRes = async (parsedOutput, context) => {
2537
- const contents = (0, smithy_client_1.map)({});
2538
- const data = parsedOutput.body;
2539
- const doc = (0, smithy_client_1.take)(data, {
2540
- 'message': smithy_client_1.expectString,
2541
- });
2542
- Object.assign(contents, doc);
2543
- const exception = new models_0_1.TargetNotFoundException({
2544
- $metadata: deserializeMetadata(parsedOutput),
2545
- ...contents
2546
- });
2547
- return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
2548
- };
2549
- const deserializeMetadata = (output) => ({
2550
- httpStatusCode: output.statusCode,
2551
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2552
- extendedRequestId: output.headers["x-amz-id-2"],
2553
- cfId: output.headers["x-amz-cf-id"],
2554
- });
2555
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then(body => context.utf8Encoder(body));
2556
- const _c = "category";
2557
- const _cI = "clientId";
2558
- const _cIo = "companyId";
2559
- const _co = "company";
2560
- const _d = "download";
2561
- const _f = "force";
2562
- const _l = "limit";
2563
- const _o = "offset";
2564
- const _rA = "retryAfter";
2565
- const _rL = "rateLimit";
2566
- const _rLR = "rateLimitRemaining";
2567
- const _rLRa = "rateLimitReset";
2568
- const _ra = "retry-after";
2569
- const _s = "silent";
2570
- const _u = "user";
2571
- const _uI = "userId";
2572
- const _xrl = "x-ratelimit-limit";
2573
- const _xrr = "x-ratelimit-remaining";
2574
- const _xrr_ = "x-ratelimit-reset";