stream-chat 10.0.0-rc.2 → 10.0.0-rc.21

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