@stream-io/feeds-client 0.3.48 → 0.3.50
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.
- package/CHANGELOG.md +20 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-bindings.js +1 -1
- package/dist/es/index.mjs +2 -2
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/react-bindings.mjs +1 -1
- package/dist/{feeds-client-D-EFo20w.mjs → feeds-client-BHpmg4_E.mjs} +270 -176
- package/dist/feeds-client-BHpmg4_E.mjs.map +1 -0
- package/dist/{feeds-client-DuJuJuEJ.js → feeds-client-CKxvuiKz.js} +270 -176
- package/dist/feeds-client-CKxvuiKz.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/common/Poll.d.ts +7 -3
- package/dist/types/common/Poll.d.ts.map +1 -1
- package/dist/types/common/real-time/StableWSConnection.d.ts +3 -3
- package/dist/types/common/real-time/StableWSConnection.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/activity-updater.d.ts +3 -1
- package/dist/types/feed/event-handlers/activity-updater.d.ts.map +1 -1
- package/dist/types/feed/event-handlers/comment/handle-comment-added.d.ts.map +1 -1
- package/dist/types/feed/feed.d.ts +2 -2
- package/dist/types/feed/feed.d.ts.map +1 -1
- package/dist/types/feeds-client/feeds-client.d.ts +7 -3
- package/dist/types/feeds-client/feeds-client.d.ts.map +1 -1
- package/dist/types/gen/feeds/FeedsApi.d.ts +34 -3
- package/dist/types/gen/feeds/FeedsApi.d.ts.map +1 -1
- package/dist/types/gen/model-decoders/event-decoder-mapping.d.ts.map +1 -1
- package/dist/types/gen/models/index.d.ts +276 -422
- package/dist/types/gen/models/index.d.ts.map +1 -1
- package/dist/types/gen/moderation/ModerationApi.d.ts.map +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/constants.d.ts +1 -1
- package/package.json +1 -1
- package/src/common/Poll.ts +16 -15
- package/src/feed/event-handlers/comment/handle-comment-added.ts +14 -2
- package/src/feed/feed.ts +25 -9
- package/src/feeds-client/feeds-client.ts +28 -1
- package/src/gen/feeds/FeedsApi.ts +200 -2
- package/src/gen/model-decoders/decoders.ts +95 -230
- package/src/gen/model-decoders/event-decoder-mapping.ts +6 -2
- package/src/gen/models/index.ts +443 -746
- package/src/gen/moderation/ModerationApi.ts +1 -0
- package/src/test-utils/response-generators.ts +3 -2
- package/src/types.ts +2 -2
- package/src/utils/constants.ts +1 -1
- package/dist/feeds-client-D-EFo20w.mjs.map +0 -1
- package/dist/feeds-client-DuJuJuEJ.js.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: '
|
|
196
|
+
reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
|
|
197
197
|
|
|
198
198
|
user: { type: 'UserResponse', isSingle: true },
|
|
199
199
|
|
|
@@ -293,6 +293,13 @@ decoders.AddReactionResponse = (input?: Record<string, any>) => {
|
|
|
293
293
|
return decode(typeMappings, input);
|
|
294
294
|
};
|
|
295
295
|
|
|
296
|
+
decoders.AddUserGroupMembersResponse = (input?: Record<string, any>) => {
|
|
297
|
+
const typeMappings: TypeMapping = {
|
|
298
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
299
|
+
};
|
|
300
|
+
return decode(typeMappings, input);
|
|
301
|
+
};
|
|
302
|
+
|
|
296
303
|
decoders.AggregatedActivityResponse = (input?: Record<string, any>) => {
|
|
297
304
|
const typeMappings: TypeMapping = {
|
|
298
305
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -324,17 +331,15 @@ decoders.AppealItemResponse = (input?: Record<string, any>) => {
|
|
|
324
331
|
return decode(typeMappings, input);
|
|
325
332
|
};
|
|
326
333
|
|
|
327
|
-
decoders.
|
|
334
|
+
decoders.BanInfoResponse = (input?: Record<string, any>) => {
|
|
328
335
|
const typeMappings: TypeMapping = {
|
|
329
336
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
330
337
|
|
|
331
338
|
expires: { type: 'DatetimeType', isSingle: true },
|
|
332
339
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
created_by: { type: 'User', isSingle: true },
|
|
340
|
+
created_by: { type: 'UserResponse', isSingle: true },
|
|
336
341
|
|
|
337
|
-
|
|
342
|
+
user: { type: 'UserResponse', isSingle: true },
|
|
338
343
|
};
|
|
339
344
|
return decode(typeMappings, input);
|
|
340
345
|
};
|
|
@@ -496,44 +501,6 @@ decoders.CallSessionResponse = (input?: Record<string, any>) => {
|
|
|
496
501
|
return decode(typeMappings, input);
|
|
497
502
|
};
|
|
498
503
|
|
|
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
504
|
decoders.ChannelConfigWithInfo = (input?: Record<string, any>) => {
|
|
538
505
|
const typeMappings: TypeMapping = {
|
|
539
506
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -545,40 +512,6 @@ decoders.ChannelConfigWithInfo = (input?: Record<string, any>) => {
|
|
|
545
512
|
return decode(typeMappings, input);
|
|
546
513
|
};
|
|
547
514
|
|
|
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
515
|
decoders.ChannelMemberResponse = (input?: Record<string, any>) => {
|
|
583
516
|
const typeMappings: TypeMapping = {
|
|
584
517
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -747,7 +680,7 @@ decoders.CommentResponse = (input?: Record<string, any>) => {
|
|
|
747
680
|
|
|
748
681
|
latest_reactions: { type: 'FeedsReactionResponse', isSingle: false },
|
|
749
682
|
|
|
750
|
-
reaction_groups: { type: '
|
|
683
|
+
reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
|
|
751
684
|
};
|
|
752
685
|
return decode(typeMappings, input);
|
|
753
686
|
};
|
|
@@ -800,6 +733,13 @@ decoders.CreateGuestResponse = (input?: Record<string, any>) => {
|
|
|
800
733
|
return decode(typeMappings, input);
|
|
801
734
|
};
|
|
802
735
|
|
|
736
|
+
decoders.CreateUserGroupResponse = (input?: Record<string, any>) => {
|
|
737
|
+
const typeMappings: TypeMapping = {
|
|
738
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
739
|
+
};
|
|
740
|
+
return decode(typeMappings, input);
|
|
741
|
+
};
|
|
742
|
+
|
|
803
743
|
decoders.DeleteActivityReactionResponse = (input?: Record<string, any>) => {
|
|
804
744
|
const typeMappings: TypeMapping = {
|
|
805
745
|
activity: { type: 'ActivityResponse', isSingle: true },
|
|
@@ -834,13 +774,6 @@ decoders.DeleteCommentResponse = (input?: Record<string, any>) => {
|
|
|
834
774
|
return decode(typeMappings, input);
|
|
835
775
|
};
|
|
836
776
|
|
|
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
777
|
decoders.DeviceResponse = (input?: Record<string, any>) => {
|
|
845
778
|
const typeMappings: TypeMapping = {
|
|
846
779
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -943,6 +876,15 @@ decoders.FeedGroupDeletedEvent = (input?: Record<string, any>) => {
|
|
|
943
876
|
return decode(typeMappings, input);
|
|
944
877
|
};
|
|
945
878
|
|
|
879
|
+
decoders.FeedGroupRestoredEvent = (input?: Record<string, any>) => {
|
|
880
|
+
const typeMappings: TypeMapping = {
|
|
881
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
882
|
+
|
|
883
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
884
|
+
};
|
|
885
|
+
return decode(typeMappings, input);
|
|
886
|
+
};
|
|
887
|
+
|
|
946
888
|
decoders.FeedMemberAddedEvent = (input?: Record<string, any>) => {
|
|
947
889
|
const typeMappings: TypeMapping = {
|
|
948
890
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1051,6 +993,15 @@ decoders.FeedUpdatedEvent = (input?: Record<string, any>) => {
|
|
|
1051
993
|
return decode(typeMappings, input);
|
|
1052
994
|
};
|
|
1053
995
|
|
|
996
|
+
decoders.FeedsReactionGroupResponse = (input?: Record<string, any>) => {
|
|
997
|
+
const typeMappings: TypeMapping = {
|
|
998
|
+
first_reaction_at: { type: 'DatetimeType', isSingle: true },
|
|
999
|
+
|
|
1000
|
+
last_reaction_at: { type: 'DatetimeType', isSingle: true },
|
|
1001
|
+
};
|
|
1002
|
+
return decode(typeMappings, input);
|
|
1003
|
+
};
|
|
1004
|
+
|
|
1054
1005
|
decoders.FeedsReactionResponse = (input?: Record<string, any>) => {
|
|
1055
1006
|
const typeMappings: TypeMapping = {
|
|
1056
1007
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1226,11 +1177,20 @@ decoders.GetOrCreateFeedResponse = (input?: Record<string, any>) => {
|
|
|
1226
1177
|
return decode(typeMappings, input);
|
|
1227
1178
|
};
|
|
1228
1179
|
|
|
1180
|
+
decoders.GetUserGroupResponse = (input?: Record<string, any>) => {
|
|
1181
|
+
const typeMappings: TypeMapping = {
|
|
1182
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
1183
|
+
};
|
|
1184
|
+
return decode(typeMappings, input);
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1229
1187
|
decoders.HealthCheckEvent = (input?: Record<string, any>) => {
|
|
1230
1188
|
const typeMappings: TypeMapping = {
|
|
1231
1189
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1232
1190
|
|
|
1233
1191
|
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1192
|
+
|
|
1193
|
+
me: { type: 'OwnUserResponse', isSingle: true },
|
|
1234
1194
|
};
|
|
1235
1195
|
return decode(typeMappings, input);
|
|
1236
1196
|
};
|
|
@@ -1249,69 +1209,18 @@ decoders.ListDevicesResponse = (input?: Record<string, any>) => {
|
|
|
1249
1209
|
return decode(typeMappings, input);
|
|
1250
1210
|
};
|
|
1251
1211
|
|
|
1252
|
-
decoders.
|
|
1212
|
+
decoders.ListUserGroupsResponse = (input?: Record<string, any>) => {
|
|
1253
1213
|
const typeMappings: TypeMapping = {
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1214
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
1257
1215
|
};
|
|
1258
1216
|
return decode(typeMappings, input);
|
|
1259
1217
|
};
|
|
1260
1218
|
|
|
1261
|
-
decoders.
|
|
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>) => {
|
|
1219
|
+
decoders.MembershipLevelResponse = (input?: Record<string, any>) => {
|
|
1303
1220
|
const typeMappings: TypeMapping = {
|
|
1304
1221
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1305
1222
|
|
|
1306
1223
|
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
1224
|
};
|
|
1316
1225
|
return decode(typeMappings, input);
|
|
1317
1226
|
};
|
|
@@ -1389,7 +1298,7 @@ decoders.ModerationFlaggedEvent = (input?: Record<string, any>) => {
|
|
|
1389
1298
|
const typeMappings: TypeMapping = {
|
|
1390
1299
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1391
1300
|
|
|
1392
|
-
|
|
1301
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
1393
1302
|
};
|
|
1394
1303
|
return decode(typeMappings, input);
|
|
1395
1304
|
};
|
|
@@ -1409,9 +1318,9 @@ decoders.ModerationMarkReviewedEvent = (input?: Record<string, any>) => {
|
|
|
1409
1318
|
|
|
1410
1319
|
decoders.MuteResponse = (input?: Record<string, any>) => {
|
|
1411
1320
|
const typeMappings: TypeMapping = {
|
|
1412
|
-
mutes: { type: '
|
|
1321
|
+
mutes: { type: 'UserMuteResponse', isSingle: false },
|
|
1413
1322
|
|
|
1414
|
-
own_user: { type: '
|
|
1323
|
+
own_user: { type: 'OwnUserResponse', isSingle: true },
|
|
1415
1324
|
};
|
|
1416
1325
|
return decode(typeMappings, input);
|
|
1417
1326
|
};
|
|
@@ -1448,7 +1357,7 @@ decoders.OwnBatchResponse = (input?: Record<string, any>) => {
|
|
|
1448
1357
|
return decode(typeMappings, input);
|
|
1449
1358
|
};
|
|
1450
1359
|
|
|
1451
|
-
decoders.
|
|
1360
|
+
decoders.OwnUserResponse = (input?: Record<string, any>) => {
|
|
1452
1361
|
const typeMappings: TypeMapping = {
|
|
1453
1362
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1454
1363
|
|
|
@@ -1456,9 +1365,9 @@ decoders.OwnUser = (input?: Record<string, any>) => {
|
|
|
1456
1365
|
|
|
1457
1366
|
channel_mutes: { type: 'ChannelMute', isSingle: false },
|
|
1458
1367
|
|
|
1459
|
-
devices: { type: '
|
|
1368
|
+
devices: { type: 'DeviceResponse', isSingle: false },
|
|
1460
1369
|
|
|
1461
|
-
mutes: { type: '
|
|
1370
|
+
mutes: { type: 'UserMuteResponse', isSingle: false },
|
|
1462
1371
|
|
|
1463
1372
|
deactivated_at: { type: 'DatetimeType', isSingle: true },
|
|
1464
1373
|
|
|
@@ -1466,9 +1375,9 @@ decoders.OwnUser = (input?: Record<string, any>) => {
|
|
|
1466
1375
|
|
|
1467
1376
|
last_active: { type: 'DatetimeType', isSingle: true },
|
|
1468
1377
|
|
|
1469
|
-
|
|
1378
|
+
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
1470
1379
|
|
|
1471
|
-
push_preferences: { type: '
|
|
1380
|
+
push_preferences: { type: 'PushPreferencesResponse', isSingle: true },
|
|
1472
1381
|
};
|
|
1473
1382
|
return decode(typeMappings, input);
|
|
1474
1383
|
};
|
|
@@ -1482,21 +1391,6 @@ decoders.PinActivityResponse = (input?: Record<string, any>) => {
|
|
|
1482
1391
|
return decode(typeMappings, input);
|
|
1483
1392
|
};
|
|
1484
1393
|
|
|
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
1394
|
decoders.PollClosedFeedEvent = (input?: Record<string, any>) => {
|
|
1501
1395
|
const typeMappings: TypeMapping = {
|
|
1502
1396
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1552,17 +1446,6 @@ decoders.PollUpdatedFeedEvent = (input?: Record<string, any>) => {
|
|
|
1552
1446
|
return decode(typeMappings, input);
|
|
1553
1447
|
};
|
|
1554
1448
|
|
|
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
1449
|
decoders.PollVoteCastedFeedEvent = (input?: Record<string, any>) => {
|
|
1567
1450
|
const typeMappings: TypeMapping = {
|
|
1568
1451
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1629,7 +1512,7 @@ decoders.PollVotesResponse = (input?: Record<string, any>) => {
|
|
|
1629
1512
|
return decode(typeMappings, input);
|
|
1630
1513
|
};
|
|
1631
1514
|
|
|
1632
|
-
decoders.
|
|
1515
|
+
decoders.PushPreferencesResponse = (input?: Record<string, any>) => {
|
|
1633
1516
|
const typeMappings: TypeMapping = {
|
|
1634
1517
|
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
1635
1518
|
};
|
|
@@ -1741,8 +1624,6 @@ decoders.Reaction = (input?: Record<string, any>) => {
|
|
|
1741
1624
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1742
1625
|
|
|
1743
1626
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
1744
|
-
|
|
1745
|
-
user: { type: 'User', isSingle: true },
|
|
1746
1627
|
};
|
|
1747
1628
|
return decode(typeMappings, input);
|
|
1748
1629
|
};
|
|
@@ -1805,6 +1686,13 @@ decoders.ReminderResponseData = (input?: Record<string, any>) => {
|
|
|
1805
1686
|
return decode(typeMappings, input);
|
|
1806
1687
|
};
|
|
1807
1688
|
|
|
1689
|
+
decoders.RemoveUserGroupMembersResponse = (input?: Record<string, any>) => {
|
|
1690
|
+
const typeMappings: TypeMapping = {
|
|
1691
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
1692
|
+
};
|
|
1693
|
+
return decode(typeMappings, input);
|
|
1694
|
+
};
|
|
1695
|
+
|
|
1808
1696
|
decoders.RestoreActivityResponse = (input?: Record<string, any>) => {
|
|
1809
1697
|
const typeMappings: TypeMapping = {
|
|
1810
1698
|
activity: { type: 'ActivityResponse', isSingle: true },
|
|
@@ -1820,7 +1708,7 @@ decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
|
|
|
1820
1708
|
|
|
1821
1709
|
actions: { type: 'ActionLogResponse', isSingle: false },
|
|
1822
1710
|
|
|
1823
|
-
bans: { type: '
|
|
1711
|
+
bans: { type: 'BanInfoResponse', isSingle: false },
|
|
1824
1712
|
|
|
1825
1713
|
flags: { type: 'ModerationFlagResponse', isSingle: false },
|
|
1826
1714
|
|
|
@@ -1849,17 +1737,9 @@ decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
|
|
|
1849
1737
|
return decode(typeMappings, input);
|
|
1850
1738
|
};
|
|
1851
1739
|
|
|
1852
|
-
decoders.
|
|
1740
|
+
decoders.SearchUserGroupsResponse = (input?: Record<string, any>) => {
|
|
1853
1741
|
const typeMappings: TypeMapping = {
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1857
|
-
|
|
1858
|
-
end_at: { type: 'DatetimeType', isSingle: true },
|
|
1859
|
-
|
|
1860
|
-
channel: { type: 'Channel', isSingle: true },
|
|
1861
|
-
|
|
1862
|
-
message: { type: 'Message', isSingle: true },
|
|
1742
|
+
user_groups: { type: 'UserGroupResponse', isSingle: false },
|
|
1863
1743
|
};
|
|
1864
1744
|
return decode(typeMappings, input);
|
|
1865
1745
|
};
|
|
@@ -1956,7 +1836,7 @@ decoders.ThreadedCommentResponse = (input?: Record<string, any>) => {
|
|
|
1956
1836
|
|
|
1957
1837
|
replies: { type: 'ThreadedCommentResponse', isSingle: false },
|
|
1958
1838
|
|
|
1959
|
-
reaction_groups: { type: '
|
|
1839
|
+
reaction_groups: { type: 'FeedsReactionGroupResponse', isSingle: false },
|
|
1960
1840
|
};
|
|
1961
1841
|
return decode(typeMappings, input);
|
|
1962
1842
|
};
|
|
@@ -2054,6 +1934,13 @@ decoders.UpdateFollowResponse = (input?: Record<string, any>) => {
|
|
|
2054
1934
|
return decode(typeMappings, input);
|
|
2055
1935
|
};
|
|
2056
1936
|
|
|
1937
|
+
decoders.UpdateUserGroupResponse = (input?: Record<string, any>) => {
|
|
1938
|
+
const typeMappings: TypeMapping = {
|
|
1939
|
+
user_group: { type: 'UserGroupResponse', isSingle: true },
|
|
1940
|
+
};
|
|
1941
|
+
return decode(typeMappings, input);
|
|
1942
|
+
};
|
|
1943
|
+
|
|
2057
1944
|
decoders.UpdateUsersResponse = (input?: Record<string, any>) => {
|
|
2058
1945
|
const typeMappings: TypeMapping = {
|
|
2059
1946
|
users: { type: 'FullUserResponse', isSingle: false },
|
|
@@ -2077,67 +1964,45 @@ decoders.UpsertConfigResponse = (input?: Record<string, any>) => {
|
|
|
2077
1964
|
|
|
2078
1965
|
decoders.UpsertPushPreferencesResponse = (input?: Record<string, any>) => {
|
|
2079
1966
|
const typeMappings: TypeMapping = {
|
|
2080
|
-
user_preferences: { type: '
|
|
1967
|
+
user_preferences: { type: 'PushPreferencesResponse', isSingle: false },
|
|
2081
1968
|
};
|
|
2082
1969
|
return decode(typeMappings, input);
|
|
2083
1970
|
};
|
|
2084
1971
|
|
|
2085
|
-
decoders.
|
|
1972
|
+
decoders.UserBannedEvent = (input?: Record<string, any>) => {
|
|
2086
1973
|
const typeMappings: TypeMapping = {
|
|
2087
|
-
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
2088
|
-
|
|
2089
1974
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2090
1975
|
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
2094
|
-
|
|
2095
|
-
last_active: { type: 'DatetimeType', isSingle: true },
|
|
2096
|
-
|
|
2097
|
-
last_engaged_at: { type: 'DatetimeType', isSingle: true },
|
|
2098
|
-
|
|
2099
|
-
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
1976
|
+
expiration: { type: 'DatetimeType', isSingle: true },
|
|
2100
1977
|
|
|
2101
|
-
|
|
1978
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2102
1979
|
};
|
|
2103
1980
|
return decode(typeMappings, input);
|
|
2104
1981
|
};
|
|
2105
1982
|
|
|
2106
|
-
decoders.
|
|
1983
|
+
decoders.UserDeactivatedEvent = (input?: Record<string, any>) => {
|
|
2107
1984
|
const typeMappings: TypeMapping = {
|
|
2108
1985
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2109
1986
|
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
expiration: { type: 'DatetimeType', isSingle: true },
|
|
2113
|
-
|
|
2114
|
-
user: { type: 'User', isSingle: true },
|
|
1987
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2115
1988
|
};
|
|
2116
1989
|
return decode(typeMappings, input);
|
|
2117
1990
|
};
|
|
2118
1991
|
|
|
2119
|
-
decoders.
|
|
1992
|
+
decoders.UserGroupMember = (input?: Record<string, any>) => {
|
|
2120
1993
|
const typeMappings: TypeMapping = {
|
|
2121
1994
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2122
|
-
|
|
2123
|
-
created_by: { type: 'User', isSingle: true },
|
|
2124
|
-
|
|
2125
|
-
user: { type: 'User', isSingle: true },
|
|
2126
1995
|
};
|
|
2127
1996
|
return decode(typeMappings, input);
|
|
2128
1997
|
};
|
|
2129
1998
|
|
|
2130
|
-
decoders.
|
|
1999
|
+
decoders.UserGroupResponse = (input?: Record<string, any>) => {
|
|
2131
2000
|
const typeMappings: TypeMapping = {
|
|
2132
2001
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2133
2002
|
|
|
2134
2003
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2135
2004
|
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
target: { type: 'User', isSingle: true },
|
|
2139
|
-
|
|
2140
|
-
user: { type: 'User', isSingle: true },
|
|
2005
|
+
members: { type: 'UserGroupMember', isSingle: false },
|
|
2141
2006
|
};
|
|
2142
2007
|
return decode(typeMappings, input);
|
|
2143
2008
|
};
|
|
@@ -2157,20 +2022,11 @@ decoders.UserMuteResponse = (input?: Record<string, any>) => {
|
|
|
2157
2022
|
return decode(typeMappings, input);
|
|
2158
2023
|
};
|
|
2159
2024
|
|
|
2160
|
-
decoders.UserMutedEvent = (input?: Record<string, any>) => {
|
|
2161
|
-
const typeMappings: TypeMapping = {
|
|
2162
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2163
|
-
|
|
2164
|
-
user: { type: 'User', isSingle: true },
|
|
2165
|
-
};
|
|
2166
|
-
return decode(typeMappings, input);
|
|
2167
|
-
};
|
|
2168
|
-
|
|
2169
2025
|
decoders.UserReactivatedEvent = (input?: Record<string, any>) => {
|
|
2170
2026
|
const typeMappings: TypeMapping = {
|
|
2171
2027
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2172
2028
|
|
|
2173
|
-
|
|
2029
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2174
2030
|
};
|
|
2175
2031
|
return decode(typeMappings, input);
|
|
2176
2032
|
};
|
|
@@ -2192,6 +2048,15 @@ decoders.UserResponse = (input?: Record<string, any>) => {
|
|
|
2192
2048
|
return decode(typeMappings, input);
|
|
2193
2049
|
};
|
|
2194
2050
|
|
|
2051
|
+
decoders.UserUnbannedEvent = (input?: Record<string, any>) => {
|
|
2052
|
+
const typeMappings: TypeMapping = {
|
|
2053
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2054
|
+
|
|
2055
|
+
received_at: { type: 'DatetimeType', isSingle: true },
|
|
2056
|
+
};
|
|
2057
|
+
return decode(typeMappings, input);
|
|
2058
|
+
};
|
|
2059
|
+
|
|
2195
2060
|
decoders.UserUpdatedEvent = (input?: Record<string, any>) => {
|
|
2196
2061
|
const typeMappings: TypeMapping = {
|
|
2197
2062
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -91,6 +91,9 @@ const eventDecoderMapping: Record<
|
|
|
91
91
|
'feeds.feed_group.deleted': (data: Record<string, any>) =>
|
|
92
92
|
decoders.FeedGroupDeletedEvent(data),
|
|
93
93
|
|
|
94
|
+
'feeds.feed_group.restored': (data: Record<string, any>) =>
|
|
95
|
+
decoders.FeedGroupRestoredEvent(data),
|
|
96
|
+
|
|
94
97
|
'feeds.feed_member.added': (data: Record<string, any>) =>
|
|
95
98
|
decoders.FeedMemberAddedEvent(data),
|
|
96
99
|
|
|
@@ -150,11 +153,12 @@ const eventDecoderMapping: Record<
|
|
|
150
153
|
'user.deactivated': (data: Record<string, any>) =>
|
|
151
154
|
decoders.UserDeactivatedEvent(data),
|
|
152
155
|
|
|
153
|
-
'user.muted': (data: Record<string, any>) => decoders.UserMutedEvent(data),
|
|
154
|
-
|
|
155
156
|
'user.reactivated': (data: Record<string, any>) =>
|
|
156
157
|
decoders.UserReactivatedEvent(data),
|
|
157
158
|
|
|
159
|
+
'user.unbanned': (data: Record<string, any>) =>
|
|
160
|
+
decoders.UserUnbannedEvent(data),
|
|
161
|
+
|
|
158
162
|
'user.updated': (data: Record<string, any>) =>
|
|
159
163
|
decoders.UserUpdatedEvent(data),
|
|
160
164
|
};
|