@stream-io/feeds-client 0.3.47 → 0.3.49

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 (49) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/react-bindings.js +1 -1
  5. package/dist/es/index.mjs +2 -2
  6. package/dist/es/index.mjs.map +1 -1
  7. package/dist/es/react-bindings.mjs +1 -1
  8. package/dist/{feeds-client-ykIZW9Hi.mjs → feeds-client-B9b7zUcW.mjs} +182 -196
  9. package/dist/feeds-client-B9b7zUcW.mjs.map +1 -0
  10. package/dist/{feeds-client-CxjZlEtX.js → feeds-client-BDvUG9yF.js} +182 -196
  11. package/dist/feeds-client-BDvUG9yF.js.map +1 -0
  12. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  13. package/dist/types/common/Poll.d.ts +15 -6
  14. package/dist/types/common/Poll.d.ts.map +1 -1
  15. package/dist/types/common/real-time/StableWSConnection.d.ts +3 -3
  16. package/dist/types/common/real-time/StableWSConnection.d.ts.map +1 -1
  17. package/dist/types/feed/event-handlers/activity-updater.d.ts +1 -1
  18. package/dist/types/feed/event-handlers/comment/handle-comment-added.d.ts.map +1 -1
  19. package/dist/types/feed/feed.d.ts +2 -2
  20. package/dist/types/feed/feed.d.ts.map +1 -1
  21. package/dist/types/feeds-client/feeds-client.d.ts +17 -3
  22. package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
  23. package/dist/types/gen/feeds/FeedApi.d.ts +2 -1
  24. package/dist/types/gen/feeds/FeedApi.d.ts.map +1 -1
  25. package/dist/types/gen/feeds/FeedsApi.d.ts +5 -1
  26. package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
  27. package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts.map +1 -1
  28. package/dist/types/gen/models/index.d.ts +209 -422
  29. package/dist/types/gen/models/index.d.ts.map +1 -1
  30. package/dist/types/gen/moderation/ModerationApi.d.ts.map +1 -1
  31. package/dist/types/types.d.ts +2 -2
  32. package/dist/types/types.d.ts.map +1 -1
  33. package/dist/types/utils/constants.d.ts +1 -1
  34. package/package.json +1 -1
  35. package/src/common/Poll.ts +59 -40
  36. package/src/feed/event-handlers/comment/handle-comment-added.ts +14 -2
  37. package/src/feed/feed.ts +24 -9
  38. package/src/feeds-client/feeds-client.ts +70 -1
  39. package/src/gen/feeds/FeedApi.ts +12 -0
  40. package/src/gen/feeds/FeedsApi.ts +37 -0
  41. package/src/gen/model-decoders/decoders.ts +47 -251
  42. package/src/gen/model-decoders/event-decoder-mapping.ts +3 -2
  43. package/src/gen/models/index.ts +314 -723
  44. package/src/gen/moderation/ModerationApi.ts +1 -0
  45. package/src/test-utils/response-generators.ts +3 -2
  46. package/src/types.ts +2 -2
  47. package/src/utils/constants.ts +1 -1
  48. package/dist/feeds-client-CxjZlEtX.js.map +0 -1
  49. package/dist/feeds-client-ykIZW9Hi.mjs.map +0 -1
