@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.cjs.js
CHANGED
|
@@ -197,6 +197,7 @@ decoders.ActivityResponse = (input) => {
|
|
|
197
197
|
mentioned_users: { type: 'UserResponse', isSingle: false },
|
|
198
198
|
own_bookmarks: { type: 'BookmarkResponse', isSingle: false },
|
|
199
199
|
own_reactions: { type: 'FeedsReactionResponse', isSingle: false },
|
|
200
|
+
collections: { type: 'EnrichedCollectionResponse', isSingle: false },
|
|
200
201
|
reaction_groups: { type: 'ReactionGroupResponse', isSingle: false },
|
|
201
202
|
user: { type: 'UserResponse', isSingle: true },
|
|
202
203
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -425,6 +426,7 @@ decoders.BookmarkFolderResponse = (input) => {
|
|
|
425
426
|
const typeMappings = {
|
|
426
427
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
427
428
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
429
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
428
430
|
};
|
|
429
431
|
return decode(typeMappings, input);
|
|
430
432
|
};
|
|
@@ -442,7 +444,7 @@ decoders.BookmarkResponse = (input) => {
|
|
|
442
444
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
443
445
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
444
446
|
activity: { type: 'ActivityResponse', isSingle: true },
|
|
445
|
-
user: { type: '
|
|
447
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
446
448
|
folder: { type: 'BookmarkFolderResponse', isSingle: true },
|
|
447
449
|
};
|
|
448
450
|
return decode(typeMappings, input);
|
|
@@ -971,14 +973,14 @@ decoders.ChannelHiddenEvent = (input) => {
|
|
|
971
973
|
};
|
|
972
974
|
decoders.ChannelMember = (input) => {
|
|
973
975
|
const typeMappings = {
|
|
974
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
975
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
976
976
|
archived_at: { type: 'DatetimeType', isSingle: true },
|
|
977
977
|
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
978
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
978
979
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
979
980
|
invite_accepted_at: { type: 'DatetimeType', isSingle: true },
|
|
980
981
|
invite_rejected_at: { type: 'DatetimeType', isSingle: true },
|
|
981
982
|
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
983
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
982
984
|
user: { type: 'User', isSingle: true },
|
|
983
985
|
};
|
|
984
986
|
return decode(typeMappings, input);
|
|
@@ -1021,7 +1023,7 @@ decoders.ChannelMutedEvent = (input) => {
|
|
|
1021
1023
|
};
|
|
1022
1024
|
return decode(typeMappings, input);
|
|
1023
1025
|
};
|
|
1024
|
-
decoders.
|
|
1026
|
+
decoders.ChannelPushPreferencesResponse = (input) => {
|
|
1025
1027
|
const typeMappings = {
|
|
1026
1028
|
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
1027
1029
|
};
|
|
@@ -1060,7 +1062,10 @@ decoders.ChannelStateResponse = (input) => {
|
|
|
1060
1062
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
1061
1063
|
draft: { type: 'DraftResponse', isSingle: true },
|
|
1062
1064
|
membership: { type: 'ChannelMemberResponse', isSingle: true },
|
|
1063
|
-
push_preferences: {
|
|
1065
|
+
push_preferences: {
|
|
1066
|
+
type: 'ChannelPushPreferencesResponse',
|
|
1067
|
+
isSingle: true,
|
|
1068
|
+
},
|
|
1064
1069
|
};
|
|
1065
1070
|
return decode(typeMappings, input);
|
|
1066
1071
|
};
|
|
@@ -1081,7 +1086,10 @@ decoders.ChannelStateResponseFields = (input) => {
|
|
|
1081
1086
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
1082
1087
|
draft: { type: 'DraftResponse', isSingle: true },
|
|
1083
1088
|
membership: { type: 'ChannelMemberResponse', isSingle: true },
|
|
1084
|
-
push_preferences: {
|
|
1089
|
+
push_preferences: {
|
|
1090
|
+
type: 'ChannelPushPreferencesResponse',
|
|
1091
|
+
isSingle: true,
|
|
1092
|
+
},
|
|
1085
1093
|
};
|
|
1086
1094
|
return decode(typeMappings, input);
|
|
1087
1095
|
};
|
|
@@ -1146,6 +1154,13 @@ decoders.ClosedCaptionEvent = (input) => {
|
|
|
1146
1154
|
};
|
|
1147
1155
|
return decode(typeMappings, input);
|
|
1148
1156
|
};
|
|
1157
|
+
decoders.CollectionResponse = (input) => {
|
|
1158
|
+
const typeMappings = {
|
|
1159
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1160
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1161
|
+
};
|
|
1162
|
+
return decode(typeMappings, input);
|
|
1163
|
+
};
|
|
1149
1164
|
decoders.Command = (input) => {
|
|
1150
1165
|
const typeMappings = {
|
|
1151
1166
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1258,6 +1273,12 @@ decoders.CreateChannelTypeResponse = (input) => {
|
|
|
1258
1273
|
};
|
|
1259
1274
|
return decode(typeMappings, input);
|
|
1260
1275
|
};
|
|
1276
|
+
decoders.CreateCollectionsResponse = (input) => {
|
|
1277
|
+
const typeMappings = {
|
|
1278
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
1279
|
+
};
|
|
1280
|
+
return decode(typeMappings, input);
|
|
1281
|
+
};
|
|
1261
1282
|
decoders.CreateCommandResponse = (input) => {
|
|
1262
1283
|
const typeMappings = {
|
|
1263
1284
|
command: { type: 'Command', isSingle: true },
|
|
@@ -1306,6 +1327,12 @@ decoders.CreateRoleResponse = (input) => {
|
|
|
1306
1327
|
};
|
|
1307
1328
|
return decode(typeMappings, input);
|
|
1308
1329
|
};
|
|
1330
|
+
decoders.CreateSIPTrunkResponse = (input) => {
|
|
1331
|
+
const typeMappings = {
|
|
1332
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
1333
|
+
};
|
|
1334
|
+
return decode(typeMappings, input);
|
|
1335
|
+
};
|
|
1309
1336
|
decoders.CustomCheckResponse = (input) => {
|
|
1310
1337
|
const typeMappings = {
|
|
1311
1338
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
@@ -1411,6 +1438,13 @@ decoders.EgressRTMPResponse = (input) => {
|
|
|
1411
1438
|
};
|
|
1412
1439
|
return decode(typeMappings, input);
|
|
1413
1440
|
};
|
|
1441
|
+
decoders.EnrichedCollectionResponse = (input) => {
|
|
1442
|
+
const typeMappings = {
|
|
1443
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
1444
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
1445
|
+
};
|
|
1446
|
+
return decode(typeMappings, input);
|
|
1447
|
+
};
|
|
1414
1448
|
decoders.EntityCreatorResponse = (input) => {
|
|
1415
1449
|
const typeMappings = {
|
|
1416
1450
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1841,7 +1875,7 @@ decoders.GetPushTemplatesResponse = (input) => {
|
|
|
1841
1875
|
};
|
|
1842
1876
|
decoders.GetReactionsResponse = (input) => {
|
|
1843
1877
|
const typeMappings = {
|
|
1844
|
-
reactions: { type: '
|
|
1878
|
+
reactions: { type: 'ReactionResponse', isSingle: false },
|
|
1845
1879
|
};
|
|
1846
1880
|
return decode(typeMappings, input);
|
|
1847
1881
|
};
|
|
@@ -1970,6 +2004,21 @@ decoders.ListRolesResponse = (input) => {
|
|
|
1970
2004
|
};
|
|
1971
2005
|
return decode(typeMappings, input);
|
|
1972
2006
|
};
|
|
2007
|
+
decoders.ListSIPInboundRoutingRuleResponse = (input) => {
|
|
2008
|
+
const typeMappings = {
|
|
2009
|
+
sip_inbound_routing_rules: {
|
|
2010
|
+
type: 'SIPInboundRoutingRuleResponse',
|
|
2011
|
+
isSingle: false,
|
|
2012
|
+
},
|
|
2013
|
+
};
|
|
2014
|
+
return decode(typeMappings, input);
|
|
2015
|
+
};
|
|
2016
|
+
decoders.ListSIPTrunksResponse = (input) => {
|
|
2017
|
+
const typeMappings = {
|
|
2018
|
+
sip_trunks: { type: 'SIPTrunkResponse', isSingle: false },
|
|
2019
|
+
};
|
|
2020
|
+
return decode(typeMappings, input);
|
|
2021
|
+
};
|
|
1973
2022
|
decoders.ListTranscriptionsResponse = (input) => {
|
|
1974
2023
|
const typeMappings = {
|
|
1975
2024
|
transcriptions: { type: 'CallTranscription', isSingle: false },
|
|
@@ -2328,7 +2377,7 @@ decoders.OwnUserResponse = (input) => {
|
|
|
2328
2377
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
2329
2378
|
last_active: { type: 'DatetimeType', isSingle: true },
|
|
2330
2379
|
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
2331
|
-
push_preferences: { type: '
|
|
2380
|
+
push_preferences: { type: 'PushPreferencesResponse', isSingle: true },
|
|
2332
2381
|
};
|
|
2333
2382
|
return decode(typeMappings, input);
|
|
2334
2383
|
};
|
|
@@ -2455,6 +2504,12 @@ decoders.PushPreferences = (input) => {
|
|
|
2455
2504
|
};
|
|
2456
2505
|
return decode(typeMappings, input);
|
|
2457
2506
|
};
|
|
2507
|
+
decoders.PushPreferencesResponse = (input) => {
|
|
2508
|
+
const typeMappings = {
|
|
2509
|
+
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
2510
|
+
};
|
|
2511
|
+
return decode(typeMappings, input);
|
|
2512
|
+
};
|
|
2458
2513
|
decoders.PushProvider = (input) => {
|
|
2459
2514
|
const typeMappings = {
|
|
2460
2515
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2670,12 +2725,6 @@ decoders.QueryRemindersResponse = (input) => {
|
|
|
2670
2725
|
};
|
|
2671
2726
|
return decode(typeMappings, input);
|
|
2672
2727
|
};
|
|
2673
|
-
decoders.QueryReviewQueueResponse = (input) => {
|
|
2674
|
-
const typeMappings = {
|
|
2675
|
-
items: { type: 'ReviewQueueItemResponse', isSingle: false },
|
|
2676
|
-
};
|
|
2677
|
-
return decode(typeMappings, input);
|
|
2678
|
-
};
|
|
2679
2728
|
decoders.QuerySegmentTargetsResponse = (input) => {
|
|
2680
2729
|
const typeMappings = {
|
|
2681
2730
|
targets: { type: 'SegmentTargetResponse', isSingle: false },
|
|
@@ -2758,6 +2807,12 @@ decoders.ReactivateUserResponse = (input) => {
|
|
|
2758
2807
|
};
|
|
2759
2808
|
return decode(typeMappings, input);
|
|
2760
2809
|
};
|
|
2810
|
+
decoders.ReadCollectionsResponse = (input) => {
|
|
2811
|
+
const typeMappings = {
|
|
2812
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
2813
|
+
};
|
|
2814
|
+
return decode(typeMappings, input);
|
|
2815
|
+
};
|
|
2761
2816
|
decoders.ReadStateResponse = (input) => {
|
|
2762
2817
|
const typeMappings = {
|
|
2763
2818
|
last_read: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2808,8 +2863,8 @@ decoders.ReminderResponseData = (input) => {
|
|
|
2808
2863
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2809
2864
|
remind_at: { type: 'DatetimeType', isSingle: true },
|
|
2810
2865
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2811
|
-
message: { type: '
|
|
2812
|
-
user: { type: '
|
|
2866
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2867
|
+
user: { type: 'UserResponse', isSingle: true },
|
|
2813
2868
|
};
|
|
2814
2869
|
return decode(typeMappings, input);
|
|
2815
2870
|
};
|
|
@@ -2821,6 +2876,13 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
2821
2876
|
};
|
|
2822
2877
|
return decode(typeMappings, input);
|
|
2823
2878
|
};
|
|
2879
|
+
decoders.ResolveSipInboundResponse = (input) => {
|
|
2880
|
+
const typeMappings = {
|
|
2881
|
+
sip_routing_rule: { type: 'SIPInboundRoutingRuleResponse', isSingle: true },
|
|
2882
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
2883
|
+
};
|
|
2884
|
+
return decode(typeMappings, input);
|
|
2885
|
+
};
|
|
2824
2886
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
2825
2887
|
const typeMappings = {
|
|
2826
2888
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2868,6 +2930,20 @@ decoders.Role = (input) => {
|
|
|
2868
2930
|
};
|
|
2869
2931
|
return decode(typeMappings, input);
|
|
2870
2932
|
};
|
|
2933
|
+
decoders.SIPInboundRoutingRuleResponse = (input) => {
|
|
2934
|
+
const typeMappings = {
|
|
2935
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2936
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2937
|
+
};
|
|
2938
|
+
return decode(typeMappings, input);
|
|
2939
|
+
};
|
|
2940
|
+
decoders.SIPTrunkResponse = (input) => {
|
|
2941
|
+
const typeMappings = {
|
|
2942
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2943
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2944
|
+
};
|
|
2945
|
+
return decode(typeMappings, input);
|
|
2946
|
+
};
|
|
2871
2947
|
decoders.SearchResult = (input) => {
|
|
2872
2948
|
const typeMappings = {
|
|
2873
2949
|
message: { type: 'SearchResultMessage', isSingle: true },
|
|
@@ -2936,11 +3012,7 @@ decoders.SendReactionResponse = (input) => {
|
|
|
2936
3012
|
};
|
|
2937
3013
|
decoders.SharedLocation = (input) => {
|
|
2938
3014
|
const typeMappings = {
|
|
2939
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2940
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2941
3015
|
end_at: { type: 'DatetimeType', isSingle: true },
|
|
2942
|
-
channel: { type: 'Channel', isSingle: true },
|
|
2943
|
-
message: { type: 'Message', isSingle: true },
|
|
2944
3016
|
};
|
|
2945
3017
|
return decode(typeMappings, input);
|
|
2946
3018
|
};
|
|
@@ -3194,6 +3266,12 @@ decoders.UpdateChannelTypeResponse = (input) => {
|
|
|
3194
3266
|
};
|
|
3195
3267
|
return decode(typeMappings, input);
|
|
3196
3268
|
};
|
|
3269
|
+
decoders.UpdateCollectionsResponse = (input) => {
|
|
3270
|
+
const typeMappings = {
|
|
3271
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
3272
|
+
};
|
|
3273
|
+
return decode(typeMappings, input);
|
|
3274
|
+
};
|
|
3197
3275
|
decoders.UpdateCommandResponse = (input) => {
|
|
3198
3276
|
const typeMappings = {
|
|
3199
3277
|
command: { type: 'Command', isSingle: true },
|
|
@@ -3267,6 +3345,21 @@ decoders.UpdateReminderResponse = (input) => {
|
|
|
3267
3345
|
};
|
|
3268
3346
|
return decode(typeMappings, input);
|
|
3269
3347
|
};
|
|
3348
|
+
decoders.UpdateSIPInboundRoutingRuleResponse = (input) => {
|
|
3349
|
+
const typeMappings = {
|
|
3350
|
+
sip_inbound_routing_rule: {
|
|
3351
|
+
type: 'SIPInboundRoutingRuleResponse',
|
|
3352
|
+
isSingle: true,
|
|
3353
|
+
},
|
|
3354
|
+
};
|
|
3355
|
+
return decode(typeMappings, input);
|
|
3356
|
+
};
|
|
3357
|
+
decoders.UpdateSIPTrunkResponse = (input) => {
|
|
3358
|
+
const typeMappings = {
|
|
3359
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
3360
|
+
};
|
|
3361
|
+
return decode(typeMappings, input);
|
|
3362
|
+
};
|
|
3270
3363
|
decoders.UpdateThreadPartialResponse = (input) => {
|
|
3271
3364
|
const typeMappings = {
|
|
3272
3365
|
thread: { type: 'ThreadResponse', isSingle: true },
|
|
@@ -3292,6 +3385,12 @@ decoders.UpsertActivitiesResponse = (input) => {
|
|
|
3292
3385
|
};
|
|
3293
3386
|
return decode(typeMappings, input);
|
|
3294
3387
|
};
|
|
3388
|
+
decoders.UpsertCollectionsResponse = (input) => {
|
|
3389
|
+
const typeMappings = {
|
|
3390
|
+
collections: { type: 'CollectionResponse', isSingle: false },
|
|
3391
|
+
};
|
|
3392
|
+
return decode(typeMappings, input);
|
|
3393
|
+
};
|
|
3295
3394
|
decoders.UpsertConfigResponse = (input) => {
|
|
3296
3395
|
const typeMappings = {
|
|
3297
3396
|
config: { type: 'ConfigResponse', isSingle: true },
|
|
@@ -3332,13 +3431,7 @@ decoders.UpsertPushTemplateResponse = (input) => {
|
|
|
3332
3431
|
decoders.User = (input) => {
|
|
3333
3432
|
const typeMappings = {
|
|
3334
3433
|
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
3335
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3336
|
-
deactivated_at: { type: 'DatetimeType', isSingle: true },
|
|
3337
|
-
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
3338
|
-
last_active: { type: 'DatetimeType', isSingle: true },
|
|
3339
|
-
last_engaged_at: { type: 'DatetimeType', isSingle: true },
|
|
3340
3434
|
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
3341
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
3342
3435
|
};
|
|
3343
3436
|
return decode(typeMappings, input);
|
|
3344
3437
|
};
|
|
@@ -4548,6 +4641,19 @@ class VideoApi {
|
|
|
4548
4641
|
decoders.GetCallReportResponse?.(response.body);
|
|
4549
4642
|
return { ...response.body, metadata: response.metadata };
|
|
4550
4643
|
}
|
|
4644
|
+
async ringCall(request) {
|
|
4645
|
+
const pathParams = {
|
|
4646
|
+
type: request?.type,
|
|
4647
|
+
id: request?.id,
|
|
4648
|
+
};
|
|
4649
|
+
const body = {
|
|
4650
|
+
video: request?.video,
|
|
4651
|
+
members_ids: request?.members_ids,
|
|
4652
|
+
};
|
|
4653
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/call/{type}/{id}/ring', pathParams, undefined, body, 'application/json');
|
|
4654
|
+
decoders.RingCallResponse?.(response.body);
|
|
4655
|
+
return { ...response.body, metadata: response.metadata };
|
|
4656
|
+
}
|
|
4551
4657
|
async startRTMPBroadcasts(request) {
|
|
4552
4658
|
const pathParams = {
|
|
4553
4659
|
type: request?.type,
|
|
@@ -4891,6 +4997,99 @@ class VideoApi {
|
|
|
4891
4997
|
decoders.GetEdgesResponse?.(response.body);
|
|
4892
4998
|
return { ...response.body, metadata: response.metadata };
|
|
4893
4999
|
}
|
|
5000
|
+
async resolveSipInbound(request) {
|
|
5001
|
+
const body = {
|
|
5002
|
+
sip_caller_number: request?.sip_caller_number,
|
|
5003
|
+
sip_trunk_number: request?.sip_trunk_number,
|
|
5004
|
+
challenge: request?.challenge,
|
|
5005
|
+
sip_headers: request?.sip_headers,
|
|
5006
|
+
};
|
|
5007
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/resolve', undefined, undefined, body, 'application/json');
|
|
5008
|
+
decoders.ResolveSipInboundResponse?.(response.body);
|
|
5009
|
+
return { ...response.body, metadata: response.metadata };
|
|
5010
|
+
}
|
|
5011
|
+
async listSIPInboundRoutingRule() {
|
|
5012
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/sip/routing_rules', undefined, undefined);
|
|
5013
|
+
decoders.ListSIPInboundRoutingRuleResponse?.(response.body);
|
|
5014
|
+
return { ...response.body, metadata: response.metadata };
|
|
5015
|
+
}
|
|
5016
|
+
async createSIPInboundRoutingRule(request) {
|
|
5017
|
+
const body = {
|
|
5018
|
+
name: request?.name,
|
|
5019
|
+
trunk_ids: request?.trunk_ids,
|
|
5020
|
+
caller_configs: request?.caller_configs,
|
|
5021
|
+
called_numbers: request?.called_numbers,
|
|
5022
|
+
caller_numbers: request?.caller_numbers,
|
|
5023
|
+
call_configs: request?.call_configs,
|
|
5024
|
+
direct_routing_configs: request?.direct_routing_configs,
|
|
5025
|
+
pin_protection_configs: request?.pin_protection_configs,
|
|
5026
|
+
pin_routing_configs: request?.pin_routing_configs,
|
|
5027
|
+
};
|
|
5028
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/routing_rules', undefined, undefined, body, 'application/json');
|
|
5029
|
+
decoders.SIPInboundRoutingRuleResponse?.(response.body);
|
|
5030
|
+
return { ...response.body, metadata: response.metadata };
|
|
5031
|
+
}
|
|
5032
|
+
async deleteSIPInboundRoutingRule(request) {
|
|
5033
|
+
const pathParams = {
|
|
5034
|
+
id: request?.id,
|
|
5035
|
+
};
|
|
5036
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/video/sip/routing_rules/{id}', pathParams, undefined);
|
|
5037
|
+
decoders.DeleteSIPInboundRoutingRuleResponse?.(response.body);
|
|
5038
|
+
return { ...response.body, metadata: response.metadata };
|
|
5039
|
+
}
|
|
5040
|
+
async updateSIPInboundRoutingRule(request) {
|
|
5041
|
+
const pathParams = {
|
|
5042
|
+
id: request?.id,
|
|
5043
|
+
};
|
|
5044
|
+
const body = {
|
|
5045
|
+
name: request?.name,
|
|
5046
|
+
called_numbers: request?.called_numbers,
|
|
5047
|
+
trunk_ids: request?.trunk_ids,
|
|
5048
|
+
caller_configs: request?.caller_configs,
|
|
5049
|
+
caller_numbers: request?.caller_numbers,
|
|
5050
|
+
call_configs: request?.call_configs,
|
|
5051
|
+
direct_routing_configs: request?.direct_routing_configs,
|
|
5052
|
+
pin_protection_configs: request?.pin_protection_configs,
|
|
5053
|
+
pin_routing_configs: request?.pin_routing_configs,
|
|
5054
|
+
};
|
|
5055
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/video/sip/routing_rules/{id}', pathParams, undefined, body, 'application/json');
|
|
5056
|
+
decoders.UpdateSIPInboundRoutingRuleResponse?.(response.body);
|
|
5057
|
+
return { ...response.body, metadata: response.metadata };
|
|
5058
|
+
}
|
|
5059
|
+
async listSIPTrunks() {
|
|
5060
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/video/sip/trunks', undefined, undefined);
|
|
5061
|
+
decoders.ListSIPTrunksResponse?.(response.body);
|
|
5062
|
+
return { ...response.body, metadata: response.metadata };
|
|
5063
|
+
}
|
|
5064
|
+
async createSIPTrunk(request) {
|
|
5065
|
+
const body = {
|
|
5066
|
+
name: request?.name,
|
|
5067
|
+
numbers: request?.numbers,
|
|
5068
|
+
};
|
|
5069
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/video/sip/trunks', undefined, undefined, body, 'application/json');
|
|
5070
|
+
decoders.CreateSIPTrunkResponse?.(response.body);
|
|
5071
|
+
return { ...response.body, metadata: response.metadata };
|
|
5072
|
+
}
|
|
5073
|
+
async deleteSIPTrunk(request) {
|
|
5074
|
+
const pathParams = {
|
|
5075
|
+
id: request?.id,
|
|
5076
|
+
};
|
|
5077
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/video/sip/trunks/{id}', pathParams, undefined);
|
|
5078
|
+
decoders.DeleteSIPTrunkResponse?.(response.body);
|
|
5079
|
+
return { ...response.body, metadata: response.metadata };
|
|
5080
|
+
}
|
|
5081
|
+
async updateSIPTrunk(request) {
|
|
5082
|
+
const pathParams = {
|
|
5083
|
+
id: request?.id,
|
|
5084
|
+
};
|
|
5085
|
+
const body = {
|
|
5086
|
+
name: request?.name,
|
|
5087
|
+
numbers: request?.numbers,
|
|
5088
|
+
};
|
|
5089
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/video/sip/trunks/{id}', pathParams, undefined, body, 'application/json');
|
|
5090
|
+
decoders.UpdateSIPTrunkResponse?.(response.body);
|
|
5091
|
+
return { ...response.body, metadata: response.metadata };
|
|
5092
|
+
}
|
|
4894
5093
|
async queryAggregateCallStats(request) {
|
|
4895
5094
|
const body = {
|
|
4896
5095
|
from: request?.from,
|
|
@@ -5004,6 +5203,9 @@ class CallApi {
|
|
|
5004
5203
|
...request,
|
|
5005
5204
|
});
|
|
5006
5205
|
}
|
|
5206
|
+
ring(request) {
|
|
5207
|
+
return this.videoApi.ringCall({ id: this.id, type: this.type, ...request });
|
|
5208
|
+
}
|
|
5007
5209
|
startRTMPBroadcasts(request) {
|
|
5008
5210
|
return this.videoApi.startRTMPBroadcasts({
|
|
5009
5211
|
id: this.id,
|
|
@@ -5282,6 +5484,17 @@ class ChatApi {
|
|
|
5282
5484
|
decoders.DeleteChannelsResponse?.(response.body);
|
|
5283
5485
|
return { ...response.body, metadata: response.metadata };
|
|
5284
5486
|
}
|
|
5487
|
+
async markDelivered(request) {
|
|
5488
|
+
const queryParams = {
|
|
5489
|
+
user_id: request?.user_id,
|
|
5490
|
+
};
|
|
5491
|
+
const body = {
|
|
5492
|
+
latest_delivered_messages: request?.latest_delivered_messages,
|
|
5493
|
+
};
|
|
5494
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/chat/channels/delivered', undefined, queryParams, body, 'application/json');
|
|
5495
|
+
decoders.MarkDeliveredResponse?.(response.body);
|
|
5496
|
+
return { ...response.body, metadata: response.metadata };
|
|
5497
|
+
}
|
|
5285
5498
|
async markChannelsRead(request) {
|
|
5286
5499
|
const body = {
|
|
5287
5500
|
user_id: request?.user_id,
|
|
@@ -5345,14 +5558,17 @@ class ChatApi {
|
|
|
5345
5558
|
accept_invite: request?.accept_invite,
|
|
5346
5559
|
cooldown: request?.cooldown,
|
|
5347
5560
|
hide_history: request?.hide_history,
|
|
5561
|
+
hide_history_before: request?.hide_history_before,
|
|
5348
5562
|
reject_invite: request?.reject_invite,
|
|
5349
5563
|
skip_push: request?.skip_push,
|
|
5350
5564
|
user_id: request?.user_id,
|
|
5565
|
+
add_filter_tags: request?.add_filter_tags,
|
|
5351
5566
|
add_members: request?.add_members,
|
|
5352
5567
|
add_moderators: request?.add_moderators,
|
|
5353
5568
|
assign_roles: request?.assign_roles,
|
|
5354
5569
|
demote_moderators: request?.demote_moderators,
|
|
5355
5570
|
invites: request?.invites,
|
|
5571
|
+
remove_filter_tags: request?.remove_filter_tags,
|
|
5356
5572
|
remove_members: request?.remove_members,
|
|
5357
5573
|
data: request?.data,
|
|
5358
5574
|
message: request?.message,
|
|
@@ -5582,6 +5798,7 @@ class ChatApi {
|
|
|
5582
5798
|
};
|
|
5583
5799
|
const body = {
|
|
5584
5800
|
message_id: request?.message_id,
|
|
5801
|
+
message_timestamp: request?.message_timestamp,
|
|
5585
5802
|
thread_id: request?.thread_id,
|
|
5586
5803
|
user_id: request?.user_id,
|
|
5587
5804
|
user: request?.user,
|
|
@@ -6199,8 +6416,11 @@ class ChatApi {
|
|
|
6199
6416
|
decoders.UpdateThreadPartialResponse?.(response.body);
|
|
6200
6417
|
return { ...response.body, metadata: response.metadata };
|
|
6201
6418
|
}
|
|
6202
|
-
async unreadCounts() {
|
|
6203
|
-
const
|
|
6419
|
+
async unreadCounts(request) {
|
|
6420
|
+
const queryParams = {
|
|
6421
|
+
user_id: request?.user_id,
|
|
6422
|
+
};
|
|
6423
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/chat/unread', undefined, queryParams);
|
|
6204
6424
|
decoders.WrappedUnreadCountsResponse?.(response.body);
|
|
6205
6425
|
return { ...response.body, metadata: response.metadata };
|
|
6206
6426
|
}
|
|
@@ -6817,7 +7037,7 @@ class ApiClient {
|
|
|
6817
7037
|
const headers = {
|
|
6818
7038
|
Authorization: this.apiConfig.token,
|
|
6819
7039
|
'stream-auth-type': 'jwt',
|
|
6820
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7040
|
+
'X-Stream-Client': 'stream-node-' + "0.7.20",
|
|
6821
7041
|
'Accept-Encoding': 'gzip',
|
|
6822
7042
|
'x-client-request-id': clientRequestId,
|
|
6823
7043
|
};
|
|
@@ -6923,6 +7143,7 @@ class FeedsApi {
|
|
|
6923
7143
|
visibility: request?.visibility,
|
|
6924
7144
|
visibility_tag: request?.visibility_tag,
|
|
6925
7145
|
attachments: request?.attachments,
|
|
7146
|
+
collection_refs: request?.collection_refs,
|
|
6926
7147
|
filter_tags: request?.filter_tags,
|
|
6927
7148
|
interest_tags: request?.interest_tags,
|
|
6928
7149
|
mentioned_user_ids: request?.mentioned_user_ids,
|
|
@@ -7142,6 +7363,7 @@ class FeedsApi {
|
|
|
7142
7363
|
user_id: request?.user_id,
|
|
7143
7364
|
visibility: request?.visibility,
|
|
7144
7365
|
attachments: request?.attachments,
|
|
7366
|
+
collection_refs: request?.collection_refs,
|
|
7145
7367
|
feeds: request?.feeds,
|
|
7146
7368
|
filter_tags: request?.filter_tags,
|
|
7147
7369
|
interest_tags: request?.interest_tags,
|
|
@@ -7199,6 +7421,51 @@ class FeedsApi {
|
|
|
7199
7421
|
decoders.QueryBookmarksResponse?.(response.body);
|
|
7200
7422
|
return { ...response.body, metadata: response.metadata };
|
|
7201
7423
|
}
|
|
7424
|
+
async deleteCollections(request) {
|
|
7425
|
+
const queryParams = {
|
|
7426
|
+
collection_refs: request?.collection_refs,
|
|
7427
|
+
};
|
|
7428
|
+
const response = await this.apiClient.sendRequest('DELETE', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7429
|
+
decoders.DeleteCollectionsResponse?.(response.body);
|
|
7430
|
+
return { ...response.body, metadata: response.metadata };
|
|
7431
|
+
}
|
|
7432
|
+
async readCollections(request) {
|
|
7433
|
+
const queryParams = {
|
|
7434
|
+
collection_refs: request?.collection_refs,
|
|
7435
|
+
user_id: request?.user_id,
|
|
7436
|
+
};
|
|
7437
|
+
const response = await this.apiClient.sendRequest('GET', '/api/v2/feeds/collections', undefined, queryParams);
|
|
7438
|
+
decoders.ReadCollectionsResponse?.(response.body);
|
|
7439
|
+
return { ...response.body, metadata: response.metadata };
|
|
7440
|
+
}
|
|
7441
|
+
async updateCollections(request) {
|
|
7442
|
+
const body = {
|
|
7443
|
+
collections: request?.collections,
|
|
7444
|
+
user_id: request?.user_id,
|
|
7445
|
+
user: request?.user,
|
|
7446
|
+
};
|
|
7447
|
+
const response = await this.apiClient.sendRequest('PATCH', '/api/v2/feeds/collections', undefined, undefined, body, 'application/json');
|
|
7448
|
+
decoders.UpdateCollectionsResponse?.(response.body);
|
|
7449
|
+
return { ...response.body, metadata: response.metadata };
|
|
7450
|
+
}
|
|
7451
|
+
async createCollections(request) {
|
|
7452
|
+
const body = {
|
|
7453
|
+
collections: request?.collections,
|
|
7454
|
+
user_id: request?.user_id,
|
|
7455
|
+
user: request?.user,
|
|
7456
|
+
};
|
|
7457
|
+
const response = await this.apiClient.sendRequest('POST', '/api/v2/feeds/collections', undefined, undefined, body, 'application/json');
|
|
7458
|
+
decoders.CreateCollectionsResponse?.(response.body);
|
|
7459
|
+
return { ...response.body, metadata: response.metadata };
|
|
7460
|
+
}
|
|
7461
|
+
async upsertCollections(request) {
|
|
7462
|
+
const body = {
|
|
7463
|
+
collections: request?.collections,
|
|
7464
|
+
};
|
|
7465
|
+
const response = await this.apiClient.sendRequest('PUT', '/api/v2/feeds/collections', undefined, undefined, body, 'application/json');
|
|
7466
|
+
decoders.UpsertCollectionsResponse?.(response.body);
|
|
7467
|
+
return { ...response.body, metadata: response.metadata };
|
|
7468
|
+
}
|
|
7202
7469
|
async getComments(request) {
|
|
7203
7470
|
const queryParams = {
|
|
7204
7471
|
object_id: request?.object_id,
|