@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.
@@ -601,13 +601,15 @@ export class ChatApi extends BaseApi {
601
601
 
602
602
  updateMemberPartial = async (
603
603
  request: UpdateMemberPartialRequest & {
604
- user_id: string;
605
604
  type: string;
606
605
  id: string;
606
+ user_id?: string;
607
607
  },
608
608
  ): Promise<StreamResponse<UpdateMemberPartialResponse>> => {
609
- const pathParams = {
609
+ const queryParams = {
610
610
  user_id: request?.user_id,
611
+ };
612
+ const pathParams = {
611
613
  type: request?.type,
612
614
  id: request?.id,
613
615
  };
@@ -620,9 +622,9 @@ export class ChatApi extends BaseApi {
620
622
  StreamResponse<UpdateMemberPartialResponse>
621
623
  >(
622
624
  'PATCH',
623
- '/api/v2/chat/channels/{type}/{id}/member/{user_id}',
625
+ '/api/v2/chat/channels/{type}/{id}/member',
624
626
  pathParams,
625
- undefined,
627
+ queryParams,
626
628
  body,
627
629
  );
628
630
 
@@ -2083,6 +2085,8 @@ export class ChatApi extends BaseApi {
2083
2085
  prev: request?.prev,
2084
2086
  reply_limit: request?.reply_limit,
2085
2087
  user_id: request?.user_id,
2088
+ sort: request?.sort,
2089
+ filter: request?.filter,
2086
2090
  user: request?.user,
2087
2091
  };
2088
2092
 
@@ -484,6 +484,13 @@ decoders.ChannelTypeConfig = (input?: Record<string, any>) => {
484
484
  return decode(typeMappings, input);
485
485
  };
486
486
 
487
+ decoders.ChatActivityStatsResponse = (input?: Record<string, any>) => {
488
+ const typeMappings: TypeMapping = {
489
+ messages: { type: 'MessageStatsResponse', isSingle: true },
490
+ };
491
+ return decode(typeMappings, input);
492
+ };
493
+
487
494
  decoders.CheckResponse = (input?: Record<string, any>) => {
488
495
  const typeMappings: TypeMapping = {
489
496
  item: { type: 'ReviewQueueItem', isSingle: true },
@@ -509,6 +516,13 @@ decoders.ConfigResponse = (input?: Record<string, any>) => {
509
516
  return decode(typeMappings, input);
510
517
  };
511
518
 
519
+ decoders.CountByMinuteResponse = (input?: Record<string, any>) => {
520
+ const typeMappings: TypeMapping = {
521
+ start_ts: { type: 'DatetimeType', isSingle: true },
522
+ };
523
+ return decode(typeMappings, input);
524
+ };
525
+
512
526
  decoders.CreateBlockListResponse = (input?: Record<string, any>) => {
513
527
  const typeMappings: TypeMapping = {
514
528
  blocklist: { type: 'BlockListResponse', isSingle: true },
@@ -785,6 +799,13 @@ decoders.GetBlockedUsersResponse = (input?: Record<string, any>) => {
785
799
  return decode(typeMappings, input);
786
800
  };
787
801
 
802
+ decoders.GetCallReportResponse = (input?: Record<string, any>) => {
803
+ const typeMappings: TypeMapping = {
804
+ chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
805
+ };
806
+ return decode(typeMappings, input);
807
+ };
808
+
788
809
  decoders.GetCallResponse = (input?: Record<string, any>) => {
789
810
  const typeMappings: TypeMapping = {
790
811
  members: { type: 'MemberResponse', isSingle: false },
@@ -883,8 +904,6 @@ decoders.GetRepliesResponse = (input?: Record<string, any>) => {
883
904
 
884
905
  decoders.GetReviewQueueItemResponse = (input?: Record<string, any>) => {
885
906
  const typeMappings: TypeMapping = {
886
- history: { type: 'ReviewQueueItemResponse', isSingle: false },
887
-
888
907
  item: { type: 'ReviewQueueItemResponse', isSingle: true },
889
908
  };
890
909
  return decode(typeMappings, input);
@@ -1163,6 +1182,13 @@ decoders.MessageResponse = (input?: Record<string, any>) => {
1163
1182
  return decode(typeMappings, input);
1164
1183
  };
1165
1184
 
1185
+ decoders.MessageStatsResponse = (input?: Record<string, any>) => {
1186
+ const typeMappings: TypeMapping = {
1187
+ count_over_time: { type: 'CountByMinuteResponse', isSingle: false },
1188
+ };
1189
+ return decode(typeMappings, input);
1190
+ };
1191
+
1166
1192
  decoders.MessageWithChannelResponse = (input?: Record<string, any>) => {
1167
1193
  const typeMappings: TypeMapping = {
1168
1194
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1272,6 +1298,20 @@ decoders.OwnUserResponse = (input?: Record<string, any>) => {
1272
1298
  return decode(typeMappings, input);
1273
1299
  };
1274
1300
 
1301
+ decoders.ParticipantCountByMinuteResponse = (input?: Record<string, any>) => {
1302
+ const typeMappings: TypeMapping = {
1303
+ start_ts: { type: 'DatetimeType', isSingle: true },
1304
+ };
1305
+ return decode(typeMappings, input);
1306
+ };
1307
+
1308
+ decoders.ParticipantCountOverTimeResponse = (input?: Record<string, any>) => {
1309
+ const typeMappings: TypeMapping = {
1310
+ by_minute: { type: 'ParticipantCountByMinuteResponse', isSingle: false },
1311
+ };
1312
+ return decode(typeMappings, input);
1313
+ };
1314
+
1275
1315
  decoders.PendingMessageResponse = (input?: Record<string, any>) => {
1276
1316
  const typeMappings: TypeMapping = {
1277
1317
  channel: { type: 'ChannelResponse', isSingle: true },
@@ -1413,6 +1453,17 @@ decoders.QueryCallMembersResponse = (input?: Record<string, any>) => {
1413
1453
  return decode(typeMappings, input);
1414
1454
  };
1415
1455
 
1456
+ decoders.QueryCallParticipantsResponse = (input?: Record<string, any>) => {
1457
+ const typeMappings: TypeMapping = {
1458
+ members: { type: 'MemberResponse', isSingle: false },
1459
+
1460
+ participants: { type: 'CallParticipantResponse', isSingle: false },
1461
+
1462
+ call: { type: 'CallResponse', isSingle: true },
1463
+ };
1464
+ return decode(typeMappings, input);
1465
+ };
1466
+
1416
1467
  decoders.QueryCallStatsResponse = (input?: Record<string, any>) => {
1417
1468
  const typeMappings: TypeMapping = {
1418
1469
  reports: { type: 'CallStatsReportSummaryResponse', isSingle: false },