stream-chat 10.0.0-rc.8 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/README.md +7 -6
  2. package/dist/cjs/index.browser.js +22095 -22290
  3. package/dist/cjs/index.browser.js.map +4 -4
  4. package/dist/cjs/index.node.js +22143 -22298
  5. package/dist/cjs/index.node.js.map +4 -4
  6. package/dist/esm/index.mjs +22093 -22288
  7. package/dist/esm/index.mjs.map +4 -4
  8. package/dist/types/ChannelManager.d.ts +216 -135
  9. package/dist/types/CooldownTimer.d.ts +16 -27
  10. package/dist/types/EventHandlerPipeline.d.ts +18 -38
  11. package/dist/types/LiveLocationManager.d.ts +25 -47
  12. package/dist/types/api-client.d.ts +17 -5
  13. package/dist/types/channel.d.ts +435 -500
  14. package/dist/types/channel_state.d.ts +72 -112
  15. package/dist/types/client.d.ts +323 -440
  16. package/dist/types/client_state.d.ts +1 -3
  17. package/dist/types/configuration/ConfigController.d.ts +31 -125
  18. package/dist/types/configuration/InstanceConfigurationRegistry.d.ts +32 -124
  19. package/dist/types/configuration/keys.d.ts +5 -19
  20. package/dist/types/configuration/shape.d.ts +12 -29
  21. package/dist/types/configuration/types.d.ts +64 -79
  22. package/dist/types/configuration/utils/applyInstanceConfiguration.d.ts +14 -36
  23. package/dist/types/configuration/utils/copyConfigPatch.d.ts +8 -0
  24. package/dist/types/configuration/utils/declarativeSlices.d.ts +5 -16
  25. package/dist/types/configuration/utils/deepFreezeConfig.d.ts +3 -17
  26. package/dist/types/configuration/utils/serverAuthority.d.ts +9 -29
  27. package/dist/types/connection/ConnectionIdManager.d.ts +45 -0
  28. package/dist/types/connection/ConnectionRecoveryManager.d.ts +84 -0
  29. package/dist/types/connection/index.d.ts +4 -0
  30. package/dist/types/connection/networkConnection/NetworkConnectionObserver.d.ts +82 -0
  31. package/dist/types/connection/networkConnection/index.d.ts +3 -0
  32. package/dist/types/connection/networkConnection/reporters.d.ts +20 -0
  33. package/dist/types/connection/networkConnection/types.d.ts +40 -0
  34. package/dist/types/connection/wsConnection/StableWSConnection.d.ts +137 -0
  35. package/dist/types/connection/wsConnection/WSConnection.d.ts +105 -0
  36. package/dist/types/connection/wsConnection/WSConnectionFallback.d.ts +47 -0
  37. package/dist/types/connection/wsConnection/config.d.ts +31 -0
  38. package/dist/types/connection/wsConnection/index.d.ts +4 -0
  39. package/dist/types/connection/wsConnection/types.d.ts +46 -0
  40. package/dist/types/constants.d.ts +3 -1
  41. package/dist/types/custom_types.d.ts +0 -2
  42. package/dist/types/entityStore/EntityStore.d.ts +226 -65
  43. package/dist/types/entityStore/StoreBackedItemIndex.d.ts +19 -33
  44. package/dist/types/entityStore/index.d.ts +0 -1
  45. package/dist/types/errors.d.ts +16 -19
  46. package/dist/types/formatMessageMemo.d.ts +5 -0
  47. package/dist/types/gen/chat/ChannelApi.d.ts +5 -1
  48. package/dist/types/gen/chat/ChatApi.d.ts +149 -105
  49. package/dist/types/gen/models/index.d.ts +2540 -698
  50. package/dist/types/gen/models/timestamp-guard.d.ts +22 -0
  51. package/dist/types/gen/moderation/ModerationApi.d.ts +37 -14
  52. package/dist/types/index.d.ts +10 -5
  53. package/dist/types/{i18n/languageNames.d.ts → languageNames.d.ts} +9 -24
  54. package/dist/types/logger.d.ts +1 -3
  55. package/dist/types/messageComposer/CustomDataManager.d.ts +7 -1
  56. package/dist/types/messageComposer/LocationComposer.d.ts +8 -2
  57. package/dist/types/messageComposer/attachmentIdentity.d.ts +24 -0
  58. package/dist/types/messageComposer/attachmentManager.d.ts +52 -24
  59. package/dist/types/messageComposer/attachmentUtils.d.ts +23 -0
  60. package/dist/types/messageComposer/configuration/configuration.d.ts +2 -5
  61. package/dist/types/messageComposer/configuration/types.d.ts +38 -50
  62. package/dist/types/messageComposer/index.d.ts +1 -0
  63. package/dist/types/messageComposer/linkPreviewsManager.d.ts +12 -9
  64. package/dist/types/messageComposer/messageComposer.d.ts +60 -123
  65. package/dist/types/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.d.ts +10 -1
  66. package/dist/types/messageComposer/middleware/messageComposer/attachments.d.ts +4 -0
  67. package/dist/types/messageComposer/middleware/messageComposer/commandInjection.d.ts +5 -0
  68. package/dist/types/messageComposer/middleware/messageComposer/index.d.ts +2 -0
  69. package/dist/types/messageComposer/middleware/messageComposer/pollOnly.d.ts +6 -0
  70. package/dist/types/messageComposer/middleware/messageComposer/userDataInjection.d.ts +5 -0
  71. package/dist/types/messageComposer/middleware/pollComposer/types.d.ts +2 -4
  72. package/dist/types/messageComposer/middleware/pollComposer/validation.d.ts +7 -19
  73. package/dist/types/messageComposer/middleware/textComposer/commandUtils.d.ts +4 -0
  74. package/dist/types/messageComposer/middleware/textComposer/commands.d.ts +11 -2
  75. package/dist/types/messageComposer/middleware/textComposer/mentions.d.ts +20 -19
  76. package/dist/types/messageComposer/middleware/textComposer/textMiddlewareUtils.d.ts +9 -3
  77. package/dist/types/messageComposer/middleware/textComposer/types.d.ts +1 -6
  78. package/dist/types/messageComposer/pollComposer.d.ts +15 -5
  79. package/dist/types/messageComposer/textComposer.d.ts +14 -7
  80. package/dist/types/messageComposer/types.d.ts +27 -7
  81. package/dist/types/messageDelivery/MessageDeliveryReporter.d.ts +27 -80
  82. package/dist/types/messageDelivery/MessageReceiptsTracker.d.ts +43 -73
  83. package/dist/types/messageOperations/FailedSendCache.d.ts +29 -0
  84. package/dist/types/messageOperations/MessageOperationStatePolicy.d.ts +16 -22
  85. package/dist/types/messageOperations/MessageOperations.d.ts +63 -34
  86. package/dist/types/messageOperations/applyReactionLocally.d.ts +15 -0
  87. package/dist/types/messageOperations/createMessageOperations.d.ts +9 -0
  88. package/dist/types/messageOperations/index.d.ts +6 -4
  89. package/dist/types/messageOperations/reflectReactionEvent.d.ts +16 -0
  90. package/dist/types/messageOperations/sendOrdering.d.ts +14 -0
  91. package/dist/types/messageOperations/settlePendingAttachmentUploads.d.ts +20 -0
  92. package/dist/types/messageOperations/types.d.ts +43 -14
  93. package/dist/types/middleware.d.ts +10 -0
  94. package/dist/types/moderation.d.ts +21 -14
  95. package/dist/types/notifications/NotificationManager.d.ts +10 -23
  96. package/dist/types/notifications/types.d.ts +21 -57
  97. package/dist/types/offline-support/offline_support_api.d.ts +150 -528
  98. package/dist/types/offline-support/offline_sync_manager.d.ts +21 -42
  99. package/dist/types/offline-support/queueableOperations.d.ts +35 -37
  100. package/dist/types/offline-support/types.d.ts +40 -185
  101. package/dist/types/pagination/FilterBuilder.d.ts +1 -18
  102. package/dist/types/pagination/ItemIndex.d.ts +4 -12
  103. package/dist/types/pagination/cursorDerivation/aroundPaginationFlags.d.ts +13 -0
  104. package/dist/types/pagination/cursorDerivation/createdAtAroundPaginationFlags.d.ts +4 -5
  105. package/dist/types/pagination/cursorDerivation/linearPaginationFlags.d.ts +19 -5
  106. package/dist/types/pagination/index.d.ts +1 -0
  107. package/dist/types/pagination/paginators/BasePaginator.d.ts +604 -550
  108. package/dist/types/pagination/paginators/ChannelPaginator.d.ts +123 -106
  109. package/dist/types/pagination/paginators/MessageIntervalPaginator.d.ts +576 -327
  110. package/dist/types/pagination/paginators/MessagePaginator.d.ts +237 -131
  111. package/dist/types/pagination/paginators/PinnedMessagePaginator.d.ts +15 -26
  112. package/dist/types/pagination/paginators/ReminderPaginator.d.ts +4 -3
  113. package/dist/types/pagination/paginators/ThreadPaginator.d.ts +44 -0
  114. package/dist/types/pagination/paginators/UserGroupPaginator.d.ts +5 -8
  115. package/dist/types/pagination/paginators/index.d.ts +1 -0
  116. package/dist/types/pagination/sortCompiler.d.ts +11 -22
  117. package/dist/types/pagination/utility.normalization.d.ts +8 -13
  118. package/dist/types/pagination/utility.search.d.ts +3 -8
  119. package/dist/types/poll.d.ts +35 -8
  120. package/dist/types/poll_manager.d.ts +12 -2
  121. package/dist/types/poll_optimistic_votes.d.ts +57 -0
  122. package/dist/types/reminders/Reminder.d.ts +17 -7
  123. package/dist/types/reminders/ReminderManager.d.ts +13 -25
  124. package/dist/types/search/BaseSearchSource.d.ts +10 -8
  125. package/dist/types/search/ChannelSearchSource.d.ts +16 -0
  126. package/dist/types/search/MessageSearchSource.d.ts +17 -0
  127. package/dist/types/search/SearchController.d.ts +26 -28
  128. package/dist/types/search/types.d.ts +6 -10
  129. package/dist/types/signing.d.ts +12 -3
  130. package/dist/types/thread.d.ts +67 -129
  131. package/dist/types/thread_manager.d.ts +95 -66
  132. package/dist/types/token_manager.d.ts +8 -13
  133. package/dist/types/types.d.ts +81 -197
  134. package/dist/types/types.utility.d.ts +3 -3
  135. package/dist/types/upload-utils.d.ts +5 -10
  136. package/dist/types/uploadManager.d.ts +31 -11
  137. package/dist/types/utils/FixedSizeQueueCache.d.ts +8 -11
  138. package/dist/types/utils/WithSubscriptions.d.ts +6 -16
  139. package/dist/types/utils/abort.d.ts +17 -0
  140. package/dist/types/utils/concurrency.d.ts +12 -20
  141. package/dist/types/utils/mergeWith/mergeWith.d.ts +8 -11
  142. package/dist/types/utils/mergeWith/mergeWithCore.d.ts +5 -13
  143. package/dist/types/utils/mergeWith/mergeWithDiff.d.ts +22 -0
  144. package/dist/types/utils/objectPath.d.ts +6 -41
  145. package/dist/types/utils/retryable.d.ts +8 -12
  146. package/dist/types/utils/throttling/throttle.d.ts +8 -23
  147. package/dist/types/utils/time.d.ts +45 -0
  148. package/dist/types/utils.d.ts +74 -93
  149. package/package.json +14 -40
  150. package/src/ChannelManager.ts +494 -303
  151. package/src/CooldownTimer.ts +46 -59
  152. package/src/EventHandlerPipeline.ts +22 -45
  153. package/src/LiveLocationManager.ts +99 -91
  154. package/src/api-client.ts +113 -50
  155. package/src/campaign.ts +1 -1
  156. package/src/channel.ts +1098 -1351
  157. package/src/channel_batch_updater.ts +1 -1
  158. package/src/channel_state.ts +81 -174
  159. package/src/client.ts +755 -970
  160. package/src/client_state.ts +3 -8
  161. package/src/configuration/ConfigController.ts +42 -158
  162. package/src/configuration/InstanceConfigurationRegistry.ts +43 -172
  163. package/src/configuration/index.ts +1 -1
  164. package/src/configuration/keys.ts +13 -32
  165. package/src/configuration/shape.ts +169 -59
  166. package/src/configuration/types.ts +69 -92
  167. package/src/configuration/utils/applyInstanceConfiguration.ts +22 -54
  168. package/src/configuration/utils/copyConfigPatch.ts +11 -32
  169. package/src/configuration/utils/declarativeSlices.ts +9 -39
  170. package/src/configuration/utils/deepFreezeConfig.ts +3 -17
  171. package/src/configuration/utils/index.ts +2 -4
  172. package/src/configuration/utils/serverAuthority.ts +20 -68
  173. package/src/connection/ConnectionIdManager.ts +111 -0
  174. package/src/connection/ConnectionRecoveryManager.ts +257 -0
  175. package/src/connection/index.ts +4 -0
  176. package/src/connection/networkConnection/NetworkConnectionObserver.ts +204 -0
  177. package/src/connection/networkConnection/index.ts +3 -0
  178. package/src/connection/networkConnection/reporters.ts +58 -0
  179. package/src/connection/networkConnection/types.ts +45 -0
  180. package/src/{connection.ts → connection/wsConnection/StableWSConnection.ts} +230 -231
  181. package/src/connection/wsConnection/WSConnection.ts +270 -0
  182. package/src/connection/wsConnection/WSConnectionFallback.ts +250 -0
  183. package/src/connection/wsConnection/config.ts +73 -0
  184. package/src/connection/wsConnection/index.ts +4 -0
  185. package/src/connection/wsConnection/types.ts +48 -0
  186. package/src/constants.ts +7 -5
  187. package/src/custom_types.ts +0 -1
  188. package/src/entityStore/EntityStore.ts +415 -79
  189. package/src/entityStore/StoreBackedItemIndex.ts +37 -41
  190. package/src/entityStore/index.ts +0 -1
  191. package/src/errors.ts +39 -20
  192. package/src/formatMessageMemo.ts +17 -0
  193. package/src/gen/chat/ChannelApi.ts +122 -36
  194. package/src/gen/chat/ChatApi.ts +578 -1752
  195. package/src/gen/models/index.ts +2566 -3440
  196. package/src/gen/models/timestamp-guard.ts +27 -0
  197. package/src/gen/moderation/ModerationApi.ts +183 -406
  198. package/src/index.ts +32 -10
  199. package/src/languageNames.ts +88 -0
  200. package/src/logger.ts +1 -3
  201. package/src/messageComposer/CustomDataManager.ts +19 -6
  202. package/src/messageComposer/LocationComposer.ts +49 -9
  203. package/src/messageComposer/MessageComposerEffectHandlers.ts +1 -2
  204. package/src/messageComposer/attachmentIdentity.ts +54 -0
  205. package/src/messageComposer/attachmentManager.ts +170 -185
  206. package/src/messageComposer/attachmentUtils.ts +44 -0
  207. package/src/messageComposer/configuration/configuration.ts +15 -8
  208. package/src/messageComposer/configuration/types.ts +38 -50
  209. package/src/messageComposer/fileUtils.ts +1 -1
  210. package/src/messageComposer/index.ts +1 -0
  211. package/src/messageComposer/linkPreviewsManager.ts +18 -21
  212. package/src/messageComposer/messageComposer.ts +234 -179
  213. package/src/messageComposer/middleware/attachmentManager/postUpload/AttachmentPostUploadMiddlewareExecutor.ts +1 -1
  214. package/src/messageComposer/middleware/attachmentManager/postUpload/attachmentEnrichment.ts +46 -33
  215. package/src/messageComposer/middleware/attachmentManager/postUpload/uploadErrorHandler.ts +4 -1
  216. package/src/messageComposer/middleware/attachmentManager/preUpload/blockedUploadNotification.ts +1 -1
  217. package/src/messageComposer/middleware/messageComposer/MessageComposerMiddlewareExecutor.ts +6 -0
  218. package/src/messageComposer/middleware/messageComposer/attachments.ts +76 -5
  219. package/src/messageComposer/middleware/messageComposer/commandInjection.ts +10 -4
  220. package/src/messageComposer/middleware/messageComposer/customData.ts +17 -5
  221. package/src/messageComposer/middleware/messageComposer/index.ts +2 -0
  222. package/src/messageComposer/middleware/messageComposer/linkPreviews.ts +22 -12
  223. package/src/messageComposer/middleware/messageComposer/pollOnly.ts +9 -1
  224. package/src/messageComposer/middleware/messageComposer/sharedLocation.ts +7 -2
  225. package/src/messageComposer/middleware/messageComposer/textComposer.ts +1 -1
  226. package/src/messageComposer/middleware/messageComposer/userDataInjection.ts +12 -12
  227. package/src/messageComposer/middleware/pollComposer/state.ts +2 -2
  228. package/src/messageComposer/middleware/pollComposer/types.ts +2 -4
  229. package/src/messageComposer/middleware/pollComposer/validation.ts +8 -26
  230. package/src/messageComposer/middleware/textComposer/TextComposerMiddlewareExecutor.ts +8 -6
  231. package/src/messageComposer/middleware/textComposer/commandUtils.ts +10 -3
  232. package/src/messageComposer/middleware/textComposer/commands.ts +11 -16
  233. package/src/messageComposer/middleware/textComposer/mentions.ts +32 -70
  234. package/src/messageComposer/middleware/textComposer/textMiddlewareUtils.ts +10 -4
  235. package/src/messageComposer/middleware/textComposer/types.ts +1 -6
  236. package/src/messageComposer/pollComposer.ts +21 -9
  237. package/src/messageComposer/textComposer.ts +37 -57
  238. package/src/messageComposer/types.ts +39 -11
  239. package/src/messageDelivery/MessageDeliveryReporter.ts +86 -124
  240. package/src/messageDelivery/MessageReceiptsTracker.ts +122 -139
  241. package/src/messageOperations/FailedSendCache.ts +85 -0
  242. package/src/messageOperations/MessageOperationStatePolicy.ts +124 -116
  243. package/src/messageOperations/MessageOperations.ts +297 -175
  244. package/src/{entityStore → messageOperations}/applyReactionLocally.ts +13 -25
  245. package/src/messageOperations/createMessageOperations.ts +176 -0
  246. package/src/messageOperations/index.ts +6 -14
  247. package/src/messageOperations/reflectReactionEvent.ts +43 -0
  248. package/src/messageOperations/sendOrdering.ts +25 -0
  249. package/src/messageOperations/settlePendingAttachmentUploads.ts +98 -0
  250. package/src/messageOperations/types.ts +51 -13
  251. package/src/middleware.ts +13 -5
  252. package/src/moderation.ts +25 -21
  253. package/src/notifications/NotificationManager.ts +19 -28
  254. package/src/notifications/types.ts +21 -57
  255. package/src/offline-support/offline_support_api.ts +231 -681
  256. package/src/offline-support/offline_sync_manager.ts +51 -90
  257. package/src/offline-support/queueableOperations.ts +98 -73
  258. package/src/offline-support/types.ts +43 -185
  259. package/src/pagination/FilterBuilder.ts +1 -22
  260. package/src/pagination/ItemIndex.ts +4 -12
  261. package/src/pagination/cursorDerivation/aroundPaginationFlags.ts +29 -0
  262. package/src/pagination/cursorDerivation/createdAtAroundPaginationFlags.ts +17 -62
  263. package/src/pagination/cursorDerivation/idAroundPaginationFlags.ts +11 -39
  264. package/src/pagination/cursorDerivation/linearPaginationFlags.ts +53 -33
  265. package/src/pagination/filterCompiler.ts +11 -25
  266. package/src/pagination/index.ts +1 -0
  267. package/src/pagination/paginators/BasePaginator.ts +1415 -1041
  268. package/src/pagination/paginators/ChannelPaginator.ts +481 -219
  269. package/src/pagination/paginators/MessageIntervalPaginator.ts +1362 -775
  270. package/src/pagination/paginators/MessagePaginator.ts +521 -240
  271. package/src/pagination/paginators/PinnedMessagePaginator.ts +32 -40
  272. package/src/pagination/paginators/ReminderPaginator.ts +21 -16
  273. package/src/pagination/paginators/ThreadPaginator.ts +170 -0
  274. package/src/pagination/paginators/UserGroupPaginator.ts +18 -15
  275. package/src/pagination/paginators/index.ts +1 -0
  276. package/src/pagination/paginators/stateThrottling.ts +5 -10
  277. package/src/pagination/sortCompiler.ts +23 -50
  278. package/src/pagination/utility.normalization.ts +17 -24
  279. package/src/pagination/utility.search.ts +4 -11
  280. package/src/poll.ts +183 -102
  281. package/src/poll_manager.ts +24 -22
  282. package/src/poll_optimistic_votes.ts +335 -0
  283. package/src/reminders/Reminder.ts +33 -16
  284. package/src/reminders/ReminderManager.ts +23 -56
  285. package/src/reminders/ReminderTimer.ts +6 -6
  286. package/src/search/BaseSearchSource.ts +19 -25
  287. package/src/search/ChannelSearchSource.ts +43 -1
  288. package/src/search/MessageSearchSource.ts +77 -13
  289. package/src/search/SearchController.ts +39 -36
  290. package/src/search/types.ts +6 -10
  291. package/src/segment.ts +1 -1
  292. package/src/signing.ts +23 -3
  293. package/src/thread.ts +430 -712
  294. package/src/thread_manager.ts +300 -234
  295. package/src/token_manager.ts +12 -22
  296. package/src/types.ts +102 -214
  297. package/src/types.utility.ts +3 -3
  298. package/src/upload-utils.ts +5 -10
  299. package/src/uploadManager.ts +64 -18
  300. package/src/utils/FixedSizeQueueCache.ts +18 -21
  301. package/src/utils/WithSubscriptions.ts +6 -16
  302. package/src/utils/abort.ts +45 -0
  303. package/src/utils/concurrency.ts +16 -55
  304. package/src/utils/mergeWith/mergeWith.ts +10 -13
  305. package/src/utils/mergeWith/mergeWithCore.ts +24 -81
  306. package/src/utils/mergeWith/mergeWithDiff.ts +15 -33
  307. package/src/utils/objectPath.ts +6 -41
  308. package/src/utils/retryable.ts +10 -14
  309. package/src/utils/throttling/throttle.ts +9 -25
  310. package/src/utils/time.ts +64 -0
  311. package/src/utils.ts +227 -174
  312. package/codegen/i18n/callSites.ts +0 -126
  313. package/codegen/i18n/generate.ts +0 -226
  314. package/codegen/i18n/guards.ts +0 -178
  315. package/codegen/i18n/index.ts +0 -29
  316. package/codegen/i18n/stringMaps.ts +0 -91
  317. package/codegen/i18n/types.ts +0 -100
  318. package/dist/cjs/i18n.browser.js +0 -1131
  319. package/dist/cjs/i18n.browser.js.map +0 -7
  320. package/dist/cjs/i18n.node.js +0 -1160
  321. package/dist/cjs/i18n.node.js.map +0 -7
  322. package/dist/esm/i18n-codegen.mjs +0 -409
  323. package/dist/esm/i18n-codegen.mjs.map +0 -7
  324. package/dist/esm/i18n.mjs +0 -1098
  325. package/dist/esm/i18n.mjs.map +0 -7
  326. package/dist/types/ConnectionRecoveryManager.d.ts +0 -156
  327. package/dist/types/connection.d.ts +0 -139
  328. package/dist/types/entityStore/applyReactionLocally.d.ts +0 -26
  329. package/dist/types/gen/model-decoders/decoders.d.ts +0 -3
  330. package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts +0 -6
  331. package/dist/types/i18n/Streami18n.d.ts +0 -168
  332. package/dist/types/i18n/TranslationBuilder.d.ts +0 -70
  333. package/dist/types/i18n/TranslationStore.d.ts +0 -57
  334. package/dist/types/i18n/dayjs.d.ts +0 -104
  335. package/dist/types/i18n/formatters.d.ts +0 -91
  336. package/dist/types/i18n/index.d.ts +0 -15
  337. package/dist/types/i18n/translator.d.ts +0 -29
  338. package/dist/types/i18n/types.d.ts +0 -262
  339. package/dist/types/i18n-codegen/callSites.d.ts +0 -10
  340. package/dist/types/i18n-codegen/generate.d.ts +0 -15
  341. package/dist/types/i18n-codegen/guards.d.ts +0 -61
  342. package/dist/types/i18n-codegen/index.d.ts +0 -29
  343. package/dist/types/i18n-codegen/stringMaps.d.ts +0 -14
  344. package/dist/types/i18n-codegen/types.d.ts +0 -94
  345. package/dist/types/insights.d.ts +0 -56
  346. package/dist/types/messageOperations/optimistic.d.ts +0 -118
  347. package/dist/types/messageOperations/persistence.d.ts +0 -21
  348. package/dist/types/pagination/utility.queryChannel.d.ts +0 -26
  349. package/dist/types/store.d.ts +0 -125
  350. package/src/ConnectionRecoveryManager.ts +0 -293
  351. package/src/gen/model-decoders/decoders.ts +0 -2710
  352. package/src/gen/model-decoders/event-decoder-mapping.ts +0 -198
  353. package/src/i18n/Streami18n.ts +0 -520
  354. package/src/i18n/TranslationBuilder.ts +0 -176
  355. package/src/i18n/TranslationStore.ts +0 -96
  356. package/src/i18n/dayjs.ts +0 -228
  357. package/src/i18n/formatters.ts +0 -461
  358. package/src/i18n/index.ts +0 -15
  359. package/src/i18n/languageNames.ts +0 -103
  360. package/src/i18n/translator.ts +0 -76
  361. package/src/i18n/types.ts +0 -375
  362. package/src/insights.ts +0 -82
  363. package/src/messageOperations/optimistic.ts +0 -249
  364. package/src/messageOperations/persistence.ts +0 -40
  365. package/src/pagination/utility.queryChannel.ts +0 -84
  366. package/src/store.ts +0 -304
