@stream-io/node-sdk 0.7.11 → 0.7.13

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.
@@ -14,6 +14,7 @@ import {
14
14
  GetActiveCallsStatusResponse,
15
15
  GetCallReportResponse,
16
16
  GetCallResponse,
17
+ GetCallSessionParticipantStatsDetailsResponse,
17
18
  GetCallTypeResponse,
18
19
  GetEdgesResponse,
19
20
  GetOrCreateCallRequest,
@@ -35,6 +36,8 @@ import {
35
36
  QueryCallMembersResponse,
36
37
  QueryCallParticipantsRequest,
37
38
  QueryCallParticipantsResponse,
39
+ QueryCallSessionParticipantStatsResponse,
40
+ QueryCallSessionParticipantStatsTimelineResponse,
38
41
  QueryCallStatsRequest,
39
42
  QueryCallStatsResponse,
40
43
  QueryCallsRequest,
@@ -46,6 +49,7 @@ import {
46
49
  SendCallEventResponse,
47
50
  SendClosedCaptionRequest,
48
51
  SendClosedCaptionResponse,
52
+ SortParamRequest,
49
53
  StartClosedCaptionsRequest,
50
54
  StartClosedCaptionsResponse,
51
55
  StartFrameRecordingRequest,
@@ -1208,6 +1212,113 @@ export class VideoApi {
1208
1212
  return { ...response.body, metadata: response.metadata };
1209
1213
  }
1210
1214
 
1215
+ async getCallSessionParticipantStatsDetails(request: {
1216
+ call_type: string;
1217
+ call_id: string;
1218
+ session: string;
1219
+ user: string;
1220
+ user_session: string;
1221
+ since?: string;
1222
+ until?: string;
1223
+ max_points?: number;
1224
+ }): Promise<StreamResponse<GetCallSessionParticipantStatsDetailsResponse>> {
1225
+ const queryParams = {
1226
+ since: request?.since,
1227
+ until: request?.until,
1228
+ max_points: request?.max_points,
1229
+ };
1230
+ const pathParams = {
1231
+ call_type: request?.call_type,
1232
+ call_id: request?.call_id,
1233
+ session: request?.session,
1234
+ user: request?.user,
1235
+ user_session: request?.user_session,
1236
+ };
1237
+
1238
+ const response = await this.apiClient.sendRequest<
1239
+ StreamResponse<GetCallSessionParticipantStatsDetailsResponse>
1240
+ >(
1241
+ 'GET',
1242
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participant/{user}/{user_session}/details',
1243
+ pathParams,
1244
+ queryParams,
1245
+ );
1246
+
1247
+ decoders.GetCallSessionParticipantStatsDetailsResponse?.(response.body);
1248
+
1249
+ return { ...response.body, metadata: response.metadata };
1250
+ }
1251
+
1252
+ async queryCallSessionParticipantStats(request: {
1253
+ call_type: string;
1254
+ call_id: string;
1255
+ session: string;
1256
+ sort?: SortParamRequest[];
1257
+ filter_conditions?: Record<string, any>;
1258
+ }): Promise<StreamResponse<QueryCallSessionParticipantStatsResponse>> {
1259
+ const queryParams = {
1260
+ sort: request?.sort,
1261
+ filter_conditions: request?.filter_conditions,
1262
+ };
1263
+ const pathParams = {
1264
+ call_type: request?.call_type,
1265
+ call_id: request?.call_id,
1266
+ session: request?.session,
1267
+ };
1268
+
1269
+ const response = await this.apiClient.sendRequest<
1270
+ StreamResponse<QueryCallSessionParticipantStatsResponse>
1271
+ >(
1272
+ 'GET',
1273
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants',
1274
+ pathParams,
1275
+ queryParams,
1276
+ );
1277
+
1278
+ decoders.QueryCallSessionParticipantStatsResponse?.(response.body);
1279
+
1280
+ return { ...response.body, metadata: response.metadata };
1281
+ }
1282
+
1283
+ async getCallSessionParticipantStatsTimeline(request: {
1284
+ call_type: string;
1285
+ call_id: string;
1286
+ session: string;
1287
+ user: string;
1288
+ user_session: string;
1289
+ start_time?: string;
1290
+ end_time?: string;
1291
+ severity?: string[];
1292
+ }): Promise<
1293
+ StreamResponse<QueryCallSessionParticipantStatsTimelineResponse>
1294
+ > {
1295
+ const queryParams = {
1296
+ start_time: request?.start_time,
1297
+ end_time: request?.end_time,
1298
+ severity: request?.severity,
1299
+ };
1300
+ const pathParams = {
1301
+ call_type: request?.call_type,
1302
+ call_id: request?.call_id,
1303
+ session: request?.session,
1304
+ user: request?.user,
1305
+ user_session: request?.user_session,
1306
+ };
1307
+
1308
+ const response = await this.apiClient.sendRequest<
1309
+ StreamResponse<QueryCallSessionParticipantStatsTimelineResponse>
1310
+ >(
1311
+ 'GET',
1312
+ '/api/v2/video/call_stats/{call_type}/{call_id}/{session}/participants/{user}/{user_session}/timeline',
1313
+ pathParams,
1314
+ queryParams,
1315
+ );
1316
+
1317
+ decoders.QueryCallSessionParticipantStatsTimelineResponse?.(response.body);
1318
+
1319
+ return { ...response.body, metadata: response.metadata };
1320
+ }
1321
+
1211
1322
  async queryCalls(
1212
1323
  request?: QueryCallsRequest,
1213
1324
  ): Promise<StreamResponse<QueryCallsResponse>> {