@stream-io/node-sdk 0.4.22 → 0.4.23
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 +73 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.mjs +73 -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 +89 -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 +230 -310
- package/src/gen/video/CallApi.ts +12 -11
- package/src/gen/video/VideoApi.ts +35 -26
package/dist/index.cjs.js
CHANGED
|
@@ -157,7 +157,7 @@ class BaseApi {
|
|
|
157
157
|
Authorization: this.apiConfig.token,
|
|
158
158
|
'stream-auth-type': 'jwt',
|
|
159
159
|
'Content-Type': 'application/json',
|
|
160
|
-
'X-Stream-Client': 'stream-node-' + "0.4.
|
|
160
|
+
'X-Stream-Client': 'stream-node-' + "0.4.23",
|
|
161
161
|
'Accept-Encoding': 'gzip',
|
|
162
162
|
'x-client-request-id': clientRequestId,
|
|
163
163
|
};
|
|
@@ -564,6 +564,12 @@ decoders.ChannelTypeConfig = (input) => {
|
|
|
564
564
|
};
|
|
565
565
|
return decode(typeMappings, input);
|
|
566
566
|
};
|
|
567
|
+
decoders.ChatActivityStatsResponse = (input) => {
|
|
568
|
+
const typeMappings = {
|
|
569
|
+
messages: { type: 'MessageStatsResponse', isSingle: true },
|
|
570
|
+
};
|
|
571
|
+
return decode(typeMappings, input);
|
|
572
|
+
};
|
|
567
573
|
decoders.CheckResponse = (input) => {
|
|
568
574
|
const typeMappings = {
|
|
569
575
|
item: { type: 'ReviewQueueItem', isSingle: true },
|
|
@@ -584,6 +590,12 @@ decoders.ConfigResponse = (input) => {
|
|
|
584
590
|
};
|
|
585
591
|
return decode(typeMappings, input);
|
|
586
592
|
};
|
|
593
|
+
decoders.CountByMinuteResponse = (input) => {
|
|
594
|
+
const typeMappings = {
|
|
595
|
+
start_ts: { type: 'DatetimeType', isSingle: true },
|
|
596
|
+
};
|
|
597
|
+
return decode(typeMappings, input);
|
|
598
|
+
};
|
|
587
599
|
decoders.CreateBlockListResponse = (input) => {
|
|
588
600
|
const typeMappings = {
|
|
589
601
|
blocklist: { type: 'BlockListResponse', isSingle: true },
|
|
@@ -796,6 +808,12 @@ decoders.GetBlockedUsersResponse = (input) => {
|
|
|
796
808
|
};
|
|
797
809
|
return decode(typeMappings, input);
|
|
798
810
|
};
|
|
811
|
+
decoders.GetCallReportResponse = (input) => {
|
|
812
|
+
const typeMappings = {
|
|
813
|
+
chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
|
|
814
|
+
};
|
|
815
|
+
return decode(typeMappings, input);
|
|
816
|
+
};
|
|
799
817
|
decoders.GetCallResponse = (input) => {
|
|
800
818
|
const typeMappings = {
|
|
801
819
|
members: { type: 'MemberResponse', isSingle: false },
|
|
@@ -876,7 +894,6 @@ decoders.GetRepliesResponse = (input) => {
|
|
|
876
894
|
};
|
|
877
895
|
decoders.GetReviewQueueItemResponse = (input) => {
|
|
878
896
|
const typeMappings = {
|
|
879
|
-
history: { type: 'ReviewQueueItemResponse', isSingle: false },
|
|
880
897
|
item: { type: 'ReviewQueueItemResponse', isSingle: true },
|
|
881
898
|
};
|
|
882
899
|
return decode(typeMappings, input);
|
|
@@ -1080,6 +1097,12 @@ decoders.MessageResponse = (input) => {
|
|
|
1080
1097
|
};
|
|
1081
1098
|
return decode(typeMappings, input);
|
|
1082
1099
|
};
|
|
1100
|
+
decoders.MessageStatsResponse = (input) => {
|
|
1101
|
+
const typeMappings = {
|
|
1102
|
+
count_over_time: { type: 'CountByMinuteResponse', isSingle: false },
|
|
1103
|
+
};
|
|
1104
|
+
return decode(typeMappings, input);
|
|
1105
|
+
};
|
|
1083
1106
|
decoders.MessageWithChannelResponse = (input) => {
|
|
1084
1107
|
const typeMappings = {
|
|
1085
1108
|
created_at: { type: 'DatetimeType', isSingle: true },
|
|
@@ -1147,6 +1170,18 @@ decoders.OwnUserResponse = (input) => {
|
|
|
1147
1170
|
};
|
|
1148
1171
|
return decode(typeMappings, input);
|
|
1149
1172
|
};
|
|
1173
|
+
decoders.ParticipantCountByMinuteResponse = (input) => {
|
|
1174
|
+
const typeMappings = {
|
|
1175
|
+
start_ts: { type: 'DatetimeType', isSingle: true },
|
|
1176
|
+
};
|
|
1177
|
+
return decode(typeMappings, input);
|
|
1178
|
+
};
|
|
1179
|
+
decoders.ParticipantCountOverTimeResponse = (input) => {
|
|
1180
|
+
const typeMappings = {
|
|
1181
|
+
by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false },
|
|
1182
|
+
};
|
|
1183
|
+
return decode(typeMappings, input);
|
|
1184
|
+
};
|
|
1150
1185
|
decoders.PendingMessageResponse = (input) => {
|
|
1151
1186
|
const typeMappings = {
|
|
1152
1187
|
channel: { type: 'ChannelResponse', isSingle: true },
|
|
@@ -1255,6 +1290,14 @@ decoders.QueryCallMembersResponse = (input) => {
|
|
|
1255
1290
|
};
|
|
1256
1291
|
return decode(typeMappings, input);
|
|
1257
1292
|
};
|
|
1293
|
+
decoders.QueryCallParticipantsResponse = (input) => {
|
|
1294
|
+
const typeMappings = {
|
|
1295
|
+
members: { type: 'MemberResponse', isSingle: false },
|
|
1296
|
+
participants: { type: 'CallParticipantResponse', isSingle: false },
|
|
1297
|
+
call: { type: 'CallResponse', isSingle: true },
|
|
1298
|
+
};
|
|
1299
|
+
return decode(typeMappings, input);
|
|
1300
|
+
};
|
|
1258
1301
|
decoders.QueryCallStatsResponse = (input) => {
|
|
1259
1302
|
const typeMappings = {
|
|
1260
1303
|
reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },
|
|
@@ -2471,6 +2514,21 @@ class VideoApi extends BaseApi {
|
|
|
2471
2514
|
decoders.MuteUsersResponse?.(response.body);
|
|
2472
2515
|
return { ...response.body, metadata: response.metadata };
|
|
2473
2516
|
};
|
|
2517
|
+
this.queryCallParticipants = async (request) => {
|
|
2518
|
+
const queryParams = {
|
|
2519
|
+
limit: request?.limit,
|
|
2520
|
+
};
|
|
2521
|
+
const pathParams = {
|
|
2522
|
+
id: request?.id,
|
|
2523
|
+
type: request?.type,
|
|
2524
|
+
};
|
|
2525
|
+
const body = {
|
|
2526
|
+
filter_conditions: request?.filter_conditions,
|
|
2527
|
+
};
|
|
2528
|
+
const response = await this.sendRequest('POST', '/api/v2/video/call/{type}/{id}/participants', pathParams, queryParams, body);
|
|
2529
|
+
decoders.QueryCallParticipantsResponse?.(response.body);
|
|
2530
|
+
return { ...response.body, metadata: response.metadata };
|
|
2531
|
+
};
|
|
2474
2532
|
this.videoPin = async (request) => {
|
|
2475
2533
|
const pathParams = {
|
|
2476
2534
|
type: request?.type,
|
|
@@ -2598,16 +2656,6 @@ class VideoApi extends BaseApi {
|
|
|
2598
2656
|
decoders.StartTranscriptionResponse?.(response.body);
|
|
2599
2657
|
return { ...response.body, metadata: response.metadata };
|
|
2600
2658
|
};
|
|
2601
|
-
this.getCallStats = async (request) => {
|
|
2602
|
-
const pathParams = {
|
|
2603
|
-
type: request?.type,
|
|
2604
|
-
id: request?.id,
|
|
2605
|
-
session: request?.session,
|
|
2606
|
-
};
|
|
2607
|
-
const response = await this.sendRequest('GET', '/api/v2/video/call/{type}/{id}/stats/{session}', pathParams, undefined);
|
|
2608
|
-
decoders.GetCallStatsResponse?.(response.body);
|
|
2609
|
-
return { ...response.body, metadata: response.metadata };
|
|
2610
|
-
};
|
|
2611
2659
|
this.stopHLSBroadcasting = async (request) => {
|
|
2612
2660
|
const pathParams = {
|
|
2613
2661
|
type: request?.type,
|
|
@@ -2892,6 +2940,13 @@ class CallApi {
|
|
|
2892
2940
|
...request,
|
|
2893
2941
|
});
|
|
2894
2942
|
};
|
|
2943
|
+
this.queryCallParticipants = (request) => {
|
|
2944
|
+
return this.videoApi.queryCallParticipants({
|
|
2945
|
+
id: this.id,
|
|
2946
|
+
type: this.type,
|
|
2947
|
+
...request,
|
|
2948
|
+
});
|
|
2949
|
+
};
|
|
2895
2950
|
this.videoPin = (request) => {
|
|
2896
2951
|
return this.videoApi.videoPin({ id: this.id, type: this.type, ...request });
|
|
2897
2952
|
};
|
|
@@ -2956,13 +3011,6 @@ class CallApi {
|
|
|
2956
3011
|
...request,
|
|
2957
3012
|
});
|
|
2958
3013
|
};
|
|
2959
|
-
this.getCallStats = (request) => {
|
|
2960
|
-
return this.videoApi.getCallStats({
|
|
2961
|
-
id: this.id,
|
|
2962
|
-
type: this.type,
|
|
2963
|
-
...request,
|
|
2964
|
-
});
|
|
2965
|
-
};
|
|
2966
3014
|
this.stopHLSBroadcasting = () => {
|
|
2967
3015
|
return this.videoApi.stopHLSBroadcasting({ id: this.id, type: this.type });
|
|
2968
3016
|
};
|
|
@@ -3344,8 +3392,10 @@ class ChatApi extends BaseApi {
|
|
|
3344
3392
|
return { ...response.body, metadata: response.metadata };
|
|
3345
3393
|
};
|
|
3346
3394
|
this.updateMemberPartial = async (request) => {
|
|
3347
|
-
const
|
|
3395
|
+
const queryParams = {
|
|
3348
3396
|
user_id: request?.user_id,
|
|
3397
|
+
};
|
|
3398
|
+
const pathParams = {
|
|
3349
3399
|
type: request?.type,
|
|
3350
3400
|
id: request?.id,
|
|
3351
3401
|
};
|
|
@@ -3353,7 +3403,7 @@ class ChatApi extends BaseApi {
|
|
|
3353
3403
|
unset: request?.unset,
|
|
3354
3404
|
set: request?.set,
|
|
3355
3405
|
};
|
|
3356
|
-
const response = await this.sendRequest('PATCH', '/api/v2/chat/channels/{type}/{id}/member
|
|
3406
|
+
const response = await this.sendRequest('PATCH', '/api/v2/chat/channels/{type}/{id}/member', pathParams, queryParams, body);
|
|
3357
3407
|
decoders.UpdateMemberPartialResponse?.(response.body);
|
|
3358
3408
|
return { ...response.body, metadata: response.metadata };
|
|
3359
3409
|
};
|
|
@@ -4139,6 +4189,8 @@ class ChatApi extends BaseApi {
|
|
|
4139
4189
|
prev: request?.prev,
|
|
4140
4190
|
reply_limit: request?.reply_limit,
|
|
4141
4191
|
user_id: request?.user_id,
|
|
4192
|
+
sort: request?.sort,
|
|
4193
|
+
filter: request?.filter,
|
|
4142
4194
|
user: request?.user,
|
|
4143
4195
|
};
|
|
4144
4196
|
const response = await this.sendRequest('POST', '/api/v2/chat/threads', undefined, undefined, body);
|