@stream-io/node-sdk 0.4.22 → 0.4.24
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 +74 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +74 -21
- package/dist/index.es.mjs.map +1 -1
- package/dist/src/gen/chat/ChannelApi.d.ts +2 -2
- package/dist/src/gen/chat/ChatApi.d.ts +1 -1
- package/dist/src/gen/models/index.d.ts +116 -182
- package/dist/src/gen/video/CallApi.d.ts +4 -4
- package/dist/src/gen/video/VideoApi.d.ts +6 -6
- package/package.json +1 -1
- package/src/gen/chat/ChannelApi.ts +1 -1
- package/src/gen/chat/ChatApi.ts +8 -4
- package/src/gen/model-decoders/index.ts +53 -2
- package/src/gen/models/index.ts +276 -310
- package/src/gen/moderation/ModerationApi.ts +1 -0
- package/src/gen/video/CallApi.ts +12 -11
- package/src/gen/video/VideoApi.ts +35 -26
package/dist/index.es.mjs
CHANGED
|
@@ -138,7 +138,7 @@ class BaseApi {
|
|
|
138
138
|
Authorization: this.apiConfig.token,
|
|
139
139
|
'stream-auth-type': 'jwt',
|
|
140
140
|
'Content-Type': 'application/json',
|
|
141
|
-
'X-Stream-Client': 'stream-node-' + "0.4.
|
|
141
|
+
'X-Stream-Client': 'stream-node-' + "0.4.24",
|
|
142
142
|
'Accept-Encoding': 'gzip',
|
|
143
143
|
'x-client-request-id': clientRequestId,
|
|
144
144
|
};
|
|
@@ -545,6 +545,12 @@ decoders.ChannelTypeConfig = (input) => {
|
|
|
545
545
|
};
|
|
546
546
|
return decode(typeMappings, input);
|
|
547
547
|
};
|
|
548
|
+
decoders.ChatActivityStatsResponse = (input) => {
|
|
549
|
+
const typeMappings = {
|
|
550
|
+
messages: { type: 'MessageStatsResponse', isSingle: true },
|
|
551
|
+
};
|
|
552
|
+
return decode(typeMappings, input);
|
|
553
|
+
};
|
|
548
554
|
decoders.CheckResponse = (input) => {
|
|
549
555
|
const typeMappings = {
|
|
550
556
|
item: { type: 'ReviewQueueItem', isSingle: true },
|
|
@@ -565,6 +571,12 @@ decoders.ConfigResponse = (input) => {
|
|
|
565
571
|
};
|
|
566
572
|
return decode(typeMappings, input);
|
|
567
573
|
};
|
|
574
|
+
decoders.CountByMinuteResponse = (input) => {
|
|
575
|
+
const typeMappings = {
|
|
576
|
+
start_ts: { type: 'DatetimeType', isSingle: true },
|
|
577
|
+
};
|
|
578
|
+
return decode(typeMappings, input);
|
|
579
|
+
};
|
|
568
580
|
decoders.CreateBlockListResponse = (input) => {
|
|
569
581
|
const typeMappings = {
|
|
570
582
|
blocklist: { type: 'BlockListResponse', isSingle: true },
|
|
@@ -777,6 +789,12 @@ decoders.GetBlockedUsersResponse = (input) => {
|
|
|
777
789
|
};
|
|
778
790
|
return decode(typeMappings, input);
|
|
779
791
|
};
|
|
792
|
+
decoders.GetCallReportResponse = (input) => {
|
|
793
|
+
const typeMappings = {
|
|
794
|
+
chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
|
|
795
|
+
};
|
|
796
|
+
return decode(typeMappings, input);
|
|
797
|
+
};
|
|
780
798
|
decoders.GetCallResponse = (input) => {
|
|
781
799
|
const typeMappings = {
|
|
782
800
|
members: { type: 'MemberResponse', isSingle: false },
|
|
@@ -857,7 +875,6 @@ decoders.GetRepliesResponse = (input) => {
|
|
|
857
875
|
};
|
|
858
876
|
decoders.GetReviewQueueItemResponse = (input) => {
|
|
859
877
|
const typeMappings = {
|
|
860
|
-
history: { type: 'ReviewQueueItemResponse', isSingle: false },
|
|
861
878
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
862
879
|
};
|
|
863
880
|
return decode(typeMappings, input);
|
|
@@ -1061,6 +1078,12 @@ decoders.MessageResponse = (input) => {
|
|
|
1061
1078
|
};
|
|
1062
1079
|
return decode(typeMappings, input);
|
|
1063
1080
|
};
|
|
1081
|
+
decoders.MessageStatsResponse = (input) => {
|
|
1082
|
+
const typeMappings = {
|
|
1083
|
+
count_over_time: { type: 'CountByMinuteResponse', isSingle: false },
|
|
1084
|
+
};
|
|
1085
|
+
return decode(typeMappings, input);
|
|
1086
|
+
};
|
|
1064
1087
|
decoders.MessageWithChannelResponse = (input) => {
|
|
1065
1088
|
const typeMappings = {
|
|
1066
1089
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1128,6 +1151,18 @@ decoders.OwnUserResponse = (input) => {
|
|
|
1128
1151
|
};
|
|
1129
1152
|
return decode(typeMappings, input);
|
|
1130
1153
|
};
|
|
1154
|
+
decoders.ParticipantCountByMinuteResponse = (input) => {
|
|
1155
|
+
const typeMappings = {
|
|
1156
|
+
start_ts: { type: 'DatetimeType', isSingle: true },
|
|
1157
|
+
};
|
|
1158
|
+
return decode(typeMappings, input);
|
|
1159
|
+
};
|
|
1160
|
+
decoders.ParticipantCountOverTimeResponse = (input) => {
|
|
1161
|
+
const typeMappings = {
|
|
1162
|
+
by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false },
|
|
1163
|
+
};
|
|
1164
|
+
return decode(typeMappings, input);
|
|
1165
|
+
};
|
|
1131
1166
|
decoders.PendingMessageResponse = (input) => {
|
|
1132
1167
|
const typeMappings = {
|
|
1133
1168
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
@@ -1236,6 +1271,14 @@ decoders.QueryCallMembersResponse = (input) => {
|
|
|
1236
1271
|
};
|
|
1237
1272
|
return decode(typeMappings, input);
|
|
1238
1273
|
};
|
|
1274
|
+
decoders.QueryCallParticipantsResponse = (input) => {
|
|
1275
|
+
const typeMappings = {
|
|
1276
|
+
members: { type: 'MemberResponse', isSingle: false },
|
|
1277
|
+
participants: { type: 'CallParticipantResponse', isSingle: false },
|
|
1278
|
+
call: { type: 'CallResponse', isSingle: true },
|
|
1279
|
+
};
|
|
1280
|
+
return decode(typeMappings, input);
|
|
1281
|
+
};
|
|
1239
1282
|
decoders.QueryCallStatsResponse = (input) => {
|
|
1240
1283
|
const typeMappings = {
|
|
1241
1284
|
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
|
|
@@ -2452,6 +2495,21 @@ class VideoApi extends BaseApi {
|
|
|
2452
2495
|
decoders.MuteUsersResponse?.(response.body);
|
|
2453
2496
|
return { ...response.body, metadata: response.metadata };
|
|
2454
2497
|
};
|
|
2498
|
+
this.queryCallParticipants = async (request) => {
|
|
2499
|
+
const queryParams = {
|
|
2500
|
+
limit: request?.limit,
|
|
2501
|
+
};
|
|
2502
|
+
const pathParams = {
|
|
2503
|
+
id: request?.id,
|
|
2504
|
+
type: request?.type,
|
|
2505
|
+
};
|
|
2506
|
+
const body = {
|
|
2507
|
+
filter_conditions: request?.filter_conditions,
|
|
2508
|
+
};
|
|
2509
|
+
const response = await this.sendRequest('POST', '/api/v2/video/call/{type}/{id}/participants', pathParams, queryParams, body);
|
|
2510
|
+
decoders.QueryCallParticipantsResponse?.(response.body);
|
|
2511
|
+
return { ...response.body, metadata: response.metadata };
|
|
2512
|
+
};
|
|
2455
2513
|
this.videoPin = async (request) => {
|
|
2456
2514
|
const pathParams = {
|
|
2457
2515
|
type: request?.type,
|
|
@@ -2579,16 +2637,6 @@ class VideoApi extends BaseApi {
|
|
|
2579
2637
|
decoders.StartTranscriptionResponse?.(response.body);
|
|
2580
2638
|
return { ...response.body, metadata: response.metadata };
|
|
2581
2639
|
};
|
|
2582
|
-
this.getCallStats = async (request) => {
|
|
2583
|
-
const pathParams = {
|
|
2584
|
-
type: request?.type,
|
|
2585
|
-
id: request?.id,
|
|
2586
|
-
session: request?.session,
|
|
2587
|
-
};
|
|
2588
|
-
const response = await this.sendRequest('GET', '/api/v2/video/call/{type}/{id}/stats/{session}', pathParams, undefined);
|
|
2589
|
-
decoders.GetCallStatsResponse?.(response.body);
|
|
2590
|
-
return { ...response.body, metadata: response.metadata };
|
|
2591
|
-
};
|
|
2592
2640
|
this.stopHLSBroadcasting = async (request) => {
|
|
2593
2641
|
const pathParams = {
|
|
2594
2642
|
type: request?.type,
|
|
@@ -2873,6 +2921,13 @@ class CallApi {
|
|
|
2873
2921
|
...request,
|
|
2874
2922
|
});
|
|
2875
2923
|
};
|
|
2924
|
+
this.queryCallParticipants = (request) => {
|
|
2925
|
+
return this.videoApi.queryCallParticipants({
|
|
2926
|
+
id: this.id,
|
|
2927
|
+
type: this.type,
|
|
2928
|
+
...request,
|
|
2929
|
+
});
|
|
2930
|
+
};
|
|
2876
2931
|
this.videoPin = (request) => {
|
|
2877
2932
|
return this.videoApi.videoPin({ id: this.id, type: this.type, ...request });
|
|
2878
2933
|
};
|
|
@@ -2937,13 +2992,6 @@ class CallApi {
|
|
|
2937
2992
|
...request,
|
|
2938
2993
|
});
|
|
2939
2994
|
};
|
|
2940
|
-
this.getCallStats = (request) => {
|
|
2941
|
-
return this.videoApi.getCallStats({
|
|
2942
|
-
id: this.id,
|
|
2943
|
-
type: this.type,
|
|
2944
|
-
...request,
|
|
2945
|
-
});
|
|
2946
|
-
};
|
|
2947
2995
|
this.stopHLSBroadcasting = () => {
|
|
2948
2996
|
return this.videoApi.stopHLSBroadcasting({ id: this.id, type: this.type });
|
|
2949
2997
|
};
|
|
@@ -3325,8 +3373,10 @@ class ChatApi extends BaseApi {
|
|
|
3325
3373
|
return { ...response.body, metadata: response.metadata };
|
|
3326
3374
|
};
|
|
3327
3375
|
this.updateMemberPartial = async (request) => {
|
|
3328
|
-
const
|
|
3376
|
+
const queryParams = {
|
|
3329
3377
|
user_id: request?.user_id,
|
|
3378
|
+
};
|
|
3379
|
+
const pathParams = {
|
|
3330
3380
|
type: request?.type,
|
|
3331
3381
|
id: request?.id,
|
|
3332
3382
|
};
|
|
@@ -3334,7 +3384,7 @@ class ChatApi extends BaseApi {
|
|
|
3334
3384
|
unset: request?.unset,
|
|
3335
3385
|
set: request?.set,
|
|
3336
3386
|
};
|
|
3337
|
-
const response = await this.sendRequest('PATCH', '/api/v2/chat/channels/{type}/{id}/member
|
|
3387
|
+
const response = await this.sendRequest('PATCH', '/api/v2/chat/channels/{type}/{id}/member', pathParams, queryParams, body);
|
|
3338
3388
|
decoders.UpdateMemberPartialResponse?.(response.body);
|
|
3339
3389
|
return { ...response.body, metadata: response.metadata };
|
|
3340
3390
|
};
|
|
@@ -4120,6 +4170,8 @@ class ChatApi extends BaseApi {
|
|
|
4120
4170
|
prev: request?.prev,
|
|
4121
4171
|
reply_limit: request?.reply_limit,
|
|
4122
4172
|
user_id: request?.user_id,
|
|
4173
|
+
sort: request?.sort,
|
|
4174
|
+
filter: request?.filter,
|
|
4123
4175
|
user: request?.user,
|
|
4124
4176
|
};
|
|
4125
4177
|
const response = await this.sendRequest('POST', '/api/v2/chat/threads', undefined, undefined, body);
|
|
@@ -4464,6 +4516,7 @@ class ModerationApi extends BaseApi {
|
|
|
4464
4516
|
block_list_config: request?.block_list_config,
|
|
4465
4517
|
bodyguard_config: request?.bodyguard_config,
|
|
4466
4518
|
google_vision_config: request?.google_vision_config,
|
|
4519
|
+
rule_builder_config: request?.rule_builder_config,
|
|
4467
4520
|
user: request?.user,
|
|
4468
4521
|
velocity_filter_config: request?.velocity_filter_config,
|
|
4469
4522
|
};
|