@@ -1,2710 +0,0 @@
1
- type Decoder = (i: any) => any;
2
-
3
- type TypeMapping = Record<string, { type: string; isSingle: boolean }>;
4
-
5
- export const decoders: Record<string, Decoder> = {};
6
-
7
- const decodeDatetimeType = (input: number | string) =>
8
- typeof input === 'number' ? new Date(Math.floor(input / 1000000)) : new Date(input);
9
-
10
- decoders.DatetimeType = decodeDatetimeType;
11
-
12
- const decode = (typeMappings: TypeMapping, input?: Record<string, any>) => {
13
- if (!input || Object.keys(typeMappings).length === 0) return input;
14
-
15
- Object.keys(typeMappings).forEach((key) => {
16
- if (input[key] != null) {
17
- if (typeMappings[key]) {
18
- const decoder = decoders[typeMappings[key].type];
19
- if (decoder) {
20
- if (typeMappings[key].isSingle) {
21
- input[key] = decoder(input[key]);
22
- } else {
23
- Object.keys(input[key]).forEach((k) => {
24
- input[key][k] = decoder(input[key][k]);
25
- });
26
- }
27
- }
28
- }
29
- }
30
- });
31
-
32
- return input;
33
- };
34
-
35
- decoders['AIIndicatorClearEvent'] = (input?: { [key: string]: any }) => {
36
- const typeMappings: TypeMapping = {
37
- created_at: { type: 'DatetimeType', isSingle: true },
38
-
39
- received_at: { type: 'DatetimeType', isSingle: true },
40
- };
41
- return decode(typeMappings, input);
42
- };
43
-
44
- decoders['AIIndicatorStopEvent'] = (input?: { [key: string]: any }) => {
45
- const typeMappings: TypeMapping = {
46
- created_at: { type: 'DatetimeType', isSingle: true },
47
-
48
- received_at: { type: 'DatetimeType', isSingle: true },
49
- };
50
- return decode(typeMappings, input);
51
- };
52
-
53
- decoders['AIIndicatorUpdateEvent'] = (input?: { [key: string]: any }) => {
54
- const typeMappings: TypeMapping = {
55
- created_at: { type: 'DatetimeType', isSingle: true },
56
-
57
- received_at: { type: 'DatetimeType', isSingle: true },
58
- };
59
- return decode(typeMappings, input);
60
- };
61
-
62
- decoders['ActionLogResponse'] = (input?: { [key: string]: any }) => {
63
- const typeMappings: TypeMapping = {
64
- created_at: { type: 'DatetimeType', isSingle: true },
65
-
66
- review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
67
-
68
- target_user: { type: 'UserResponse', isSingle: true },
69
-
70
- user: { type: 'UserResponse', isSingle: true },
71
- };
72
- return decode(typeMappings, input);
73
- };
74
-
75
- decoders['AddUserGroupMembersResponse'] = (input?: { [key: string]: any }) => {
76
- const typeMappings: TypeMapping = {
77
- user_group: { type: 'UserGroupResponse', isSingle: true },
78
- };
79
- return decode(typeMappings, input);
80
- };
81
-
82
- decoders['AppUpdatedEvent'] = (input?: { [key: string]: any }) => {
83
- const typeMappings: TypeMapping = {
84
- created_at: { type: 'DatetimeType', isSingle: true },
85
-
86
- received_at: { type: 'DatetimeType', isSingle: true },
87
- };
88
- return decode(typeMappings, input);
89
- };
90
-
91
- decoders['AppealItemResponse'] = (input?: { [key: string]: any }) => {
92
- const typeMappings: TypeMapping = {
93
- created_at: { type: 'DatetimeType', isSingle: true },
94
-
95
- updated_at: { type: 'DatetimeType', isSingle: true },
96
-
97
- actions: { type: 'ActionLogResponse', isSingle: false },
98
-
99
- flags: { type: 'ModerationFlagResponse', isSingle: false },
100
-
101
- moderation_action: { type: 'ActionLogResponse', isSingle: true },
102
-
103
- original_moderation_action: { type: 'ActionLogResponse', isSingle: true },
104
-
105
- user: { type: 'UserResponse', isSingle: true },
106
- };
107
- return decode(typeMappings, input);
108
- };
109
-
110
- decoders['AutomodDetailsResponse'] = (input?: { [key: string]: any }) => {
111
- const typeMappings: TypeMapping = {
112
- result: { type: 'MessageModerationResult', isSingle: true },
113
- };
114
- return decode(typeMappings, input);
115
- };
116
-
117
- decoders['BanInfoResponse'] = (input?: { [key: string]: any }) => {
118
- const typeMappings: TypeMapping = {
119
- created_at: { type: 'DatetimeType', isSingle: true },
120
-
121
- expires: { type: 'DatetimeType', isSingle: true },
122
-
123
- channel: { type: 'ChannelMetadata', isSingle: true },
124
-
125
- created_by: { type: 'UserResponse', isSingle: true },
126
-
127
- user: { type: 'UserResponse', isSingle: true },
128
- };
129
- return decode(typeMappings, input);
130
- };
131
-
132
- decoders['BanResponse'] = (input?: { [key: string]: any }) => {
133
- const typeMappings: TypeMapping = {
134
- created_at: { type: 'DatetimeType', isSingle: true },
135
-
136
- expires: { type: 'DatetimeType', isSingle: true },
137
-
138
- banned_by: { type: 'UserResponse', isSingle: true },
139
-
140
- channel: { type: 'ChannelResponse', isSingle: true },
141
-
142
- user: { type: 'UserResponse', isSingle: true },
143
- };
144
- return decode(typeMappings, input);
145
- };
146
-
147
- decoders['BlockListResponse'] = (input?: { [key: string]: any }) => {
148
- const typeMappings: TypeMapping = {
149
- created_at: { type: 'DatetimeType', isSingle: true },
150
-
151
- updated_at: { type: 'DatetimeType', isSingle: true },
152
- };
153
- return decode(typeMappings, input);
154
- };
155
-
156
- decoders['BlockUsersResponse'] = (input?: { [key: string]: any }) => {
157
- const typeMappings: TypeMapping = {
158
- created_at: { type: 'DatetimeType', isSingle: true },
159
- };
160
- return decode(typeMappings, input);
161
- };
162
-
163
- decoders['BlockedUserResponse'] = (input?: { [key: string]: any }) => {
164
- const typeMappings: TypeMapping = {
165
- created_at: { type: 'DatetimeType', isSingle: true },
166
-
167
- blocked_user: { type: 'UserResponse', isSingle: true },
168
-
169
- user: { type: 'UserResponse', isSingle: true },
170
- };
171
- return decode(typeMappings, input);
172
- };
173
-
174
- decoders['BulkActionAppealsResponse'] = (input?: { [key: string]: any }) => {
175
- const typeMappings: TypeMapping = {
176
- results: { type: 'BulkAppealResult', isSingle: false },
177
- };
178
- return decode(typeMappings, input);
179
- };
180
-
181
- decoders['BulkAppealResult'] = (input?: { [key: string]: any }) => {
182
- const typeMappings: TypeMapping = {
183
- appeal_item: { type: 'AppealItemResponse', isSingle: true },
184
- };
185
- return decode(typeMappings, input);
186
- };
187
-
188
- decoders['ChannelConfigWithInfo'] = (input?: { [key: string]: any }) => {
189
- const typeMappings: TypeMapping = {
190
- created_at: { type: 'DatetimeType', isSingle: true },
191
-
192
- updated_at: { type: 'DatetimeType', isSingle: true },
193
-
194
- commands: { type: 'Command', isSingle: false },
195
- };
196
- return decode(typeMappings, input);
197
- };
198
-
199
- decoders['ChannelContextResponse'] = (input?: { [key: string]: any }) => {
200
- const typeMappings: TypeMapping = {
201
- created_by: { type: 'UserResponse', isSingle: true },
202
- };
203
- return decode(typeMappings, input);
204
- };
205
-
206
- decoders['ChannelCreatedEvent'] = (input?: { [key: string]: any }) => {
207
- const typeMappings: TypeMapping = {
208
- created_at: { type: 'DatetimeType', isSingle: true },
209
-
210
- channel: { type: 'ChannelResponse', isSingle: true },
211
-
212
- received_at: { type: 'DatetimeType', isSingle: true },
213
-
214
- user: { type: 'UserResponseCommonFields', isSingle: true },
215
- };
216
- return decode(typeMappings, input);
217
- };
218
-
219
- decoders['ChannelDeletedEvent'] = (input?: { [key: string]: any }) => {
220
- const typeMappings: TypeMapping = {
221
- created_at: { type: 'DatetimeType', isSingle: true },
222
-
223
- channel: { type: 'ChannelResponse', isSingle: true },
224
-
225
- received_at: { type: 'DatetimeType', isSingle: true },
226
-
227
- user: { type: 'UserResponseCommonFields', isSingle: true },
228
- };
229
- return decode(typeMappings, input);
230
- };
231
-
232
- decoders['ChannelFrozenEvent'] = (input?: { [key: string]: any }) => {
233
- const typeMappings: TypeMapping = {
234
- created_at: { type: 'DatetimeType', isSingle: true },
235
-
236
- received_at: { type: 'DatetimeType', isSingle: true },
237
- };
238
- return decode(typeMappings, input);
239
- };
240
-
241
- decoders['ChannelHiddenEvent'] = (input?: { [key: string]: any }) => {
242
- const typeMappings: TypeMapping = {
243
- created_at: { type: 'DatetimeType', isSingle: true },
244
-
245
- channel: { type: 'ChannelResponse', isSingle: true },
246
-
247
- received_at: { type: 'DatetimeType', isSingle: true },
248
-
249
- user: { type: 'UserResponseCommonFields', isSingle: true },
250
- };
251
- return decode(typeMappings, input);
252
- };
253
-
254
- decoders['ChannelKickedEvent'] = (input?: { [key: string]: any }) => {
255
- const typeMappings: TypeMapping = {
256
- created_at: { type: 'DatetimeType', isSingle: true },
257
-
258
- received_at: { type: 'DatetimeType', isSingle: true },
259
- };
260
- return decode(typeMappings, input);
261
- };
262
-
263
- decoders['ChannelMemberResponse'] = (input?: { [key: string]: any }) => {
264
- const typeMappings: TypeMapping = {
265
- created_at: { type: 'DatetimeType', isSingle: true },
266
-
267
- updated_at: { type: 'DatetimeType', isSingle: true },
268
-
269
- archived_at: { type: 'DatetimeType', isSingle: true },
270
-
271
- ban_expires: { type: 'DatetimeType', isSingle: true },
272
-
273
- deleted_at: { type: 'DatetimeType', isSingle: true },
274
-
275
- future_channel_ban_expires: { type: 'DatetimeType', isSingle: true },
276
-
277
- invite_accepted_at: { type: 'DatetimeType', isSingle: true },
278
-
279
- invite_rejected_at: { type: 'DatetimeType', isSingle: true },
280
-
281
- pinned_at: { type: 'DatetimeType', isSingle: true },
282
-
283
- user: { type: 'UserResponse', isSingle: true },
284
- };
285
- return decode(typeMappings, input);
286
- };
287
-
288
- decoders['ChannelMetadata'] = (input?: { [key: string]: any }) => {
289
- const typeMappings: TypeMapping = {
290
- last_message_at: { type: 'DatetimeType', isSingle: true },
291
- };
292
- return decode(typeMappings, input);
293
- };
294
-
295
- decoders['ChannelMute'] = (input?: { [key: string]: any }) => {
296
- const typeMappings: TypeMapping = {
297
- created_at: { type: 'DatetimeType', isSingle: true },
298
-
299
- updated_at: { type: 'DatetimeType', isSingle: true },
300
-
301
- expires: { type: 'DatetimeType', isSingle: true },
302
-
303
- channel: { type: 'ChannelResponse', isSingle: true },
304
-
305
- user: { type: 'UserResponse', isSingle: true },
306
- };
307
- return decode(typeMappings, input);
308
- };
309
-
310
- decoders['ChannelPushPreferencesResponse'] = (input?: { [key: string]: any }) => {
311
- const typeMappings: TypeMapping = {
312
- disabled_until: { type: 'DatetimeType', isSingle: true },
313
- };
314
- return decode(typeMappings, input);
315
- };
316
-
317
- decoders['ChannelResponse'] = (input?: { [key: string]: any }) => {
318
- const typeMappings: TypeMapping = {
319
- created_at: { type: 'DatetimeType', isSingle: true },
320
-
321
- updated_at: { type: 'DatetimeType', isSingle: true },
322
-
323
- deleted_at: { type: 'DatetimeType', isSingle: true },
324
-
325
- hide_messages_before: { type: 'DatetimeType', isSingle: true },
326
-
327
- last_message_at: { type: 'DatetimeType', isSingle: true },
328
-
329
- mute_expires_at: { type: 'DatetimeType', isSingle: true },
330
-
331
- truncated_at: { type: 'DatetimeType', isSingle: true },
332
-
333
- members: { type: 'ChannelMemberResponse', isSingle: false },
334
-
335
- config: { type: 'ChannelConfigWithInfo', isSingle: true },
336
-
337
- created_by: { type: 'UserResponse', isSingle: true },
338
-
339
- truncated_by: { type: 'UserResponse', isSingle: true },
340
- };
341
- return decode(typeMappings, input);
342
- };
343
-
344
- decoders['ChannelStateResponse'] = (input?: { [key: string]: any }) => {
345
- const typeMappings: TypeMapping = {
346
- members: { type: 'ChannelMemberResponse', isSingle: false },
347
-
348
- messages: { type: 'MessageResponse', isSingle: false },
349
-
350
- pinned_messages: { type: 'MessageResponse', isSingle: false },
351
-
352
- threads: { type: 'ThreadStateResponse', isSingle: false },
353
-
354
- hide_messages_before: { type: 'DatetimeType', isSingle: true },
355
-
356
- active_live_locations: { type: 'SharedLocationResponseData', isSingle: false },
357
-
358
- pending_messages: { type: 'PendingMessageResponse', isSingle: false },
359
-
360
- read: { type: 'ReadStateResponse', isSingle: false },
361
-
362
- watchers: { type: 'UserResponse', isSingle: false },
363
-
364
- channel: { type: 'ChannelResponse', isSingle: true },
365
-
366
- draft: { type: 'DraftResponse', isSingle: true },
367
-
368
- membership: { type: 'ChannelMemberResponse', isSingle: true },
369
-
370
- push_preferences: { type: 'ChannelPushPreferencesResponse', isSingle: true },
371
- };
372
- return decode(typeMappings, input);
373
- };
374
-
375
- decoders['ChannelStateResponseFields'] = (input?: { [key: string]: any }) => {
376
- const typeMappings: TypeMapping = {
377
- members: { type: 'ChannelMemberResponse', isSingle: false },
378
-
379
- messages: { type: 'MessageResponse', isSingle: false },
380
-
381
- pinned_messages: { type: 'MessageResponse', isSingle: false },
382
-
383
- threads: { type: 'ThreadStateResponse', isSingle: false },
384
-
385
- hide_messages_before: { type: 'DatetimeType', isSingle: true },
386
-
387
- active_live_locations: { type: 'SharedLocationResponseData', isSingle: false },
388
-
389
- pending_messages: { type: 'PendingMessageResponse', isSingle: false },
390
-
391
- read: { type: 'ReadStateResponse', isSingle: false },
392
-
393
- watchers: { type: 'UserResponse', isSingle: false },
394
-
395
- channel: { type: 'ChannelResponse', isSingle: true },
396
-
397
- draft: { type: 'DraftResponse', isSingle: true },
398
-
399
- membership: { type: 'ChannelMemberResponse', isSingle: true },
400
-
401
- push_preferences: { type: 'ChannelPushPreferencesResponse', isSingle: true },
402
- };
403
- return decode(typeMappings, input);
404
- };
405
-
406
- decoders['ChannelTruncatedEvent'] = (input?: { [key: string]: any }) => {
407
- const typeMappings: TypeMapping = {
408
- created_at: { type: 'DatetimeType', isSingle: true },
409
-
410
- channel: { type: 'ChannelResponse', isSingle: true },
411
-
412
- received_at: { type: 'DatetimeType', isSingle: true },
413
-
414
- message: { type: 'MessageResponse', isSingle: true },
415
-
416
- user: { type: 'UserResponseCommonFields', isSingle: true },
417
- };
418
- return decode(typeMappings, input);
419
- };
420
-
421
- decoders['ChannelUnFrozenEvent'] = (input?: { [key: string]: any }) => {
422
- const typeMappings: TypeMapping = {
423
- created_at: { type: 'DatetimeType', isSingle: true },
424
-
425
- received_at: { type: 'DatetimeType', isSingle: true },
426
- };
427
- return decode(typeMappings, input);
428
- };
429
-
430
- decoders['ChannelUpdatedEvent'] = (input?: { [key: string]: any }) => {
431
- const typeMappings: TypeMapping = {
432
- created_at: { type: 'DatetimeType', isSingle: true },
433
-
434
- channel: { type: 'ChannelResponse', isSingle: true },
435
-
436
- received_at: { type: 'DatetimeType', isSingle: true },
437
-
438
- message: { type: 'MessageResponse', isSingle: true },
439
-
440
- user: { type: 'UserResponseCommonFields', isSingle: true },
441
- };
442
- return decode(typeMappings, input);
443
- };
444
-
445
- decoders['ChannelVisibleEvent'] = (input?: { [key: string]: any }) => {
446
- const typeMappings: TypeMapping = {
447
- created_at: { type: 'DatetimeType', isSingle: true },
448
-
449
- channel: { type: 'ChannelResponse', isSingle: true },
450
-
451
- received_at: { type: 'DatetimeType', isSingle: true },
452
-
453
- user: { type: 'UserResponseCommonFields', isSingle: true },
454
- };
455
- return decode(typeMappings, input);
456
- };
457
-
458
- decoders['ChatDraftPayloadResponse'] = (input?: { [key: string]: any }) => {
459
- const typeMappings: TypeMapping = {
460
- mentioned_users: { type: 'UserResponse', isSingle: false },
461
- };
462
- return decode(typeMappings, input);
463
- };
464
-
465
- decoders['ChatDraftResponse'] = (input?: { [key: string]: any }) => {
466
- const typeMappings: TypeMapping = {
467
- created_at: { type: 'DatetimeType', isSingle: true },
468
-
469
- message: { type: 'ChatDraftPayloadResponse', isSingle: true },
470
-
471
- parent_message: { type: 'ChatMessageResponse', isSingle: true },
472
-
473
- quoted_message: { type: 'ChatMessageResponse', isSingle: true },
474
- };
475
- return decode(typeMappings, input);
476
- };
477
-
478
- decoders['ChatMessageResponse'] = (input?: { [key: string]: any }) => {
479
- const typeMappings: TypeMapping = {
480
- created_at: { type: 'DatetimeType', isSingle: true },
481
-
482
- updated_at: { type: 'DatetimeType', isSingle: true },
483
-
484
- latest_reactions: { type: 'ChatReactionResponse', isSingle: false },
485
-
486
- mentioned_users: { type: 'UserResponse', isSingle: false },
487
-
488
- own_reactions: { type: 'ChatReactionResponse', isSingle: false },
489
-
490
- user: { type: 'UserResponse', isSingle: true },
491
-
492
- deleted_at: { type: 'DatetimeType', isSingle: true },
493
-
494
- message_text_updated_at: { type: 'DatetimeType', isSingle: true },
495
-
496
- pin_expires: { type: 'DatetimeType', isSingle: true },
497
-
498
- pinned_at: { type: 'DatetimeType', isSingle: true },
499
-
500
- mentioned_groups: { type: 'UserGroupResponse', isSingle: false },
501
-
502
- thread_participants: { type: 'UserResponse', isSingle: false },
503
-
504
- draft: { type: 'ChatDraftResponse', isSingle: true },
505
-
506
- pinned_by: { type: 'UserResponse', isSingle: true },
507
-
508
- poll: { type: 'PollResponseData', isSingle: true },
509
-
510
- quoted_message: { type: 'ChatMessageResponse', isSingle: true },
511
-
512
- reaction_groups: { type: 'ChatReactionGroupResponse', isSingle: false },
513
-
514
- reminder: { type: 'ChatReminderResponseData', isSingle: true },
515
-
516
- shared_location: { type: 'ChatSharedLocationResponseData', isSingle: true },
517
- };
518
- return decode(typeMappings, input);
519
- };
520
-
521
- decoders['ChatReactionGroupResponse'] = (input?: { [key: string]: any }) => {
522
- const typeMappings: TypeMapping = {
523
- first_reaction_at: { type: 'DatetimeType', isSingle: true },
524
-
525
- last_reaction_at: { type: 'DatetimeType', isSingle: true },
526
-
527
- latest_reactions_by: { type: 'ChatReactionGroupUserResponse', isSingle: false },
528
- };
529
- return decode(typeMappings, input);
530
- };
531
-
532
- decoders['ChatReactionGroupUserResponse'] = (input?: { [key: string]: any }) => {
533
- const typeMappings: TypeMapping = {
534
- created_at: { type: 'DatetimeType', isSingle: true },
535
-
536
- user: { type: 'UserResponse', isSingle: true },
537
- };
538
- return decode(typeMappings, input);
539
- };
540
-
541
- decoders['ChatReactionResponse'] = (input?: { [key: string]: any }) => {
542
- const typeMappings: TypeMapping = {
543
- created_at: { type: 'DatetimeType', isSingle: true },
544
-
545
- updated_at: { type: 'DatetimeType', isSingle: true },
546
-
547
- user: { type: 'UserResponse', isSingle: true },
548
- };
549
- return decode(typeMappings, input);
550
- };
551
-
552
- decoders['ChatReminderResponseData'] = (input?: { [key: string]: any }) => {
553
- const typeMappings: TypeMapping = {
554
- created_at: { type: 'DatetimeType', isSingle: true },
555
-
556
- updated_at: { type: 'DatetimeType', isSingle: true },
557
-
558
- remind_at: { type: 'DatetimeType', isSingle: true },
559
-
560
- message: { type: 'ChatMessageResponse', isSingle: true },
561
-
562
- user: { type: 'UserResponse', isSingle: true },
563
- };
564
- return decode(typeMappings, input);
565
- };
566
-
567
- decoders['ChatSharedLocationResponseData'] = (input?: { [key: string]: any }) => {
568
- const typeMappings: TypeMapping = {
569
- created_at: { type: 'DatetimeType', isSingle: true },
570
-
571
- updated_at: { type: 'DatetimeType', isSingle: true },
572
-
573
- end_at: { type: 'DatetimeType', isSingle: true },
574
-
575
- message: { type: 'ChatMessageResponse', isSingle: true },
576
- };
577
- return decode(typeMappings, input);
578
- };
579
-
580
- decoders['Command'] = (input?: { [key: string]: any }) => {
581
- const typeMappings: TypeMapping = {
582
- created_at: { type: 'DatetimeType', isSingle: true },
583
-
584
- updated_at: { type: 'DatetimeType', isSingle: true },
585
- };
586
- return decode(typeMappings, input);
587
- };
588
-
589
- decoders['ConfigResponse'] = (input?: { [key: string]: any }) => {
590
- const typeMappings: TypeMapping = {
591
- created_at: { type: 'DatetimeType', isSingle: true },
592
-
593
- updated_at: { type: 'DatetimeType', isSingle: true },
594
- };
595
- return decode(typeMappings, input);
596
- };
597
-
598
- decoders['CreateBlockListResponse'] = (input?: { [key: string]: any }) => {
599
- const typeMappings: TypeMapping = {
600
- blocklist: { type: 'BlockListResponse', isSingle: true },
601
- };
602
- return decode(typeMappings, input);
603
- };
604
-
605
- decoders['CreateDraftResponse'] = (input?: { [key: string]: any }) => {
606
- const typeMappings: TypeMapping = {
607
- draft: { type: 'DraftResponse', isSingle: true },
608
- };
609
- return decode(typeMappings, input);
610
- };
611
-
612
- decoders['CreateGuestResponse'] = (input?: { [key: string]: any }) => {
613
- const typeMappings: TypeMapping = {
614
- user: { type: 'UserResponse', isSingle: true },
615
- };
616
- return decode(typeMappings, input);
617
- };
618
-
619
- decoders['CreateUserGroupResponse'] = (input?: { [key: string]: any }) => {
620
- const typeMappings: TypeMapping = {
621
- user_group: { type: 'UserGroupResponse', isSingle: true },
622
- };
623
- return decode(typeMappings, input);
624
- };
625
-
626
- decoders['CustomEvent'] = (input?: { [key: string]: any }) => {
627
- const typeMappings: TypeMapping = {
628
- created_at: { type: 'DatetimeType', isSingle: true },
629
-
630
- received_at: { type: 'DatetimeType', isSingle: true },
631
- };
632
- return decode(typeMappings, input);
633
- };
634
-
635
- decoders['DeleteChannelResponse'] = (input?: { [key: string]: any }) => {
636
- const typeMappings: TypeMapping = {
637
- channel: { type: 'ChannelResponse', isSingle: true },
638
- };
639
- return decode(typeMappings, input);
640
- };
641
-
642
- decoders['DeleteMessageResponse'] = (input?: { [key: string]: any }) => {
643
- const typeMappings: TypeMapping = {
644
- message: { type: 'MessageResponse', isSingle: true },
645
- };
646
- return decode(typeMappings, input);
647
- };
648
-
649
- decoders['DeleteReactionResponse'] = (input?: { [key: string]: any }) => {
650
- const typeMappings: TypeMapping = {
651
- message: { type: 'MessageResponse', isSingle: true },
652
-
653
- reaction: { type: 'ReactionResponse', isSingle: true },
654
- };
655
- return decode(typeMappings, input);
656
- };
657
-
658
- decoders['DeviceResponse'] = (input?: { [key: string]: any }) => {
659
- const typeMappings: TypeMapping = {
660
- created_at: { type: 'DatetimeType', isSingle: true },
661
- };
662
- return decode(typeMappings, input);
663
- };
664
-
665
- decoders['DraftDeletedEvent'] = (input?: { [key: string]: any }) => {
666
- const typeMappings: TypeMapping = {
667
- created_at: { type: 'DatetimeType', isSingle: true },
668
-
669
- received_at: { type: 'DatetimeType', isSingle: true },
670
-
671
- draft: { type: 'DraftResponse', isSingle: true },
672
- };
673
- return decode(typeMappings, input);
674
- };
675
-
676
- decoders['DraftPayloadResponse'] = (input?: { [key: string]: any }) => {
677
- const typeMappings: TypeMapping = {
678
- mentioned_users: { type: 'UserResponse', isSingle: false },
679
- };
680
- return decode(typeMappings, input);
681
- };
682
-
683
- decoders['DraftResponse'] = (input?: { [key: string]: any }) => {
684
- const typeMappings: TypeMapping = {
685
- created_at: { type: 'DatetimeType', isSingle: true },
686
-
687
- message: { type: 'DraftPayloadResponse', isSingle: true },
688
-
689
- channel: { type: 'ChannelResponse', isSingle: true },
690
-
691
- parent_message: { type: 'MessageResponse', isSingle: true },
692
-
693
- quoted_message: { type: 'MessageResponse', isSingle: true },
694
- };
695
- return decode(typeMappings, input);
696
- };
697
-
698
- decoders['DraftUpdatedEvent'] = (input?: { [key: string]: any }) => {
699
- const typeMappings: TypeMapping = {
700
- created_at: { type: 'DatetimeType', isSingle: true },
701
-
702
- received_at: { type: 'DatetimeType', isSingle: true },
703
-
704
- draft: { type: 'DraftResponse', isSingle: true },
705
- };
706
- return decode(typeMappings, input);
707
- };
708
-
709
- decoders['EntityCreatorResponse'] = (input?: { [key: string]: any }) => {
710
- const typeMappings: TypeMapping = {
711
- created_at: { type: 'DatetimeType', isSingle: true },
712
-
713
- updated_at: { type: 'DatetimeType', isSingle: true },
714
-
715
- deactivated_at: { type: 'DatetimeType', isSingle: true },
716
-
717
- deleted_at: { type: 'DatetimeType', isSingle: true },
718
-
719
- last_active: { type: 'DatetimeType', isSingle: true },
720
-
721
- revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
722
- };
723
- return decode(typeMappings, input);
724
- };
725
-
726
- decoders['FeedsBookmarkResponse'] = (input?: { [key: string]: any }) => {
727
- const typeMappings: TypeMapping = {
728
- created_at: { type: 'DatetimeType', isSingle: true },
729
-
730
- updated_at: { type: 'DatetimeType', isSingle: true },
731
-
732
- user: { type: 'UserResponse', isSingle: true },
733
- };
734
- return decode(typeMappings, input);
735
- };
736
-
737
- decoders['FeedsEnrichedCollectionResponse'] = (input?: { [key: string]: any }) => {
738
- const typeMappings: TypeMapping = {
739
- created_at: { type: 'DatetimeType', isSingle: true },
740
-
741
- updated_at: { type: 'DatetimeType', isSingle: true },
742
- };
743
- return decode(typeMappings, input);
744
- };
745
-
746
- decoders['FeedsFeedResponse'] = (input?: { [key: string]: any }) => {
747
- const typeMappings: TypeMapping = {
748
- created_at: { type: 'DatetimeType', isSingle: true },
749
-
750
- updated_at: { type: 'DatetimeType', isSingle: true },
751
-
752
- created_by: { type: 'UserResponse', isSingle: true },
753
-
754
- deleted_at: { type: 'DatetimeType', isSingle: true },
755
- };
756
- return decode(typeMappings, input);
757
- };
758
-
759
- decoders['FeedsReactionGroupResponse'] = (input?: { [key: string]: any }) => {
760
- const typeMappings: TypeMapping = {
761
- first_reaction_at: { type: 'DatetimeType', isSingle: true },
762
-
763
- last_reaction_at: { type: 'DatetimeType', isSingle: true },
764
- };
765
- return decode(typeMappings, input);
766
- };
767
-
768
- decoders['FeedsReactionResponse'] = (input?: { [key: string]: any }) => {
769
- const typeMappings: TypeMapping = {
770
- created_at: { type: 'DatetimeType', isSingle: true },
771
-
772
- updated_at: { type: 'DatetimeType', isSingle: true },
773
-
774
- user: { type: 'UserResponse', isSingle: true },
775
- };
776
- return decode(typeMappings, input);
777
- };
778
-
779
- decoders['FeedsShareResponse'] = (input?: { [key: string]: any }) => {
780
- const typeMappings: TypeMapping = {
781
- created_at: { type: 'DatetimeType', isSingle: true },
782
-
783
- user: { type: 'UserResponse', isSingle: true },
784
- };
785
- return decode(typeMappings, input);
786
- };
787
-
788
- decoders['FeedsV3ActivityResponse'] = (input?: { [key: string]: any }) => {
789
- const typeMappings: TypeMapping = {
790
- created_at: { type: 'DatetimeType', isSingle: true },
791
-
792
- updated_at: { type: 'DatetimeType', isSingle: true },
793
-
794
- comments: { type: 'FeedsV3CommentResponse', isSingle: false },
795
-
796
- latest_reactions: { type: 'FeedsReactionResponse', isSingle: false },
797
-
798
- mentioned_users: { type: 'UserResponse', isSingle: false },
799
-
800
- own_bookmarks: { type: 'FeedsBookmarkResponse', isSingle: false },
801
-
802
- own_reactions: { type: 'FeedsReactionResponse', isSingle: false },
803
-
804
- collections: { type: 'FeedsEnrichedCollectionResponse', isSingle: false },
805
-
806
- reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
807
-
808
- user: { type: 'UserResponse', isSingle: true },
809
-
810
- deleted_at: { type: 'DatetimeType', isSingle: true },
811
-
812
- edited_at: { type: 'DatetimeType', isSingle: true },
813
-
814
- expires_at: { type: 'DatetimeType', isSingle: true },
815
-
816
- friend_reactions: { type: 'FeedsReactionResponse', isSingle: false },
817
-
818
- latest_shares: { type: 'FeedsShareResponse', isSingle: false },
819
-
820
- current_feed: { type: 'FeedsFeedResponse', isSingle: true },
821
-
822
- parent: { type: 'FeedsV3ActivityResponse', isSingle: true },
823
-
824
- poll: { type: 'PollResponseData', isSingle: true },
825
- };
826
- return decode(typeMappings, input);
827
- };
828
-
829
- decoders['FeedsV3CommentResponse'] = (input?: { [key: string]: any }) => {
830
- const typeMappings: TypeMapping = {
831
- created_at: { type: 'DatetimeType', isSingle: true },
832
-
833
- updated_at: { type: 'DatetimeType', isSingle: true },
834
-
835
- mentioned_users: { type: 'UserResponse', isSingle: false },
836
-
837
- own_reactions: { type: 'FeedsReactionResponse', isSingle: false },
838
-
839
- user: { type: 'UserResponse', isSingle: true },
840
-
841
- deleted_at: { type: 'DatetimeType', isSingle: true },
842
-
843
- edited_at: { type: 'DatetimeType', isSingle: true },
844
-
845
- latest_reactions: { type: 'FeedsReactionResponse', isSingle: false },
846
-
847
- reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
848
- };
849
- return decode(typeMappings, input);
850
- };
851
-
852
- decoders['FlagDetailsResponse'] = (input?: { [key: string]: any }) => {
853
- const typeMappings: TypeMapping = {
854
- automod: { type: 'AutomodDetailsResponse', isSingle: true },
855
- };
856
- return decode(typeMappings, input);
857
- };
858
-
859
- decoders['FlagFeedbackResponse'] = (input?: { [key: string]: any }) => {
860
- const typeMappings: TypeMapping = {
861
- created_at: { type: 'DatetimeType', isSingle: true },
862
- };
863
- return decode(typeMappings, input);
864
- };
865
-
866
- decoders['FullUserResponse'] = (input?: { [key: string]: any }) => {
867
- const typeMappings: TypeMapping = {
868
- created_at: { type: 'DatetimeType', isSingle: true },
869
-
870
- updated_at: { type: 'DatetimeType', isSingle: true },
871
-
872
- channel_mutes: { type: 'ChannelMute', isSingle: false },
873
-
874
- devices: { type: 'DeviceResponse', isSingle: false },
875
-
876
- mutes: { type: 'UserMuteResponse', isSingle: false },
877
-
878
- ban_expires: { type: 'DatetimeType', isSingle: true },
879
-
880
- deactivated_at: { type: 'DatetimeType', isSingle: true },
881
-
882
- deleted_at: { type: 'DatetimeType', isSingle: true },
883
-
884
- last_active: { type: 'DatetimeType', isSingle: true },
885
-
886
- revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
887
- };
888
- return decode(typeMappings, input);
889
- };
890
-
891
- decoders['FutureChannelBanResponse'] = (input?: { [key: string]: any }) => {
892
- const typeMappings: TypeMapping = {
893
- created_at: { type: 'DatetimeType', isSingle: true },
894
-
895
- expires: { type: 'DatetimeType', isSingle: true },
896
-
897
- banned_by: { type: 'UserResponse', isSingle: true },
898
-
899
- user: { type: 'UserResponse', isSingle: true },
900
- };
901
- return decode(typeMappings, input);
902
- };
903
-
904
- decoders['GetAppealResponse'] = (input?: { [key: string]: any }) => {
905
- const typeMappings: TypeMapping = {
906
- item: { type: 'AppealItemResponse', isSingle: true },
907
- };
908
- return decode(typeMappings, input);
909
- };
910
-
911
- decoders['GetBlockedUsersResponse'] = (input?: { [key: string]: any }) => {
912
- const typeMappings: TypeMapping = {
913
- blocks: { type: 'BlockedUserResponse', isSingle: false },
914
- };
915
- return decode(typeMappings, input);
916
- };
917
-
918
- decoders['GetConfigResponse'] = (input?: { [key: string]: any }) => {
919
- const typeMappings: TypeMapping = {
920
- config: { type: 'ConfigResponse', isSingle: true },
921
- };
922
- return decode(typeMappings, input);
923
- };
924
-
925
- decoders['GetDraftResponse'] = (input?: { [key: string]: any }) => {
926
- const typeMappings: TypeMapping = {
927
- draft: { type: 'DraftResponse', isSingle: true },
928
- };
929
- return decode(typeMappings, input);
930
- };
931
-
932
- decoders['GetManyMessagesResponse'] = (input?: { [key: string]: any }) => {
933
- const typeMappings: TypeMapping = {
934
- messages: { type: 'MessageResponse', isSingle: false },
935
- };
936
- return decode(typeMappings, input);
937
- };
938
-
939
- decoders['GetMessageResponse'] = (input?: { [key: string]: any }) => {
940
- const typeMappings: TypeMapping = {
941
- message: { type: 'MessageWithChannelResponse', isSingle: true },
942
- };
943
- return decode(typeMappings, input);
944
- };
945
-
946
- decoders['GetPinnedMessagesResponse'] = (input?: { [key: string]: any }) => {
947
- const typeMappings: TypeMapping = {
948
- messages: { type: 'MessageResponse', isSingle: false },
949
- };
950
- return decode(typeMappings, input);
951
- };
952
-
953
- decoders['GetReactionsResponse'] = (input?: { [key: string]: any }) => {
954
- const typeMappings: TypeMapping = {
955
- reactions: { type: 'ReactionResponse', isSingle: false },
956
- };
957
- return decode(typeMappings, input);
958
- };
959
-
960
- decoders['GetRepliesResponse'] = (input?: { [key: string]: any }) => {
961
- const typeMappings: TypeMapping = {
962
- messages: { type: 'MessageResponse', isSingle: false },
963
- };
964
- return decode(typeMappings, input);
965
- };
966
-
967
- decoders['GetThreadResponse'] = (input?: { [key: string]: any }) => {
968
- const typeMappings: TypeMapping = {
969
- thread: { type: 'ThreadStateResponse', isSingle: true },
970
- };
971
- return decode(typeMappings, input);
972
- };
973
-
974
- decoders['GetUserGroupResponse'] = (input?: { [key: string]: any }) => {
975
- const typeMappings: TypeMapping = {
976
- user_group: { type: 'UserGroupResponse', isSingle: true },
977
- };
978
- return decode(typeMappings, input);
979
- };
980
-
981
- decoders['GroupedChannelsBucket'] = (input?: { [key: string]: any }) => {
982
- const typeMappings: TypeMapping = {
983
- channels: { type: 'ChannelStateResponseFields', isSingle: false },
984
- };
985
- return decode(typeMappings, input);
986
- };
987
-
988
- decoders['GroupedQueryChannelsResponse'] = (input?: { [key: string]: any }) => {
989
- const typeMappings: TypeMapping = {
990
- groups: { type: 'GroupedChannelsBucket', isSingle: false },
991
- };
992
- return decode(typeMappings, input);
993
- };
994
-
995
- decoders['HealthCheckEvent'] = (input?: { [key: string]: any }) => {
996
- const typeMappings: TypeMapping = {
997
- created_at: { type: 'DatetimeType', isSingle: true },
998
-
999
- received_at: { type: 'DatetimeType', isSingle: true },
1000
-
1001
- me: { type: 'OwnUserResponse', isSingle: true },
1002
- };
1003
- return decode(typeMappings, input);
1004
- };
1005
-
1006
- decoders['ListBlockListResponse'] = (input?: { [key: string]: any }) => {
1007
- const typeMappings: TypeMapping = {
1008
- blocklists: { type: 'BlockListResponse', isSingle: false },
1009
- };
1010
- return decode(typeMappings, input);
1011
- };
1012
-
1013
- decoders['ListDevicesResponse'] = (input?: { [key: string]: any }) => {
1014
- const typeMappings: TypeMapping = {
1015
- devices: { type: 'DeviceResponse', isSingle: false },
1016
- };
1017
- return decode(typeMappings, input);
1018
- };
1019
-
1020
- decoders['ListQueuesResponse'] = (input?: { [key: string]: any }) => {
1021
- const typeMappings: TypeMapping = {
1022
- queues: { type: 'ModerationQueueResponse', isSingle: false },
1023
- };
1024
- return decode(typeMappings, input);
1025
- };
1026
-
1027
- decoders['ListUserGroupsResponse'] = (input?: { [key: string]: any }) => {
1028
- const typeMappings: TypeMapping = {
1029
- user_groups: { type: 'UserGroupResponse', isSingle: false },
1030
- };
1031
- return decode(typeMappings, input);
1032
- };
1033
-
1034
- decoders['MarkReadResponse'] = (input?: { [key: string]: any }) => {
1035
- const typeMappings: TypeMapping = {
1036
- event: { type: 'MarkReadResponseEvent', isSingle: true },
1037
- };
1038
- return decode(typeMappings, input);
1039
- };
1040
-
1041
- decoders['MarkReadResponseEvent'] = (input?: { [key: string]: any }) => {
1042
- const typeMappings: TypeMapping = {
1043
- created_at: { type: 'DatetimeType', isSingle: true },
1044
-
1045
- channel_last_message_at: { type: 'DatetimeType', isSingle: true },
1046
-
1047
- channel: { type: 'ChannelResponse', isSingle: true },
1048
-
1049
- thread: { type: 'ThreadResponse', isSingle: true },
1050
-
1051
- user: { type: 'UserResponseCommonFields', isSingle: true },
1052
- };
1053
- return decode(typeMappings, input);
1054
- };
1055
-
1056
- decoders['MaxStreakChangedEvent'] = (input?: { [key: string]: any }) => {
1057
- const typeMappings: TypeMapping = {
1058
- created_at: { type: 'DatetimeType', isSingle: true },
1059
-
1060
- received_at: { type: 'DatetimeType', isSingle: true },
1061
- };
1062
- return decode(typeMappings, input);
1063
- };
1064
-
1065
- decoders['MemberAddedEvent'] = (input?: { [key: string]: any }) => {
1066
- const typeMappings: TypeMapping = {
1067
- created_at: { type: 'DatetimeType', isSingle: true },
1068
-
1069
- channel: { type: 'ChannelResponse', isSingle: true },
1070
-
1071
- member: { type: 'ChannelMemberResponse', isSingle: true },
1072
-
1073
- received_at: { type: 'DatetimeType', isSingle: true },
1074
-
1075
- user: { type: 'UserResponseCommonFields', isSingle: true },
1076
- };
1077
- return decode(typeMappings, input);
1078
- };
1079
-
1080
- decoders['MemberRemovedEvent'] = (input?: { [key: string]: any }) => {
1081
- const typeMappings: TypeMapping = {
1082
- created_at: { type: 'DatetimeType', isSingle: true },
1083
-
1084
- channel: { type: 'ChannelResponse', isSingle: true },
1085
-
1086
- member: { type: 'ChannelMemberResponse', isSingle: true },
1087
-
1088
- received_at: { type: 'DatetimeType', isSingle: true },
1089
-
1090
- user: { type: 'UserResponseCommonFields', isSingle: true },
1091
- };
1092
- return decode(typeMappings, input);
1093
- };
1094
-
1095
- decoders['MemberUpdatedEvent'] = (input?: { [key: string]: any }) => {
1096
- const typeMappings: TypeMapping = {
1097
- created_at: { type: 'DatetimeType', isSingle: true },
1098
-
1099
- channel: { type: 'ChannelResponse', isSingle: true },
1100
-
1101
- member: { type: 'ChannelMemberResponse', isSingle: true },
1102
-
1103
- received_at: { type: 'DatetimeType', isSingle: true },
1104
-
1105
- user: { type: 'UserResponseCommonFields', isSingle: true },
1106
- };
1107
- return decode(typeMappings, input);
1108
- };
1109
-
1110
- decoders['MembersResponse'] = (input?: { [key: string]: any }) => {
1111
- const typeMappings: TypeMapping = {
1112
- members: { type: 'ChannelMemberResponse', isSingle: false },
1113
- };
1114
- return decode(typeMappings, input);
1115
- };
1116
-
1117
- decoders['MessageActionResponse'] = (input?: { [key: string]: any }) => {
1118
- const typeMappings: TypeMapping = {
1119
- message: { type: 'MessageResponse', isSingle: true },
1120
- };
1121
- return decode(typeMappings, input);
1122
- };
1123
-
1124
- decoders['MessageDeletedEvent'] = (input?: { [key: string]: any }) => {
1125
- const typeMappings: TypeMapping = {
1126
- created_at: { type: 'DatetimeType', isSingle: true },
1127
-
1128
- message: { type: 'MessageResponse', isSingle: true },
1129
-
1130
- received_at: { type: 'DatetimeType', isSingle: true },
1131
-
1132
- user: { type: 'UserResponseCommonFields', isSingle: true },
1133
- };
1134
- return decode(typeMappings, input);
1135
- };
1136
-
1137
- decoders['MessageDeliveredEvent'] = (input?: { [key: string]: any }) => {
1138
- const typeMappings: TypeMapping = {
1139
- created_at: { type: 'DatetimeType', isSingle: true },
1140
-
1141
- received_at: { type: 'DatetimeType', isSingle: true },
1142
-
1143
- channel: { type: 'ChannelResponse', isSingle: true },
1144
-
1145
- user: { type: 'UserResponseCommonFields', isSingle: true },
1146
- };
1147
- return decode(typeMappings, input);
1148
- };
1149
-
1150
- decoders['MessageFlagResponse'] = (input?: { [key: string]: any }) => {
1151
- const typeMappings: TypeMapping = {
1152
- created_at: { type: 'DatetimeType', isSingle: true },
1153
-
1154
- updated_at: { type: 'DatetimeType', isSingle: true },
1155
-
1156
- approved_at: { type: 'DatetimeType', isSingle: true },
1157
-
1158
- rejected_at: { type: 'DatetimeType', isSingle: true },
1159
-
1160
- reviewed_at: { type: 'DatetimeType', isSingle: true },
1161
-
1162
- details: { type: 'FlagDetailsResponse', isSingle: true },
1163
-
1164
- message: { type: 'MessageResponse', isSingle: true },
1165
-
1166
- moderation_feedback: { type: 'FlagFeedbackResponse', isSingle: true },
1167
-
1168
- moderation_result: { type: 'MessageModerationResult', isSingle: true },
1169
-
1170
- reviewed_by: { type: 'UserResponse', isSingle: true },
1171
-
1172
- user: { type: 'UserResponse', isSingle: true },
1173
- };
1174
- return decode(typeMappings, input);
1175
- };
1176
-
1177
- decoders['MessageModerationResult'] = (input?: { [key: string]: any }) => {
1178
- const typeMappings: TypeMapping = {
1179
- created_at: { type: 'DatetimeType', isSingle: true },
1180
-
1181
- updated_at: { type: 'DatetimeType', isSingle: true },
1182
- };
1183
- return decode(typeMappings, input);
1184
- };
1185
-
1186
- decoders['MessageNewEvent'] = (input?: { [key: string]: any }) => {
1187
- const typeMappings: TypeMapping = {
1188
- created_at: { type: 'DatetimeType', isSingle: true },
1189
-
1190
- message: { type: 'MessageResponse', isSingle: true },
1191
-
1192
- received_at: { type: 'DatetimeType', isSingle: true },
1193
-
1194
- thread_participants: { type: 'UserResponseCommonFields', isSingle: false },
1195
-
1196
- channel: { type: 'ChannelResponse', isSingle: true },
1197
-
1198
- user: { type: 'UserResponseCommonFields', isSingle: true },
1199
- };
1200
- return decode(typeMappings, input);
1201
- };
1202
-
1203
- decoders['MessageReadEvent'] = (input?: { [key: string]: any }) => {
1204
- const typeMappings: TypeMapping = {
1205
- created_at: { type: 'DatetimeType', isSingle: true },
1206
-
1207
- received_at: { type: 'DatetimeType', isSingle: true },
1208
-
1209
- channel: { type: 'ChannelResponse', isSingle: true },
1210
-
1211
- thread: { type: 'ThreadResponse', isSingle: true },
1212
-
1213
- user: { type: 'UserResponseCommonFields', isSingle: true },
1214
- };
1215
- return decode(typeMappings, input);
1216
- };
1217
-
1218
- decoders['MessageResponse'] = (input?: { [key: string]: any }) => {
1219
- const typeMappings: TypeMapping = {
1220
- created_at: { type: 'DatetimeType', isSingle: true },
1221
-
1222
- updated_at: { type: 'DatetimeType', isSingle: true },
1223
-
1224
- latest_reactions: { type: 'ReactionResponse', isSingle: false },
1225
-
1226
- mentioned_users: { type: 'UserResponse', isSingle: false },
1227
-
1228
- own_reactions: { type: 'ReactionResponse', isSingle: false },
1229
-
1230
- user: { type: 'UserResponse', isSingle: true },
1231
-
1232
- deleted_at: { type: 'DatetimeType', isSingle: true },
1233
-
1234
- message_text_updated_at: { type: 'DatetimeType', isSingle: true },
1235
-
1236
- pin_expires: { type: 'DatetimeType', isSingle: true },
1237
-
1238
- pinned_at: { type: 'DatetimeType', isSingle: true },
1239
-
1240
- mentioned_groups: { type: 'UserGroupResponse', isSingle: false },
1241
-
1242
- thread_participants: { type: 'UserResponse', isSingle: false },
1243
-
1244
- draft: { type: 'DraftResponse', isSingle: true },
1245
-
1246
- pinned_by: { type: 'UserResponse', isSingle: true },
1247
-
1248
- poll: { type: 'PollResponseData', isSingle: true },
1249
-
1250
- quoted_message: { type: 'MessageResponse', isSingle: true },
1251
-
1252
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1253
-
1254
- reminder: { type: 'ReminderResponseData', isSingle: true },
1255
-
1256
- shared_location: { type: 'SharedLocationResponseData', isSingle: true },
1257
- };
1258
- return decode(typeMappings, input);
1259
- };
1260
-
1261
- decoders['MessageUndeletedEvent'] = (input?: { [key: string]: any }) => {
1262
- const typeMappings: TypeMapping = {
1263
- created_at: { type: 'DatetimeType', isSingle: true },
1264
-
1265
- message: { type: 'MessageResponse', isSingle: true },
1266
-
1267
- received_at: { type: 'DatetimeType', isSingle: true },
1268
- };
1269
- return decode(typeMappings, input);
1270
- };
1271
-
1272
- decoders['MessageUpdatedEvent'] = (input?: { [key: string]: any }) => {
1273
- const typeMappings: TypeMapping = {
1274
- created_at: { type: 'DatetimeType', isSingle: true },
1275
-
1276
- message: { type: 'MessageResponse', isSingle: true },
1277
-
1278
- received_at: { type: 'DatetimeType', isSingle: true },
1279
-
1280
- user: { type: 'UserResponseCommonFields', isSingle: true },
1281
- };
1282
- return decode(typeMappings, input);
1283
- };
1284
-
1285
- decoders['MessageWithChannelResponse'] = (input?: { [key: string]: any }) => {
1286
- const typeMappings: TypeMapping = {
1287
- created_at: { type: 'DatetimeType', isSingle: true },
1288
-
1289
- updated_at: { type: 'DatetimeType', isSingle: true },
1290
-
1291
- latest_reactions: { type: 'ReactionResponse', isSingle: false },
1292
-
1293
- mentioned_users: { type: 'UserResponse', isSingle: false },
1294
-
1295
- own_reactions: { type: 'ReactionResponse', isSingle: false },
1296
-
1297
- channel: { type: 'ChannelResponse', isSingle: true },
1298
-
1299
- user: { type: 'UserResponse', isSingle: true },
1300
-
1301
- deleted_at: { type: 'DatetimeType', isSingle: true },
1302
-
1303
- message_text_updated_at: { type: 'DatetimeType', isSingle: true },
1304
-
1305
- pin_expires: { type: 'DatetimeType', isSingle: true },
1306
-
1307
- pinned_at: { type: 'DatetimeType', isSingle: true },
1308
-
1309
- mentioned_groups: { type: 'UserGroupResponse', isSingle: false },
1310
-
1311
- thread_participants: { type: 'UserResponse', isSingle: false },
1312
-
1313
- draft: { type: 'DraftResponse', isSingle: true },
1314
-
1315
- pinned_by: { type: 'UserResponse', isSingle: true },
1316
-
1317
- poll: { type: 'PollResponseData', isSingle: true },
1318
-
1319
- quoted_message: { type: 'MessageResponse', isSingle: true },
1320
-
1321
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1322
-
1323
- reminder: { type: 'ReminderResponseData', isSingle: true },
1324
-
1325
- shared_location: { type: 'SharedLocationResponseData', isSingle: true },
1326
- };
1327
- return decode(typeMappings, input);
1328
- };
1329
-
1330
- decoders['ModerationCallResponse'] = (input?: { [key: string]: any }) => {
1331
- const typeMappings: TypeMapping = {
1332
- created_at: { type: 'DatetimeType', isSingle: true },
1333
-
1334
- updated_at: { type: 'DatetimeType', isSingle: true },
1335
-
1336
- ended_at: { type: 'DatetimeType', isSingle: true },
1337
-
1338
- starts_at: { type: 'DatetimeType', isSingle: true },
1339
-
1340
- created_by: { type: 'UserResponse', isSingle: true },
1341
- };
1342
- return decode(typeMappings, input);
1343
- };
1344
-
1345
- decoders['ModerationCustomActionEvent'] = (input?: { [key: string]: any }) => {
1346
- const typeMappings: TypeMapping = {
1347
- created_at: { type: 'DatetimeType', isSingle: true },
1348
-
1349
- review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
1350
-
1351
- received_at: { type: 'DatetimeType', isSingle: true },
1352
-
1353
- message: { type: 'MessageResponse', isSingle: true },
1354
- };
1355
- return decode(typeMappings, input);
1356
- };
1357
-
1358
- decoders['ModerationFlagResponse'] = (input?: { [key: string]: any }) => {
1359
- const typeMappings: TypeMapping = {
1360
- created_at: { type: 'DatetimeType', isSingle: true },
1361
-
1362
- updated_at: { type: 'DatetimeType', isSingle: true },
1363
-
1364
- review_queue_item: { type: 'ReviewQueueItemResponse', isSingle: true },
1365
-
1366
- user: { type: 'UserResponse', isSingle: true },
1367
- };
1368
- return decode(typeMappings, input);
1369
- };
1370
-
1371
- decoders['ModerationFlaggedEvent'] = (input?: { [key: string]: any }) => {
1372
- const typeMappings: TypeMapping = {
1373
- created_at: { type: 'DatetimeType', isSingle: true },
1374
-
1375
- received_at: { type: 'DatetimeType', isSingle: true },
1376
- };
1377
- return decode(typeMappings, input);
1378
- };
1379
-
1380
- decoders['ModerationMarkReviewedEvent'] = (input?: { [key: string]: any }) => {
1381
- const typeMappings: TypeMapping = {
1382
- created_at: { type: 'DatetimeType', isSingle: true },
1383
-
1384
- item: { type: 'ReviewQueueItemResponse', isSingle: true },
1385
-
1386
- received_at: { type: 'DatetimeType', isSingle: true },
1387
-
1388
- message: { type: 'MessageResponse', isSingle: true },
1389
- };
1390
- return decode(typeMappings, input);
1391
- };
1392
-
1393
- decoders['ModerationQueueResponse'] = (input?: { [key: string]: any }) => {
1394
- const typeMappings: TypeMapping = {
1395
- created_at: { type: 'DatetimeType', isSingle: true },
1396
-
1397
- updated_at: { type: 'DatetimeType', isSingle: true },
1398
- };
1399
- return decode(typeMappings, input);
1400
- };
1401
-
1402
- decoders['MuteChannelResponse'] = (input?: { [key: string]: any }) => {
1403
- const typeMappings: TypeMapping = {
1404
- channel_mutes: { type: 'ChannelMute', isSingle: false },
1405
-
1406
- channel_mute: { type: 'ChannelMute', isSingle: true },
1407
-
1408
- own_user: { type: 'OwnUserResponse', isSingle: true },
1409
- };
1410
- return decode(typeMappings, input);
1411
- };
1412
-
1413
- decoders['MuteResponse'] = (input?: { [key: string]: any }) => {
1414
- const typeMappings: TypeMapping = {
1415
- mutes: { type: 'UserMuteResponse', isSingle: false },
1416
-
1417
- own_user: { type: 'OwnUserResponse', isSingle: true },
1418
- };
1419
- return decode(typeMappings, input);
1420
- };
1421
-
1422
- decoders['NotificationAddedToChannelEvent'] = (input?: { [key: string]: any }) => {
1423
- const typeMappings: TypeMapping = {
1424
- created_at: { type: 'DatetimeType', isSingle: true },
1425
-
1426
- channel: { type: 'ChannelResponse', isSingle: true },
1427
-
1428
- member: { type: 'ChannelMemberResponse', isSingle: true },
1429
-
1430
- received_at: { type: 'DatetimeType', isSingle: true },
1431
- };
1432
- return decode(typeMappings, input);
1433
- };
1434
-
1435
- decoders['NotificationChannelDeletedEvent'] = (input?: { [key: string]: any }) => {
1436
- const typeMappings: TypeMapping = {
1437
- created_at: { type: 'DatetimeType', isSingle: true },
1438
-
1439
- channel: { type: 'ChannelResponse', isSingle: true },
1440
-
1441
- received_at: { type: 'DatetimeType', isSingle: true },
1442
- };
1443
- return decode(typeMappings, input);
1444
- };
1445
-
1446
- decoders['NotificationChannelMutesUpdatedEvent'] = (input?: { [key: string]: any }) => {
1447
- const typeMappings: TypeMapping = {
1448
- created_at: { type: 'DatetimeType', isSingle: true },
1449
-
1450
- me: { type: 'OwnUserResponse', isSingle: true },
1451
-
1452
- received_at: { type: 'DatetimeType', isSingle: true },
1453
- };
1454
- return decode(typeMappings, input);
1455
- };
1456
-
1457
- decoders['NotificationChannelTruncatedEvent'] = (input?: { [key: string]: any }) => {
1458
- const typeMappings: TypeMapping = {
1459
- created_at: { type: 'DatetimeType', isSingle: true },
1460
-
1461
- channel: { type: 'ChannelResponse', isSingle: true },
1462
-
1463
- received_at: { type: 'DatetimeType', isSingle: true },
1464
-
1465
- message: { type: 'MessageResponse', isSingle: true },
1466
- };
1467
- return decode(typeMappings, input);
1468
- };
1469
-
1470
- decoders['NotificationInviteAcceptedEvent'] = (input?: { [key: string]: any }) => {
1471
- const typeMappings: TypeMapping = {
1472
- created_at: { type: 'DatetimeType', isSingle: true },
1473
-
1474
- channel: { type: 'ChannelResponse', isSingle: true },
1475
-
1476
- member: { type: 'ChannelMemberResponse', isSingle: true },
1477
-
1478
- received_at: { type: 'DatetimeType', isSingle: true },
1479
-
1480
- user: { type: 'UserResponseCommonFields', isSingle: true },
1481
- };
1482
- return decode(typeMappings, input);
1483
- };
1484
-
1485
- decoders['NotificationInviteRejectedEvent'] = (input?: { [key: string]: any }) => {
1486
- const typeMappings: TypeMapping = {
1487
- created_at: { type: 'DatetimeType', isSingle: true },
1488
-
1489
- channel: { type: 'ChannelResponse', isSingle: true },
1490
-
1491
- member: { type: 'ChannelMemberResponse', isSingle: true },
1492
-
1493
- received_at: { type: 'DatetimeType', isSingle: true },
1494
-
1495
- user: { type: 'UserResponseCommonFields', isSingle: true },
1496
- };
1497
- return decode(typeMappings, input);
1498
- };
1499
-
1500
- decoders['NotificationInvitedEvent'] = (input?: { [key: string]: any }) => {
1501
- const typeMappings: TypeMapping = {
1502
- created_at: { type: 'DatetimeType', isSingle: true },
1503
-
1504
- channel: { type: 'ChannelResponse', isSingle: true },
1505
-
1506
- member: { type: 'ChannelMemberResponse', isSingle: true },
1507
-
1508
- received_at: { type: 'DatetimeType', isSingle: true },
1509
-
1510
- user: { type: 'UserResponseCommonFields', isSingle: true },
1511
- };
1512
- return decode(typeMappings, input);
1513
- };
1514
-
1515
- decoders['NotificationMarkReadEvent'] = (input?: { [key: string]: any }) => {
1516
- const typeMappings: TypeMapping = {
1517
- created_at: { type: 'DatetimeType', isSingle: true },
1518
-
1519
- received_at: { type: 'DatetimeType', isSingle: true },
1520
-
1521
- channel: { type: 'ChannelResponse', isSingle: true },
1522
-
1523
- thread: { type: 'ThreadResponse', isSingle: true },
1524
-
1525
- user: { type: 'UserResponseCommonFields', isSingle: true },
1526
- };
1527
- return decode(typeMappings, input);
1528
- };
1529
-
1530
- decoders['NotificationMarkUnreadEvent'] = (input?: { [key: string]: any }) => {
1531
- const typeMappings: TypeMapping = {
1532
- created_at: { type: 'DatetimeType', isSingle: true },
1533
-
1534
- last_read_at: { type: 'DatetimeType', isSingle: true },
1535
-
1536
- received_at: { type: 'DatetimeType', isSingle: true },
1537
-
1538
- channel: { type: 'ChannelResponse', isSingle: true },
1539
-
1540
- user: { type: 'UserResponseCommonFields', isSingle: true },
1541
- };
1542
- return decode(typeMappings, input);
1543
- };
1544
-
1545
- decoders['NotificationMutesUpdatedEvent'] = (input?: { [key: string]: any }) => {
1546
- const typeMappings: TypeMapping = {
1547
- created_at: { type: 'DatetimeType', isSingle: true },
1548
-
1549
- me: { type: 'OwnUserResponse', isSingle: true },
1550
-
1551
- received_at: { type: 'DatetimeType', isSingle: true },
1552
- };
1553
- return decode(typeMappings, input);
1554
- };
1555
-
1556
- decoders['NotificationNewMessageEvent'] = (input?: { [key: string]: any }) => {
1557
- const typeMappings: TypeMapping = {
1558
- created_at: { type: 'DatetimeType', isSingle: true },
1559
-
1560
- channel: { type: 'ChannelResponse', isSingle: true },
1561
-
1562
- message: { type: 'MessageResponse', isSingle: true },
1563
-
1564
- received_at: { type: 'DatetimeType', isSingle: true },
1565
-
1566
- thread_participants: { type: 'UserResponseCommonFields', isSingle: false },
1567
- };
1568
- return decode(typeMappings, input);
1569
- };
1570
-
1571
- decoders['NotificationRemovedFromChannelEvent'] = (input?: { [key: string]: any }) => {
1572
- const typeMappings: TypeMapping = {
1573
- created_at: { type: 'DatetimeType', isSingle: true },
1574
-
1575
- channel: { type: 'ChannelResponse', isSingle: true },
1576
-
1577
- member: { type: 'ChannelMemberResponse', isSingle: true },
1578
-
1579
- received_at: { type: 'DatetimeType', isSingle: true },
1580
-
1581
- user: { type: 'UserResponseCommonFields', isSingle: true },
1582
- };
1583
- return decode(typeMappings, input);
1584
- };
1585
-
1586
- decoders['NotificationThreadMessageNewEvent'] = (input?: { [key: string]: any }) => {
1587
- const typeMappings: TypeMapping = {
1588
- created_at: { type: 'DatetimeType', isSingle: true },
1589
-
1590
- channel: { type: 'ChannelResponse', isSingle: true },
1591
-
1592
- message: { type: 'MessageResponse', isSingle: true },
1593
-
1594
- received_at: { type: 'DatetimeType', isSingle: true },
1595
-
1596
- thread_participants: { type: 'UserResponseCommonFields', isSingle: false },
1597
- };
1598
- return decode(typeMappings, input);
1599
- };
1600
-
1601
- decoders['OwnUserResponse'] = (input?: { [key: string]: any }) => {
1602
- const typeMappings: TypeMapping = {
1603
- created_at: { type: 'DatetimeType', isSingle: true },
1604
-
1605
- updated_at: { type: 'DatetimeType', isSingle: true },
1606
-
1607
- channel_mutes: { type: 'ChannelMute', isSingle: false },
1608
-
1609
- devices: { type: 'DeviceResponse', isSingle: false },
1610
-
1611
- mutes: { type: 'UserMuteResponse', isSingle: false },
1612
-
1613
- deactivated_at: { type: 'DatetimeType', isSingle: true },
1614
-
1615
- deleted_at: { type: 'DatetimeType', isSingle: true },
1616
-
1617
- last_active: { type: 'DatetimeType', isSingle: true },
1618
-
1619
- revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
1620
-
1621
- push_preferences: { type: 'PushPreferencesResponse', isSingle: true },
1622
- };
1623
- return decode(typeMappings, input);
1624
- };
1625
-
1626
- decoders['PendingMessageEvent'] = (input?: { [key: string]: any }) => {
1627
- const typeMappings: TypeMapping = {
1628
- created_at: { type: 'DatetimeType', isSingle: true },
1629
-
1630
- received_at: { type: 'DatetimeType', isSingle: true },
1631
-
1632
- channel: { type: 'ChannelResponse', isSingle: true },
1633
-
1634
- message: { type: 'MessageResponse', isSingle: true },
1635
-
1636
- user: { type: 'UserResponse', isSingle: true },
1637
- };
1638
- return decode(typeMappings, input);
1639
- };
1640
-
1641
- decoders['PendingMessageResponse'] = (input?: { [key: string]: any }) => {
1642
- const typeMappings: TypeMapping = {
1643
- channel: { type: 'ChannelResponse', isSingle: true },
1644
-
1645
- message: { type: 'MessageResponse', isSingle: true },
1646
-
1647
- user: { type: 'UserResponse', isSingle: true },
1648
- };
1649
- return decode(typeMappings, input);
1650
- };
1651
-
1652
- decoders['PollClosedEvent'] = (input?: { [key: string]: any }) => {
1653
- const typeMappings: TypeMapping = {
1654
- created_at: { type: 'DatetimeType', isSingle: true },
1655
-
1656
- poll: { type: 'PollResponseData', isSingle: true },
1657
-
1658
- received_at: { type: 'DatetimeType', isSingle: true },
1659
- };
1660
- return decode(typeMappings, input);
1661
- };
1662
-
1663
- decoders['PollDeletedEvent'] = (input?: { [key: string]: any }) => {
1664
- const typeMappings: TypeMapping = {
1665
- created_at: { type: 'DatetimeType', isSingle: true },
1666
-
1667
- poll: { type: 'PollResponseData', isSingle: true },
1668
-
1669
- received_at: { type: 'DatetimeType', isSingle: true },
1670
- };
1671
- return decode(typeMappings, input);
1672
- };
1673
-
1674
- decoders['PollResponse'] = (input?: { [key: string]: any }) => {
1675
- const typeMappings: TypeMapping = {
1676
- poll: { type: 'PollResponseData', isSingle: true },
1677
- };
1678
- return decode(typeMappings, input);
1679
- };
1680
-
1681
- decoders['PollResponseData'] = (input?: { [key: string]: any }) => {
1682
- const typeMappings: TypeMapping = {
1683
- created_at: { type: 'DatetimeType', isSingle: true },
1684
-
1685
- updated_at: { type: 'DatetimeType', isSingle: true },
1686
-
1687
- latest_answers: { type: 'PollVoteResponseData', isSingle: false },
1688
-
1689
- own_votes: { type: 'PollVoteResponseData', isSingle: false },
1690
-
1691
- created_by: { type: 'UserResponse', isSingle: true },
1692
- };
1693
- return decode(typeMappings, input);
1694
- };
1695
-
1696
- decoders['PollUpdatedEvent'] = (input?: { [key: string]: any }) => {
1697
- const typeMappings: TypeMapping = {
1698
- created_at: { type: 'DatetimeType', isSingle: true },
1699
-
1700
- poll: { type: 'PollResponseData', isSingle: true },
1701
-
1702
- received_at: { type: 'DatetimeType', isSingle: true },
1703
- };
1704
- return decode(typeMappings, input);
1705
- };
1706
-
1707
- decoders['PollVoteCastedEvent'] = (input?: { [key: string]: any }) => {
1708
- const typeMappings: TypeMapping = {
1709
- created_at: { type: 'DatetimeType', isSingle: true },
1710
-
1711
- poll: { type: 'PollResponseData', isSingle: true },
1712
-
1713
- poll_vote: { type: 'PollVoteResponseData', isSingle: true },
1714
-
1715
- received_at: { type: 'DatetimeType', isSingle: true },
1716
- };
1717
- return decode(typeMappings, input);
1718
- };
1719
-
1720
- decoders['PollVoteChangedEvent'] = (input?: { [key: string]: any }) => {
1721
- const typeMappings: TypeMapping = {
1722
- created_at: { type: 'DatetimeType', isSingle: true },
1723
-
1724
- poll: { type: 'PollResponseData', isSingle: true },
1725
-
1726
- poll_vote: { type: 'PollVoteResponseData', isSingle: true },
1727
-
1728
- received_at: { type: 'DatetimeType', isSingle: true },
1729
- };
1730
- return decode(typeMappings, input);
1731
- };
1732
-
1733
- decoders['PollVoteRemovedEvent'] = (input?: { [key: string]: any }) => {
1734
- const typeMappings: TypeMapping = {
1735
- created_at: { type: 'DatetimeType', isSingle: true },
1736
-
1737
- poll: { type: 'PollResponseData', isSingle: true },
1738
-
1739
- poll_vote: { type: 'PollVoteResponseData', isSingle: true },
1740
-
1741
- received_at: { type: 'DatetimeType', isSingle: true },
1742
- };
1743
- return decode(typeMappings, input);
1744
- };
1745
-
1746
- decoders['PollVoteResponse'] = (input?: { [key: string]: any }) => {
1747
- const typeMappings: TypeMapping = {
1748
- poll: { type: 'PollResponseData', isSingle: true },
1749
-
1750
- vote: { type: 'PollVoteResponseData', isSingle: true },
1751
- };
1752
- return decode(typeMappings, input);
1753
- };
1754
-
1755
- decoders['PollVoteResponseData'] = (input?: { [key: string]: any }) => {
1756
- const typeMappings: TypeMapping = {
1757
- created_at: { type: 'DatetimeType', isSingle: true },
1758
-
1759
- updated_at: { type: 'DatetimeType', isSingle: true },
1760
-
1761
- user: { type: 'UserResponse', isSingle: true },
1762
- };
1763
- return decode(typeMappings, input);
1764
- };
1765
-
1766
- decoders['PollVotesResponse'] = (input?: { [key: string]: any }) => {
1767
- const typeMappings: TypeMapping = {
1768
- votes: { type: 'PollVoteResponseData', isSingle: false },
1769
- };
1770
- return decode(typeMappings, input);
1771
- };
1772
-
1773
- decoders['PushPreferencesResponse'] = (input?: { [key: string]: any }) => {
1774
- const typeMappings: TypeMapping = {
1775
- disabled_until: { type: 'DatetimeType', isSingle: true },
1776
- };
1777
- return decode(typeMappings, input);
1778
- };
1779
-
1780
- decoders['QueryAppealsResponse'] = (input?: { [key: string]: any }) => {
1781
- const typeMappings: TypeMapping = {
1782
- items: { type: 'AppealItemResponse', isSingle: false },
1783
- };
1784
- return decode(typeMappings, input);
1785
- };
1786
-
1787
- decoders['QueryBannedUsersResponse'] = (input?: { [key: string]: any }) => {
1788
- const typeMappings: TypeMapping = {
1789
- bans: { type: 'BanResponse', isSingle: false },
1790
- };
1791
- return decode(typeMappings, input);
1792
- };
1793
-
1794
- decoders['QueryChannelsResponse'] = (input?: { [key: string]: any }) => {
1795
- const typeMappings: TypeMapping = {
1796
- channels: { type: 'ChannelStateResponseFields', isSingle: false },
1797
- };
1798
- return decode(typeMappings, input);
1799
- };
1800
-
1801
- decoders['QueryDraftsResponse'] = (input?: { [key: string]: any }) => {
1802
- const typeMappings: TypeMapping = {
1803
- drafts: { type: 'DraftResponse', isSingle: false },
1804
- };
1805
- return decode(typeMappings, input);
1806
- };
1807
-
1808
- decoders['QueryFutureChannelBansResponse'] = (input?: { [key: string]: any }) => {
1809
- const typeMappings: TypeMapping = {
1810
- bans: { type: 'FutureChannelBanResponse', isSingle: false },
1811
- };
1812
- return decode(typeMappings, input);
1813
- };
1814
-
1815
- decoders['QueryMessageFlagsResponse'] = (input?: { [key: string]: any }) => {
1816
- const typeMappings: TypeMapping = {
1817
- flags: { type: 'MessageFlagResponse', isSingle: false },
1818
- };
1819
- return decode(typeMappings, input);
1820
- };
1821
-
1822
- decoders['QueryModerationConfigsResponse'] = (input?: { [key: string]: any }) => {
1823
- const typeMappings: TypeMapping = {
1824
- configs: { type: 'ConfigResponse', isSingle: false },
1825
- };
1826
- return decode(typeMappings, input);
1827
- };
1828
-
1829
- decoders['QueryPollsResponse'] = (input?: { [key: string]: any }) => {
1830
- const typeMappings: TypeMapping = {
1831
- polls: { type: 'PollResponseData', isSingle: false },
1832
- };
1833
- return decode(typeMappings, input);
1834
- };
1835
-
1836
- decoders['QueryReactionsResponse'] = (input?: { [key: string]: any }) => {
1837
- const typeMappings: TypeMapping = {
1838
- reactions: { type: 'ReactionResponse', isSingle: false },
1839
- };
1840
- return decode(typeMappings, input);
1841
- };
1842
-
1843
- decoders['QueryRemindersResponse'] = (input?: { [key: string]: any }) => {
1844
- const typeMappings: TypeMapping = {
1845
- reminders: { type: 'ReminderResponseData', isSingle: false },
1846
- };
1847
- return decode(typeMappings, input);
1848
- };
1849
-
1850
- decoders['QueryReviewQueueResponse'] = (input?: { [key: string]: any }) => {
1851
- const typeMappings: TypeMapping = {
1852
- items: { type: 'ReviewQueueItemResponse', isSingle: false },
1853
- };
1854
- return decode(typeMappings, input);
1855
- };
1856
-
1857
- decoders['QueryThreadsResponse'] = (input?: { [key: string]: any }) => {
1858
- const typeMappings: TypeMapping = {
1859
- threads: { type: 'ThreadStateResponse', isSingle: false },
1860
- };
1861
- return decode(typeMappings, input);
1862
- };
1863
-
1864
- decoders['QueryUsersResponse'] = (input?: { [key: string]: any }) => {
1865
- const typeMappings: TypeMapping = {
1866
- users: { type: 'FullUserResponse', isSingle: false },
1867
- };
1868
- return decode(typeMappings, input);
1869
- };
1870
-
1871
- decoders['QueueResponse'] = (input?: { [key: string]: any }) => {
1872
- const typeMappings: TypeMapping = {
1873
- queue: { type: 'ModerationQueueResponse', isSingle: true },
1874
- };
1875
- return decode(typeMappings, input);
1876
- };
1877
-
1878
- decoders['Reaction'] = (input?: { [key: string]: any }) => {
1879
- const typeMappings: TypeMapping = {
1880
- created_at: { type: 'DatetimeType', isSingle: true },
1881
-
1882
- updated_at: { type: 'DatetimeType', isSingle: true },
1883
-
1884
- deleted_at: { type: 'DatetimeType', isSingle: true },
1885
- };
1886
- return decode(typeMappings, input);
1887
- };
1888
-
1889
- decoders['ReactionDeletedEvent'] = (input?: { [key: string]: any }) => {
1890
- const typeMappings: TypeMapping = {
1891
- created_at: { type: 'DatetimeType', isSingle: true },
1892
-
1893
- channel: { type: 'ChannelResponse', isSingle: true },
1894
-
1895
- received_at: { type: 'DatetimeType', isSingle: true },
1896
-
1897
- thread_participants: { type: 'UserResponseCommonFields', isSingle: false },
1898
-
1899
- message: { type: 'MessageResponse', isSingle: true },
1900
-
1901
- reaction: { type: 'ReactionResponse', isSingle: true },
1902
-
1903
- user: { type: 'UserResponseCommonFields', isSingle: true },
1904
- };
1905
- return decode(typeMappings, input);
1906
- };
1907
-
1908
- decoders['ReactionGroupResponse'] = (input?: { [key: string]: any }) => {
1909
- const typeMappings: TypeMapping = {
1910
- first_reaction_at: { type: 'DatetimeType', isSingle: true },
1911
-
1912
- last_reaction_at: { type: 'DatetimeType', isSingle: true },
1913
-
1914
- latest_reactions_by: { type: 'ReactionGroupUserResponse', isSingle: false },
1915
- };
1916
- return decode(typeMappings, input);
1917
- };
1918
-
1919
- decoders['ReactionGroupUserResponse'] = (input?: { [key: string]: any }) => {
1920
- const typeMappings: TypeMapping = {
1921
- created_at: { type: 'DatetimeType', isSingle: true },
1922
-
1923
- user: { type: 'UserResponse', isSingle: true },
1924
- };
1925
- return decode(typeMappings, input);
1926
- };
1927
-
1928
- decoders['ReactionNewEvent'] = (input?: { [key: string]: any }) => {
1929
- const typeMappings: TypeMapping = {
1930
- created_at: { type: 'DatetimeType', isSingle: true },
1931
-
1932
- channel: { type: 'ChannelResponse', isSingle: true },
1933
-
1934
- received_at: { type: 'DatetimeType', isSingle: true },
1935
-
1936
- thread_participants: { type: 'UserResponseCommonFields', isSingle: false },
1937
-
1938
- message: { type: 'MessageResponse', isSingle: true },
1939
-
1940
- reaction: { type: 'ReactionResponse', isSingle: true },
1941
-
1942
- user: { type: 'UserResponseCommonFields', isSingle: true },
1943
- };
1944
- return decode(typeMappings, input);
1945
- };
1946
-
1947
- decoders['ReactionResponse'] = (input?: { [key: string]: any }) => {
1948
- const typeMappings: TypeMapping = {
1949
- created_at: { type: 'DatetimeType', isSingle: true },
1950
-
1951
- updated_at: { type: 'DatetimeType', isSingle: true },
1952
-
1953
- user: { type: 'UserResponse', isSingle: true },
1954
- };
1955
- return decode(typeMappings, input);
1956
- };
1957
-
1958
- decoders['ReactionUpdatedEvent'] = (input?: { [key: string]: any }) => {
1959
- const typeMappings: TypeMapping = {
1960
- created_at: { type: 'DatetimeType', isSingle: true },
1961
-
1962
- channel: { type: 'ChannelResponse', isSingle: true },
1963
-
1964
- message: { type: 'MessageResponse', isSingle: true },
1965
-
1966
- received_at: { type: 'DatetimeType', isSingle: true },
1967
-
1968
- reaction: { type: 'ReactionResponse', isSingle: true },
1969
-
1970
- user: { type: 'UserResponseCommonFields', isSingle: true },
1971
- };
1972
- return decode(typeMappings, input);
1973
- };
1974
-
1975
- decoders['ReadStateResponse'] = (input?: { [key: string]: any }) => {
1976
- const typeMappings: TypeMapping = {
1977
- last_read: { type: 'DatetimeType', isSingle: true },
1978
-
1979
- user: { type: 'UserResponse', isSingle: true },
1980
-
1981
- last_delivered_at: { type: 'DatetimeType', isSingle: true },
1982
- };
1983
- return decode(typeMappings, input);
1984
- };
1985
-
1986
- decoders['ReminderCreatedEvent'] = (input?: { [key: string]: any }) => {
1987
- const typeMappings: TypeMapping = {
1988
- created_at: { type: 'DatetimeType', isSingle: true },
1989
-
1990
- received_at: { type: 'DatetimeType', isSingle: true },
1991
-
1992
- reminder: { type: 'ReminderResponseData', isSingle: true },
1993
- };
1994
- return decode(typeMappings, input);
1995
- };
1996
-
1997
- decoders['ReminderDeletedEvent'] = (input?: { [key: string]: any }) => {
1998
- const typeMappings: TypeMapping = {
1999
- created_at: { type: 'DatetimeType', isSingle: true },
2000
-
2001
- received_at: { type: 'DatetimeType', isSingle: true },
2002
-
2003
- reminder: { type: 'ReminderResponseData', isSingle: true },
2004
- };
2005
- return decode(typeMappings, input);
2006
- };
2007
-
2008
- decoders['ReminderNotificationEvent'] = (input?: { [key: string]: any }) => {
2009
- const typeMappings: TypeMapping = {
2010
- created_at: { type: 'DatetimeType', isSingle: true },
2011
-
2012
- received_at: { type: 'DatetimeType', isSingle: true },
2013
-
2014
- reminder: { type: 'ReminderResponseData', isSingle: true },
2015
- };
2016
- return decode(typeMappings, input);
2017
- };
2018
-
2019
- decoders['ReminderResponseData'] = (input?: { [key: string]: any }) => {
2020
- const typeMappings: TypeMapping = {
2021
- created_at: { type: 'DatetimeType', isSingle: true },
2022
-
2023
- updated_at: { type: 'DatetimeType', isSingle: true },
2024
-
2025
- remind_at: { type: 'DatetimeType', isSingle: true },
2026
-
2027
- channel: { type: 'ChannelResponse', isSingle: true },
2028
-
2029
- message: { type: 'MessageResponse', isSingle: true },
2030
-
2031
- user: { type: 'UserResponse', isSingle: true },
2032
- };
2033
- return decode(typeMappings, input);
2034
- };
2035
-
2036
- decoders['ReminderUpdatedEvent'] = (input?: { [key: string]: any }) => {
2037
- const typeMappings: TypeMapping = {
2038
- created_at: { type: 'DatetimeType', isSingle: true },
2039
-
2040
- received_at: { type: 'DatetimeType', isSingle: true },
2041
-
2042
- reminder: { type: 'ReminderResponseData', isSingle: true },
2043
- };
2044
- return decode(typeMappings, input);
2045
- };
2046
-
2047
- decoders['RemoveUserGroupMembersResponse'] = (input?: { [key: string]: any }) => {
2048
- const typeMappings: TypeMapping = {
2049
- user_group: { type: 'UserGroupResponse', isSingle: true },
2050
- };
2051
- return decode(typeMappings, input);
2052
- };
2053
-
2054
- decoders['ReviewQueueItemResponse'] = (input?: { [key: string]: any }) => {
2055
- const typeMappings: TypeMapping = {
2056
- created_at: { type: 'DatetimeType', isSingle: true },
2057
-
2058
- updated_at: { type: 'DatetimeType', isSingle: true },
2059
-
2060
- actions: { type: 'ActionLogResponse', isSingle: false },
2061
-
2062
- bans: { type: 'BanInfoResponse', isSingle: false },
2063
-
2064
- flags: { type: 'ModerationFlagResponse', isSingle: false },
2065
-
2066
- completed_at: { type: 'DatetimeType', isSingle: true },
2067
-
2068
- escalated_at: { type: 'DatetimeType', isSingle: true },
2069
-
2070
- reviewed_at: { type: 'DatetimeType', isSingle: true },
2071
-
2072
- appeal: { type: 'AppealItemResponse', isSingle: true },
2073
-
2074
- assigned_to: { type: 'UserResponse', isSingle: true },
2075
-
2076
- call: { type: 'ModerationCallResponse', isSingle: true },
2077
-
2078
- entity_creator: { type: 'EntityCreatorResponse', isSingle: true },
2079
-
2080
- feeds_v2_reaction: { type: 'Reaction', isSingle: true },
2081
-
2082
- feeds_v3_activity: { type: 'FeedsV3ActivityResponse', isSingle: true },
2083
-
2084
- feeds_v3_comment: { type: 'FeedsV3CommentResponse', isSingle: true },
2085
-
2086
- message: { type: 'ChatMessageResponse', isSingle: true },
2087
-
2088
- reaction: { type: 'Reaction', isSingle: true },
2089
- };
2090
- return decode(typeMappings, input);
2091
- };
2092
-
2093
- decoders['Role'] = (input?: { [key: string]: any }) => {
2094
- const typeMappings: TypeMapping = {
2095
- created_at: { type: 'DatetimeType', isSingle: true },
2096
-
2097
- updated_at: { type: 'DatetimeType', isSingle: true },
2098
- };
2099
- return decode(typeMappings, input);
2100
- };
2101
-
2102
- decoders['SearchResponse'] = (input?: { [key: string]: any }) => {
2103
- const typeMappings: TypeMapping = {
2104
- results: { type: 'SearchResult', isSingle: false },
2105
- };
2106
- return decode(typeMappings, input);
2107
- };
2108
-
2109
- decoders['SearchResult'] = (input?: { [key: string]: any }) => {
2110
- const typeMappings: TypeMapping = {
2111
- message: { type: 'SearchResultMessage', isSingle: true },
2112
- };
2113
- return decode(typeMappings, input);
2114
- };
2115
-
2116
- decoders['SearchResultMessage'] = (input?: { [key: string]: any }) => {
2117
- const typeMappings: TypeMapping = {
2118
- created_at: { type: 'DatetimeType', isSingle: true },
2119
-
2120
- updated_at: { type: 'DatetimeType', isSingle: true },
2121
-
2122
- latest_reactions: { type: 'ReactionResponse', isSingle: false },
2123
-
2124
- mentioned_users: { type: 'UserResponse', isSingle: false },
2125
-
2126
- own_reactions: { type: 'ReactionResponse', isSingle: false },
2127
-
2128
- user: { type: 'UserResponse', isSingle: true },
2129
-
2130
- deleted_at: { type: 'DatetimeType', isSingle: true },
2131
-
2132
- message_text_updated_at: { type: 'DatetimeType', isSingle: true },
2133
-
2134
- pin_expires: { type: 'DatetimeType', isSingle: true },
2135
-
2136
- pinned_at: { type: 'DatetimeType', isSingle: true },
2137
-
2138
- mentioned_groups: { type: 'UserGroupResponse', isSingle: false },
2139
-
2140
- thread_participants: { type: 'UserResponse', isSingle: false },
2141
-
2142
- channel: { type: 'ChannelResponse', isSingle: true },
2143
-
2144
- draft: { type: 'DraftResponse', isSingle: true },
2145
-
2146
- pinned_by: { type: 'UserResponse', isSingle: true },
2147
-
2148
- poll: { type: 'PollResponseData', isSingle: true },
2149
-
2150
- quoted_message: { type: 'MessageResponse', isSingle: true },
2151
-
2152
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
2153
-
2154
- reminder: { type: 'ReminderResponseData', isSingle: true },
2155
-
2156
- shared_location: { type: 'SharedLocationResponseData', isSingle: true },
2157
- };
2158
- return decode(typeMappings, input);
2159
- };
2160
-
2161
- decoders['SearchRolesResponse'] = (input?: { [key: string]: any }) => {
2162
- const typeMappings: TypeMapping = {
2163
- roles: { type: 'Role', isSingle: false },
2164
- };
2165
- return decode(typeMappings, input);
2166
- };
2167
-
2168
- decoders['SearchUserGroupsResponse'] = (input?: { [key: string]: any }) => {
2169
- const typeMappings: TypeMapping = {
2170
- user_groups: { type: 'UserGroupResponse', isSingle: false },
2171
- };
2172
- return decode(typeMappings, input);
2173
- };
2174
-
2175
- decoders['SendMessageResponse'] = (input?: { [key: string]: any }) => {
2176
- const typeMappings: TypeMapping = {
2177
- message: { type: 'MessageResponse', isSingle: true },
2178
-
2179
- channel_context: { type: 'ChannelContextResponse', isSingle: true },
2180
- };
2181
- return decode(typeMappings, input);
2182
- };
2183
-
2184
- decoders['SendReactionResponse'] = (input?: { [key: string]: any }) => {
2185
- const typeMappings: TypeMapping = {
2186
- message: { type: 'MessageResponse', isSingle: true },
2187
-
2188
- reaction: { type: 'ReactionResponse', isSingle: true },
2189
- };
2190
- return decode(typeMappings, input);
2191
- };
2192
-
2193
- decoders['SharedLocationResponse'] = (input?: { [key: string]: any }) => {
2194
- const typeMappings: TypeMapping = {
2195
- created_at: { type: 'DatetimeType', isSingle: true },
2196
-
2197
- updated_at: { type: 'DatetimeType', isSingle: true },
2198
-
2199
- end_at: { type: 'DatetimeType', isSingle: true },
2200
-
2201
- channel: { type: 'ChannelResponse', isSingle: true },
2202
-
2203
- message: { type: 'MessageResponse', isSingle: true },
2204
- };
2205
- return decode(typeMappings, input);
2206
- };
2207
-
2208
- decoders['SharedLocationResponseData'] = (input?: { [key: string]: any }) => {
2209
- const typeMappings: TypeMapping = {
2210
- created_at: { type: 'DatetimeType', isSingle: true },
2211
-
2212
- updated_at: { type: 'DatetimeType', isSingle: true },
2213
-
2214
- end_at: { type: 'DatetimeType', isSingle: true },
2215
-
2216
- channel: { type: 'ChannelResponse', isSingle: true },
2217
-
2218
- message: { type: 'MessageResponse', isSingle: true },
2219
- };
2220
- return decode(typeMappings, input);
2221
- };
2222
-
2223
- decoders['SharedLocationsResponse'] = (input?: { [key: string]: any }) => {
2224
- const typeMappings: TypeMapping = {
2225
- active_live_locations: { type: 'SharedLocationResponseData', isSingle: false },
2226
- };
2227
- return decode(typeMappings, input);
2228
- };
2229
-
2230
- decoders['SubmitActionResponse'] = (input?: { [key: string]: any }) => {
2231
- const typeMappings: TypeMapping = {
2232
- appeal_item: { type: 'AppealItemResponse', isSingle: true },
2233
-
2234
- item: { type: 'ReviewQueueItemResponse', isSingle: true },
2235
- };
2236
- return decode(typeMappings, input);
2237
- };
2238
-
2239
- decoders['ThreadParticipant'] = (input?: { [key: string]: any }) => {
2240
- const typeMappings: TypeMapping = {
2241
- created_at: { type: 'DatetimeType', isSingle: true },
2242
-
2243
- last_read_at: { type: 'DatetimeType', isSingle: true },
2244
-
2245
- last_thread_message_at: { type: 'DatetimeType', isSingle: true },
2246
-
2247
- left_thread_at: { type: 'DatetimeType', isSingle: true },
2248
-
2249
- user: { type: 'UserResponse', isSingle: true },
2250
- };
2251
- return decode(typeMappings, input);
2252
- };
2253
-
2254
- decoders['ThreadResponse'] = (input?: { [key: string]: any }) => {
2255
- const typeMappings: TypeMapping = {
2256
- created_at: { type: 'DatetimeType', isSingle: true },
2257
-
2258
- updated_at: { type: 'DatetimeType', isSingle: true },
2259
-
2260
- deleted_at: { type: 'DatetimeType', isSingle: true },
2261
-
2262
- last_message_at: { type: 'DatetimeType', isSingle: true },
2263
-
2264
- thread_participants: { type: 'ThreadParticipant', isSingle: false },
2265
-
2266
- channel: { type: 'ChannelResponse', isSingle: true },
2267
-
2268
- created_by: { type: 'UserResponse', isSingle: true },
2269
-
2270
- parent_message: { type: 'MessageResponse', isSingle: true },
2271
- };
2272
- return decode(typeMappings, input);
2273
- };
2274
-
2275
- decoders['ThreadStateResponse'] = (input?: { [key: string]: any }) => {
2276
- const typeMappings: TypeMapping = {
2277
- created_at: { type: 'DatetimeType', isSingle: true },
2278
-
2279
- updated_at: { type: 'DatetimeType', isSingle: true },
2280
-
2281
- latest_replies: { type: 'MessageResponse', isSingle: false },
2282
-
2283
- deleted_at: { type: 'DatetimeType', isSingle: true },
2284
-
2285
- last_message_at: { type: 'DatetimeType', isSingle: true },
2286
-
2287
- read: { type: 'ReadStateResponse', isSingle: false },
2288
-
2289
- thread_participants: { type: 'ThreadParticipant', isSingle: false },
2290
-
2291
- channel: { type: 'ChannelResponse', isSingle: true },
2292
-
2293
- created_by: { type: 'UserResponse', isSingle: true },
2294
-
2295
- draft: { type: 'DraftResponse', isSingle: true },
2296
-
2297
- parent_message: { type: 'MessageResponse', isSingle: true },
2298
- };
2299
- return decode(typeMappings, input);
2300
- };
2301
-
2302
- decoders['ThreadUpdatedEvent'] = (input?: { [key: string]: any }) => {
2303
- const typeMappings: TypeMapping = {
2304
- created_at: { type: 'DatetimeType', isSingle: true },
2305
-
2306
- received_at: { type: 'DatetimeType', isSingle: true },
2307
-
2308
- thread: { type: 'ThreadResponse', isSingle: true },
2309
- };
2310
- return decode(typeMappings, input);
2311
- };
2312
-
2313
- decoders['TruncateChannelResponse'] = (input?: { [key: string]: any }) => {
2314
- const typeMappings: TypeMapping = {
2315
- channel: { type: 'ChannelResponse', isSingle: true },
2316
-
2317
- message: { type: 'MessageResponse', isSingle: true },
2318
- };
2319
- return decode(typeMappings, input);
2320
- };
2321
-
2322
- decoders['TypingStartEvent'] = (input?: { [key: string]: any }) => {
2323
- const typeMappings: TypeMapping = {
2324
- created_at: { type: 'DatetimeType', isSingle: true },
2325
-
2326
- received_at: { type: 'DatetimeType', isSingle: true },
2327
-
2328
- user: { type: 'UserResponseCommonFields', isSingle: true },
2329
- };
2330
- return decode(typeMappings, input);
2331
- };
2332
-
2333
- decoders['TypingStopEvent'] = (input?: { [key: string]: any }) => {
2334
- const typeMappings: TypeMapping = {
2335
- created_at: { type: 'DatetimeType', isSingle: true },
2336
-
2337
- received_at: { type: 'DatetimeType', isSingle: true },
2338
-
2339
- user: { type: 'UserResponseCommonFields', isSingle: true },
2340
- };
2341
- return decode(typeMappings, input);
2342
- };
2343
-
2344
- decoders['UnreadCountsChannel'] = (input?: { [key: string]: any }) => {
2345
- const typeMappings: TypeMapping = {
2346
- last_read: { type: 'DatetimeType', isSingle: true },
2347
- };
2348
- return decode(typeMappings, input);
2349
- };
2350
-
2351
- decoders['UnreadCountsThread'] = (input?: { [key: string]: any }) => {
2352
- const typeMappings: TypeMapping = {
2353
- last_read: { type: 'DatetimeType', isSingle: true },
2354
- };
2355
- return decode(typeMappings, input);
2356
- };
2357
-
2358
- decoders['UpdateBlockListResponse'] = (input?: { [key: string]: any }) => {
2359
- const typeMappings: TypeMapping = {
2360
- blocklist: { type: 'BlockListResponse', isSingle: true },
2361
- };
2362
- return decode(typeMappings, input);
2363
- };
2364
-
2365
- decoders['UpdateChannelPartialResponse'] = (input?: { [key: string]: any }) => {
2366
- const typeMappings: TypeMapping = {
2367
- members: { type: 'ChannelMemberResponse', isSingle: false },
2368
-
2369
- channel: { type: 'ChannelResponse', isSingle: true },
2370
- };
2371
- return decode(typeMappings, input);
2372
- };
2373
-
2374
- decoders['UpdateChannelResponse'] = (input?: { [key: string]: any }) => {
2375
- const typeMappings: TypeMapping = {
2376
- members: { type: 'ChannelMemberResponse', isSingle: false },
2377
-
2378
- channel: { type: 'ChannelResponse', isSingle: true },
2379
-
2380
- message: { type: 'MessageResponse', isSingle: true },
2381
- };
2382
- return decode(typeMappings, input);
2383
- };
2384
-
2385
- decoders['UpdateMemberPartialResponse'] = (input?: { [key: string]: any }) => {
2386
- const typeMappings: TypeMapping = {
2387
- channel_member: { type: 'ChannelMemberResponse', isSingle: true },
2388
- };
2389
- return decode(typeMappings, input);
2390
- };
2391
-
2392
- decoders['UpdateMessagePartialResponse'] = (input?: { [key: string]: any }) => {
2393
- const typeMappings: TypeMapping = {
2394
- message: { type: 'MessageResponse', isSingle: true },
2395
- };
2396
- return decode(typeMappings, input);
2397
- };
2398
-
2399
- decoders['UpdateMessageResponse'] = (input?: { [key: string]: any }) => {
2400
- const typeMappings: TypeMapping = {
2401
- message: { type: 'MessageResponse', isSingle: true },
2402
- };
2403
- return decode(typeMappings, input);
2404
- };
2405
-
2406
- decoders['UpdateReminderResponse'] = (input?: { [key: string]: any }) => {
2407
- const typeMappings: TypeMapping = {
2408
- reminder: { type: 'ReminderResponseData', isSingle: true },
2409
- };
2410
- return decode(typeMappings, input);
2411
- };
2412
-
2413
- decoders['UpdateThreadPartialResponse'] = (input?: { [key: string]: any }) => {
2414
- const typeMappings: TypeMapping = {
2415
- thread: { type: 'ThreadResponse', isSingle: true },
2416
- };
2417
- return decode(typeMappings, input);
2418
- };
2419
-
2420
- decoders['UpdateUserGroupResponse'] = (input?: { [key: string]: any }) => {
2421
- const typeMappings: TypeMapping = {
2422
- user_group: { type: 'UserGroupResponse', isSingle: true },
2423
- };
2424
- return decode(typeMappings, input);
2425
- };
2426
-
2427
- decoders['UpdateUsersResponse'] = (input?: { [key: string]: any }) => {
2428
- const typeMappings: TypeMapping = {
2429
- users: { type: 'FullUserResponse', isSingle: false },
2430
- };
2431
- return decode(typeMappings, input);
2432
- };
2433
-
2434
- decoders['UpsertConfigResponse'] = (input?: { [key: string]: any }) => {
2435
- const typeMappings: TypeMapping = {
2436
- config: { type: 'ConfigResponse', isSingle: true },
2437
- };
2438
- return decode(typeMappings, input);
2439
- };
2440
-
2441
- decoders['UpsertPushPreferencesResponse'] = (input?: { [key: string]: any }) => {
2442
- const typeMappings: TypeMapping = {
2443
- user_preferences: { type: 'PushPreferencesResponse', isSingle: false },
2444
- };
2445
- return decode(typeMappings, input);
2446
- };
2447
-
2448
- decoders['UserBannedEvent'] = (input?: { [key: string]: any }) => {
2449
- const typeMappings: TypeMapping = {
2450
- created_at: { type: 'DatetimeType', isSingle: true },
2451
-
2452
- user: { type: 'UserResponseCommonFields', isSingle: true },
2453
-
2454
- expiration: { type: 'DatetimeType', isSingle: true },
2455
-
2456
- received_at: { type: 'DatetimeType', isSingle: true },
2457
-
2458
- created_by: { type: 'UserResponseCommonFields', isSingle: true },
2459
- };
2460
- return decode(typeMappings, input);
2461
- };
2462
-
2463
- decoders['UserDeactivatedEvent'] = (input?: { [key: string]: any }) => {
2464
- const typeMappings: TypeMapping = {
2465
- created_at: { type: 'DatetimeType', isSingle: true },
2466
-
2467
- user: { type: 'UserResponseCommonFields', isSingle: true },
2468
-
2469
- received_at: { type: 'DatetimeType', isSingle: true },
2470
-
2471
- created_by: { type: 'UserResponseCommonFields', isSingle: true },
2472
- };
2473
- return decode(typeMappings, input);
2474
- };
2475
-
2476
- decoders['UserDeletedEvent'] = (input?: { [key: string]: any }) => {
2477
- const typeMappings: TypeMapping = {
2478
- created_at: { type: 'DatetimeType', isSingle: true },
2479
-
2480
- user: { type: 'UserResponseCommonFields', isSingle: true },
2481
-
2482
- received_at: { type: 'DatetimeType', isSingle: true },
2483
- };
2484
- return decode(typeMappings, input);
2485
- };
2486
-
2487
- decoders['UserGroupCreatedEvent'] = (input?: { [key: string]: any }) => {
2488
- const typeMappings: TypeMapping = {
2489
- created_at: { type: 'DatetimeType', isSingle: true },
2490
-
2491
- received_at: { type: 'DatetimeType', isSingle: true },
2492
-
2493
- user: { type: 'UserResponseCommonFields', isSingle: true },
2494
- };
2495
- return decode(typeMappings, input);
2496
- };
2497
-
2498
- decoders['UserGroupDeletedEvent'] = (input?: { [key: string]: any }) => {
2499
- const typeMappings: TypeMapping = {
2500
- created_at: { type: 'DatetimeType', isSingle: true },
2501
-
2502
- received_at: { type: 'DatetimeType', isSingle: true },
2503
-
2504
- user: { type: 'UserResponseCommonFields', isSingle: true },
2505
- };
2506
- return decode(typeMappings, input);
2507
- };
2508
-
2509
- decoders['UserGroupMember'] = (input?: { [key: string]: any }) => {
2510
- const typeMappings: TypeMapping = {
2511
- created_at: { type: 'DatetimeType', isSingle: true },
2512
- };
2513
- return decode(typeMappings, input);
2514
- };
2515
-
2516
- decoders['UserGroupMemberAddedEvent'] = (input?: { [key: string]: any }) => {
2517
- const typeMappings: TypeMapping = {
2518
- created_at: { type: 'DatetimeType', isSingle: true },
2519
-
2520
- received_at: { type: 'DatetimeType', isSingle: true },
2521
-
2522
- user: { type: 'UserResponseCommonFields', isSingle: true },
2523
- };
2524
- return decode(typeMappings, input);
2525
- };
2526
-
2527
- decoders['UserGroupMemberRemovedEvent'] = (input?: { [key: string]: any }) => {
2528
- const typeMappings: TypeMapping = {
2529
- created_at: { type: 'DatetimeType', isSingle: true },
2530
-
2531
- received_at: { type: 'DatetimeType', isSingle: true },
2532
-
2533
- user: { type: 'UserResponseCommonFields', isSingle: true },
2534
- };
2535
- return decode(typeMappings, input);
2536
- };
2537
-
2538
- decoders['UserGroupResponse'] = (input?: { [key: string]: any }) => {
2539
- const typeMappings: TypeMapping = {
2540
- created_at: { type: 'DatetimeType', isSingle: true },
2541
-
2542
- updated_at: { type: 'DatetimeType', isSingle: true },
2543
-
2544
- members: { type: 'UserGroupMember', isSingle: false },
2545
- };
2546
- return decode(typeMappings, input);
2547
- };
2548
-
2549
- decoders['UserGroupUpdatedEvent'] = (input?: { [key: string]: any }) => {
2550
- const typeMappings: TypeMapping = {
2551
- created_at: { type: 'DatetimeType', isSingle: true },
2552
-
2553
- received_at: { type: 'DatetimeType', isSingle: true },
2554
-
2555
- user: { type: 'UserResponseCommonFields', isSingle: true },
2556
- };
2557
- return decode(typeMappings, input);
2558
- };
2559
-
2560
- decoders['UserMessagesDeletedEvent'] = (input?: { [key: string]: any }) => {
2561
- const typeMappings: TypeMapping = {
2562
- created_at: { type: 'DatetimeType', isSingle: true },
2563
-
2564
- user: { type: 'UserResponseCommonFields', isSingle: true },
2565
-
2566
- received_at: { type: 'DatetimeType', isSingle: true },
2567
- };
2568
- return decode(typeMappings, input);
2569
- };
2570
-
2571
- decoders['UserMuteResponse'] = (input?: { [key: string]: any }) => {
2572
- const typeMappings: TypeMapping = {
2573
- created_at: { type: 'DatetimeType', isSingle: true },
2574
-
2575
- updated_at: { type: 'DatetimeType', isSingle: true },
2576
-
2577
- expires: { type: 'DatetimeType', isSingle: true },
2578
-
2579
- target: { type: 'UserResponse', isSingle: true },
2580
-
2581
- user: { type: 'UserResponse', isSingle: true },
2582
- };
2583
- return decode(typeMappings, input);
2584
- };
2585
-
2586
- decoders['UserMutedEvent'] = (input?: { [key: string]: any }) => {
2587
- const typeMappings: TypeMapping = {
2588
- created_at: { type: 'DatetimeType', isSingle: true },
2589
-
2590
- user: { type: 'UserResponseCommonFields', isSingle: true },
2591
-
2592
- received_at: { type: 'DatetimeType', isSingle: true },
2593
-
2594
- target_users: { type: 'UserResponseCommonFields', isSingle: false },
2595
-
2596
- target_user: { type: 'UserResponseCommonFields', isSingle: true },
2597
- };
2598
- return decode(typeMappings, input);
2599
- };
2600
-
2601
- decoders['UserPresenceChangedEvent'] = (input?: { [key: string]: any }) => {
2602
- const typeMappings: TypeMapping = {
2603
- created_at: { type: 'DatetimeType', isSingle: true },
2604
-
2605
- user: { type: 'UserResponseCommonFields', isSingle: true },
2606
-
2607
- received_at: { type: 'DatetimeType', isSingle: true },
2608
- };
2609
- return decode(typeMappings, input);
2610
- };
2611
-
2612
- decoders['UserReactivatedEvent'] = (input?: { [key: string]: any }) => {
2613
- const typeMappings: TypeMapping = {
2614
- created_at: { type: 'DatetimeType', isSingle: true },
2615
-
2616
- user: { type: 'UserResponseCommonFields', isSingle: true },
2617
-
2618
- received_at: { type: 'DatetimeType', isSingle: true },
2619
-
2620
- created_by: { type: 'UserResponseCommonFields', isSingle: true },
2621
- };
2622
- return decode(typeMappings, input);
2623
- };
2624
-
2625
- decoders['UserResponse'] = (input?: { [key: string]: any }) => {
2626
- const typeMappings: TypeMapping = {
2627
- created_at: { type: 'DatetimeType', isSingle: true },
2628
-
2629
- updated_at: { type: 'DatetimeType', isSingle: true },
2630
-
2631
- deactivated_at: { type: 'DatetimeType', isSingle: true },
2632
-
2633
- deleted_at: { type: 'DatetimeType', isSingle: true },
2634
-
2635
- last_active: { type: 'DatetimeType', isSingle: true },
2636
-
2637
- revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
2638
- };
2639
- return decode(typeMappings, input);
2640
- };
2641
-
2642
- decoders['UserResponseCommonFields'] = (input?: { [key: string]: any }) => {
2643
- const typeMappings: TypeMapping = {
2644
- created_at: { type: 'DatetimeType', isSingle: true },
2645
-
2646
- updated_at: { type: 'DatetimeType', isSingle: true },
2647
-
2648
- deactivated_at: { type: 'DatetimeType', isSingle: true },
2649
-
2650
- deleted_at: { type: 'DatetimeType', isSingle: true },
2651
-
2652
- last_active: { type: 'DatetimeType', isSingle: true },
2653
-
2654
- revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
2655
- };
2656
- return decode(typeMappings, input);
2657
- };
2658
-
2659
- decoders['UserUnbannedEvent'] = (input?: { [key: string]: any }) => {
2660
- const typeMappings: TypeMapping = {
2661
- created_at: { type: 'DatetimeType', isSingle: true },
2662
-
2663
- user: { type: 'UserResponseCommonFields', isSingle: true },
2664
-
2665
- received_at: { type: 'DatetimeType', isSingle: true },
2666
-
2667
- created_by: { type: 'UserResponseCommonFields', isSingle: true },
2668
- };
2669
- return decode(typeMappings, input);
2670
- };
2671
-
2672
- decoders['UserUpdatedEvent'] = (input?: { [key: string]: any }) => {
2673
- const typeMappings: TypeMapping = {
2674
- created_at: { type: 'DatetimeType', isSingle: true },
2675
-
2676
- received_at: { type: 'DatetimeType', isSingle: true },
2677
- };
2678
- return decode(typeMappings, input);
2679
- };
2680
-
2681
- decoders['UserWatchingStartEvent'] = (input?: { [key: string]: any }) => {
2682
- const typeMappings: TypeMapping = {
2683
- created_at: { type: 'DatetimeType', isSingle: true },
2684
-
2685
- user: { type: 'UserResponseCommonFields', isSingle: true },
2686
-
2687
- received_at: { type: 'DatetimeType', isSingle: true },
2688
- };
2689
- return decode(typeMappings, input);
2690
- };
2691
-
2692
- decoders['UserWatchingStopEvent'] = (input?: { [key: string]: any }) => {
2693
- const typeMappings: TypeMapping = {
2694
- created_at: { type: 'DatetimeType', isSingle: true },
2695
-
2696
- user: { type: 'UserResponseCommonFields', isSingle: true },
2697
-
2698
- received_at: { type: 'DatetimeType', isSingle: true },
2699
- };
2700
- return decode(typeMappings, input);
2701
- };
2702
-
2703
- decoders['WrappedUnreadCountsResponse'] = (input?: { [key: string]: any }) => {
2704
- const typeMappings: TypeMapping = {
2705
- channels: { type: 'UnreadCountsChannel', isSingle: false },
2706
-
2707
- threads: { type: 'UnreadCountsThread', isSingle: false },
2708
- };
2709
- return decode(typeMappings, input);
2710
- };