@stream-io/node-sdk 0.4.11 → 0.4.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.
@@ -195,10 +195,14 @@ export interface AppResponseFields {
195
195
 
196
196
  enforce_unique_usernames: string;
197
197
 
198
+ guest_user_creation_disabled: boolean;
199
+
198
200
  image_moderation_enabled: boolean;
199
201
 
200
202
  moderation_enabled: boolean;
201
203
 
204
+ moderation_multitenant_blocklist_enabled: boolean;
205
+
202
206
  moderation_webhook_url: string;
203
207
 
204
208
  multi_tenant_enabled: boolean;
@@ -543,6 +547,10 @@ export interface BlockListResponse {
543
547
 
544
548
  created_at?: Date;
545
549
 
550
+ id?: string;
551
+
552
+ team?: string;
553
+
546
554
  updated_at?: Date;
547
555
  }
548
556
 
@@ -556,6 +564,8 @@ export interface BlockListRule {
556
564
  | 'bounce_remove';
557
565
 
558
566
  name: string;
567
+
568
+ team: string;
559
569
  }
560
570
 
561
571
  export interface BlockUserRequest {
@@ -782,6 +792,62 @@ export interface CallEvent {
782
792
  issue_tags?: string[];
783
793
  }
784
794
 
795
+ export interface CallFrameRecordingFailedEvent {
796
+ call_cid: string;
797
+
798
+ created_at: Date;
799
+
800
+ egress_id: string;
801
+
802
+ call: CallResponse;
803
+
804
+ type: string;
805
+ }
806
+
807
+ export interface CallFrameRecordingFrameReadyEvent {
808
+ call_cid: string;
809
+
810
+ captured_at: Date;
811
+
812
+ created_at: Date;
813
+
814
+ egress_id: string;
815
+
816
+ session_id: string;
817
+
818
+ track_type: string;
819
+
820
+ url: string;
821
+
822
+ users: Record<string, UserResponse>;
823
+
824
+ type: string;
825
+ }
826
+
827
+ export interface CallFrameRecordingStartedEvent {
828
+ call_cid: string;
829
+
830
+ created_at: Date;
831
+
832
+ egress_id: string;
833
+
834
+ call: CallResponse;
835
+
836
+ type: string;
837
+ }
838
+
839
+ export interface CallFrameRecordingStoppedEvent {
840
+ call_cid: string;
841
+
842
+ created_at: Date;
843
+
844
+ egress_id: string;
845
+
846
+ call: CallResponse;
847
+
848
+ type: string;
849
+ }
850
+
785
851
  export interface CallHLSBroadcastingFailedEvent {
786
852
  call_cid: string;
787
853
 
@@ -797,6 +863,8 @@ export interface CallHLSBroadcastingStartedEvent {
797
863
 
798
864
  hls_playlist_url: string;
799
865
 
866
+ call: CallResponse;
867
+
800
868
  type: string;
801
869
  }
802
870
 
@@ -1203,6 +1271,8 @@ export interface CallSettings {
1203
1271
 
1204
1272
  broadcasting?: BroadcastSettings;
1205
1273
 
1274
+ frame_recording?: FrameRecordSettings;
1275
+
1206
1276
  geofencing?: GeofenceSettings;
1207
1277
 
1208
1278
  limits?: LimitsSettings;
@@ -1229,6 +1299,8 @@ export interface CallSettingsRequest {
1229
1299
 
1230
1300
  broadcasting?: BroadcastSettingsRequest;
1231
1301
 
1302
+ frame_recording?: FrameRecordingSettingsRequest;
1303
+
1232
1304
  geofencing?: GeofenceSettingsRequest;
1233
1305
 
1234
1306
  limits?: LimitsSettingsRequest;
@@ -1255,6 +1327,8 @@ export interface CallSettingsResponse {
1255
1327
 
1256
1328
  broadcasting: BroadcastSettingsResponse;
1257
1329
 
1330
+ frame_recording: FrameRecordingSettingsResponse;
1331
+
1258
1332
  geofencing: GeofenceSettingsResponse;
1259
1333
 
1260
1334
  limits: LimitsSettingsResponse;
@@ -1940,6 +2014,7 @@ export const ChannelOwnCapability = {
1940
2014
  SEND_POLL: 'send-poll',
1941
2015
  SEND_REACTION: 'send-reaction',
1942
2016
  SEND_REPLY: 'send-reply',
2017
+ SEND_RESTRICTED_VISIBILITY_MESSAGE: 'send-restricted-visibility-message',
1943
2018
  SEND_TYPING_EVENTS: 'send-typing-events',
1944
2019
  SET_CHANNEL_COOLDOWN: 'set-channel-cooldown',
1945
2020
  SKIP_SLOW_MODE: 'skip-slow-mode',
@@ -2262,6 +2337,8 @@ export interface CheckRequest {
2262
2337
 
2263
2338
  entity_type: string;
2264
2339
 
2340
+ config_team?: string;
2341
+
2265
2342
  test_mode?: boolean;
2266
2343
 
2267
2344
  user_id?: string;
@@ -2346,10 +2423,10 @@ export interface CollectUserFeedbackRequest {
2346
2423
 
2347
2424
  sdk_version: string;
2348
2425
 
2349
- user_session_id: string;
2350
-
2351
2426
  reason?: string;
2352
2427
 
2428
+ user_session_id?: string;
2429
+
2353
2430
  custom?: Record<string, any>;
2354
2431
  }
2355
2432
 
@@ -2442,9 +2519,17 @@ export interface CreateBlockListRequest {
2442
2519
 
2443
2520
  words: string[];
2444
2521
 
2522
+ team?: string;
2523
+
2445
2524
  type?: 'regex' | 'domain' | 'email' | 'word';
2446
2525
  }
2447
2526
 
2527
+ export interface CreateBlockListResponse {
2528
+ duration: string;
2529
+
2530
+ blocklist?: BlockListResponse;
2531
+ }
2532
+
2448
2533
  export interface CreateCallTypeRequest {
2449
2534
  name: string;
2450
2535
 
@@ -3084,6 +3169,8 @@ export interface EgressResponse {
3084
3169
 
3085
3170
  rtmps: EgressRTMPResponse[];
3086
3171
 
3172
+ frame_recording?: FrameRecordingResponse;
3173
+
3087
3174
  hls?: EgressHLSResponse;
3088
3175
  }
3089
3176
 
@@ -3551,6 +3638,34 @@ export interface FlagUpdatedEvent {
3551
3638
  user?: UserResponse;
3552
3639
  }
3553
3640
 
3641
+ export interface FrameRecordSettings {
3642
+ capture_interval_in_seconds: number;
3643
+
3644
+ mode: 'available' | 'disabled' | 'auto-on';
3645
+
3646
+ quality?: string;
3647
+ }
3648
+
3649
+ export interface FrameRecordingResponse {
3650
+ status: string;
3651
+ }
3652
+
3653
+ export interface FrameRecordingSettingsRequest {
3654
+ capture_interval_in_seconds: number;
3655
+
3656
+ mode: 'available' | 'disabled' | 'auto-on';
3657
+
3658
+ quality?: '360p' | '480p' | '720p' | '1080p' | '1440p';
3659
+ }
3660
+
3661
+ export interface FrameRecordingSettingsResponse {
3662
+ capture_interval_in_seconds: number;
3663
+
3664
+ mode: 'available' | 'disabled' | 'auto-on';
3665
+
3666
+ quality?: string;
3667
+ }
3668
+
3554
3669
  export interface FullUserResponse {
3555
3670
  banned: boolean;
3556
3671
 
@@ -3889,6 +4004,18 @@ export interface GetMessageResponse {
3889
4004
  pending_message_metadata?: Record<string, string>;
3890
4005
  }
3891
4006
 
4007
+ export interface GetModerationAnalyticsRequest {
4008
+ end_date?: string;
4009
+
4010
+ start_date?: string;
4011
+ }
4012
+
4013
+ export interface GetModerationAnalyticsResponse {
4014
+ duration: string;
4015
+
4016
+ analytics?: ModerationAnalytics;
4017
+ }
4018
+
3892
4019
  export interface GetOGResponse {
3893
4020
  duration: string;
3894
4021
 
@@ -4524,6 +4651,8 @@ export interface Message {
4524
4651
 
4525
4652
  own_reactions: Reaction[];
4526
4653
 
4654
+ restricted_visibility: string[];
4655
+
4527
4656
  custom: Record<string, any>;
4528
4657
 
4529
4658
  reaction_counts: Record<string, number>;
@@ -4786,6 +4915,8 @@ export interface MessageRequest {
4786
4915
 
4787
4916
  mentioned_users?: string[];
4788
4917
 
4918
+ restricted_visibility?: string[];
4919
+
4789
4920
  custom?: Record<string, any>;
4790
4921
 
4791
4922
  user?: UserRequest;
@@ -4824,6 +4955,8 @@ export interface MessageResponse {
4824
4955
 
4825
4956
  own_reactions: ReactionResponse[];
4826
4957
 
4958
+ restricted_visibility: string[];
4959
+
4827
4960
  custom: Record<string, any>;
4828
4961
 
4829
4962
  reaction_counts: Record<string, number>;
@@ -4962,6 +5095,8 @@ export interface MessageWithChannelResponse {
4962
5095
 
4963
5096
  own_reactions: ReactionResponse[];
4964
5097
 
5098
+ restricted_visibility: string[];
5099
+
4965
5100
  channel: ChannelResponse;
4966
5101
 
4967
5102
  custom: Record<string, any>;
@@ -5023,6 +5158,36 @@ export interface ModerationActionConfig {
5023
5158
  custom: Record<string, any>;
5024
5159
  }
5025
5160
 
5161
+ export interface ModerationAnalytics {
5162
+ total_items_moderated: number;
5163
+
5164
+ ai_image_harms: Array<Record<string, any>>;
5165
+
5166
+ ai_text_harms: Array<Record<string, any>>;
5167
+
5168
+ ai_video_harms: Array<Record<string, any>>;
5169
+
5170
+ blocklist_by_list: Array<Record<string, any>>;
5171
+
5172
+ blocklist_matches: Array<Record<string, any>>;
5173
+
5174
+ model_accuracy: Array<Record<string, any>>;
5175
+
5176
+ moderator_actions: Array<Record<string, any>>;
5177
+
5178
+ moderator_productivity: Array<Record<string, any>>;
5179
+
5180
+ semantic_filter_top_matches: Array<Record<string, any>>;
5181
+
5182
+ sla_metrics: Array<Record<string, any>>;
5183
+
5184
+ usage_metrics: Array<Record<string, any>>;
5185
+
5186
+ action_distribution_over_time: Record<string, Record<string, any>>;
5187
+
5188
+ detection_by_engine_over_time: Record<string, Record<string, any>>;
5189
+ }
5190
+
5026
5191
  export interface ModerationCustomActionEvent {
5027
5192
  created_at: Date;
5028
5193
 
@@ -5294,10 +5459,12 @@ export const OwnCapability = {
5294
5459
  SEND_VIDEO: 'send-video',
5295
5460
  START_BROADCAST_CALL: 'start-broadcast-call',
5296
5461
  START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
5462
+ START_FRAME_RECORD_CALL: 'start-frame-record-call',
5297
5463
  START_RECORD_CALL: 'start-record-call',
5298
5464
  START_TRANSCRIPTION_CALL: 'start-transcription-call',
5299
5465
  STOP_BROADCAST_CALL: 'stop-broadcast-call',
5300
5466
  STOP_CLOSED_CAPTIONS_CALL: 'stop-closed-captions-call',
5467
+ STOP_FRAME_RECORD_CALL: 'stop-frame-record-call',
5301
5468
  STOP_RECORD_CALL: 'stop-record-call',
5302
5469
  STOP_TRANSCRIPTION_CALL: 'stop-transcription-call',
5303
5470
  UPDATE_CALL: 'update-call',
@@ -6746,8 +6913,6 @@ export interface ReportByHistogramBucket {
6746
6913
 
6747
6914
  count: number;
6748
6915
 
6749
- mean: number;
6750
-
6751
6916
  sum: number;
6752
6917
 
6753
6918
  lower_bound?: Bound;
@@ -6774,6 +6939,8 @@ export interface RestoreUsersRequest {
6774
6939
  }
6775
6940
 
6776
6941
  export interface ReviewQueueItem {
6942
+ ai_text_severity: string;
6943
+
6777
6944
  bounce_count: number;
6778
6945
 
6779
6946
  content_changed: boolean;
@@ -6830,6 +6997,8 @@ export interface ReviewQueueItem {
6830
6997
  }
6831
6998
 
6832
6999
  export interface ReviewQueueItemResponse {
7000
+ ai_text_severity: string;
7001
+
6833
7002
  created_at: Date;
6834
7003
 
6835
7004
  entity_id: string;
@@ -6862,6 +7031,8 @@ export interface ReviewQueueItemResponse {
6862
7031
 
6863
7032
  reviewed_at?: Date;
6864
7033
 
7034
+ teams?: string[];
7035
+
6865
7036
  assigned_to?: UserResponse;
6866
7037
 
6867
7038
  entity_creator?: EntityCreatorResponse;
@@ -7026,6 +7197,8 @@ export interface SearchResultMessage {
7026
7197
 
7027
7198
  own_reactions: ReactionResponse[];
7028
7199
 
7200
+ restricted_visibility: string[];
7201
+
7029
7202
  custom: Record<string, any>;
7030
7203
 
7031
7204
  reaction_counts: Record<string, number>;
@@ -7255,6 +7428,14 @@ export interface StartClosedCaptionsResponse {
7255
7428
  duration: string;
7256
7429
  }
7257
7430
 
7431
+ export interface StartFrameRecordingRequest {
7432
+ recording_external_storage?: string;
7433
+ }
7434
+
7435
+ export interface StartFrameRecordingResponse {
7436
+ duration: string;
7437
+ }
7438
+
7258
7439
  export interface StartHLSBroadcastingRequest {}
7259
7440
 
7260
7441
  export interface StartHLSBroadcastingResponse {
@@ -7307,6 +7488,12 @@ export interface StopClosedCaptionsResponse {
7307
7488
  duration: string;
7308
7489
  }
7309
7490
 
7491
+ export interface StopFrameRecordingRequest {}
7492
+
7493
+ export interface StopFrameRecordingResponse {
7494
+ duration: string;
7495
+ }
7496
+
7310
7497
  export interface StopHLSBroadcastingRequest {}
7311
7498
 
7312
7499
  export interface StopHLSBroadcastingResponse {
@@ -7921,6 +8108,8 @@ export interface UpdateAppRequest {
7921
8108
 
7922
8109
  feeds_v2_region?: string;
7923
8110
 
8111
+ guest_user_creation_disabled?: boolean;
8112
+
7924
8113
  image_moderation_enabled?: boolean;
7925
8114
 
7926
8115
  migrate_permissions_to_v2?: boolean;
@@ -7985,9 +8174,17 @@ export interface UpdateAppRequest {
7985
8174
  }
7986
8175
 
7987
8176
  export interface UpdateBlockListRequest {
8177
+ team?: string;
8178
+
7988
8179
  words?: string[];
7989
8180
  }
7990
8181
 
8182
+ export interface UpdateBlockListResponse {
8183
+ duration: string;
8184
+
8185
+ blocklist?: BlockListResponse;
8186
+ }
8187
+
7991
8188
  export interface UpdateCallMembersRequest {
7992
8189
  remove_members?: string[];
7993
8190
 
@@ -12,6 +12,8 @@ import {
12
12
  FlagRequest,
13
13
  FlagResponse,
14
14
  GetConfigResponse,
15
+ GetModerationAnalyticsRequest,
16
+ GetModerationAnalyticsResponse,
15
17
  GetReviewQueueItemResponse,
16
18
  GetUserModerationReportResponse,
17
19
  ModeratorStatsResponse,
@@ -41,6 +43,23 @@ import {
41
43
  import { decoders } from '../model-decoders';
42
44
 
43
45
  export class ModerationApi extends BaseApi {
46
+ getModerationAnalytics = async (
47
+ request?: GetModerationAnalyticsRequest,
48
+ ): Promise<StreamResponse<GetModerationAnalyticsResponse>> => {
49
+ const body = {
50
+ end_date: request?.end_date,
51
+ start_date: request?.start_date,
52
+ };
53
+
54
+ const response = await this.sendRequest<
55
+ StreamResponse<GetModerationAnalyticsResponse>
56
+ >('POST', '/api/v2/moderation/analytics', undefined, undefined, body);
57
+
58
+ decoders.GetModerationAnalyticsResponse?.(response.body);
59
+
60
+ return { ...response.body, metadata: response.metadata };
61
+ };
62
+
44
63
  ban = async (request: BanRequest): Promise<StreamResponse<BanResponse>> => {
45
64
  const body = {
46
65
  target_user_id: request?.target_user_id,
@@ -74,6 +93,7 @@ export class ModerationApi extends BaseApi {
74
93
  entity_creator_id: request?.entity_creator_id,
75
94
  entity_id: request?.entity_id,
76
95
  entity_type: request?.entity_type,
96
+ config_team: request?.config_team,
77
97
  test_mode: request?.test_mode,
78
98
  user_id: request?.user_id,
79
99
  moderation_payload: request?.moderation_payload,
@@ -27,6 +27,8 @@ import {
27
27
  SendCallEventResponse,
28
28
  StartClosedCaptionsRequest,
29
29
  StartClosedCaptionsResponse,
30
+ StartFrameRecordingRequest,
31
+ StartFrameRecordingResponse,
30
32
  StartHLSBroadcastingResponse,
31
33
  StartRTMPBroadcastsRequest,
32
34
  StartRTMPBroadcastsResponse,
@@ -37,6 +39,7 @@ import {
37
39
  StopAllRTMPBroadcastsResponse,
38
40
  StopClosedCaptionsRequest,
39
41
  StopClosedCaptionsResponse,
42
+ StopFrameRecordingResponse,
40
43
  StopHLSBroadcastingResponse,
41
44
  StopLiveRequest,
42
45
  StopLiveResponse,
@@ -124,7 +127,7 @@ export class CallApi {
124
127
  };
125
128
 
126
129
  collectUserFeedback = (
127
- request: CollectUserFeedbackRequest & { session: string },
130
+ request: CollectUserFeedbackRequest,
128
131
  ): Promise<StreamResponse<CollectUserFeedbackResponse>> => {
129
132
  return this.videoApi.collectUserFeedback({
130
133
  id: this.id,
@@ -226,6 +229,16 @@ export class CallApi {
226
229
  });
227
230
  };
228
231
 
232
+ startFrameRecording = (
233
+ request?: StartFrameRecordingRequest,
234
+ ): Promise<StreamResponse<StartFrameRecordingResponse>> => {
235
+ return this.videoApi.startFrameRecording({
236
+ id: this.id,
237
+ type: this.type,
238
+ ...request,
239
+ });
240
+ };
241
+
229
242
  startRecording = (
230
243
  request?: StartRecordingRequest,
231
244
  ): Promise<StreamResponse<StartRecordingResponse>> => {
@@ -272,6 +285,12 @@ export class CallApi {
272
285
  });
273
286
  };
274
287
 
288
+ stopFrameRecording = (): Promise<
289
+ StreamResponse<StopFrameRecordingResponse>
290
+ > => {
291
+ return this.videoApi.stopFrameRecording({ id: this.id, type: this.type });
292
+ };
293
+
275
294
  stopLive = (
276
295
  request?: StopLiveRequest,
277
296
  ): Promise<StreamResponse<StopLiveResponse>> => {
@@ -43,6 +43,8 @@ import {
43
43
  SendCallEventResponse,
44
44
  StartClosedCaptionsRequest,
45
45
  StartClosedCaptionsResponse,
46
+ StartFrameRecordingRequest,
47
+ StartFrameRecordingResponse,
46
48
  StartHLSBroadcastingResponse,
47
49
  StartRTMPBroadcastsRequest,
48
50
  StartRTMPBroadcastsResponse,
@@ -53,6 +55,7 @@ import {
53
55
  StopAllRTMPBroadcastsResponse,
54
56
  StopClosedCaptionsRequest,
55
57
  StopClosedCaptionsResponse,
58
+ StopFrameRecordingResponse,
56
59
  StopHLSBroadcastingResponse,
57
60
  StopLiveRequest,
58
61
  StopLiveResponse,
@@ -300,23 +303,18 @@ export class VideoApi extends BaseApi {
300
303
  };
301
304
 
302
305
  collectUserFeedback = async (
303
- request: CollectUserFeedbackRequest & {
304
- type: string;
305
- id: string;
306
- session: string;
307
- },
306
+ request: CollectUserFeedbackRequest & { type: string; id: string },
308
307
  ): Promise<StreamResponse<CollectUserFeedbackResponse>> => {
309
308
  const pathParams = {
310
309
  type: request?.type,
311
310
  id: request?.id,
312
- session: request?.session,
313
311
  };
314
312
  const body = {
315
313
  rating: request?.rating,
316
314
  sdk: request?.sdk,
317
315
  sdk_version: request?.sdk_version,
318
- user_session_id: request?.user_session_id,
319
316
  reason: request?.reason,
317
+ user_session_id: request?.user_session_id,
320
318
  custom: request?.custom,
321
319
  };
322
320
 
@@ -324,7 +322,7 @@ export class VideoApi extends BaseApi {
324
322
  StreamResponse<CollectUserFeedbackResponse>
325
323
  >(
326
324
  'POST',
327
- '/api/v2/video/call/{type}/{id}/feedback/{session}',
325
+ '/api/v2/video/call/{type}/{id}/feedback',
328
326
  pathParams,
329
327
  undefined,
330
328
  body,
@@ -643,6 +641,32 @@ export class VideoApi extends BaseApi {
643
641
  return { ...response.body, metadata: response.metadata };
644
642
  };
645
643
 
644
+ startFrameRecording = async (
645
+ request: StartFrameRecordingRequest & { type: string; id: string },
646
+ ): Promise<StreamResponse<StartFrameRecordingResponse>> => {
647
+ const pathParams = {
648
+ type: request?.type,
649
+ id: request?.id,
650
+ };
651
+ const body = {
652
+ recording_external_storage: request?.recording_external_storage,
653
+ };
654
+
655
+ const response = await this.sendRequest<
656
+ StreamResponse<StartFrameRecordingResponse>
657
+ >(
658
+ 'POST',
659
+ '/api/v2/video/call/{type}/{id}/start_frame_recording',
660
+ pathParams,
661
+ undefined,
662
+ body,
663
+ );
664
+
665
+ decoders.StartFrameRecordingResponse?.(response.body);
666
+
667
+ return { ...response.body, metadata: response.metadata };
668
+ };
669
+
646
670
  startRecording = async (
647
671
  request: StartRecordingRequest & { type: string; id: string },
648
672
  ): Promise<StreamResponse<StartRecordingResponse>> => {
@@ -771,6 +795,29 @@ export class VideoApi extends BaseApi {
771
795
  return { ...response.body, metadata: response.metadata };
772
796
  };
773
797
 
798
+ stopFrameRecording = async (request: {
799
+ type: string;
800
+ id: string;
801
+ }): Promise<StreamResponse<StopFrameRecordingResponse>> => {
802
+ const pathParams = {
803
+ type: request?.type,
804
+ id: request?.id,
805
+ };
806
+
807
+ const response = await this.sendRequest<
808
+ StreamResponse<StopFrameRecordingResponse>
809
+ >(
810
+ 'POST',
811
+ '/api/v2/video/call/{type}/{id}/stop_frame_recording',
812
+ pathParams,
813
+ undefined,
814
+ );
815
+
816
+ decoders.StopFrameRecordingResponse?.(response.body);
817
+
818
+ return { ...response.body, metadata: response.metadata };
819
+ };
820
+
774
821
  stopLive = async (
775
822
  request: StopLiveRequest & { type: string; id: string },
776
823
  ): Promise<StreamResponse<StopLiveResponse>> => {