@@ -193,7 +193,7 @@ decoders.ActivityResponse = (input?: Record<string, any>) => {
193
193
 
194
194
  collections: { type: 'EnrichedCollectionResponse', isSingle: false },
195
195
 
196
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
196
+ reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
197
197
 
198
198
  user: { type: 'UserResponse', isSingle: true },
199
199
 
@@ -324,17 +324,15 @@ decoders.AppealItemResponse = (input?: Record<string, any>) => {
324
324
  return decode(typeMappings, input);
325
325
  };
326
326
 
327
- decoders.Ban = (input?: Record<string, any>) => {
327
+ decoders.BanInfoResponse = (input?: Record<string, any>) => {
328
328
  const typeMappings: TypeMapping = {
329
329
  created_at: { type: 'DatetimeType', isSingle: true },
330
330
 
331
331
  expires: { type: 'DatetimeType', isSingle: true },
332
332
 
333
- channel: { type: 'Channel', isSingle: true },
334
-
335
- created_by: { type: 'User', isSingle: true },
333
+ created_by: { type: 'UserResponse', isSingle: true },
336
334
 
337
- target: { type: 'User', isSingle: true },
335
+ user: { type: 'UserResponse', isSingle: true },
338
336
  };
339
337
  return decode(typeMappings, input);
340
338
  };
@@ -496,44 +494,6 @@ decoders.CallSessionResponse = (input?: Record<string, any>) => {
496
494
  return decode(typeMappings, input);
497
495
  };
498
496
 
499
- decoders.Channel = (input?: Record<string, any>) => {
500
- const typeMappings: TypeMapping = {
501
- created_at: { type: 'DatetimeType', isSingle: true },
502
-
503
- updated_at: { type: 'DatetimeType', isSingle: true },
504
-
505
- deleted_at: { type: 'DatetimeType', isSingle: true },
506
-
507
- last_message_at: { type: 'DatetimeType', isSingle: true },
508
-
509
- message_count_updated_at: { type: 'DatetimeType', isSingle: true },
510
-
511
- active_live_locations: { type: 'SharedLocation', isSingle: false },
512
-
513
- invites: { type: 'ChannelMember', isSingle: false },
514
-
515
- members: { type: 'ChannelMember', isSingle: false },
516
-
517
- config: { type: 'ChannelConfig', isSingle: true },
518
-
519
- created_by: { type: 'User', isSingle: true },
520
-
521
- members_lookup: { type: 'ChannelMemberLookup', isSingle: false },
522
-
523
- truncated_by: { type: 'User', isSingle: true },
524
- };
525
- return decode(typeMappings, input);
526
- };
527
-
528
- decoders.ChannelConfig = (input?: Record<string, any>) => {
529
- const typeMappings: TypeMapping = {
530
- created_at: { type: 'DatetimeType', isSingle: true },
531
-
532
- updated_at: { type: 'DatetimeType', isSingle: true },
533
- };
534
- return decode(typeMappings, input);
535
- };
536
-
537
497
  decoders.ChannelConfigWithInfo = (input?: Record<string, any>) => {
538
498
  const typeMappings: TypeMapping = {
539
499
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -545,40 +505,6 @@ decoders.ChannelConfigWithInfo = (input?: Record<string, any>) => {
545
505
  return decode(typeMappings, input);
546
506
  };
547
507
 
548
- decoders.ChannelMember = (input?: Record<string, any>) => {
549
- const typeMappings: TypeMapping = {
550
- created_at: { type: 'DatetimeType', isSingle: true },
551
-
552
- updated_at: { type: 'DatetimeType', isSingle: true },
553
-
554
- archived_at: { type: 'DatetimeType', isSingle: true },
555
-
556
- ban_expires: { type: 'DatetimeType', isSingle: true },
557
-
558
- deleted_at: { type: 'DatetimeType', isSingle: true },
559
-
560
- invite_accepted_at: { type: 'DatetimeType', isSingle: true },
561
-
562
- invite_rejected_at: { type: 'DatetimeType', isSingle: true },
563
-
564
- pinned_at: { type: 'DatetimeType', isSingle: true },
565
-
566
- user: { type: 'User', isSingle: true },
567
- };
568
- return decode(typeMappings, input);
569
- };
570
-
571
- decoders.ChannelMemberLookup = (input?: Record<string, any>) => {
572
- const typeMappings: TypeMapping = {
573
- archived_at: { type: 'DatetimeType', isSingle: true },
574
-
575
- ban_expires: { type: 'DatetimeType', isSingle: true },
576
-
577
- pinned_at: { type: 'DatetimeType', isSingle: true },
578
- };
579
- return decode(typeMappings, input);
580
- };
581
-
582
508
  decoders.ChannelMemberResponse = (input?: Record<string, any>) => {
583
509
  const typeMappings: TypeMapping = {
584
510
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -747,7 +673,7 @@ decoders.CommentResponse = (input?: Record<string, any>) => {
747
673
 
748
674
  latest_reactions: { type: 'FeedsReactionResponse', isSingle: false },
749
675
 
750
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
676
+ reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
751
677
  };
752
678
  return decode(typeMappings, input);
753
679
  };
@@ -834,13 +760,6 @@ decoders.DeleteCommentResponse = (input?: Record<string, any>) => {
834
760
  return decode(typeMappings, input);
835
761
  };
836
762
 
837
- decoders.Device = (input?: Record<string, any>) => {
838
- const typeMappings: TypeMapping = {
839
- created_at: { type: 'DatetimeType', isSingle: true },
840
- };
841
- return decode(typeMappings, input);
842
- };
843
-
844
763
  decoders.DeviceResponse = (input?: Record<string, any>) => {
845
764
  const typeMappings: TypeMapping = {
846
765
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1051,6 +970,15 @@ decoders.FeedUpdatedEvent = (input?: Record<string, any>) => {
1051
970
  return decode(typeMappings, input);
1052
971
  };
1053
972
 
973
+ decoders.FeedsReactionGroupResponse = (input?: Record<string, any>) => {
974
+ const typeMappings: TypeMapping = {
975
+ first_reaction_at: { type: 'DatetimeType', isSingle: true },
976
+
977
+ last_reaction_at: { type: 'DatetimeType', isSingle: true },
978
+ };
979
+ return decode(typeMappings, input);
980
+ };
981
+
1054
982
  decoders.FeedsReactionResponse = (input?: Record<string, any>) => {
1055
983
  const typeMappings: TypeMapping = {
1056
984
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1231,6 +1159,8 @@ decoders.HealthCheckEvent = (input?: Record<string, any>) => {
1231
1159
  created_at: { type: 'DatetimeType', isSingle: true },
1232
1160
 
1233
1161
  received_at: { type: 'DatetimeType', isSingle: true },
1162
+
1163
+ me: { type: 'OwnUserResponse', isSingle: true },
1234
1164
  };
1235
1165
  return decode(typeMappings, input);
1236
1166
  };
@@ -1258,64 +1188,6 @@ decoders.MembershipLevelResponse = (input?: Record<string, any>) => {
1258
1188
  return decode(typeMappings, input);
1259
1189
  };
1260
1190
 
1261
- decoders.Message = (input?: Record<string, any>) => {
1262
- const typeMappings: TypeMapping = {
1263
- created_at: { type: 'DatetimeType', isSingle: true },
1264
-
1265
- updated_at: { type: 'DatetimeType', isSingle: true },
1266
-
1267
- latest_reactions: { type: 'Reaction', isSingle: false },
1268
-
1269
- mentioned_users: { type: 'User', isSingle: false },
1270
-
1271
- own_reactions: { type: 'Reaction', isSingle: false },
1272
-
1273
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1274
-
1275
- deleted_at: { type: 'DatetimeType', isSingle: true },
1276
-
1277
- message_text_updated_at: { type: 'DatetimeType', isSingle: true },
1278
-
1279
- pin_expires: { type: 'DatetimeType', isSingle: true },
1280
-
1281
- pinned_at: { type: 'DatetimeType', isSingle: true },
1282
-
1283
- thread_participants: { type: 'User', isSingle: false },
1284
-
1285
- member: { type: 'ChannelMember', isSingle: true },
1286
-
1287
- pinned_by: { type: 'User', isSingle: true },
1288
-
1289
- poll: { type: 'Poll', isSingle: true },
1290
-
1291
- quoted_message: { type: 'Message', isSingle: true },
1292
-
1293
- reminder: { type: 'MessageReminder', isSingle: true },
1294
-
1295
- shared_location: { type: 'SharedLocation', isSingle: true },
1296
-
1297
- user: { type: 'User', isSingle: true },
1298
- };
1299
- return decode(typeMappings, input);
1300
- };
1301
-
1302
- decoders.MessageReminder = (input?: Record<string, any>) => {
1303
- const typeMappings: TypeMapping = {
1304
- created_at: { type: 'DatetimeType', isSingle: true },
1305
-
1306
- updated_at: { type: 'DatetimeType', isSingle: true },
1307
-
1308
- remind_at: { type: 'DatetimeType', isSingle: true },
1309
-
1310
- channel: { type: 'Channel', isSingle: true },
1311
-
1312
- message: { type: 'Message', isSingle: true },
1313
-
1314
- user: { type: 'User', isSingle: true },
1315
- };
1316
- return decode(typeMappings, input);
1317
- };
1318
-
1319
1191
  decoders.MessageResponse = (input?: Record<string, any>) => {
1320
1192
  const typeMappings: TypeMapping = {
1321
1193
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1389,7 +1261,7 @@ decoders.ModerationFlaggedEvent = (input?: Record<string, any>) => {
1389
1261
  const typeMappings: TypeMapping = {
1390
1262
  created_at: { type: 'DatetimeType', isSingle: true },
1391
1263
 
1392
- user: { type: 'User', isSingle: true },
1264
+ received_at: { type: 'DatetimeType', isSingle: true },
1393
1265
  };
1394
1266
  return decode(typeMappings, input);
1395
1267
  };
@@ -1409,9 +1281,9 @@ decoders.ModerationMarkReviewedEvent = (input?: Record<string, any>) => {
1409
1281
 
1410
1282
  decoders.MuteResponse = (input?: Record<string, any>) => {
1411
1283
  const typeMappings: TypeMapping = {
1412
- mutes: { type: 'UserMute', isSingle: false },
1284
+ mutes: { type: 'UserMuteResponse', isSingle: false },
1413
1285
 
1414
- own_user: { type: 'OwnUser', isSingle: true },
1286
+ own_user: { type: 'OwnUserResponse', isSingle: true },
1415
1287
  };
1416
1288
  return decode(typeMappings, input);
1417
1289
  };
@@ -1448,7 +1320,7 @@ decoders.OwnBatchResponse = (input?: Record<string, any>) => {
1448
1320
  return decode(typeMappings, input);
1449
1321
  };
1450
1322
 
1451
- decoders.OwnUser = (input?: Record<string, any>) => {
1323
+ decoders.OwnUserResponse = (input?: Record<string, any>) => {
1452
1324
  const typeMappings: TypeMapping = {
1453
1325
  created_at: { type: 'DatetimeType', isSingle: true },
1454
1326
 
@@ -1456,9 +1328,9 @@ decoders.OwnUser = (input?: Record<string, any>) => {
1456
1328
 
1457
1329
  channel_mutes: { type: 'ChannelMute', isSingle: false },
1458
1330
 
1459
- devices: { type: 'Device', isSingle: false },
1331
+ devices: { type: 'DeviceResponse', isSingle: false },
1460
1332
 
1461
- mutes: { type: 'UserMute', isSingle: false },
1333
+ mutes: { type: 'UserMuteResponse', isSingle: false },
1462
1334
 
1463
1335
  deactivated_at: { type: 'DatetimeType', isSingle: true },
1464
1336
 
@@ -1466,9 +1338,9 @@ decoders.OwnUser = (input?: Record<string, any>) => {
1466
1338
 
1467
1339
  last_active: { type: 'DatetimeType', isSingle: true },
1468
1340
 
1469
- last_engaged_at: { type: 'DatetimeType', isSingle: true },
1341
+ revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
1470
1342
 
1471
- push_preferences: { type: 'PushPreferences', isSingle: true },
1343
+ push_preferences: { type: 'PushPreferencesResponse', isSingle: true },
1472
1344
  };
1473
1345
  return decode(typeMappings, input);
1474
1346
  };
@@ -1482,21 +1354,6 @@ decoders.PinActivityResponse = (input?: Record<string, any>) => {
1482
1354
  return decode(typeMappings, input);
1483
1355
  };
1484
1356
 
1485
- decoders.Poll = (input?: Record<string, any>) => {
1486
- const typeMappings: TypeMapping = {
1487
- created_at: { type: 'DatetimeType', isSingle: true },
1488
-
1489
- updated_at: { type: 'DatetimeType', isSingle: true },
1490
-
1491
- latest_answers: { type: 'PollVote', isSingle: false },
1492
-
1493
- own_votes: { type: 'PollVote', isSingle: false },
1494
-
1495
- created_by: { type: 'User', isSingle: true },
1496
- };
1497
- return decode(typeMappings, input);
1498
- };
1499
-
1500
1357
  decoders.PollClosedFeedEvent = (input?: Record<string, any>) => {
1501
1358
  const typeMappings: TypeMapping = {
1502
1359
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1552,17 +1409,6 @@ decoders.PollUpdatedFeedEvent = (input?: Record<string, any>) => {
1552
1409
  return decode(typeMappings, input);
1553
1410
  };
1554
1411
 
1555
- decoders.PollVote = (input?: Record<string, any>) => {
1556
- const typeMappings: TypeMapping = {
1557
- created_at: { type: 'DatetimeType', isSingle: true },
1558
-
1559
- updated_at: { type: 'DatetimeType', isSingle: true },
1560
-
1561
- user: { type: 'User', isSingle: true },
1562
- };
1563
- return decode(typeMappings, input);
1564
- };
1565
-
1566
1412
  decoders.PollVoteCastedFeedEvent = (input?: Record<string, any>) => {
1567
1413
  const typeMappings: TypeMapping = {
1568
1414
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1629,7 +1475,7 @@ decoders.PollVotesResponse = (input?: Record<string, any>) => {
1629
1475
  return decode(typeMappings, input);
1630
1476
  };
1631
1477
 
1632
- decoders.PushPreferences = (input?: Record<string, any>) => {
1478
+ decoders.PushPreferencesResponse = (input?: Record<string, any>) => {
1633
1479
  const typeMappings: TypeMapping = {
1634
1480
  disabled_until: { type: 'DatetimeType', isSingle: true },
1635
1481
  };
@@ -1713,6 +1559,13 @@ decoders.QueryModerationConfigsResponse = (input?: Record<string, any>) => {
1713
1559
  return decode(typeMappings, input);
1714
1560
  };
1715
1561
 
1562
+ decoders.QueryPinnedActivitiesResponse = (input?: Record<string, any>) => {
1563
+ const typeMappings: TypeMapping = {
1564
+ pinned_activities: { type: 'ActivityPinResponse', isSingle: false },
1565
+ };
1566
+ return decode(typeMappings, input);
1567
+ };
1568
+
1716
1569
  decoders.QueryPollsResponse = (input?: Record<string, any>) => {
1717
1570
  const typeMappings: TypeMapping = {
1718
1571
  polls: { type: 'PollResponseData', isSingle: false },
@@ -1734,8 +1587,6 @@ decoders.Reaction = (input?: Record<string, any>) => {
1734
1587
  updated_at: { type: 'DatetimeType', isSingle: true },
1735
1588
 
1736
1589
  deleted_at: { type: 'DatetimeType', isSingle: true },
1737
-
1738
- user: { type: 'User', isSingle: true },
1739
1590
  };
1740
1591
  return decode(typeMappings, input);
1741
1592
  };
@@ -1813,7 +1664,7 @@ decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
1813
1664
 
1814
1665
  actions: { type: 'ActionLogResponse', isSingle: false },
1815
1666
 
1816
- bans: { type: 'Ban', isSingle: false },
1667
+ bans: { type: 'BanInfoResponse', isSingle: false },
1817
1668
 
1818
1669
  flags: { type: 'ModerationFlagResponse', isSingle: false },
1819
1670
 
@@ -1842,21 +1693,6 @@ decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
1842
1693
  return decode(typeMappings, input);
1843
1694
  };
1844
1695
 
1845
- decoders.SharedLocation = (input?: Record<string, any>) => {
1846
- const typeMappings: TypeMapping = {
1847
- created_at: { type: 'DatetimeType', isSingle: true },
1848
-
1849
- updated_at: { type: 'DatetimeType', isSingle: true },
1850
-
1851
- end_at: { type: 'DatetimeType', isSingle: true },
1852
-
1853
- channel: { type: 'Channel', isSingle: true },
1854
-
1855
- message: { type: 'Message', isSingle: true },
1856
- };
1857
- return decode(typeMappings, input);
1858
- };
1859
-
1860
1696
  decoders.SharedLocationResponse = (input?: Record<string, any>) => {
1861
1697
  const typeMappings: TypeMapping = {
1862
1698
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1949,7 +1785,7 @@ decoders.ThreadedCommentResponse = (input?: Record<string, any>) => {
1949
1785
 
1950
1786
  replies: { type: 'ThreadedCommentResponse', isSingle: false },
1951
1787
 
1952
- reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1788
+ reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
1953
1789
  };
1954
1790
  return decode(typeMappings, input);
1955
1791
  };
@@ -2070,28 +1906,7 @@ decoders.UpsertConfigResponse = (input?: Record<string, any>) => {
2070
1906
 
2071
1907
  decoders.UpsertPushPreferencesResponse = (input?: Record<string, any>) => {
2072
1908
  const typeMappings: TypeMapping = {
2073
- user_preferences: { type: 'PushPreferences', isSingle: false },
2074
- };
2075
- return decode(typeMappings, input);
2076
- };
2077
-
2078
- decoders.User = (input?: Record<string, any>) => {
2079
- const typeMappings: TypeMapping = {
2080
- ban_expires: { type: 'DatetimeType', isSingle: true },
2081
-
2082
- created_at: { type: 'DatetimeType', isSingle: true },
2083
-
2084
- deactivated_at: { type: 'DatetimeType', isSingle: true },
2085
-
2086
- deleted_at: { type: 'DatetimeType', isSingle: true },
2087
-
2088
- last_active: { type: 'DatetimeType', isSingle: true },
2089
-
2090
- last_engaged_at: { type: 'DatetimeType', isSingle: true },
2091
-
2092
- revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
2093
-
2094
- updated_at: { type: 'DatetimeType', isSingle: true },
1909
+ user_preferences: { type: 'PushPreferencesResponse', isSingle: false },
2095
1910
  };
2096
1911
  return decode(typeMappings, input);
2097
1912
  };
@@ -2100,11 +1915,9 @@ decoders.UserBannedEvent = (input?: Record<string, any>) => {
2100
1915
  const typeMappings: TypeMapping = {
2101
1916
  created_at: { type: 'DatetimeType', isSingle: true },
2102
1917
 
2103
- created_by: { type: 'User', isSingle: true },
2104
-
2105
1918
  expiration: { type: 'DatetimeType', isSingle: true },
2106
1919
 
2107
- user: { type: 'User', isSingle: true },
1920
+ received_at: { type: 'DatetimeType', isSingle: true },
2108
1921
  };
2109
1922
  return decode(typeMappings, input);
2110
1923
  };
@@ -2113,24 +1926,7 @@ decoders.UserDeactivatedEvent = (input?: Record<string, any>) => {
2113
1926
  const typeMappings: TypeMapping = {
2114
1927
  created_at: { type: 'DatetimeType', isSingle: true },
2115
1928
 
2116
- created_by: { type: 'User', isSingle: true },
2117
-
2118
- user: { type: 'User', isSingle: true },
2119
- };
2120
- return decode(typeMappings, input);
2121
- };
2122
-
2123
- decoders.UserMute = (input?: Record<string, any>) => {
2124
- const typeMappings: TypeMapping = {
2125
- created_at: { type: 'DatetimeType', isSingle: true },
2126
-
2127
- updated_at: { type: 'DatetimeType', isSingle: true },
2128
-
2129
- expires: { type: 'DatetimeType', isSingle: true },
2130
-
2131
- target: { type: 'User', isSingle: true },
2132
-
2133
- user: { type: 'User', isSingle: true },
1929
+ received_at: { type: 'DatetimeType', isSingle: true },
2134
1930
  };
2135
1931
  return decode(typeMappings, input);
2136
1932
  };
@@ -2150,20 +1946,11 @@ decoders.UserMuteResponse = (input?: Record<string, any>) => {
2150
1946
  return decode(typeMappings, input);
2151
1947
  };
2152
1948
 
2153
- decoders.UserMutedEvent = (input?: Record<string, any>) => {
2154
- const typeMappings: TypeMapping = {
2155
- created_at: { type: 'DatetimeType', isSingle: true },
2156
-
2157
- user: { type: 'User', isSingle: true },
2158
- };
2159
- return decode(typeMappings, input);
2160
- };
2161
-
2162
1949
  decoders.UserReactivatedEvent = (input?: Record<string, any>) => {
2163
1950
  const typeMappings: TypeMapping = {
2164
1951
  created_at: { type: 'DatetimeType', isSingle: true },
2165
1952
 
2166
- user: { type: 'User', isSingle: true },
1953
+ received_at: { type: 'DatetimeType', isSingle: true },
2167
1954
  };
2168
1955
  return decode(typeMappings, input);
2169
1956
  };
@@ -2185,6 +1972,15 @@ decoders.UserResponse = (input?: Record<string, any>) => {
2185
1972
  return decode(typeMappings, input);
2186
1973
  };
2187
1974
 
1975
+ decoders.UserUnbannedEvent = (input?: Record<string, any>) => {
1976
+ const typeMappings: TypeMapping = {
1977
+ created_at: { type: 'DatetimeType', isSingle: true },
1978
+
1979
+ received_at: { type: 'DatetimeType', isSingle: true },
1980
+ };
1981
+ return decode(typeMappings, input);
1982
+ };
1983
+
2188
1984
  decoders.UserUpdatedEvent = (input?: Record<string, any>) => {
2189
1985
  const typeMappings: TypeMapping = {
2190
1986
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -150,11 +150,12 @@ const eventDecoderMapping: Record<
150
150
  'user.deactivated': (data: Record<string, any>) =>
151
151
  decoders.UserDeactivatedEvent(data),
152
152
 
153
- 'user.muted': (data: Record<string, any>) => decoders.UserMutedEvent(data),
154
-
155
153
  'user.reactivated': (data: Record<string, any>) =>
156
154
  decoders.UserReactivatedEvent(data),
157
155
 
156
+ 'user.unbanned': (data: Record<string, any>) =>
157
+ decoders.UserUnbannedEvent(data),
158
+
158
159
  'user.updated': (data: Record<string, any>) =>
159
160
  decoders.UserUpdatedEvent(data),
160
161
  };