@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.
@@ -12,7 +12,6 @@ import {
12
12
  EndCallResponse,
13
13
  GetCallReportResponse,
14
14
  GetCallResponse,
15
- GetCallStatsResponse,
16
15
  GetOrCreateCallRequest,
17
16
  GetOrCreateCallResponse,
18
17
  GoLiveRequest,
@@ -23,6 +22,8 @@ import {
23
22
  MuteUsersResponse,
24
23
  PinRequest,
25
24
  PinResponse,
25
+ QueryCallParticipantsRequest,
26
+ QueryCallParticipantsResponse,
26
27
  SendCallEventRequest,
27
28
  SendCallEventResponse,
28
29
  StartClosedCaptionsRequest,
@@ -166,6 +167,16 @@ export class CallApi {
166
167
  });
167
168
  };
168
169
 
170
+ queryCallParticipants = (
171
+ request?: QueryCallParticipantsRequest & { limit?: number },
172
+ ): Promise<StreamResponse<QueryCallParticipantsResponse>> => {
173
+ return this.videoApi.queryCallParticipants({
174
+ id: this.id,
175
+ type: this.type,
176
+ ...request,
177
+ });
178
+ };
179
+
169
180
  videoPin = (request: PinRequest): Promise<StreamResponse<PinResponse>> => {
170
181
  return this.videoApi.videoPin({ id: this.id, type: this.type, ...request });
171
182
  };
@@ -259,16 +270,6 @@ export class CallApi {
259
270
  });
260
271
  };
261
272
 
262
- getCallStats = (request: {
263
- session: string;
264
- }): Promise<StreamResponse<GetCallStatsResponse>> => {
265
- return this.videoApi.getCallStats({
266
- id: this.id,
267
- type: this.type,
268
- ...request,
269
- });
270
- };
271
-
272
273
  stopHLSBroadcasting = (): Promise<
273
274
  StreamResponse<StopHLSBroadcastingResponse>
274
275
  > => {
@@ -14,7 +14,6 @@ import {
14
14
  EndCallResponse,
15
15
  GetCallReportResponse,
16
16
  GetCallResponse,
17
- GetCallStatsResponse,
18
17
  GetCallTypeResponse,
19
18
  GetEdgesResponse,
20
19
  GetOrCreateCallRequest,
@@ -32,6 +31,8 @@ import {
32
31
  QueryAggregateCallStatsResponse,
33
32
  QueryCallMembersRequest,
34
33
  QueryCallMembersResponse,
34
+ QueryCallParticipantsRequest,
35
+ QueryCallParticipantsResponse,
35
36
  QueryCallStatsRequest,
36
37
  QueryCallStatsResponse,
37
38
  QueryCallsRequest,
@@ -441,6 +442,39 @@ export class VideoApi extends BaseApi {
441
442
  return { ...response.body, metadata: response.metadata };
442
443
  };
443
444
 
445
+ queryCallParticipants = async (
446
+ request: QueryCallParticipantsRequest & {
447
+ id: string;
448
+ type: string;
449
+ limit?: number;
450
+ },
451
+ ): Promise<StreamResponse<QueryCallParticipantsResponse>> => {
452
+ const queryParams = {
453
+ limit: request?.limit,
454
+ };
455
+ const pathParams = {
456
+ id: request?.id,
457
+ type: request?.type,
458
+ };
459
+ const body = {
460
+ filter_conditions: request?.filter_conditions,
461
+ };
462
+
463
+ const response = await this.sendRequest<
464
+ StreamResponse<QueryCallParticipantsResponse>
465
+ >(
466
+ 'POST',
467
+ '/api/v2/video/call/{type}/{id}/participants',
468
+ pathParams,
469
+ queryParams,
470
+ body,
471
+ );
472
+
473
+ decoders.QueryCallParticipantsResponse?.(response.body);
474
+
475
+ return { ...response.body, metadata: response.metadata };
476
+ };
477
+
444
478
  videoPin = async (
445
479
  request: PinRequest & { type: string; id: string },
446
480
  ): Promise<StreamResponse<PinResponse>> => {
@@ -720,31 +754,6 @@ export class VideoApi extends BaseApi {
720
754
  return { ...response.body, metadata: response.metadata };
721
755
  };
722
756
 
723
- getCallStats = async (request: {
724
- type: string;
725
- id: string;
726
- session: string;
727
- }): Promise<StreamResponse<GetCallStatsResponse>> => {
728
- const pathParams = {
729
- type: request?.type,
730
- id: request?.id,
731
- session: request?.session,
732
- };
733
-
734
- const response = await this.sendRequest<
735
- StreamResponse<GetCallStatsResponse>
736
- >(
737
- 'GET',
738
- '/api/v2/video/call/{type}/{id}/stats/{session}',
739
- pathParams,
740
- undefined,
741
- );
742
-
743
- decoders.GetCallStatsResponse?.(response.body);
744
-
745
- return { ...response.body, metadata: response.metadata };
746
- };
747
-
748
757
  stopHLSBroadcasting = async (request: {
749
758
  type: string;
750
759
  id: string;