@stream-io/node-sdk 0.7.18 → 0.7.20
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/dist/index.cjs.js +296 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +296 -29
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +7 -2
- package/dist/src/gen/feeds/FeedsApi.d.ts +11 -1
- package/dist/src/gen/models/index.d.ts +347 -45
- package/dist/src/gen/video/CallApi.d.ts +2 -1
- package/dist/src/gen/video/VideoApi.d.ts +22 -1
- package/package.json +1 -1
- package/src/gen/chat/ChatApi.ts +40 -2
- package/src/gen/feeds/FeedsApi.ts +117 -0
- package/src/gen/model-decoders/decoders.ts +145 -39
- package/src/gen/models/index.ts +573 -65
- package/src/gen/video/CallApi.ts +6 -0
- package/src/gen/video/VideoApi.ts +240 -0
package/dist/index.es.mjs
CHANGED
|
@@ -178,6 +178,7 @@ decoders.ActivityResponse = (input) => {
|
|
|
178
178
|
mentioned_users: { type: 'UserResponse', isSingle: false },
|
|
179
179
|
own_bookmarks: { type: 'BookmarkResponse', isSingle: false },
|
|
180
180
|
own_reactions: { type: 'FeedsReactionResponse', isSingle: false },
|
|
181
|
+
collections: { type: 'EnrichedCollectionResponse', isSingle: false },
|
|
181
182
|
reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
|
|
182
183
|
user: { type: 'UserResponse', isSingle: true },
|
|
183
184
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -406,6 +407,7 @@ decoders.BookmarkFolderResponse = (input) => {
|
|
|
406
407
|
const typeMappings = {
|
|
407
408
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
408
409
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
410
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
409
411
|
};
|
|
410
412
|
return decode(typeMappings, input);
|
|
411
413
|
};
|
|
@@ -423,7 +425,7 @@ decoders.BookmarkResponse = (input) => {
|
|
|
423
425
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
424
426
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
425
427
|
activity: { type: 'ActivityResponse', isSingle: true },
|
|
426
|
-
user: { type: '
|
|
428
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
427
429
|
folder: { type: 'BookmarkFolderResponse', isSingle: true },
|
|
428
430
|
};
|
|
429
431
|
return decode(typeMappings, input);
|
|
@@ -952,14 +954,14 @@ decoders.ChannelHiddenEvent = (input) => {
|
|
|
952
954
|
};
|
|
953
955
|
decoders.ChannelMember = (input) => {
|
|
954
956
|
const typeMappings = {
|
|
955
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
956
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
957
957
|
archived_at: { type: 'DatetimeType', isSingle: true },
|
|
958
958
|
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
959
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
959
960
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
960
961
|
invite_accepted_at: { type: 'DatetimeType', isSingle: true },
|
|
961
962
|
invite_rejected_at: { type: 'DatetimeType', isSingle: true },
|
|
962
963
|
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
964
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
963
965
|
user: { type: 'User', isSingle: true },
|
|
964
966
|
};
|
|
965
967
|
return decode(typeMappings, input);
|
|
@@ -1002,7 +1004,7 @@ decoders.ChannelMutedEvent = (input) => {
|
|
|
1002
1004
|
};
|
|
1003
1005
|
return decode(typeMappings, input);
|
|
1004
1006
|
};
|
|
1005
|
-
decoders.
|
|
1007
|
+
decoders.ChannelPushPreferencesResponse = (input) => {
|
|
1006
1008
|
const typeMappings = {
|
|
1007
1009
|
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
1008
1010
|
};
|
|
@@ -1041,7 +1043,10 @@ decoders.ChannelStateResponse = (input) => {
|
|
|
1041
1043
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
1042
1044
|
draft: { type: 'DraftResponse', isSingle: true },
|
|
1043
1045
|
membership: { type: 'ChannelMemberResponse', isSingle: true },
|
|
1044
|
-
push_preferences: {
|
|
1046
|
+
push_preferences: {
|
|
1047
|
+
type: 'ChannelPushPreferencesResponse',
|
|
1048
|
+
isSingle: true,
|
|
1049
|
+
},
|
|
1045
1050
|
};
|
|
1046
1051
|
return decode(typeMappings, input);
|
|
1047
1052
|
};
|
|
@@ -1062,7 +1067,10 @@ decoders.ChannelStateResponseFields = (input) => {
|
|
|
1062
1067
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
1063
1068
|
draft: { type: 'DraftResponse', isSingle: true },
|
|
1064
1069
|
membership: { type: 'ChannelMemberResponse', isSingle: true },
|
|
1065
|
-
push_preferences: {
|
|
1070
|
+
push_preferences: {
|
|
1071
|
+
type: 'ChannelPushPreferencesResponse',
|
|
1072
|
+
isSingle: true,
|
|
1073
|
+
},
|
|
1066
1074
|
};
|
|
1067
1075
|
return decode(typeMappings, input);
|
|
1068
1076
|
};
|
|
@@ -1127,6 +1135,13 @@ decoders.ClosedCaptionEvent = (input) => {
|
|
|
1127
1135
|
};
|
|
1128
1136
|
return decode(typeMappings, input);
|
|
1129
1137
|
};
|
|
1138
|
+
decoders.CollectionResponse = (input) => {
|
|
1139
|
+
const typeMappings = {
|
|
1140
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1141
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1142
|
+
};
|
|
1143
|
+
return decode(typeMappings, input);
|
|
1144
|
+
};
|
|
1130
1145
|
decoders.Command = (input) => {
|
|
1131
1146
|
const typeMappings = {
|
|
1132
1147
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1239,6 +1254,12 @@ decoders.CreateChannelTypeResponse = (input) => {
|
|
|
1239
1254
|
};
|
|
1240
1255
|
return decode(typeMappings, input);
|
|
1241
1256
|
};
|
|
1257
|
+
decoders.CreateCollectionsResponse = (input) => {
|
|
1258
|
+
const typeMappings = {
|
|
1259
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
1260
|
+
};
|
|
1261
|
+
return decode(typeMappings, input);
|
|
1262
|
+
};
|
|
1242
1263
|
decoders.CreateCommandResponse = (input) => {
|
|
1243
1264
|
const typeMappings = {
|
|
1244
1265
|
command: { type: 'Command', isSingle: true },
|
|
@@ -1287,6 +1308,12 @@ decoders.CreateRoleResponse = (input) => {
|
|
|
1287
1308
|
};
|
|
1288
1309
|
return decode(typeMappings, input);
|
|
1289
1310
|
};
|
|
1311
|
+
decoders.CreateSIPTrunkResponse = (input) => {
|
|
1312
|
+
const typeMappings = {
|
|
1313
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
1314
|
+
};
|
|
1315
|
+
return decode(typeMappings, input);
|
|
1316
|
+
};
|
|
1290
1317
|
decoders.CustomCheckResponse = (input) => {
|
|
1291
1318
|
const typeMappings = {
|
|
1292
1319
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
@@ -1392,6 +1419,13 @@ decoders.EgressRTMPResponse = (input) => {
|
|
|
1392
1419
|
};
|
|
1393
1420
|
return decode(typeMappings, input);
|
|
1394
1421
|
};
|
|
1422
|
+
decoders.EnrichedCollectionResponse = (input) => {
|
|
1423
|
+
const typeMappings = {
|
|
1424
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1425
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1426
|
+
};
|
|
1427
|
+
return decode(typeMappings, input);
|
|
1428
|
+
};
|
|
1395
1429
|
decoders.EntityCreatorResponse = (input) => {
|
|
1396
1430
|
const typeMappings = {
|
|
1397
1431
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1822,7 +1856,7 @@ decoders.GetPushTemplatesResponse = (input) => {
|
|
|
1822
1856
|
};
|
|
1823
1857
|
decoders.GetReactionsResponse = (input) => {
|
|
1824
1858
|
const typeMappings = {
|
|
1825
|
-
reactions: { type: '
|
|
1859
|
+
reactions: { type: 'ReactionResponse', isSingle: false },
|
|
1826
1860
|
};
|
|
1827
1861
|
return decode(typeMappings, input);
|
|
1828
1862
|
};
|
|
@@ -1951,6 +1985,21 @@ decoders.ListRolesResponse = (input) => {
|
|
|
1951
1985
|
};
|
|
1952
1986
|
return decode(typeMappings, input);
|
|
1953
1987
|
};
|
|
1988
|
+
decoders.ListSIPInboundRoutingRuleResponse = (input) => {
|
|
1989
|
+
const typeMappings = {
|
|
1990
|
+
sip_inbound_routing_rules: {
|
|
1991
|
+
type: 'SIPInboundRoutingRuleResponse',
|
|
1992
|
+
isSingle: false,
|
|
1993
|
+
},
|
|
1994
|
+
};
|
|
1995
|
+
return decode(typeMappings, input);
|
|
1996
|
+
};
|
|
1997
|
+
decoders.ListSIPTrunksResponse = (input) => {
|
|
1998
|
+
const typeMappings = {
|
|
1999
|
+
sip_trunks: { type: 'SIPTrunkResponse', isSingle: false },
|
|
2000
|
+
};
|
|
2001
|
+
return decode(typeMappings, input);
|
|
2002
|
+
};
|
|
1954
2003
|
decoders.ListTranscriptionsResponse = (input) => {
|
|
1955
2004
|
const typeMappings = {
|
|
1956
2005
|
transcriptions: { type: 'CallTranscription', isSingle: false },
|
|
@@ -2309,7 +2358,7 @@ decoders.OwnUserResponse = (input) => {
|
|
|
2309
2358
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
2310
2359
|
last_active: { type: 'DatetimeType', isSingle: true },
|
|
2311
2360
|
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
2312
|
-
push_preferences: { type: '
|
|
2361
|
+
push_preferences: { type: 'PushPreferencesResponse', isSingle: true },
|
|
2313
2362
|
};
|
|
2314
2363
|
return decode(typeMappings, input);
|
|
2315
2364
|
};
|
|
@@ -2436,6 +2485,12 @@ decoders.PushPreferences = (input) => {
|
|
|
2436
2485
|
};
|
|
2437
2486
|
return decode(typeMappings, input);
|
|
2438
2487
|
};
|
|
2488
|
+
decoders.PushPreferencesResponse = (input) => {
|
|
2489
|
+
const typeMappings = {
|
|
2490
|
+
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
2491
|
+
};
|
|
2492
|
+
return decode(typeMappings, input);
|
|
2493
|
+
};
|
|
2439
2494
|
decoders.PushProvider = (input) => {
|
|
2440
2495
|
const typeMappings = {
|
|
2441
2496
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2651,12 +2706,6 @@ decoders.QueryRemindersResponse = (input) => {
|
|
|
2651
2706
|
};
|
|
2652
2707
|
return decode(typeMappings, input);
|
|
2653
2708
|
};
|
|
2654
|
-
decoders.QueryReviewQueueResponse = (input) => {
|
|
2655
|
-
const typeMappings = {
|
|
2656
|
-
items: { type: 'ReviewQueueItemResponse', isSingle: false },
|
|
2657
|
-
};
|
|
2658
|
-
return decode(typeMappings, input);
|
|
2659
|
-
};
|
|
2660
2709
|
decoders.QuerySegmentTargetsResponse = (input) => {
|
|
2661
2710
|
const typeMappings = {
|
|
2662
2711
|
targets: { type: 'SegmentTargetResponse', isSingle: false },
|
|
@@ -2739,6 +2788,12 @@ decoders.ReactivateUserResponse = (input) => {
|
|
|
2739
2788
|
};
|
|
2740
2789
|
return decode(typeMappings, input);
|
|
2741
2790
|
};
|
|
2791
|
+
decoders.ReadCollectionsResponse = (input) => {
|
|
2792
|
+
const typeMappings = {
|
|
2793
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
2794
|
+
};
|
|
2795
|
+
return decode(typeMappings, input);
|
|
2796
|
+
};
|
|
2742
2797
|
decoders.ReadStateResponse = (input) => {
|
|
2743
2798
|
const typeMappings = {
|
|
2744
2799
|
last_read: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2789,8 +2844,8 @@ decoders.ReminderResponseData = (input) => {
|
|
|
2789
2844
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2790
2845
|
remind_at: { type: 'DatetimeType', isSingle: true },
|
|
2791
2846
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2792
|
-
message: { type: '
|
|
2793
|
-
user: { type: '
|
|
2847
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2848
|
+
user: { type: 'UserResponse', isSingle: true },
|
|
2794
2849
|
};
|
|
2795
2850
|
return decode(typeMappings, input);
|
|
2796
2851
|
};
|
|
@@ -2802,6 +2857,13 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
2802
2857
|
};
|
|
2803
2858
|
return decode(typeMappings, input);
|
|
2804
2859
|
};
|
|
2860
|
+
decoders.ResolveSipInboundResponse = (input) => {
|
|
2861
|
+
const typeMappings = {
|
|
2862
|
+
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
2863
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
2864
|
+
};
|
|
2865
|
+
return decode(typeMappings, input);
|
|
2866
|
+
};
|
|
2805
2867
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
2806
2868
|
const typeMappings = {
|
|
2807
2869
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2849,6 +2911,20 @@ decoders.Role = (input) => {
|
|
|
2849
2911
|
};
|
|
2850
2912
|
return decode(typeMappings, input);
|
|
2851
2913
|
};
|
|
2914
|
+
decoders.SIPInboundRoutingRuleResponse = (input) => {
|
|
2915
|
+
const typeMappings = {
|
|
2916
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2917
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2918
|
+
};
|
|
2919
|
+
return decode(typeMappings, input);
|
|
2920
|
+
};
|
|
2921
|
+
decoders.SIPTrunkResponse = (input) => {
|
|
2922
|
+
const typeMappings = {
|
|
2923
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2924
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2925
|
+
};
|
|
2926
|
+
return decode(typeMappings, input);
|
|
2927
|
+
};
|
|
2852
2928
|
decoders.SearchResult = (input) => {
|
|
2853
2929
|
const typeMappings = {
|
|
2854
2930
|
message: { type: 'SearchResultMessage', isSingle: true },
|
|
@@ -2917,11 +2993,7 @@ decoders.SendReactionResponse = (input) => {
|
|
|
2917
2993
|
};
|
|
2918
2994
|
decoders.SharedLocation = (input) => {
|
|
2919
2995
|
const typeMappings = {
|
|
2920
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2921
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2922
2996
|
end_at: { type: 'DatetimeType', isSingle: true },
|
|
2923
|
-
channel: { type: 'Channel', isSingle: true },
|
|
2924
|
-
message: { type: 'Message', isSingle: true },
|
|
2925
2997
|
};
|
|
2926
2998
|
return decode(typeMappings, input);
|
|
2927
2999
|
};
|
|
@@ -3175,6 +3247,12 @@ decoders.UpdateChannelTypeResponse = (input) => {
|
|
|
3175
3247
|
};
|
|
3176
3248
|
return decode(typeMappings, input);
|
|
3177
3249
|
};
|
|
3250
|
+
decoders.UpdateCollectionsResponse = (input) => {
|
|
3251
|
+
const typeMappings = {
|
|
3252
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
3253
|
+
};
|
|
3254
|
+
return decode(typeMappings, input);
|
|
3255
|
+
};
|
|
3178
3256
|
decoders.UpdateCommandResponse = (input) => {
|
|
3179
3257
|
const typeMappings = {
|
|
3180
3258
|
command: { type: 'Command', isSingle: true },
|
|
@@ -3248,6 +3326,21 @@ decoders.UpdateReminderResponse = (input) => {
|
|
|
3248
3326
|
};
|
|
3249
3327
|
return decode(typeMappings, input);
|
|
3250
3328
|
};
|
|
3329
|
+
decoders.UpdateSIPInboundRoutingRuleResponse = (input) => {
|
|
3330
|
+
const typeMappings = {
|
|
3331
|
+
sip_inbound_routing_rule: {
|
|
3332
|
+
type: 'SIPInboundRoutingRuleResponse',
|
|
3333
|
+
isSingle: true,
|
|
3334
|
+
},
|
|
3335
|
+
};
|
|
3336
|
+
return decode(typeMappings, input);
|
|
3337
|
+
};
|
|
3338
|
+
decoders.UpdateSIPTrunkResponse = (input) => {
|
|
3339
|
+
const typeMappings = {
|
|
3340
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
3341
|
+
};
|
|
3342
|
+
return decode(typeMappings, input);
|
|
3343
|
+
};
|
|
3251
3344
|
decoders.UpdateThreadPartialResponse = (input) => {
|
|
3252
3345
|
const typeMappings = {
|
|
3253
3346
|
thread: { type: 'ThreadResponse', isSingle: true },
|
|
@@ -3273,6 +3366,12 @@ decoders.UpsertActivitiesResponse = (input) => {
|
|
|
3273
3366
|
};
|
|
3274
3367
|
return decode(typeMappings, input);
|
|
3275
3368
|
};
|
|
3369
|
+
decoders.UpsertCollectionsResponse = (input) => {
|
|
3370
|
+
const typeMappings = {
|
|
3371
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
3372
|
+
};
|
|
3373
|
+
return decode(typeMappings, input);
|
|
3374
|
+
};
|
|
3276
3375
|
decoders.UpsertConfigResponse = (input) => {
|
|
3277
3376
|
const typeMappings = {
|
|
3278
3377
|
config: { type: 'ConfigResponse', isSingle: true },
|
|
@@ -3313,13 +3412,7 @@ decoders.UpsertPushTemplateResponse = (input) => {
|
|
|
3313
3412
|
decoders.User = (input) => {
|
|
3314
3413
|
const typeMappings = {
|
|
3315
3414
|
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
3316
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3317
|
-
deactivated_at: { type: 'DatetimeType', isSingle: true },
|
|
3318
|
-
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
3319
|
-
last_active: { type: 'DatetimeType', isSingle: true },
|
|
3320
|
-
last_engaged_at: { type: 'DatetimeType', isSingle: true },
|
|
3321
3415
|
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
3322
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
3323
3416
|
};
|
|
3324
3417
|
return decode(typeMappings, input);
|
|
3325
3418
|
};
|
|
@@ -4529,6 +4622,19 @@ class VideoApi {
|
|
|
4529
4622
|
decoders.GetCallReportResponse?.(response.body);
|
|
4530
4623
|
return { ...response.body, metadata: response.metadata };
|
|
4531
4624
|
}
|
|
4625
|
+
async ringCall(request) {
|
|
4626
|
+
const pathParams = {
|
|
4627
|
+
type: request?.type,
|
|
4628
|
+
id: request?.id,
|
|
4629
|
+
};
|
|
4630
|
+
const body = {
|
|
4631
|
+
video: request?.video,
|
|
4632
|
+
members_ids: request?.members_ids,
|
|
4633
|
+
};
|
|
4634
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/call/{type}/{id}/ring', pathParams, undefined, body, 'application/json');
|
|
4635
|
+
decoders.RingCallResponse?.(response.body);
|
|
4636
|
+
return { ...response.body, metadata: response.metadata };
|
|
4637
|
+
}
|
|
4532
4638
|
async startRTMPBroadcasts(request) {
|
|
4533
4639
|
const pathParams = {
|
|
4534
4640
|
type: request?.type,
|
|
@@ -4872,6 +4978,99 @@ class VideoApi {
|
|
|
4872
4978
|
decoders.GetEdgesResponse?.(response.body);
|
|
4873
4979
|
return { ...response.body, metadata: response.metadata };
|
|
4874
4980
|
}
|
|
4981
|
+
async resolveSipInbound(request) {
|
|
4982
|
+
const body = {
|
|
4983
|
+
sip_caller_number: request?.sip_caller_number,
|
|
4984
|
+
sip_trunk_number: request?.sip_trunk_number,
|
|
4985
|
+
challenge: request?.challenge,
|
|
4986
|
+
sip_headers: request?.sip_headers,
|
|
4987
|
+
};
|
|
4988
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/resolve', undefined, undefined, body, 'application/json');
|
|
4989
|
+
decoders.ResolveSipInboundResponse?.(response.body);
|
|
4990
|
+
return { ...response.body, metadata: response.metadata };
|
|
4991
|
+
}
|
|
4992
|
+
async listSIPInboundRoutingRule() {
|
|
4993
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/sip/routing_rules', undefined, undefined);
|
|
4994
|
+
decoders.ListSIPInboundRoutingRuleResponse?.(response.body);
|
|
4995
|
+
return { ...response.body, metadata: response.metadata };
|
|
4996
|
+
}
|
|
4997
|
+
async createSIPInboundRoutingRule(request) {
|
|
4998
|
+
const body = {
|
|
4999
|
+
name: request?.name,
|
|
5000
|
+
trunk_ids: request?.trunk_ids,
|
|
5001
|
+
caller_configs: request?.caller_configs,
|
|
5002
|
+
called_numbers: request?.called_numbers,
|
|
5003
|
+
caller_numbers: request?.caller_numbers,
|
|
5004
|
+
call_configs: request?.call_configs,
|
|
5005
|
+
direct_routing_configs: request?.direct_routing_configs,
|
|
5006
|
+
pin_protection_configs: request?.pin_protection_configs,
|
|
5007
|
+
pin_routing_configs: request?.pin_routing_configs,
|
|
5008
|
+
};
|
|
5009
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/routing_rules', undefined, undefined, body, 'application/json');
|
|
5010
|
+
decoders.SIPInboundRoutingRuleResponse?.(response.body);
|
|
5011
|
+
return { ...response.body, metadata: response.metadata };
|
|
5012
|
+
}
|
|
5013
|
+
async deleteSIPInboundRoutingRule(request) {
|
|
5014
|
+
const pathParams = {
|
|
5015
|
+
id: request?.id,
|
|
5016
|
+
};
|
|
5017
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/video/sip/routing_rules/{id}', pathParams, undefined);
|
|
5018
|
+
decoders.DeleteSIPInboundRoutingRuleResponse?.(response.body);
|
|
5019
|
+
return { ...response.body, metadata: response.metadata };
|
|
5020
|
+
}
|
|
5021
|
+
async updateSIPInboundRoutingRule(request) {
|
|
5022
|
+
const pathParams = {
|
|
5023
|
+
id: request?.id,
|
|
5024
|
+
};
|
|
5025
|
+
const body = {
|
|
5026
|
+
name: request?.name,
|
|
5027
|
+
called_numbers: request?.called_numbers,
|
|
5028
|
+
trunk_ids: request?.trunk_ids,
|
|
5029
|
+
caller_configs: request?.caller_configs,
|
|
5030
|
+
caller_numbers: request?.caller_numbers,
|
|
5031
|
+
call_configs: request?.call_configs,
|
|
5032
|
+
direct_routing_configs: request?.direct_routing_configs,
|
|
5033
|
+
pin_protection_configs: request?.pin_protection_configs,
|
|
5034
|
+
pin_routing_configs: request?.pin_routing_configs,
|
|
5035
|
+
};
|
|
5036
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/video/sip/routing_rules/{id}', pathParams, undefined, body, 'application/json');
|
|
5037
|
+
decoders.UpdateSIPInboundRoutingRuleResponse?.(response.body);
|
|
5038
|
+
return { ...response.body, metadata: response.metadata };
|
|
5039
|
+
}
|
|
5040
|
+
async listSIPTrunks() {
|
|
5041
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/sip/trunks', undefined, undefined);
|
|
5042
|
+
decoders.ListSIPTrunksResponse?.(response.body);
|
|
5043
|
+
return { ...response.body, metadata: response.metadata };
|
|
5044
|
+
}
|
|
5045
|
+
async createSIPTrunk(request) {
|
|
5046
|
+
const body = {
|
|
5047
|
+
name: request?.name,
|
|
5048
|
+
numbers: request?.numbers,
|
|
5049
|
+
};
|
|
5050
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/trunks', undefined, undefined, body, 'application/json');
|
|
5051
|
+
decoders.CreateSIPTrunkResponse?.(response.body);
|
|
5052
|
+
return { ...response.body, metadata: response.metadata };
|
|
5053
|
+
}
|
|
5054
|
+
async deleteSIPTrunk(request) {
|
|
5055
|
+
const pathParams = {
|
|
5056
|
+
id: request?.id,
|
|
5057
|
+
};
|
|
5058
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/video/sip/trunks/{id}', pathParams, undefined);
|
|
5059
|
+
decoders.DeleteSIPTrunkResponse?.(response.body);
|
|
5060
|
+
return { ...response.body, metadata: response.metadata };
|
|
5061
|
+
}
|
|
5062
|
+
async updateSIPTrunk(request) {
|
|
5063
|
+
const pathParams = {
|
|
5064
|
+
id: request?.id,
|
|
5065
|
+
};
|
|
5066
|
+
const body = {
|
|
5067
|
+
name: request?.name,
|
|
5068
|
+
numbers: request?.numbers,
|
|
5069
|
+
};
|
|
5070
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/video/sip/trunks/{id}', pathParams, undefined, body, 'application/json');
|
|
5071
|
+
decoders.UpdateSIPTrunkResponse?.(response.body);
|
|
5072
|
+
return { ...response.body, metadata: response.metadata };
|
|
5073
|
+
}
|
|
4875
5074
|
async queryAggregateCallStats(request) {
|
|
4876
5075
|
const body = {
|
|
4877
5076
|
from: request?.from,
|
|
@@ -4985,6 +5184,9 @@ class CallApi {
|
|
|
4985
5184
|
...request,
|
|
4986
5185
|
});
|
|
4987
5186
|
}
|
|
5187
|
+
ring(request) {
|
|
5188
|
+
return this.videoApi.ringCall({ id: this.id, type: this.type, ...request });
|
|
5189
|
+
}
|
|
4988
5190
|
startRTMPBroadcasts(request) {
|
|
4989
5191
|
return this.videoApi.startRTMPBroadcasts({
|
|
4990
5192
|
id: this.id,
|
|
@@ -5263,6 +5465,17 @@ class ChatApi {
|
|
|
5263
5465
|
decoders.DeleteChannelsResponse?.(response.body);
|
|
5264
5466
|
return { ...response.body, metadata: response.metadata };
|
|
5265
5467
|
}
|
|
5468
|
+
async markDelivered(request) {
|
|
5469
|
+
const queryParams = {
|
|
5470
|
+
user_id: request?.user_id,
|
|
5471
|
+
};
|
|
5472
|
+
const body = {
|
|
5473
|
+
latest_delivered_messages: request?.latest_delivered_messages,
|
|
5474
|
+
};
|
|
5475
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channels/delivered', undefined, queryParams, body, 'application/json');
|
|
5476
|
+
decoders.MarkDeliveredResponse?.(response.body);
|
|
5477
|
+
return { ...response.body, metadata: response.metadata };
|
|
5478
|
+
}
|
|
5266
5479
|
async markChannelsRead(request) {
|
|
5267
5480
|
const body = {
|
|
5268
5481
|
user_id: request?.user_id,
|
|
@@ -5326,14 +5539,17 @@ class ChatApi {
|
|
|
5326
5539
|
accept_invite: request?.accept_invite,
|
|
5327
5540
|
cooldown: request?.cooldown,
|
|
5328
5541
|
hide_history: request?.hide_history,
|
|
5542
|
+
hide_history_before: request?.hide_history_before,
|
|
5329
5543
|
reject_invite: request?.reject_invite,
|
|
5330
5544
|
skip_push: request?.skip_push,
|
|
5331
5545
|
user_id: request?.user_id,
|
|
5546
|
+
add_filter_tags: request?.add_filter_tags,
|
|
5332
5547
|
add_members: request?.add_members,
|
|
5333
5548
|
add_moderators: request?.add_moderators,
|
|
5334
5549
|
assign_roles: request?.assign_roles,
|
|
5335
5550
|
demote_moderators: request?.demote_moderators,
|
|
5336
5551
|
invites: request?.invites,
|
|
5552
|
+
remove_filter_tags: request?.remove_filter_tags,
|
|
5337
5553
|
remove_members: request?.remove_members,
|
|
5338
5554
|
data: request?.data,
|
|
5339
5555
|
message: request?.message,
|
|
@@ -5563,6 +5779,7 @@ class ChatApi {
|
|
|
5563
5779
|
};
|
|
5564
5780
|
const body = {
|
|
5565
5781
|
message_id: request?.message_id,
|
|
5782
|
+
message_timestamp: request?.message_timestamp,
|
|
5566
5783
|
thread_id: request?.thread_id,
|
|
5567
5784
|
user_id: request?.user_id,
|
|
5568
5785
|
user: request?.user,
|
|
@@ -6180,8 +6397,11 @@ class ChatApi {
|
|
|
6180
6397
|
decoders.UpdateThreadPartialResponse?.(response.body);
|
|
6181
6398
|
return { ...response.body, metadata: response.metadata };
|
|
6182
6399
|
}
|
|
6183
|
-
async unreadCounts() {
|
|
6184
|
-
const
|
|
6400
|
+
async unreadCounts(request) {
|
|
6401
|
+
const queryParams = {
|
|
6402
|
+
user_id: request?.user_id,
|
|
6403
|
+
};
|
|
6404
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/chat/unread', undefined, queryParams);
|
|
6185
6405
|
decoders.WrappedUnreadCountsResponse?.(response.body);
|
|
6186
6406
|
return { ...response.body, metadata: response.metadata };
|
|
6187
6407
|
}
|
|
@@ -6798,7 +7018,7 @@ class ApiClient {
|
|
|
6798
7018
|
const headers = {
|
|
6799
7019
|
Authorization: this.apiConfig.token,
|
|
6800
7020
|
'stream-auth-type': 'jwt',
|
|
6801
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7021
|
+
'X-Stream-Client': 'stream-node-' + "0.7.20",
|
|
6802
7022
|
'Accept-Encoding': 'gzip',
|
|
6803
7023
|
'x-client-request-id': clientRequestId,
|
|
6804
7024
|
};
|
|
@@ -6904,6 +7124,7 @@ class FeedsApi {
|
|
|
6904
7124
|
visibility: request?.visibility,
|
|
6905
7125
|
visibility_tag: request?.visibility_tag,
|
|
6906
7126
|
attachments: request?.attachments,
|
|
7127
|
+
collection_refs: request?.collection_refs,
|
|
6907
7128
|
filter_tags: request?.filter_tags,
|
|
6908
7129
|
interest_tags: request?.interest_tags,
|
|
6909
7130
|
mentioned_user_ids: request?.mentioned_user_ids,
|
|
@@ -7123,6 +7344,7 @@ class FeedsApi {
|
|
|
7123
7344
|
user_id: request?.user_id,
|
|
7124
7345
|
visibility: request?.visibility,
|
|
7125
7346
|
attachments: request?.attachments,
|
|
7347
|
+
collection_refs: request?.collection_refs,
|
|
7126
7348
|
feeds: request?.feeds,
|
|
7127
7349
|
filter_tags: request?.filter_tags,
|
|
7128
7350
|
interest_tags: request?.interest_tags,
|
|
@@ -7180,6 +7402,51 @@ class FeedsApi {
|
|
|
7180
7402
|
decoders.QueryBookmarksResponse?.(response.body);
|
|
7181
7403
|
return { ...response.body, metadata: response.metadata };
|
|
7182
7404
|
}
|
|
7405
|
+
async deleteCollections(request) {
|
|
7406
|
+
const queryParams = {
|
|
7407
|
+
collection_refs: request?.collection_refs,
|
|
7408
|
+
};
|
|
7409
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7410
|
+
decoders.DeleteCollectionsResponse?.(response.body);
|
|
7411
|
+
return { ...response.body, metadata: response.metadata };
|
|
7412
|
+
}
|
|
7413
|
+
async readCollections(request) {
|
|
7414
|
+
const queryParams = {
|
|
7415
|
+
collection_refs: request?.collection_refs,
|
|
7416
|
+
user_id: request?.user_id,
|
|
7417
|
+
};
|
|
7418
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7419
|
+
decoders.ReadCollectionsResponse?.(response.body);
|
|
7420
|
+
return { ...response.body, metadata: response.metadata };
|
|
7421
|
+
}
|
|
7422
|
+
async updateCollections(request) {
|
|
7423
|
+
const body = {
|
|
7424
|
+
collections: request?.collections,
|
|
7425
|
+
user_id: request?.user_id,
|
|
7426
|
+
user: request?.user,
|
|
7427
|
+
};
|
|
7428
|
+
const response = await this.apiClient.sendRequest('PATCH', '/api/v2/feeds/collections', undefined, undefined, body, 'application/json');
|
|
7429
|
+
decoders.UpdateCollectionsResponse?.(response.body);
|
|
7430
|
+
return { ...response.body, metadata: response.metadata };
|
|
7431
|
+
}
|
|
7432
|
+
async createCollections(request) {
|
|
7433
|
+
const body = {
|
|
7434
|
+
collections: request?.collections,
|
|
7435
|
+
user_id: request?.user_id,
|
|
7436
|
+
user: request?.user,
|
|
7437
|
+
};
|
|
7438
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/collections', undefined, undefined, body, 'application/json');
|
|
7439
|
+
decoders.CreateCollectionsResponse?.(response.body);
|
|
7440
|
+
return { ...response.body, metadata: response.metadata };
|
|
7441
|
+
}
|
|
7442
|
+
async upsertCollections(request) {
|
|
7443
|
+
const body = {
|
|
7444
|
+
collections: request?.collections,
|
|
7445
|
+
};
|
|
7446
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/feeds/collections', undefined, undefined, body, 'application/json');
|
|
7447
|
+
decoders.UpsertCollectionsResponse?.(response.body);
|
|
7448
|
+
return { ...response.body, metadata: response.metadata };
|
|
7449
|
+
}
|
|
7183
7450
|
async getComments(request) {
|
|
7184
7451
|
const queryParams = {
|
|
7185
7452
|
object_id: request?.object_id,
|