@stream-io/node-sdk 0.7.19 → 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 +210 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +210 -29
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChatApi.d.ts +7 -2
- package/dist/src/gen/models/index.d.ts +289 -51
- 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/model-decoders/decoders.ts +97 -39
- package/src/gen/models/index.ts +477 -73
- package/src/gen/video/CallApi.ts +6 -0
- package/src/gen/video/VideoApi.ts +240 -0
package/dist/index.es.mjs
CHANGED
|
@@ -407,6 +407,7 @@ decoders.BookmarkFolderResponse = (input) => {
|
|
|
407
407
|
const typeMappings = {
|
|
408
408
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
409
409
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
410
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
410
411
|
};
|
|
411
412
|
return decode(typeMappings, input);
|
|
412
413
|
};
|
|
@@ -424,7 +425,7 @@ decoders.BookmarkResponse = (input) => {
|
|
|
424
425
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
425
426
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
426
427
|
activity: { type: 'ActivityResponse', isSingle: true },
|
|
427
|
-
user: { type: '
|
|
428
|
+
user: { type: 'UserResponseCommonFields', isSingle: true },
|
|
428
429
|
folder: { type: 'BookmarkFolderResponse', isSingle: true },
|
|
429
430
|
};
|
|
430
431
|
return decode(typeMappings, input);
|
|
@@ -953,14 +954,14 @@ decoders.ChannelHiddenEvent = (input) => {
|
|
|
953
954
|
};
|
|
954
955
|
decoders.ChannelMember = (input) => {
|
|
955
956
|
const typeMappings = {
|
|
956
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
957
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
958
957
|
archived_at: { type: 'DatetimeType', isSingle: true },
|
|
959
958
|
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
959
|
+
created_at: { type: 'DatetimeType', isSingle: true },
|
|
960
960
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
961
961
|
invite_accepted_at: { type: 'DatetimeType', isSingle: true },
|
|
962
962
|
invite_rejected_at: { type: 'DatetimeType', isSingle: true },
|
|
963
963
|
pinned_at: { type: 'DatetimeType', isSingle: true },
|
|
964
|
+
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
964
965
|
user: { type: 'User', isSingle: true },
|
|
965
966
|
};
|
|
966
967
|
return decode(typeMappings, input);
|
|
@@ -1003,7 +1004,7 @@ decoders.ChannelMutedEvent = (input) => {
|
|
|
1003
1004
|
};
|
|
1004
1005
|
return decode(typeMappings, input);
|
|
1005
1006
|
};
|
|
1006
|
-
decoders.
|
|
1007
|
+
decoders.ChannelPushPreferencesResponse = (input) => {
|
|
1007
1008
|
const typeMappings = {
|
|
1008
1009
|
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
1009
1010
|
};
|
|
@@ -1042,7 +1043,10 @@ decoders.ChannelStateResponse = (input) => {
|
|
|
1042
1043
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
1043
1044
|
draft: { type: 'DraftResponse', isSingle: true },
|
|
1044
1045
|
membership: { type: 'ChannelMemberResponse', isSingle: true },
|
|
1045
|
-
push_preferences: {
|
|
1046
|
+
push_preferences: {
|
|
1047
|
+
type: 'ChannelPushPreferencesResponse',
|
|
1048
|
+
isSingle: true,
|
|
1049
|
+
},
|
|
1046
1050
|
};
|
|
1047
1051
|
return decode(typeMappings, input);
|
|
1048
1052
|
};
|
|
@@ -1063,7 +1067,10 @@ decoders.ChannelStateResponseFields = (input) => {
|
|
|
1063
1067
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
1064
1068
|
draft: { type: 'DraftResponse', isSingle: true },
|
|
1065
1069
|
membership: { type: 'ChannelMemberResponse', isSingle: true },
|
|
1066
|
-
push_preferences: {
|
|
1070
|
+
push_preferences: {
|
|
1071
|
+
type: 'ChannelPushPreferencesResponse',
|
|
1072
|
+
isSingle: true,
|
|
1073
|
+
},
|
|
1067
1074
|
};
|
|
1068
1075
|
return decode(typeMappings, input);
|
|
1069
1076
|
};
|
|
@@ -1301,6 +1308,12 @@ decoders.CreateRoleResponse = (input) => {
|
|
|
1301
1308
|
};
|
|
1302
1309
|
return decode(typeMappings, input);
|
|
1303
1310
|
};
|
|
1311
|
+
decoders.CreateSIPTrunkResponse = (input) => {
|
|
1312
|
+
const typeMappings = {
|
|
1313
|
+
sip_trunk: { type: 'SIPTrunkResponse', isSingle: true },
|
|
1314
|
+
};
|
|
1315
|
+
return decode(typeMappings, input);
|
|
1316
|
+
};
|
|
1304
1317
|
decoders.CustomCheckResponse = (input) => {
|
|
1305
1318
|
const typeMappings = {
|
|
1306
1319
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
@@ -1843,7 +1856,7 @@ decoders.GetPushTemplatesResponse = (input) => {
|
|
|
1843
1856
|
};
|
|
1844
1857
|
decoders.GetReactionsResponse = (input) => {
|
|
1845
1858
|
const typeMappings = {
|
|
1846
|
-
reactions: { type: '
|
|
1859
|
+
reactions: { type: 'ReactionResponse', isSingle: false },
|
|
1847
1860
|
};
|
|
1848
1861
|
return decode(typeMappings, input);
|
|
1849
1862
|
};
|
|
@@ -1972,6 +1985,21 @@ decoders.ListRolesResponse = (input) => {
|
|
|
1972
1985
|
};
|
|
1973
1986
|
return decode(typeMappings, input);
|
|
1974
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
|
+
};
|
|
1975
2003
|
decoders.ListTranscriptionsResponse = (input) => {
|
|
1976
2004
|
const typeMappings = {
|
|
1977
2005
|
transcriptions: { type: 'CallTranscription', isSingle: false },
|
|
@@ -2330,7 +2358,7 @@ decoders.OwnUserResponse = (input) => {
|
|
|
2330
2358
|
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
2331
2359
|
last_active: { type: 'DatetimeType', isSingle: true },
|
|
2332
2360
|
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
2333
|
-
push_preferences: { type: '
|
|
2361
|
+
push_preferences: { type: 'PushPreferencesResponse', isSingle: true },
|
|
2334
2362
|
};
|
|
2335
2363
|
return decode(typeMappings, input);
|
|
2336
2364
|
};
|
|
@@ -2457,6 +2485,12 @@ decoders.PushPreferences = (input) => {
|
|
|
2457
2485
|
};
|
|
2458
2486
|
return decode(typeMappings, input);
|
|
2459
2487
|
};
|
|
2488
|
+
decoders.PushPreferencesResponse = (input) => {
|
|
2489
|
+
const typeMappings = {
|
|
2490
|
+
disabled_until: { type: 'DatetimeType', isSingle: true },
|
|
2491
|
+
};
|
|
2492
|
+
return decode(typeMappings, input);
|
|
2493
|
+
};
|
|
2460
2494
|
decoders.PushProvider = (input) => {
|
|
2461
2495
|
const typeMappings = {
|
|
2462
2496
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2672,12 +2706,6 @@ decoders.QueryRemindersResponse = (input) => {
|
|
|
2672
2706
|
};
|
|
2673
2707
|
return decode(typeMappings, input);
|
|
2674
2708
|
};
|
|
2675
|
-
decoders.QueryReviewQueueResponse = (input) => {
|
|
2676
|
-
const typeMappings = {
|
|
2677
|
-
items: { type: 'ReviewQueueItemResponse', isSingle: false },
|
|
2678
|
-
};
|
|
2679
|
-
return decode(typeMappings, input);
|
|
2680
|
-
};
|
|
2681
2709
|
decoders.QuerySegmentTargetsResponse = (input) => {
|
|
2682
2710
|
const typeMappings = {
|
|
2683
2711
|
targets: { type: 'SegmentTargetResponse', isSingle: false },
|
|
@@ -2816,8 +2844,8 @@ decoders.ReminderResponseData = (input) => {
|
|
|
2816
2844
|
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2817
2845
|
remind_at: { type: 'DatetimeType', isSingle: true },
|
|
2818
2846
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
2819
|
-
message: { type: '
|
|
2820
|
-
user: { type: '
|
|
2847
|
+
message: { type: 'MessageResponse', isSingle: true },
|
|
2848
|
+
user: { type: 'UserResponse', isSingle: true },
|
|
2821
2849
|
};
|
|
2822
2850
|
return decode(typeMappings, input);
|
|
2823
2851
|
};
|
|
@@ -2829,6 +2857,13 @@ decoders.ReminderUpdatedEvent = (input) => {
|
|
|
2829
2857
|
};
|
|
2830
2858
|
return decode(typeMappings, input);
|
|
2831
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
|
+
};
|
|
2832
2867
|
decoders.ReviewQueueItemNewEvent = (input) => {
|
|
2833
2868
|
const typeMappings = {
|
|
2834
2869
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -2876,6 +2911,20 @@ decoders.Role = (input) => {
|
|
|
2876
2911
|
};
|
|
2877
2912
|
return decode(typeMappings, input);
|
|
2878
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
|
+
};
|
|
2879
2928
|
decoders.SearchResult = (input) => {
|
|
2880
2929
|
const typeMappings = {
|
|
2881
2930
|
message: { type: 'SearchResultMessage', isSingle: true },
|
|
@@ -2944,11 +2993,7 @@ decoders.SendReactionResponse = (input) => {
|
|
|
2944
2993
|
};
|
|
2945
2994
|
decoders.SharedLocation = (input) => {
|
|
2946
2995
|
const typeMappings = {
|
|
2947
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
2948
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
2949
2996
|
end_at: { type: 'DatetimeType', isSingle: true },
|
|
2950
|
-
channel: { type: 'Channel', isSingle: true },
|
|
2951
|
-
message: { type: 'Message', isSingle: true },
|
|
2952
2997
|
};
|
|
2953
2998
|
return decode(typeMappings, input);
|
|
2954
2999
|
};
|
|
@@ -3281,6 +3326,21 @@ decoders.UpdateReminderResponse = (input) => {
|
|
|
3281
3326
|
};
|
|
3282
3327
|
return decode(typeMappings, input);
|
|
3283
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
|
+
};
|
|
3284
3344
|
decoders.UpdateThreadPartialResponse = (input) => {
|
|
3285
3345
|
const typeMappings = {
|
|
3286
3346
|
thread: { type: 'ThreadResponse', isSingle: true },
|
|
@@ -3352,13 +3412,7 @@ decoders.UpsertPushTemplateResponse = (input) => {
|
|
|
3352
3412
|
decoders.User = (input) => {
|
|
3353
3413
|
const typeMappings = {
|
|
3354
3414
|
ban_expires: { type: 'DatetimeType', isSingle: true },
|
|
3355
|
-
created_at: { type: 'DatetimeType', isSingle: true },
|
|
3356
|
-
deactivated_at: { type: 'DatetimeType', isSingle: true },
|
|
3357
|
-
deleted_at: { type: 'DatetimeType', isSingle: true },
|
|
3358
|
-
last_active: { type: 'DatetimeType', isSingle: true },
|
|
3359
|
-
last_engaged_at: { type: 'DatetimeType', isSingle: true },
|
|
3360
3415
|
revoke_tokens_issued_before: { type: 'DatetimeType', isSingle: true },
|
|
3361
|
-
updated_at: { type: 'DatetimeType', isSingle: true },
|
|
3362
3416
|
};
|
|
3363
3417
|
return decode(typeMappings, input);
|
|
3364
3418
|
};
|
|
@@ -4568,6 +4622,19 @@ class VideoApi {
|
|
|
4568
4622
|
decoders.GetCallReportResponse?.(response.body);
|
|
4569
4623
|
return { ...response.body, metadata: response.metadata };
|
|
4570
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
|
+
}
|
|
4571
4638
|
async startRTMPBroadcasts(request) {
|
|
4572
4639
|
const pathParams = {
|
|
4573
4640
|
type: request?.type,
|
|
@@ -4911,6 +4978,99 @@ class VideoApi {
|
|
|
4911
4978
|
decoders.GetEdgesResponse?.(response.body);
|
|
4912
4979
|
return { ...response.body, metadata: response.metadata };
|
|
4913
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
|
+
}
|
|
4914
5074
|
async queryAggregateCallStats(request) {
|
|
4915
5075
|
const body = {
|
|
4916
5076
|
from: request?.from,
|
|
@@ -5024,6 +5184,9 @@ class CallApi {
|
|
|
5024
5184
|
...request,
|
|
5025
5185
|
});
|
|
5026
5186
|
}
|
|
5187
|
+
ring(request) {
|
|
5188
|
+
return this.videoApi.ringCall({ id: this.id, type: this.type, ...request });
|
|
5189
|
+
}
|
|
5027
5190
|
startRTMPBroadcasts(request) {
|
|
5028
5191
|
return this.videoApi.startRTMPBroadcasts({
|
|
5029
5192
|
id: this.id,
|
|
@@ -5302,6 +5465,17 @@ class ChatApi {
|
|
|
5302
5465
|
decoders.DeleteChannelsResponse?.(response.body);
|
|
5303
5466
|
return { ...response.body, metadata: response.metadata };
|
|
5304
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
|
+
}
|
|
5305
5479
|
async markChannelsRead(request) {
|
|
5306
5480
|
const body = {
|
|
5307
5481
|
user_id: request?.user_id,
|
|
@@ -5365,14 +5539,17 @@ class ChatApi {
|
|
|
5365
5539
|
accept_invite: request?.accept_invite,
|
|
5366
5540
|
cooldown: request?.cooldown,
|
|
5367
5541
|
hide_history: request?.hide_history,
|
|
5542
|
+
hide_history_before: request?.hide_history_before,
|
|
5368
5543
|
reject_invite: request?.reject_invite,
|
|
5369
5544
|
skip_push: request?.skip_push,
|
|
5370
5545
|
user_id: request?.user_id,
|
|
5546
|
+
add_filter_tags: request?.add_filter_tags,
|
|
5371
5547
|
add_members: request?.add_members,
|
|
5372
5548
|
add_moderators: request?.add_moderators,
|
|
5373
5549
|
assign_roles: request?.assign_roles,
|
|
5374
5550
|
demote_moderators: request?.demote_moderators,
|
|
5375
5551
|
invites: request?.invites,
|
|
5552
|
+
remove_filter_tags: request?.remove_filter_tags,
|
|
5376
5553
|
remove_members: request?.remove_members,
|
|
5377
5554
|
data: request?.data,
|
|
5378
5555
|
message: request?.message,
|
|
@@ -5602,6 +5779,7 @@ class ChatApi {
|
|
|
5602
5779
|
};
|
|
5603
5780
|
const body = {
|
|
5604
5781
|
message_id: request?.message_id,
|
|
5782
|
+
message_timestamp: request?.message_timestamp,
|
|
5605
5783
|
thread_id: request?.thread_id,
|
|
5606
5784
|
user_id: request?.user_id,
|
|
5607
5785
|
user: request?.user,
|
|
@@ -6219,8 +6397,11 @@ class ChatApi {
|
|
|
6219
6397
|
decoders.UpdateThreadPartialResponse?.(response.body);
|
|
6220
6398
|
return { ...response.body, metadata: response.metadata };
|
|
6221
6399
|
}
|
|
6222
|
-
async unreadCounts() {
|
|
6223
|
-
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);
|
|
6224
6405
|
decoders.WrappedUnreadCountsResponse?.(response.body);
|
|
6225
6406
|
return { ...response.body, metadata: response.metadata };
|
|
6226
6407
|
}
|
|
@@ -6837,7 +7018,7 @@ class ApiClient {
|
|
|
6837
7018
|
const headers = {
|
|
6838
7019
|
Authorization: this.apiConfig.token,
|
|
6839
7020
|
'stream-auth-type': 'jwt',
|
|
6840
|
-
'X-Stream-Client': 'stream-node-' + "0.7.
|
|
7021
|
+
'X-Stream-Client': 'stream-node-' + "0.7.20",
|
|
6841
7022
|
'Accept-Encoding': 'gzip',
|
|
6842
7023
|
'x-client-request-id': clientRequestId,
|
|
6843
7024
|
};
|