@stream-io/node-sdk 0.4.23 → 0.4.25

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.
@@ -60,6 +60,8 @@ decoders.ActionLogResponse = (input?: Record<string, any>) => {
60
60
 
61
61
  decoders.AppResponseFields = (input?: Record<string, any>) => {
62
62
  const typeMappings: TypeMapping = {
63
+ event_hooks: { type: 'EventHook', isSingle: false },
64
+
63
65
  call_types: { type: 'CallType', isSingle: false },
64
66
 
65
67
  channel_configs: { type: 'ChannelConfig', isSingle: false },
@@ -135,6 +137,84 @@ decoders.BlockedUserResponse = (input?: Record<string, any>) => {
135
137
  return decode(typeMappings, input);
136
138
  };
137
139
 
140
+ decoders.Call = (input?: Record<string, any>) => {
141
+ const typeMappings: TypeMapping = {
142
+ created_at: { type: 'DatetimeType', isSingle: true },
143
+
144
+ updated_at: { type: 'DatetimeType', isSingle: true },
145
+
146
+ blocked_users: { type: 'User', isSingle: false },
147
+
148
+ egresses: { type: 'CallEgress', isSingle: false },
149
+
150
+ members: { type: 'CallMember', isSingle: false },
151
+
152
+ deleted_at: { type: 'DatetimeType', isSingle: true },
153
+
154
+ egress_updated_at: { type: 'DatetimeType', isSingle: true },
155
+
156
+ ended_at: { type: 'DatetimeType', isSingle: true },
157
+
158
+ last_heartbeat_at: { type: 'DatetimeType', isSingle: true },
159
+
160
+ starts_at: { type: 'DatetimeType', isSingle: true },
161
+
162
+ call_type: { type: 'CallType', isSingle: true },
163
+
164
+ created_by: { type: 'User', isSingle: true },
165
+
166
+ session: { type: 'CallSession', isSingle: true },
167
+ };
168
+ return decode(typeMappings, input);
169
+ };
170
+
171
+ decoders.CallEgress = (input?: Record<string, any>) => {
172
+ const typeMappings: TypeMapping = {
173
+ started_at: { type: 'DatetimeType', isSingle: true },
174
+
175
+ updated_at: { type: 'DatetimeType', isSingle: true },
176
+
177
+ stopped_at: { type: 'DatetimeType', isSingle: true },
178
+ };
179
+ return decode(typeMappings, input);
180
+ };
181
+
182
+ decoders.CallMember = (input?: Record<string, any>) => {
183
+ const typeMappings: TypeMapping = {
184
+ created_at: { type: 'DatetimeType', isSingle: true },
185
+
186
+ updated_at: { type: 'DatetimeType', isSingle: true },
187
+
188
+ deleted_at: { type: 'DatetimeType', isSingle: true },
189
+
190
+ user: { type: 'User', isSingle: true },
191
+ };
192
+ return decode(typeMappings, input);
193
+ };
194
+
195
+ decoders.CallParticipant = (input?: Record<string, any>) => {
196
+ const typeMappings: TypeMapping = {
197
+ joined_at: { type: 'DatetimeType', isSingle: true },
198
+
199
+ ban_expires: { type: 'DatetimeType', isSingle: true },
200
+
201
+ created_at: { type: 'DatetimeType', isSingle: true },
202
+
203
+ deactivated_at: { type: 'DatetimeType', isSingle: true },
204
+
205
+ deleted_at: { type: 'DatetimeType', isSingle: true },
206
+
207
+ last_active: { type: 'DatetimeType', isSingle: true },
208
+
209
+ last_engaged_at: { type: 'DatetimeType', isSingle: true },
210
+
211
+ revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
212
+
213
+ updated_at: { type: 'DatetimeType', isSingle: true },
214
+ };
215
+ return decode(typeMappings, input);
216
+ };
217
+
138
218
  decoders.CallParticipantResponse = (input?: Record<string, any>) => {
139
219
  const typeMappings: TypeMapping = {
140
220
  joined_at: { type: 'DatetimeType', isSingle: true },
@@ -179,6 +259,37 @@ decoders.CallResponse = (input?: Record<string, any>) => {
179
259
  return decode(typeMappings, input);
180
260
  };
181
261
 
262
+ decoders.CallSession = (input?: Record<string, any>) => {
263
+ const typeMappings: TypeMapping = {
264
+ created_at: { type: 'DatetimeType', isSingle: true },
265
+
266
+ active_sf_us: { type: 'SFUIDLastSeen', isSingle: false },
267
+
268
+ participants: { type: 'CallParticipant', isSingle: false },
269
+
270
+ accepted_by: { type: 'DatetimeType', isSingle: false },
271
+
272
+ missed_by: { type: 'DatetimeType', isSingle: false },
273
+
274
+ rejected_by: { type: 'DatetimeType', isSingle: false },
275
+
276
+ deleted_at: { type: 'DatetimeType', isSingle: true },
277
+
278
+ ended_at: { type: 'DatetimeType', isSingle: true },
279
+
280
+ live_ended_at: { type: 'DatetimeType', isSingle: true },
281
+
282
+ live_started_at: { type: 'DatetimeType', isSingle: true },
283
+
284
+ ring_at: { type: 'DatetimeType', isSingle: true },
285
+
286
+ started_at: { type: 'DatetimeType', isSingle: true },
287
+
288
+ timer_ends_at: { type: 'DatetimeType', isSingle: true },
289
+ };
290
+ return decode(typeMappings, input);
291
+ };
292
+
182
293
  decoders.CallSessionResponse = (input?: Record<string, any>) => {
183
294
  const typeMappings: TypeMapping = {
184
295
  participants: { type: 'CallParticipantResponse', isSingle: false },
@@ -710,6 +821,15 @@ decoders.EntityCreatorResponse = (input?: Record<string, any>) => {
710
821
  return decode(typeMappings, input);
711
822
  };
712
823
 
824
+ decoders.EventHook = (input?: Record<string, any>) => {
825
+ const typeMappings: TypeMapping = {
826
+ created_at: { type: 'DatetimeType', isSingle: true },
827
+
828
+ updated_at: { type: 'DatetimeType', isSingle: true },
829
+ };
830
+ return decode(typeMappings, input);
831
+ };
832
+
713
833
  decoders.EventResponse = (input?: Record<string, any>) => {
714
834
  const typeMappings: TypeMapping = {
715
835
  event: { type: 'WSEvent', isSingle: true },
@@ -734,6 +854,8 @@ decoders.Flag = (input?: Record<string, any>) => {
734
854
 
735
855
  updated_at: { type: 'DatetimeType', isSingle: true },
736
856
 
857
+ review_queue_item: { type: 'ReviewQueueItem', isSingle: true },
858
+
737
859
  user: { type: 'User', isSingle: true },
738
860
  };
739
861
  return decode(typeMappings, input);
@@ -801,6 +923,8 @@ decoders.GetBlockedUsersResponse = (input?: Record<string, any>) => {
801
923
 
802
924
  decoders.GetCallReportResponse = (input?: Record<string, any>) => {
803
925
  const typeMappings: TypeMapping = {
926
+ video_reactions: { type: 'VideoReactionsResponse', isSingle: false },
927
+
804
928
  chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
805
929
  };
806
930
  return decode(typeMappings, input);
@@ -888,6 +1012,13 @@ decoders.GetOrCreateCallResponse = (input?: Record<string, any>) => {
888
1012
  return decode(typeMappings, input);
889
1013
  };
890
1014
 
1015
+ decoders.GetPushTemplatesResponse = (input?: Record<string, any>) => {
1016
+ const typeMappings: TypeMapping = {
1017
+ templates: { type: 'PushTemplate', isSingle: false },
1018
+ };
1019
+ return decode(typeMappings, input);
1020
+ };
1021
+
891
1022
  decoders.GetReactionsResponse = (input?: Record<string, any>) => {
892
1023
  const typeMappings: TypeMapping = {
893
1024
  reactions: { type: 'Reaction', isSingle: false },
@@ -1084,6 +1215,8 @@ decoders.Message = (input?: Record<string, any>) => {
1084
1215
 
1085
1216
  quoted_message: { type: 'Message', isSingle: true },
1086
1217
 
1218
+ reminder: { type: 'MessageReminder', isSingle: true },
1219
+
1087
1220
  user: { type: 'User', isSingle: true },
1088
1221
  };
1089
1222
  return decode(typeMappings, input);
@@ -1145,6 +1278,23 @@ decoders.MessageReadEvent = (input?: Record<string, any>) => {
1145
1278
  return decode(typeMappings, input);
1146
1279
  };
1147
1280
 
1281
+ decoders.MessageReminder = (input?: Record<string, any>) => {
1282
+ const typeMappings: TypeMapping = {
1283
+ created_at: { type: 'DatetimeType', isSingle: true },
1284
+
1285
+ updated_at: { type: 'DatetimeType', isSingle: true },
1286
+
1287
+ remind_at: { type: 'DatetimeType', isSingle: true },
1288
+
1289
+ channel: { type: 'Channel', isSingle: true },
1290
+
1291
+ message: { type: 'Message', isSingle: true },
1292
+
1293
+ user: { type: 'User', isSingle: true },
1294
+ };
1295
+ return decode(typeMappings, input);
1296
+ };
1297
+
1148
1298
  decoders.MessageResponse = (input?: Record<string, any>) => {
1149
1299
  const typeMappings: TypeMapping = {
1150
1300
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1178,6 +1328,8 @@ decoders.MessageResponse = (input?: Record<string, any>) => {
1178
1328
  quoted_message: { type: 'MessageResponse', isSingle: true },
1179
1329
 
1180
1330
  reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1331
+
1332
+ reminder: { type: 'ReminderResponseData', isSingle: true },
1181
1333
  };
1182
1334
  return decode(typeMappings, input);
1183
1335
  };
@@ -1224,6 +1376,17 @@ decoders.MessageWithChannelResponse = (input?: Record<string, any>) => {
1224
1376
  quoted_message: { type: 'MessageResponse', isSingle: true },
1225
1377
 
1226
1378
  reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1379
+
1380
+ reminder: { type: 'ReminderResponseData', isSingle: true },
1381
+ };
1382
+ return decode(typeMappings, input);
1383
+ };
1384
+
1385
+ decoders.ModerationFlagResponse = (input?: Record<string, any>) => {
1386
+ const typeMappings: TypeMapping = {
1387
+ review_queue_item: { type: 'ReviewQueueItem', isSingle: true },
1388
+
1389
+ user: { type: 'UserResponse', isSingle: true },
1227
1390
  };
1228
1391
  return decode(typeMappings, input);
1229
1392
  };
@@ -1424,6 +1587,8 @@ decoders.PushProvider = (input?: Record<string, any>) => {
1424
1587
  updated_at: { type: 'DatetimeType', isSingle: true },
1425
1588
 
1426
1589
  disabled_at: { type: 'DatetimeType', isSingle: true },
1590
+
1591
+ push_templates: { type: 'PushTemplate', isSingle: false },
1427
1592
  };
1428
1593
  return decode(typeMappings, input);
1429
1594
  };
@@ -1439,6 +1604,15 @@ decoders.PushProviderResponse = (input?: Record<string, any>) => {
1439
1604
  return decode(typeMappings, input);
1440
1605
  };
1441
1606
 
1607
+ decoders.PushTemplate = (input?: Record<string, any>) => {
1608
+ const typeMappings: TypeMapping = {
1609
+ created_at: { type: 'DatetimeType', isSingle: true },
1610
+
1611
+ updated_at: { type: 'DatetimeType', isSingle: true },
1612
+ };
1613
+ return decode(typeMappings, input);
1614
+ };
1615
+
1442
1616
  decoders.QueryBannedUsersResponse = (input?: Record<string, any>) => {
1443
1617
  const typeMappings: TypeMapping = {
1444
1618
  bans: { type: 'BanResponse', isSingle: false },
@@ -1538,6 +1712,13 @@ decoders.QueryModerationConfigsResponse = (input?: Record<string, any>) => {
1538
1712
  return decode(typeMappings, input);
1539
1713
  };
1540
1714
 
1715
+ decoders.QueryModerationFlagsResponse = (input?: Record<string, any>) => {
1716
+ const typeMappings: TypeMapping = {
1717
+ flags: { type: 'ModerationFlagResponse', isSingle: false },
1718
+ };
1719
+ return decode(typeMappings, input);
1720
+ };
1721
+
1541
1722
  decoders.QueryModerationLogsResponse = (input?: Record<string, any>) => {
1542
1723
  const typeMappings: TypeMapping = {
1543
1724
  logs: { type: 'ActionLogResponse', isSingle: false },
@@ -1559,6 +1740,13 @@ decoders.QueryReactionsResponse = (input?: Record<string, any>) => {
1559
1740
  return decode(typeMappings, input);
1560
1741
  };
1561
1742
 
1743
+ decoders.QueryRemindersResponse = (input?: Record<string, any>) => {
1744
+ const typeMappings: TypeMapping = {
1745
+ reminders: { type: 'ReminderResponseData', isSingle: false },
1746
+ };
1747
+ return decode(typeMappings, input);
1748
+ };
1749
+
1562
1750
  decoders.QueryReviewQueueResponse = (input?: Record<string, any>) => {
1563
1751
  const typeMappings: TypeMapping = {
1564
1752
  items: { type: 'ReviewQueueItemResponse', isSingle: false },
@@ -1641,6 +1829,23 @@ decoders.ReadStateResponse = (input?: Record<string, any>) => {
1641
1829
  return decode(typeMappings, input);
1642
1830
  };
1643
1831
 
1832
+ decoders.ReminderResponseData = (input?: Record<string, any>) => {
1833
+ const typeMappings: TypeMapping = {
1834
+ created_at: { type: 'DatetimeType', isSingle: true },
1835
+
1836
+ updated_at: { type: 'DatetimeType', isSingle: true },
1837
+
1838
+ remind_at: { type: 'DatetimeType', isSingle: true },
1839
+
1840
+ channel: { type: 'ChannelResponse', isSingle: true },
1841
+
1842
+ message: { type: 'Message', isSingle: true },
1843
+
1844
+ user: { type: 'User', isSingle: true },
1845
+ };
1846
+ return decode(typeMappings, input);
1847
+ };
1848
+
1644
1849
  decoders.ReviewQueueItem = (input?: Record<string, any>) => {
1645
1850
  const typeMappings: TypeMapping = {
1646
1851
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1655,6 +1860,8 @@ decoders.ReviewQueueItem = (input?: Record<string, any>) => {
1655
1860
 
1656
1861
  assigned_to: { type: 'User', isSingle: true },
1657
1862
 
1863
+ call: { type: 'Call', isSingle: true },
1864
+
1658
1865
  entity_creator: { type: 'EntityCreator', isSingle: true },
1659
1866
 
1660
1867
  feeds_v2_reaction: { type: 'Reaction', isSingle: true },
@@ -1682,6 +1889,8 @@ decoders.ReviewQueueItemResponse = (input?: Record<string, any>) => {
1682
1889
 
1683
1890
  assigned_to: { type: 'UserResponse', isSingle: true },
1684
1891
 
1892
+ call: { type: 'CallResponse', isSingle: true },
1893
+
1685
1894
  entity_creator: { type: 'EntityCreatorResponse', isSingle: true },
1686
1895
 
1687
1896
  feeds_v2_reaction: { type: 'Reaction', isSingle: true },
@@ -1702,6 +1911,13 @@ decoders.Role = (input?: Record<string, any>) => {
1702
1911
  return decode(typeMappings, input);
1703
1912
  };
1704
1913
 
1914
+ decoders.SFUIDLastSeen = (input?: Record<string, any>) => {
1915
+ const typeMappings: TypeMapping = {
1916
+ last_seen: { type: 'DatetimeType', isSingle: true },
1917
+ };
1918
+ return decode(typeMappings, input);
1919
+ };
1920
+
1705
1921
  decoders.SearchResult = (input?: Record<string, any>) => {
1706
1922
  const typeMappings: TypeMapping = {
1707
1923
  message: { type: 'SearchResultMessage', isSingle: true },
@@ -1744,6 +1960,8 @@ decoders.SearchResultMessage = (input?: Record<string, any>) => {
1744
1960
  quoted_message: { type: 'MessageResponse', isSingle: true },
1745
1961
 
1746
1962
  reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
1963
+
1964
+ reminder: { type: 'ReminderResponseData', isSingle: true },
1747
1965
  };
1748
1966
  return decode(typeMappings, input);
1749
1967
  };
@@ -1998,6 +2216,13 @@ decoders.UpdateMessageResponse = (input?: Record<string, any>) => {
1998
2216
  return decode(typeMappings, input);
1999
2217
  };
2000
2218
 
2219
+ decoders.UpdateReminderResponse = (input?: Record<string, any>) => {
2220
+ const typeMappings: TypeMapping = {
2221
+ reminder: { type: 'ReminderResponseData', isSingle: true },
2222
+ };
2223
+ return decode(typeMappings, input);
2224
+ };
2225
+
2001
2226
  decoders.UpdateThreadPartialResponse = (input?: Record<string, any>) => {
2002
2227
  const typeMappings: TypeMapping = {
2003
2228
  thread: { type: 'ThreadResponse', isSingle: true },
@@ -2042,6 +2267,13 @@ decoders.UpsertPushProviderResponse = (input?: Record<string, any>) => {
2042
2267
  return decode(typeMappings, input);
2043
2268
  };
2044
2269
 
2270
+ decoders.UpsertPushTemplateResponse = (input?: Record<string, any>) => {
2271
+ const typeMappings: TypeMapping = {
2272
+ template: { type: 'PushTemplate', isSingle: true },
2273
+ };
2274
+ return decode(typeMappings, input);
2275
+ };
2276
+
2045
2277
  decoders.User = (input?: Record<string, any>) => {
2046
2278
  const typeMappings: TypeMapping = {
2047
2279
  ban_expires: { type: 'DatetimeType', isSingle: true },
@@ -2136,6 +2368,20 @@ decoders.UserResponseCommonFields = (input?: Record<string, any>) => {
2136
2368
  return decode(typeMappings, input);
2137
2369
  };
2138
2370
 
2371
+ decoders.VideoReactionOverTimeResponse = (input?: Record<string, any>) => {
2372
+ const typeMappings: TypeMapping = {
2373
+ by_minute: { type: 'CountByMinuteResponse', isSingle: false },
2374
+ };
2375
+ return decode(typeMappings, input);
2376
+ };
2377
+
2378
+ decoders.VideoReactionsResponse = (input?: Record<string, any>) => {
2379
+ const typeMappings: TypeMapping = {
2380
+ count_over_time: { type: 'VideoReactionOverTimeResponse', isSingle: true },
2381
+ };
2382
+ return decode(typeMappings, input);
2383
+ };
2384
+
2139
2385
  decoders.WSEvent = (input?: Record<string, any>) => {
2140
2386
  const typeMappings: TypeMapping = {
2141
2387
  created_at: { type: 'DatetimeType', isSingle: true },