@stream-io/node-sdk 0.3.1 → 0.4.1

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.
Files changed (69) hide show
  1. package/dist/index.cjs.js +4136 -9282
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +2 -3
  4. package/dist/index.es.js +4136 -9206
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/src/BaseApi.d.ts +10 -0
  7. package/dist/src/StreamCall.d.ts +5 -37
  8. package/dist/src/StreamChannel.d.ts +7 -34
  9. package/dist/src/StreamChatClient.d.ts +2 -25
  10. package/dist/src/StreamClient.d.ts +51 -59
  11. package/dist/src/StreamModerationClient.d.ts +3 -0
  12. package/dist/src/StreamVideoClient.d.ts +2 -18
  13. package/dist/src/gen/chat/ChannelApi.d.ts +33 -0
  14. package/dist/src/gen/chat/ChatApi.d.ts +241 -0
  15. package/dist/src/gen/common/CommonApi.d.ts +99 -0
  16. package/dist/src/gen/model-decoders/index.d.ts +3 -0
  17. package/dist/src/gen/models/index.d.ts +3881 -0
  18. package/dist/src/gen/moderation/ModerationApi.d.ts +38 -0
  19. package/dist/src/gen/video/CallApi.d.ts +56 -0
  20. package/dist/src/gen/video/VideoApi.d.ts +151 -0
  21. package/dist/src/types.d.ts +25 -0
  22. package/dist/src/utils/create-token.d.ts +2 -0
  23. package/dist/src/utils/rate-limit.d.ts +2 -0
  24. package/index.ts +2 -3
  25. package/package.json +5 -4
  26. package/src/BaseApi.ts +115 -0
  27. package/src/StreamCall.ts +9 -199
  28. package/src/StreamChannel.ts +23 -246
  29. package/src/StreamChatClient.ts +3 -122
  30. package/src/StreamClient.ts +101 -345
  31. package/src/StreamModerationClient.ts +3 -0
  32. package/src/StreamVideoClient.ts +3 -95
  33. package/src/gen/chat/ChannelApi.ts +270 -0
  34. package/src/gen/chat/ChatApi.ts +1857 -0
  35. package/src/gen/common/CommonApi.ts +1004 -0
  36. package/src/gen/model-decoders/index.ts +1897 -0
  37. package/src/gen/models/index.ts +6794 -0
  38. package/src/gen/moderation/ModerationApi.ts +476 -0
  39. package/src/gen/video/CallApi.ts +309 -0
  40. package/src/gen/video/VideoApi.ts +1007 -0
  41. package/src/types.ts +35 -0
  42. package/src/utils/create-token.ts +6 -1
  43. package/src/utils/rate-limit.ts +21 -0
  44. package/dist/src/gen/chat/apis/ProductchatApi.d.ts +0 -1750
  45. package/dist/src/gen/chat/apis/index.d.ts +0 -1
  46. package/dist/src/gen/chat/index.d.ts +0 -3
  47. package/dist/src/gen/chat/models/index.d.ts +0 -14865
  48. package/dist/src/gen/chat/runtime.d.ts +0 -180
  49. package/dist/src/gen/video/apis/ProductvideoApi.d.ts +0 -648
  50. package/dist/src/gen/video/apis/index.d.ts +0 -1
  51. package/dist/src/gen/video/index.d.ts +0 -3
  52. package/dist/src/gen/video/models/index.d.ts +0 -5011
  53. package/dist/src/gen/video/runtime.d.ts +0 -180
  54. package/src/gen/chat/.openapi-generator/FILES +0 -6
  55. package/src/gen/chat/.openapi-generator/VERSION +0 -1
  56. package/src/gen/chat/.openapi-generator-ignore +0 -23
  57. package/src/gen/chat/apis/ProductchatApi.ts +0 -7007
  58. package/src/gen/chat/apis/index.ts +0 -3
  59. package/src/gen/chat/index.ts +0 -5
  60. package/src/gen/chat/models/index.ts +0 -14766
  61. package/src/gen/chat/runtime.ts +0 -415
  62. package/src/gen/video/.openapi-generator/FILES +0 -6
  63. package/src/gen/video/.openapi-generator/VERSION +0 -1
  64. package/src/gen/video/.openapi-generator-ignore +0 -23
  65. package/src/gen/video/apis/ProductvideoApi.ts +0 -2575
  66. package/src/gen/video/apis/index.ts +0 -3
  67. package/src/gen/video/index.ts +0 -5
  68. package/src/gen/video/models/index.ts +0 -5000
  69. package/src/gen/video/runtime.ts +0 -415
@@ -0,0 +1,3881 @@
1
+ export interface APIError {
2
+ code: number;
3
+ duration: string;
4
+ message: string;
5
+ more_info: string;
6
+ status_code: number;
7
+ details: number[];
8
+ unrecoverable?: boolean;
9
+ exception_fields?: Record<string, string>;
10
+ }
11
+ export interface APNConfig {
12
+ auth_key?: string;
13
+ auth_type?: 'certificate' | 'token';
14
+ bundle_id?: string;
15
+ development?: boolean;
16
+ disabled?: boolean;
17
+ host?: string;
18
+ key_id?: string;
19
+ notification_template?: string;
20
+ p12_cert?: string;
21
+ team_id?: string;
22
+ }
23
+ export interface APNConfigFields {
24
+ development: boolean;
25
+ enabled: boolean;
26
+ notification_template: string;
27
+ auth_key?: string;
28
+ auth_type?: string;
29
+ bundle_id?: string;
30
+ host?: string;
31
+ key_id?: string;
32
+ p12_cert?: string;
33
+ team_id?: string;
34
+ }
35
+ export interface APNS {
36
+ body: string;
37
+ title: string;
38
+ }
39
+ export interface AWSRekognitionConfig {
40
+ enabled?: boolean;
41
+ rules?: AWSRekognitionRule[];
42
+ }
43
+ export interface AWSRekognitionRule {
44
+ action: 'flag' | 'shadow' | 'remove';
45
+ label: string;
46
+ }
47
+ export interface Action {
48
+ name: string;
49
+ text: string;
50
+ type: string;
51
+ style?: string;
52
+ value?: string;
53
+ }
54
+ export interface ActionLog {
55
+ created_at: Date;
56
+ id: string;
57
+ reason: string;
58
+ review_queue_item_id: string;
59
+ target_user_id: string;
60
+ type: string;
61
+ custom: Record<string, any>;
62
+ review_queue_item?: ReviewQueueItem;
63
+ target_user?: UserObject;
64
+ user?: UserObject;
65
+ }
66
+ export interface ActionLogResponse {
67
+ created_at: Date;
68
+ id: string;
69
+ reason: string;
70
+ type: string;
71
+ custom: Record<string, any>;
72
+ review_queue_item?: ReviewQueueItem;
73
+ target_user?: UserResponse;
74
+ user?: UserResponse;
75
+ }
76
+ export interface AggregatedStats {
77
+ countrywise_aggregate_stats?: Record<string, CountrywiseAggregateStats>;
78
+ publisher_aggregate_stats?: PublisherAggregateStats;
79
+ turn?: TURNAggregatedStats;
80
+ }
81
+ export interface AppResponseFields {
82
+ async_url_enrich_enabled: boolean;
83
+ auto_translation_enabled: boolean;
84
+ campaign_enabled: boolean;
85
+ cdn_expiration_seconds: number;
86
+ custom_action_handler_url: string;
87
+ disable_auth_checks: boolean;
88
+ disable_permissions_checks: boolean;
89
+ enforce_unique_usernames: string;
90
+ image_moderation_enabled: boolean;
91
+ moderation_enabled: boolean;
92
+ moderation_webhook_url: string;
93
+ multi_tenant_enabled: boolean;
94
+ name: string;
95
+ organization: string;
96
+ permission_version: string;
97
+ reminders_interval: number;
98
+ sns_key: string;
99
+ sns_secret: string;
100
+ sns_topic_arn: string;
101
+ sqs_key: string;
102
+ sqs_secret: string;
103
+ sqs_url: string;
104
+ suspended: boolean;
105
+ suspended_explanation: string;
106
+ video_provider: string;
107
+ webhook_url: string;
108
+ user_search_disallowed_roles: string[];
109
+ webhook_events: string[];
110
+ call_types: Record<string, CallType>;
111
+ channel_configs: Record<string, ChannelConfig>;
112
+ file_upload_config: FileUploadConfig;
113
+ grants: Record<string, string[]>;
114
+ image_upload_config: FileUploadConfig;
115
+ policies: Record<string, Policy[]>;
116
+ push_notifications: PushNotificationFields;
117
+ before_message_send_hook_url?: string;
118
+ revoke_tokens_issued_before?: Date;
119
+ allowed_flag_reasons?: string[];
120
+ geofences?: GeofenceResponse[];
121
+ image_moderation_labels?: string[];
122
+ agora_options?: Config;
123
+ datadog_info?: DataDogInfo;
124
+ hms_options?: Config;
125
+ }
126
+ export interface AsyncModerationCallbackConfig {
127
+ mode?: 'CALLBACK_MODE_NONE' | 'CALLBACK_MODE_REST' | 'CALLBACK_MODE_TWIRP';
128
+ server_url?: string;
129
+ }
130
+ export interface AsyncModerationConfiguration {
131
+ timeout_ms?: number;
132
+ callback?: AsyncModerationCallbackConfig;
133
+ }
134
+ export interface Attachment {
135
+ custom: Record<string, any>;
136
+ asset_url?: string;
137
+ author_icon?: string;
138
+ author_link?: string;
139
+ author_name?: string;
140
+ color?: string;
141
+ fallback?: string;
142
+ footer?: string;
143
+ footer_icon?: string;
144
+ image_url?: string;
145
+ og_scrape_url?: string;
146
+ original_height?: number;
147
+ original_width?: number;
148
+ pretext?: string;
149
+ text?: string;
150
+ thumb_url?: string;
151
+ title?: string;
152
+ title_link?: string;
153
+ type?: string;
154
+ actions?: Action[];
155
+ fields?: Field[];
156
+ giphy?: Images;
157
+ }
158
+ export interface AudioSettings {
159
+ access_request_enabled: boolean;
160
+ default_device: 'speaker' | 'earpiece';
161
+ mic_default_on: boolean;
162
+ opus_dtx_enabled: boolean;
163
+ redundant_coding_enabled: boolean;
164
+ speaker_default_on: boolean;
165
+ noise_cancellation?: NoiseCancellationSettings;
166
+ }
167
+ export interface AudioSettingsRequest {
168
+ default_device: 'speaker' | 'earpiece';
169
+ access_request_enabled?: boolean;
170
+ mic_default_on?: boolean;
171
+ opus_dtx_enabled?: boolean;
172
+ redundant_coding_enabled?: boolean;
173
+ speaker_default_on?: boolean;
174
+ noise_cancellation?: NoiseCancellationSettings;
175
+ }
176
+ export interface AudioSettingsResponse {
177
+ access_request_enabled: boolean;
178
+ default_device: 'speaker' | 'earpiece';
179
+ mic_default_on: boolean;
180
+ opus_dtx_enabled: boolean;
181
+ redundant_coding_enabled: boolean;
182
+ speaker_default_on: boolean;
183
+ noise_cancellation?: NoiseCancellationSettings;
184
+ }
185
+ export interface AutomodDetails {
186
+ action?: string;
187
+ original_message_type?: string;
188
+ image_labels?: string[];
189
+ message_details?: FlagMessageDetails;
190
+ result?: MessageModerationResult;
191
+ }
192
+ export interface AutomodPlatformCircumventionConfig {
193
+ enabled?: boolean;
194
+ rules?: AutomodRule[];
195
+ }
196
+ export interface AutomodRule {
197
+ action: 'flag' | 'shadow' | 'remove';
198
+ label: string;
199
+ threshold: number;
200
+ }
201
+ export interface AutomodSemanticFiltersConfig {
202
+ enabled?: boolean;
203
+ rules?: AutomodSemanticFiltersRule[];
204
+ }
205
+ export interface AutomodSemanticFiltersRule {
206
+ action: 'flag' | 'shadow' | 'remove';
207
+ name: string;
208
+ threshold: number;
209
+ }
210
+ export interface AutomodToxicityConfig {
211
+ enabled?: boolean;
212
+ rules?: AutomodRule[];
213
+ }
214
+ export interface AzureRequest {
215
+ abs_account_name: string;
216
+ abs_client_id: string;
217
+ abs_client_secret: string;
218
+ abs_tenant_id: string;
219
+ }
220
+ export interface BackstageSettings {
221
+ enabled: boolean;
222
+ join_ahead_time_seconds?: number;
223
+ }
224
+ export interface BackstageSettingsRequest {
225
+ enabled?: boolean;
226
+ join_ahead_time_seconds?: number;
227
+ }
228
+ export interface BackstageSettingsResponse {
229
+ enabled: boolean;
230
+ join_ahead_time_seconds?: number;
231
+ }
232
+ export interface Ban {
233
+ created_at: Date;
234
+ shadow: boolean;
235
+ expires?: Date;
236
+ reason?: string;
237
+ channel?: Channel;
238
+ created_by?: UserObject;
239
+ target?: UserObject;
240
+ }
241
+ export interface BanActionRequest {
242
+ channel_ban_only?: boolean;
243
+ reason?: string;
244
+ shadow?: boolean;
245
+ timeout?: number;
246
+ }
247
+ export interface BanRequest {
248
+ target_user_id: string;
249
+ banned_by_id?: string;
250
+ channel_cid?: string;
251
+ ip_ban?: boolean;
252
+ reason?: string;
253
+ shadow?: boolean;
254
+ timeout?: number;
255
+ banned_by?: UserRequest;
256
+ }
257
+ export interface BanResponse {
258
+ created_at: Date;
259
+ expires?: Date;
260
+ reason?: string;
261
+ shadow?: boolean;
262
+ banned_by?: UserResponse;
263
+ channel?: ChannelResponse;
264
+ user?: UserResponse;
265
+ }
266
+ export interface BlockListConfig {
267
+ enabled?: boolean;
268
+ rules?: BlockListRule[];
269
+ }
270
+ export interface BlockListOptions {
271
+ behavior: 'flag' | 'block' | 'shadow_block';
272
+ blocklist: string;
273
+ }
274
+ export interface BlockListResponse {
275
+ name: string;
276
+ type: string;
277
+ words: string[];
278
+ created_at?: Date;
279
+ updated_at?: Date;
280
+ }
281
+ export interface BlockListRule {
282
+ action: 'flag' | 'shadow' | 'remove';
283
+ name: string;
284
+ }
285
+ export interface BlockUserRequest {
286
+ user_id: string;
287
+ }
288
+ export interface BlockUserResponse {
289
+ duration: string;
290
+ }
291
+ export interface BlockUsersRequest {
292
+ blocked_user_id: string;
293
+ user_id?: string;
294
+ user?: UserRequest;
295
+ }
296
+ export interface BlockUsersResponse {
297
+ blocked_by_user_id: string;
298
+ blocked_user_id: string;
299
+ created_at: Date;
300
+ duration: string;
301
+ }
302
+ export interface BlockedUserResponse {
303
+ blocked_user_id: string;
304
+ created_at: Date;
305
+ user_id: string;
306
+ blocked_user: UserResponse;
307
+ user: UserResponse;
308
+ }
309
+ export interface BodyguardConfig {
310
+ enabled?: boolean;
311
+ profile?: string;
312
+ rules?: BodyguardRule[];
313
+ severity_rules?: BodyguardSeverityRule[];
314
+ }
315
+ export interface BodyguardRule {
316
+ action: 'flag' | 'shadow' | 'remove';
317
+ label: string;
318
+ }
319
+ export interface BodyguardSeverityRule {
320
+ action: 'flag' | 'shadow' | 'remove';
321
+ severity: 'low' | 'medium' | 'high' | 'critical';
322
+ }
323
+ export interface BroadcastSettings {
324
+ enabled: boolean;
325
+ hls?: HLSSettings;
326
+ rtmp?: RTMPSettings;
327
+ }
328
+ export interface BroadcastSettingsRequest {
329
+ enabled?: boolean;
330
+ hls?: HLSSettingsRequest;
331
+ rtmp?: RTMPSettingsRequest;
332
+ }
333
+ export interface BroadcastSettingsResponse {
334
+ enabled: boolean;
335
+ hls: HLSSettingsResponse;
336
+ rtmp: RTMPSettingsResponse;
337
+ }
338
+ export interface CallEvent {
339
+ description: string;
340
+ end_timestamp: number;
341
+ severity: number;
342
+ timestamp: number;
343
+ type: string;
344
+ component?: string;
345
+ additional?: Record<string, any>;
346
+ }
347
+ export interface CallIngressResponse {
348
+ rtmp: RTMPIngress;
349
+ }
350
+ export interface CallParticipantResponse {
351
+ joined_at: Date;
352
+ role: string;
353
+ user_session_id: string;
354
+ user: UserResponse;
355
+ }
356
+ export interface CallRecording {
357
+ end_time: Date;
358
+ filename: string;
359
+ start_time: Date;
360
+ url: string;
361
+ }
362
+ export interface CallRequest {
363
+ created_by_id?: string;
364
+ starts_at?: Date;
365
+ team?: string;
366
+ video?: boolean;
367
+ members?: MemberRequest[];
368
+ created_by?: UserRequest;
369
+ custom?: Record<string, any>;
370
+ settings_override?: CallSettingsRequest;
371
+ }
372
+ export interface CallResponse {
373
+ backstage: boolean;
374
+ cid: string;
375
+ created_at: Date;
376
+ current_session_id: string;
377
+ id: string;
378
+ recording: boolean;
379
+ transcribing: boolean;
380
+ type: string;
381
+ updated_at: Date;
382
+ blocked_user_ids: string[];
383
+ created_by: UserResponse;
384
+ custom: Record<string, any>;
385
+ egress: EgressResponse;
386
+ ingress: CallIngressResponse;
387
+ settings: CallSettingsResponse;
388
+ ended_at?: Date;
389
+ join_ahead_time_seconds?: number;
390
+ starts_at?: Date;
391
+ team?: string;
392
+ session?: CallSessionResponse;
393
+ thumbnails?: ThumbnailResponse;
394
+ }
395
+ export interface CallSessionResponse {
396
+ anonymous_participant_count: number;
397
+ id: string;
398
+ participants: CallParticipantResponse[];
399
+ accepted_by: Record<string, Date>;
400
+ missed_by: Record<string, Date>;
401
+ participants_count_by_role: Record<string, number>;
402
+ rejected_by: Record<string, Date>;
403
+ ended_at?: Date;
404
+ live_ended_at?: Date;
405
+ live_started_at?: Date;
406
+ started_at?: Date;
407
+ timer_ends_at?: Date;
408
+ }
409
+ export interface CallSettings {
410
+ audio?: AudioSettings;
411
+ backstage?: BackstageSettings;
412
+ broadcasting?: BroadcastSettings;
413
+ geofencing?: GeofenceSettings;
414
+ limits?: LimitsSettings;
415
+ recording?: RecordSettings;
416
+ ring?: RingSettings;
417
+ screensharing?: ScreensharingSettings;
418
+ thumbnails?: ThumbnailsSettings;
419
+ transcription?: TranscriptionSettings;
420
+ video?: VideoSettings;
421
+ }
422
+ export interface CallSettingsRequest {
423
+ audio?: AudioSettingsRequest;
424
+ backstage?: BackstageSettingsRequest;
425
+ broadcasting?: BroadcastSettingsRequest;
426
+ geofencing?: GeofenceSettingsRequest;
427
+ limits?: LimitsSettingsRequest;
428
+ recording?: RecordSettingsRequest;
429
+ ring?: RingSettingsRequest;
430
+ screensharing?: ScreensharingSettingsRequest;
431
+ thumbnails?: ThumbnailsSettingsRequest;
432
+ transcription?: TranscriptionSettingsRequest;
433
+ video?: VideoSettingsRequest;
434
+ }
435
+ export interface CallSettingsResponse {
436
+ audio: AudioSettingsResponse;
437
+ backstage: BackstageSettingsResponse;
438
+ broadcasting: BroadcastSettingsResponse;
439
+ geofencing: GeofenceSettingsResponse;
440
+ limits: LimitsSettingsResponse;
441
+ recording: RecordSettingsResponse;
442
+ ring: RingSettingsResponse;
443
+ screensharing: ScreensharingSettingsResponse;
444
+ thumbnails: ThumbnailsSettingsResponse;
445
+ transcription: TranscriptionSettingsResponse;
446
+ video: VideoSettingsResponse;
447
+ }
448
+ export interface CallStateResponseFields {
449
+ members: MemberResponse[];
450
+ own_capabilities: OwnCapability[];
451
+ call: CallResponse;
452
+ }
453
+ export interface CallStatsReportSummaryResponse {
454
+ call_cid: string;
455
+ call_duration_seconds: number;
456
+ call_session_id: string;
457
+ call_status: string;
458
+ first_stats_time: Date;
459
+ created_at?: Date;
460
+ quality_score?: number;
461
+ }
462
+ export interface CallTimeline {
463
+ events: CallEvent[];
464
+ }
465
+ export interface CallTranscription {
466
+ end_time: Date;
467
+ filename: string;
468
+ start_time: Date;
469
+ url: string;
470
+ }
471
+ export interface CallType {
472
+ app_pk: number;
473
+ created_at: Date;
474
+ external_storage: string;
475
+ name: string;
476
+ pk: number;
477
+ updated_at: Date;
478
+ notification_settings?: NotificationSettings;
479
+ settings?: CallSettings;
480
+ }
481
+ export interface CallTypeResponse {
482
+ created_at: Date;
483
+ name: string;
484
+ updated_at: Date;
485
+ grants: Record<string, string[]>;
486
+ notification_settings: NotificationSettings;
487
+ settings: CallSettingsResponse;
488
+ external_storage?: string;
489
+ }
490
+ export interface CastPollVoteRequest {
491
+ user_id?: string;
492
+ user?: UserRequest;
493
+ vote?: VoteData;
494
+ }
495
+ export interface Channel {
496
+ auto_translation_language: string;
497
+ cid: string;
498
+ created_at: Date;
499
+ disabled: boolean;
500
+ frozen: boolean;
501
+ id: string;
502
+ type: string;
503
+ updated_at: Date;
504
+ custom: Record<string, any>;
505
+ auto_translation_enabled?: boolean;
506
+ cooldown?: number;
507
+ deleted_at?: Date;
508
+ last_message_at?: Date;
509
+ member_count?: number;
510
+ team?: string;
511
+ invites?: ChannelMember[];
512
+ members?: ChannelMember[];
513
+ config?: ChannelConfig;
514
+ config_overrides?: ChannelConfig;
515
+ created_by?: UserObject;
516
+ truncated_by?: UserObject;
517
+ }
518
+ export interface ChannelConfig {
519
+ automod: 'disabled' | 'simple' | 'AI';
520
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
521
+ connect_events: boolean;
522
+ created_at: Date;
523
+ custom_events: boolean;
524
+ mark_messages_pending: boolean;
525
+ max_message_length: number;
526
+ mutes: boolean;
527
+ name: string;
528
+ polls: boolean;
529
+ push_notifications: boolean;
530
+ quotes: boolean;
531
+ reactions: boolean;
532
+ read_events: boolean;
533
+ reminders: boolean;
534
+ replies: boolean;
535
+ search: boolean;
536
+ typing_events: boolean;
537
+ updated_at: Date;
538
+ uploads: boolean;
539
+ url_enrichment: boolean;
540
+ commands: string[];
541
+ blocklist?: string;
542
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
543
+ allowed_flag_reasons?: string[];
544
+ blocklists?: BlockListOptions[];
545
+ automod_thresholds?: Thresholds;
546
+ }
547
+ export interface ChannelConfigWithInfo {
548
+ automod: 'disabled' | 'simple' | 'AI';
549
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
550
+ connect_events: boolean;
551
+ created_at: Date;
552
+ custom_events: boolean;
553
+ mark_messages_pending: boolean;
554
+ max_message_length: number;
555
+ mutes: boolean;
556
+ name: string;
557
+ polls: boolean;
558
+ push_notifications: boolean;
559
+ quotes: boolean;
560
+ reactions: boolean;
561
+ read_events: boolean;
562
+ reminders: boolean;
563
+ replies: boolean;
564
+ search: boolean;
565
+ typing_events: boolean;
566
+ updated_at: Date;
567
+ uploads: boolean;
568
+ url_enrichment: boolean;
569
+ commands: Command[];
570
+ blocklist?: string;
571
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
572
+ partition_size?: number;
573
+ partition_ttl?: number;
574
+ allowed_flag_reasons?: string[];
575
+ blocklists?: BlockListOptions[];
576
+ automod_thresholds?: Thresholds;
577
+ grants?: Record<string, string[]>;
578
+ }
579
+ export interface ChannelExport {
580
+ cid?: string;
581
+ id?: string;
582
+ messages_since?: Date;
583
+ messages_until?: Date;
584
+ type?: string;
585
+ }
586
+ export interface ChannelGetOrCreateRequest {
587
+ hide_for_creator?: boolean;
588
+ state?: boolean;
589
+ thread_unread_counts?: boolean;
590
+ data?: ChannelInput;
591
+ members?: PaginationParams;
592
+ messages?: MessagePaginationParams;
593
+ watchers?: PaginationParams;
594
+ }
595
+ export interface ChannelInput {
596
+ auto_translation_enabled?: boolean;
597
+ auto_translation_language?: string;
598
+ created_by_id?: string;
599
+ disabled?: boolean;
600
+ frozen?: boolean;
601
+ team?: string;
602
+ truncated_by_id?: string;
603
+ invites?: ChannelMember[];
604
+ members?: ChannelMember[];
605
+ config_overrides?: ChannelConfig;
606
+ created_by?: UserRequest;
607
+ custom?: Record<string, any>;
608
+ }
609
+ export interface ChannelMember {
610
+ banned: boolean;
611
+ channel_role: string;
612
+ created_at: Date;
613
+ notifications_muted: boolean;
614
+ shadow_banned: boolean;
615
+ updated_at: Date;
616
+ ban_expires?: Date;
617
+ deleted_at?: Date;
618
+ invite_accepted_at?: Date;
619
+ invite_rejected_at?: Date;
620
+ invited?: boolean;
621
+ is_moderator?: boolean;
622
+ status?: string;
623
+ user_id?: string;
624
+ user?: UserObject;
625
+ }
626
+ export interface ChannelMemberResponse {
627
+ banned: boolean;
628
+ channel_role: string;
629
+ created_at: Date;
630
+ notifications_muted: boolean;
631
+ shadow_banned: boolean;
632
+ updated_at: Date;
633
+ ban_expires?: Date;
634
+ deleted_at?: Date;
635
+ invite_accepted_at?: Date;
636
+ invite_rejected_at?: Date;
637
+ invited?: boolean;
638
+ is_moderator?: boolean;
639
+ role?: 'member' | 'moderator' | 'admin' | 'owner';
640
+ status?: string;
641
+ user_id?: string;
642
+ user?: UserResponse;
643
+ }
644
+ export interface ChannelMute {
645
+ created_at: Date;
646
+ updated_at: Date;
647
+ expires?: Date;
648
+ channel?: ChannelResponse;
649
+ user?: UserObject;
650
+ }
651
+ export interface ChannelResponse {
652
+ cid: string;
653
+ created_at: Date;
654
+ disabled: boolean;
655
+ frozen: boolean;
656
+ id: string;
657
+ type: string;
658
+ updated_at: Date;
659
+ custom: Record<string, any>;
660
+ auto_translation_enabled?: boolean;
661
+ auto_translation_language?: string;
662
+ blocked?: boolean;
663
+ cooldown?: number;
664
+ deleted_at?: Date;
665
+ hidden?: boolean;
666
+ hide_messages_before?: Date;
667
+ last_message_at?: Date;
668
+ member_count?: number;
669
+ mute_expires_at?: Date;
670
+ muted?: boolean;
671
+ team?: string;
672
+ truncated_at?: Date;
673
+ members?: ChannelMember[];
674
+ own_capabilities?: string[];
675
+ config?: ChannelConfigWithInfo;
676
+ created_by?: UserObject;
677
+ truncated_by?: UserObject;
678
+ }
679
+ export interface ChannelStateResponse {
680
+ duration: string;
681
+ members: ChannelMember[];
682
+ messages: MessageResponse[];
683
+ pinned_messages: MessageResponse[];
684
+ threads: ThreadState[];
685
+ hidden?: boolean;
686
+ hide_messages_before?: Date;
687
+ watcher_count?: number;
688
+ pending_messages?: PendingMessage[];
689
+ read?: ReadStateResponse[];
690
+ watchers?: UserResponse[];
691
+ channel?: ChannelResponse;
692
+ membership?: ChannelMember;
693
+ }
694
+ export interface ChannelStateResponseFields {
695
+ members: ChannelMember[];
696
+ messages: MessageResponse[];
697
+ pinned_messages: MessageResponse[];
698
+ threads: ThreadState[];
699
+ hidden?: boolean;
700
+ hide_messages_before?: Date;
701
+ watcher_count?: number;
702
+ pending_messages?: PendingMessage[];
703
+ read?: ReadStateResponse[];
704
+ watchers?: UserResponse[];
705
+ channel?: ChannelResponse;
706
+ membership?: ChannelMember;
707
+ }
708
+ export interface ChannelTypeConfig {
709
+ automod: 'disabled' | 'simple' | 'AI';
710
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
711
+ connect_events: boolean;
712
+ created_at: Date;
713
+ custom_events: boolean;
714
+ mark_messages_pending: boolean;
715
+ max_message_length: number;
716
+ mutes: boolean;
717
+ name: string;
718
+ polls: boolean;
719
+ push_notifications: boolean;
720
+ quotes: boolean;
721
+ reactions: boolean;
722
+ read_events: boolean;
723
+ reminders: boolean;
724
+ replies: boolean;
725
+ search: boolean;
726
+ typing_events: boolean;
727
+ updated_at: Date;
728
+ uploads: boolean;
729
+ url_enrichment: boolean;
730
+ commands: Command[];
731
+ permissions: PolicyRequest[];
732
+ grants: Record<string, string[]>;
733
+ blocklist?: string;
734
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
735
+ partition_size?: number;
736
+ partition_ttl?: number;
737
+ allowed_flag_reasons?: string[];
738
+ blocklists?: BlockListOptions[];
739
+ automod_thresholds?: Thresholds;
740
+ }
741
+ export interface CheckExternalStorageResponse {
742
+ duration: string;
743
+ file_url: string;
744
+ }
745
+ export interface CheckPushRequest {
746
+ apn_template?: string;
747
+ firebase_data_template?: string;
748
+ firebase_template?: string;
749
+ message_id?: string;
750
+ push_provider_name?: string;
751
+ push_provider_type?: 'firebase' | 'apn' | 'huawei' | 'xiaomi';
752
+ skip_devices?: boolean;
753
+ user_id?: string;
754
+ user?: UserRequest;
755
+ }
756
+ export interface CheckPushResponse {
757
+ duration: string;
758
+ rendered_apn_template?: string;
759
+ rendered_firebase_template?: string;
760
+ skip_devices?: boolean;
761
+ general_errors?: string[];
762
+ device_errors?: Record<string, DeviceErrorInfo>;
763
+ rendered_message?: Record<string, string>;
764
+ }
765
+ export interface CheckRequest {
766
+ config_key: string;
767
+ entity_creator_id: string;
768
+ entity_id: string;
769
+ entity_type: string;
770
+ user_id?: string;
771
+ moderation_payload?: ModerationPayload;
772
+ options?: Record<string, any>;
773
+ user?: UserRequest;
774
+ }
775
+ export interface CheckResponse {
776
+ duration: string;
777
+ recommended_action: string;
778
+ status: string;
779
+ task_id?: string;
780
+ item?: ReviewQueueItem;
781
+ }
782
+ export interface CheckSNSRequest {
783
+ sns_key?: string;
784
+ sns_secret?: string;
785
+ sns_topic_arn?: string;
786
+ }
787
+ export interface CheckSNSResponse {
788
+ duration: string;
789
+ status: 'ok' | 'error';
790
+ error?: string;
791
+ data?: Record<string, any>;
792
+ }
793
+ export interface CheckSQSRequest {
794
+ sqs_key?: string;
795
+ sqs_secret?: string;
796
+ sqs_url?: string;
797
+ }
798
+ export interface CheckSQSResponse {
799
+ duration: string;
800
+ status: 'ok' | 'error';
801
+ error?: string;
802
+ data?: Record<string, any>;
803
+ }
804
+ export interface CollectUserFeedbackRequest {
805
+ rating: number;
806
+ sdk: string;
807
+ sdk_version: string;
808
+ user_session_id: string;
809
+ reason?: string;
810
+ custom?: Record<string, any>;
811
+ }
812
+ export interface CollectUserFeedbackResponse {
813
+ duration: string;
814
+ }
815
+ export interface Command {
816
+ args: string;
817
+ description: string;
818
+ name: string;
819
+ set: string;
820
+ created_at?: Date;
821
+ updated_at?: Date;
822
+ }
823
+ export interface CommitMessageRequest {
824
+ }
825
+ export interface Config {
826
+ app_certificate: string;
827
+ app_id: string;
828
+ default_role?: 'attendee' | 'publisher' | 'subscriber' | 'admin';
829
+ role_map?: Record<string, string>;
830
+ }
831
+ export interface ConfigResponse {
832
+ async: boolean;
833
+ created_at: Date;
834
+ key: string;
835
+ updated_at: Date;
836
+ automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
837
+ automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
838
+ automod_toxicity_config?: AutomodToxicityConfig;
839
+ aws_rek_og_nition_config?: AWSRekognitionConfig;
840
+ block_list_config?: BlockListConfig;
841
+ bodyguard_config?: BodyguardConfig;
842
+ go_og_le_vision_config?: GoogleVisionConfig;
843
+ }
844
+ export interface Coordinates {
845
+ latitude: number;
846
+ longitude: number;
847
+ }
848
+ export interface Count {
849
+ app_roximate: boolean;
850
+ value: number;
851
+ }
852
+ export interface CountrywiseAggregateStats {
853
+ participant_count?: Count;
854
+ publisher_jitter?: TimeStats;
855
+ publisher_latency?: TimeStats;
856
+ subscriber_jitter?: TimeStats;
857
+ subscriber_latency?: TimeStats;
858
+ }
859
+ export interface CreateBlockListRequest {
860
+ name: string;
861
+ words: string[];
862
+ type?: 'regex' | 'domain' | 'email' | 'word';
863
+ }
864
+ export interface CreateCallTypeRequest {
865
+ name: string;
866
+ external_storage?: string;
867
+ grants?: Record<string, string[]>;
868
+ notification_settings?: NotificationSettings;
869
+ settings?: CallSettingsRequest;
870
+ }
871
+ export interface CreateCallTypeResponse {
872
+ created_at: Date;
873
+ duration: string;
874
+ name: string;
875
+ updated_at: Date;
876
+ grants: Record<string, string[]>;
877
+ notification_settings: NotificationSettings;
878
+ settings: CallSettingsResponse;
879
+ external_storage?: string;
880
+ }
881
+ export interface CreateChannelTypeRequest {
882
+ automod: 'disabled' | 'simple' | 'AI';
883
+ automod_behavior: 'flag' | 'block';
884
+ max_message_length: number;
885
+ name: string;
886
+ blocklist?: string;
887
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
888
+ connect_events?: boolean;
889
+ custom_events?: boolean;
890
+ mark_messages_pending?: boolean;
891
+ message_retention?: string;
892
+ mutes?: boolean;
893
+ partition_size?: number;
894
+ partition_ttl?: string;
895
+ polls?: boolean;
896
+ push_notifications?: boolean;
897
+ reactions?: boolean;
898
+ read_events?: boolean;
899
+ replies?: boolean;
900
+ search?: boolean;
901
+ typing_events?: boolean;
902
+ uploads?: boolean;
903
+ url_enrichment?: boolean;
904
+ blocklists?: BlockListOptions[];
905
+ commands?: string[];
906
+ permissions?: PolicyRequest[];
907
+ grants?: Record<string, string[]>;
908
+ }
909
+ export interface CreateChannelTypeResponse {
910
+ automod: 'disabled' | 'simple' | 'AI';
911
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
912
+ connect_events: boolean;
913
+ created_at: Date;
914
+ custom_events: boolean;
915
+ duration: string;
916
+ mark_messages_pending: boolean;
917
+ max_message_length: number;
918
+ mutes: boolean;
919
+ name: string;
920
+ polls: boolean;
921
+ push_notifications: boolean;
922
+ quotes: boolean;
923
+ reactions: boolean;
924
+ read_events: boolean;
925
+ reminders: boolean;
926
+ replies: boolean;
927
+ search: boolean;
928
+ typing_events: boolean;
929
+ updated_at: Date;
930
+ uploads: boolean;
931
+ url_enrichment: boolean;
932
+ commands: string[];
933
+ permissions: PolicyRequest[];
934
+ grants: Record<string, string[]>;
935
+ blocklist?: string;
936
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
937
+ partition_size?: number;
938
+ partition_ttl?: number;
939
+ allowed_flag_reasons?: string[];
940
+ blocklists?: BlockListOptions[];
941
+ automod_thresholds?: Thresholds;
942
+ }
943
+ export interface CreateCommandRequest {
944
+ description: string;
945
+ name: string;
946
+ args?: string;
947
+ set?: string;
948
+ }
949
+ export interface CreateCommandResponse {
950
+ duration: string;
951
+ command?: Command;
952
+ }
953
+ export interface CreateDeviceRequest {
954
+ id: string;
955
+ push_provider: 'firebase' | 'apn' | 'huawei' | 'xiaomi';
956
+ push_provider_name?: string;
957
+ user_id?: string;
958
+ voip_token?: boolean;
959
+ user?: UserRequest;
960
+ }
961
+ export interface CreateExternalStorageRequest {
962
+ bucket: string;
963
+ name: string;
964
+ storage_type: 's3' | 'gcs' | 'abs';
965
+ gcs_credentials?: string;
966
+ path?: string;
967
+ aws_s3?: S3Request;
968
+ azure_blob?: AzureRequest;
969
+ }
970
+ export interface CreateExternalStorageResponse {
971
+ duration: string;
972
+ }
973
+ export interface CreateGuestRequest {
974
+ user: UserRequest;
975
+ }
976
+ export interface CreateGuestResponse {
977
+ access_token: string;
978
+ duration: string;
979
+ user: UserResponse;
980
+ }
981
+ export interface CreateImportRequest {
982
+ mode: 'insert' | 'upsert';
983
+ path: string;
984
+ }
985
+ export interface CreateImportResponse {
986
+ duration: string;
987
+ import_task?: ImportTask;
988
+ }
989
+ export interface CreateImportURLRequest {
990
+ filename?: string;
991
+ }
992
+ export interface CreateImportURLResponse {
993
+ duration: string;
994
+ path: string;
995
+ upload_url: string;
996
+ }
997
+ export interface CreatePollOptionRequest {
998
+ text: string;
999
+ position?: number;
1000
+ user_id?: string;
1001
+ custom?: Record<string, any>;
1002
+ user?: UserRequest;
1003
+ }
1004
+ export interface CreatePollRequest {
1005
+ name: string;
1006
+ allow_answers?: boolean;
1007
+ allow_user_suggested_options?: boolean;
1008
+ description?: string;
1009
+ enforce_unique_vote?: boolean;
1010
+ id?: string;
1011
+ is_closed?: boolean;
1012
+ max_votes_allowed?: number;
1013
+ user_id?: string;
1014
+ voting_visibility?: 'anonymous' | 'public';
1015
+ options?: PollOptionInput[];
1016
+ custom?: Record<string, any>;
1017
+ user?: UserRequest;
1018
+ }
1019
+ export interface CreateRoleRequest {
1020
+ name: string;
1021
+ }
1022
+ export interface CreateRoleResponse {
1023
+ duration: string;
1024
+ role: Role;
1025
+ }
1026
+ export interface CustomActionRequest {
1027
+ id?: string;
1028
+ options?: Record<string, any>;
1029
+ }
1030
+ export interface CustomCheckRequest {
1031
+ entity_creator_id: string;
1032
+ entity_id: string;
1033
+ entity_type: string;
1034
+ name?: string;
1035
+ reason?: string;
1036
+ recommended_action?: string;
1037
+ user_id?: string;
1038
+ moderation_payload?: ModerationPayload;
1039
+ user?: UserRequest;
1040
+ }
1041
+ export interface CustomCheckResponse {
1042
+ duration: string;
1043
+ id: string;
1044
+ recommended_action: string;
1045
+ scored_at: Date;
1046
+ status: string;
1047
+ report: any[];
1048
+ moderator_action?: string;
1049
+ reviewed_at?: Date;
1050
+ }
1051
+ export interface Data {
1052
+ id: string;
1053
+ }
1054
+ export interface DataDogInfo {
1055
+ api_key?: string;
1056
+ enabled?: boolean;
1057
+ site?: string;
1058
+ }
1059
+ export interface DeactivateUserRequest {
1060
+ created_by_id?: string;
1061
+ mark_messages_deleted?: boolean;
1062
+ }
1063
+ export interface DeactivateUserResponse {
1064
+ duration: string;
1065
+ user?: UserResponse;
1066
+ }
1067
+ export interface DeactivateUsersRequest {
1068
+ user_ids: string[];
1069
+ created_by_id?: string;
1070
+ mark_channels_deleted?: boolean;
1071
+ mark_messages_deleted?: boolean;
1072
+ }
1073
+ export interface DeactivateUsersResponse {
1074
+ duration: string;
1075
+ task_id: string;
1076
+ }
1077
+ export interface DeleteActivityRequest {
1078
+ }
1079
+ export interface DeleteCallRequest {
1080
+ hard?: boolean;
1081
+ }
1082
+ export interface DeleteCallResponse {
1083
+ duration: string;
1084
+ call: CallResponse;
1085
+ task_id?: string;
1086
+ }
1087
+ export interface DeleteChannelResponse {
1088
+ duration: string;
1089
+ channel?: ChannelResponse;
1090
+ }
1091
+ export interface DeleteChannelsRequest {
1092
+ cids: string[];
1093
+ hard_delete?: boolean;
1094
+ }
1095
+ export interface DeleteChannelsResponse {
1096
+ duration: string;
1097
+ task_id?: string;
1098
+ result?: Record<string, DeleteChannelsResultResponse>;
1099
+ }
1100
+ export interface DeleteChannelsResultResponse {
1101
+ status: string;
1102
+ error?: string;
1103
+ }
1104
+ export interface DeleteCommandResponse {
1105
+ duration: string;
1106
+ name: string;
1107
+ }
1108
+ export interface DeleteExternalStorageResponse {
1109
+ duration: string;
1110
+ }
1111
+ export interface DeleteMessageRequest {
1112
+ hard_delete?: boolean;
1113
+ }
1114
+ export interface DeleteMessageResponse {
1115
+ duration: string;
1116
+ message: MessageResponse;
1117
+ }
1118
+ export interface DeleteModerationTemplateResponse {
1119
+ duration: string;
1120
+ }
1121
+ export interface DeleteReactionRequest {
1122
+ hard_delete?: boolean;
1123
+ }
1124
+ export interface DeleteRecordingResponse {
1125
+ duration: string;
1126
+ }
1127
+ export interface DeleteTranscriptionResponse {
1128
+ duration: string;
1129
+ }
1130
+ export interface DeleteUserRequest {
1131
+ delete_conversation_channels?: boolean;
1132
+ hard_delete?: boolean;
1133
+ mark_messages_deleted?: boolean;
1134
+ }
1135
+ export interface DeleteUsersRequest {
1136
+ user_ids: string[];
1137
+ calls?: 'soft' | 'hard';
1138
+ conversations?: 'soft' | 'hard';
1139
+ messages?: 'soft' | 'pruning' | 'hard';
1140
+ new_call_owner_id?: string;
1141
+ new_channel_owner_id?: string;
1142
+ user?: 'soft' | 'pruning' | 'hard';
1143
+ }
1144
+ export interface DeleteUsersResponse {
1145
+ duration: string;
1146
+ task_id: string;
1147
+ }
1148
+ export interface Device {
1149
+ created_at: Date;
1150
+ id: string;
1151
+ push_provider: string;
1152
+ user_id: string;
1153
+ disabled?: boolean;
1154
+ disabled_reason?: string;
1155
+ push_provider_name?: string;
1156
+ voip?: boolean;
1157
+ }
1158
+ export interface DeviceErrorInfo {
1159
+ error_message: string;
1160
+ provider: string;
1161
+ provider_name: string;
1162
+ }
1163
+ export interface EdgeResponse {
1164
+ continent_code: string;
1165
+ country_iso_code: string;
1166
+ green: number;
1167
+ id: string;
1168
+ latency_test_url: string;
1169
+ latitude: number;
1170
+ longitude: number;
1171
+ red: number;
1172
+ subdivision_iso_code: string;
1173
+ yellow: number;
1174
+ }
1175
+ export interface EgressHLSResponse {
1176
+ playlist_url: string;
1177
+ }
1178
+ export interface EgressRTMPResponse {
1179
+ name: string;
1180
+ started_at: Date;
1181
+ stream_key?: string;
1182
+ stream_url?: string;
1183
+ }
1184
+ export interface EgressResponse {
1185
+ broadcasting: boolean;
1186
+ rtmp_s: EgressRTMPResponse[];
1187
+ hls?: EgressHLSResponse;
1188
+ }
1189
+ export interface EndCallRequest {
1190
+ }
1191
+ export interface EndCallResponse {
1192
+ duration: string;
1193
+ }
1194
+ export interface EnrichedActivity {
1195
+ foreign_id?: string;
1196
+ id?: string;
1197
+ score?: number;
1198
+ verb?: string;
1199
+ to?: string[];
1200
+ actor?: Data;
1201
+ latest_reactions?: Record<string, Array<EnrichedReaction | null>>;
1202
+ object?: Data;
1203
+ origin?: Data;
1204
+ own_reactions?: Record<string, Array<EnrichedReaction | null>>;
1205
+ reaction_counts?: Record<string, number>;
1206
+ target?: Data;
1207
+ }
1208
+ export interface EnrichedReaction {
1209
+ activity_id: string;
1210
+ kind: string;
1211
+ user_id: string;
1212
+ id?: string;
1213
+ parent?: string;
1214
+ target_feeds?: string[];
1215
+ children_counts?: Record<string, number>;
1216
+ created_at?: Time;
1217
+ data?: Record<string, any>;
1218
+ latest_children?: Record<string, Array<EnrichedReaction | null>>;
1219
+ own_children?: Record<string, Array<EnrichedReaction | null>>;
1220
+ updated_at?: Time;
1221
+ user?: Data;
1222
+ }
1223
+ export interface ErrorResult {
1224
+ type: string;
1225
+ stacktrace?: string;
1226
+ version?: string;
1227
+ }
1228
+ export interface EventNotificationSettings {
1229
+ enabled: boolean;
1230
+ apns: APNS;
1231
+ }
1232
+ export interface EventRequest {
1233
+ type: string;
1234
+ parent_id?: string;
1235
+ user_id?: string;
1236
+ custom?: Record<string, any>;
1237
+ user?: UserRequest;
1238
+ }
1239
+ export interface EventResponse {
1240
+ duration: string;
1241
+ event: WSEvent;
1242
+ }
1243
+ export interface ExportChannelsRequest {
1244
+ channels: ChannelExport[];
1245
+ clear_deleted_message_text?: boolean;
1246
+ export_users?: boolean;
1247
+ include_soft_deleted_channels?: boolean;
1248
+ include_truncated_messages?: boolean;
1249
+ version?: string;
1250
+ }
1251
+ export interface ExportChannelsResponse {
1252
+ duration: string;
1253
+ task_id: string;
1254
+ }
1255
+ export interface ExportChannelsResult {
1256
+ url: string;
1257
+ path?: string;
1258
+ s3_bucket_name?: string;
1259
+ }
1260
+ export interface ExportUserResponse {
1261
+ duration: string;
1262
+ messages?: Message[];
1263
+ reactions?: Reaction[];
1264
+ user?: UserResponse;
1265
+ }
1266
+ export interface ExportUsersRequest {
1267
+ user_ids: string[];
1268
+ }
1269
+ export interface ExportUsersResponse {
1270
+ duration: string;
1271
+ task_id: string;
1272
+ }
1273
+ export interface ExternalStorageResponse {
1274
+ bucket: string;
1275
+ name: string;
1276
+ path: string;
1277
+ type: 's3' | 'gcs' | 'abs';
1278
+ }
1279
+ export interface FeedsModerationTemplateConfig {
1280
+ config_key: string;
1281
+ data_types: Record<string, string>;
1282
+ }
1283
+ export interface Field {
1284
+ short: boolean;
1285
+ title: string;
1286
+ value: string;
1287
+ }
1288
+ export interface FileUploadConfig {
1289
+ size_limit: number;
1290
+ allowed_file_extensions?: string[];
1291
+ allowed_mime_types?: string[];
1292
+ blocked_file_extensions?: string[];
1293
+ blocked_mime_types?: string[];
1294
+ }
1295
+ export interface FileUploadRequest {
1296
+ file?: string;
1297
+ user?: OnlyUserID;
1298
+ }
1299
+ export interface FileUploadResponse {
1300
+ duration: string;
1301
+ file?: string;
1302
+ thumb_url?: string;
1303
+ }
1304
+ export interface FirebaseConfig {
1305
+ apn_template?: string;
1306
+ credentials_json?: string;
1307
+ data_template?: string;
1308
+ disabled?: boolean;
1309
+ notification_template?: string;
1310
+ server_key?: string;
1311
+ }
1312
+ export interface FirebaseConfigFields {
1313
+ apn_template: string;
1314
+ data_template: string;
1315
+ enabled: boolean;
1316
+ notification_template: string;
1317
+ credentials_json?: string;
1318
+ server_key?: string;
1319
+ }
1320
+ export interface Flag2 {
1321
+ created_at: Date;
1322
+ entity_id: string;
1323
+ entity_type: string;
1324
+ updated_at: Date;
1325
+ result: Array<Record<string, any>>;
1326
+ entity_creator_id?: string;
1327
+ moderation_payload_hash?: string;
1328
+ reason?: string;
1329
+ review_queue_item_id?: string;
1330
+ type?: string;
1331
+ labels?: string[];
1332
+ custom?: Record<string, any>;
1333
+ moderation_payload?: ModerationPayload;
1334
+ user?: UserObject;
1335
+ }
1336
+ export interface FlagDetails {
1337
+ original_text: string;
1338
+ extra: Record<string, any>;
1339
+ automod?: AutomodDetails;
1340
+ }
1341
+ export interface FlagFeedback {
1342
+ created_at: Date;
1343
+ message_id: string;
1344
+ labels: Label[];
1345
+ }
1346
+ export interface FlagMessageDetails {
1347
+ pin_changed?: boolean;
1348
+ should_enrich?: boolean;
1349
+ skip_push?: boolean;
1350
+ updated_by_id?: string;
1351
+ }
1352
+ export interface FlagRequest {
1353
+ entity_id: string;
1354
+ entity_type: string;
1355
+ reason: string;
1356
+ entity_creator_id?: string;
1357
+ user_id?: string;
1358
+ custom?: Record<string, any>;
1359
+ moderation_payload?: ModerationPayload;
1360
+ user?: UserRequest;
1361
+ }
1362
+ export interface FlagResponse {
1363
+ duration: string;
1364
+ item_id: string;
1365
+ }
1366
+ export interface FullUserResponse {
1367
+ banned: boolean;
1368
+ created_at: Date;
1369
+ id: string;
1370
+ invisible: boolean;
1371
+ language: string;
1372
+ online: boolean;
1373
+ role: string;
1374
+ shadow_banned: boolean;
1375
+ total_unread_count: number;
1376
+ unread_channels: number;
1377
+ unread_threads: number;
1378
+ updated_at: Date;
1379
+ blocked_user_ids: string[];
1380
+ channel_mutes: ChannelMute[];
1381
+ devices: Device[];
1382
+ mutes: UserMuteResponse[];
1383
+ teams: string[];
1384
+ custom: Record<string, any>;
1385
+ deactivated_at?: Date;
1386
+ deleted_at?: Date;
1387
+ image?: string;
1388
+ last_active?: Date;
1389
+ name?: string;
1390
+ revoke_tokens_issued_before?: Date;
1391
+ latest_hidden_channels?: string[];
1392
+ privacy_settings?: PrivacySettingsResponse;
1393
+ push_notifications?: PushNotificationSettingsResponse;
1394
+ }
1395
+ export interface GeofenceResponse {
1396
+ name: string;
1397
+ description?: string;
1398
+ type?: string;
1399
+ country_codes?: string[];
1400
+ }
1401
+ export interface GeofenceSettings {
1402
+ names: string[];
1403
+ }
1404
+ export interface GeofenceSettingsRequest {
1405
+ names?: string[];
1406
+ }
1407
+ export interface GeofenceSettingsResponse {
1408
+ names: string[];
1409
+ }
1410
+ export interface GeolocationResult {
1411
+ accuracy_radius: number;
1412
+ city: string;
1413
+ continent: string;
1414
+ continent_code: string;
1415
+ country: string;
1416
+ country_iso_code: string;
1417
+ latitude: number;
1418
+ longitude: number;
1419
+ subdivision: string;
1420
+ subdivision_iso_code: string;
1421
+ }
1422
+ export interface GetApplicationResponse {
1423
+ duration: string;
1424
+ app: AppResponseFields;
1425
+ }
1426
+ export interface GetBlockListResponse {
1427
+ duration: string;
1428
+ blocklist?: BlockListResponse;
1429
+ }
1430
+ export interface GetBlockedUsersResponse {
1431
+ duration: string;
1432
+ blocks: BlockedUserResponse[];
1433
+ }
1434
+ export interface GetCallResponse {
1435
+ duration: string;
1436
+ members: MemberResponse[];
1437
+ own_capabilities: OwnCapability[];
1438
+ call: CallResponse;
1439
+ }
1440
+ export interface GetCallStatsResponse {
1441
+ call_duration_seconds: number;
1442
+ call_status: string;
1443
+ duration: string;
1444
+ max_freezes_duration_seconds: number;
1445
+ max_participants: number;
1446
+ max_total_quality_limitation_duration_seconds: number;
1447
+ publishing_participants: number;
1448
+ quality_score: number;
1449
+ sfu_count: number;
1450
+ participant_report: UserStats[];
1451
+ sfus: SFULocationResponse[];
1452
+ aggregated?: AggregatedStats;
1453
+ call_timeline?: CallTimeline;
1454
+ jitter?: TimeStats;
1455
+ latency?: TimeStats;
1456
+ }
1457
+ export interface GetCallTypeResponse {
1458
+ created_at: Date;
1459
+ duration: string;
1460
+ name: string;
1461
+ updated_at: Date;
1462
+ grants: Record<string, string[]>;
1463
+ notification_settings: NotificationSettings;
1464
+ settings: CallSettingsResponse;
1465
+ external_storage?: string;
1466
+ }
1467
+ export interface GetChannelTypeResponse {
1468
+ automod: 'disabled' | 'simple' | 'AI';
1469
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
1470
+ connect_events: boolean;
1471
+ created_at: Date;
1472
+ custom_events: boolean;
1473
+ duration: string;
1474
+ mark_messages_pending: boolean;
1475
+ max_message_length: number;
1476
+ mutes: boolean;
1477
+ name: string;
1478
+ polls: boolean;
1479
+ push_notifications: boolean;
1480
+ quotes: boolean;
1481
+ reactions: boolean;
1482
+ read_events: boolean;
1483
+ reminders: boolean;
1484
+ replies: boolean;
1485
+ search: boolean;
1486
+ typing_events: boolean;
1487
+ updated_at: Date;
1488
+ uploads: boolean;
1489
+ url_enrichment: boolean;
1490
+ commands: Command[];
1491
+ permissions: PolicyRequest[];
1492
+ grants: Record<string, string[]>;
1493
+ blocklist?: string;
1494
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
1495
+ partition_size?: number;
1496
+ partition_ttl?: number;
1497
+ allowed_flag_reasons?: string[];
1498
+ blocklists?: BlockListOptions[];
1499
+ automod_thresholds?: Thresholds;
1500
+ }
1501
+ export interface GetCommandResponse {
1502
+ args: string;
1503
+ description: string;
1504
+ duration: string;
1505
+ name: string;
1506
+ set: string;
1507
+ created_at?: Date;
1508
+ updated_at?: Date;
1509
+ }
1510
+ export interface GetConfigResponse {
1511
+ duration: string;
1512
+ config?: ConfigResponse;
1513
+ }
1514
+ export interface GetCustomPermissionResponse {
1515
+ duration: string;
1516
+ permission: Permission;
1517
+ }
1518
+ export interface GetEdgesResponse {
1519
+ duration: string;
1520
+ edges: EdgeResponse[];
1521
+ }
1522
+ export interface GetExportChannelsStatusResponse {
1523
+ created_at: Date;
1524
+ duration: string;
1525
+ status: 'waiting' | 'pending' | 'running' | 'completed' | 'failed' | 'canceled';
1526
+ task_id: string;
1527
+ updated_at: Date;
1528
+ error?: ErrorResult;
1529
+ result?: ExportChannelsResult;
1530
+ }
1531
+ export interface GetImportResponse {
1532
+ duration: string;
1533
+ import_task?: ImportTask;
1534
+ }
1535
+ export interface GetManyMessagesResponse {
1536
+ duration: string;
1537
+ messages: Message[];
1538
+ }
1539
+ export interface GetMessageResponse {
1540
+ duration: string;
1541
+ message: MessageWithChannelResponse;
1542
+ pending_message_metadata?: Record<string, string>;
1543
+ }
1544
+ export interface GetOGResponse {
1545
+ duration: string;
1546
+ custom: Record<string, any>;
1547
+ asset_url?: string;
1548
+ author_icon?: string;
1549
+ author_link?: string;
1550
+ author_name?: string;
1551
+ color?: string;
1552
+ fallback?: string;
1553
+ footer?: string;
1554
+ footer_icon?: string;
1555
+ image_url?: string;
1556
+ og_scrape_url?: string;
1557
+ original_height?: number;
1558
+ original_width?: number;
1559
+ pretext?: string;
1560
+ text?: string;
1561
+ thumb_url?: string;
1562
+ title?: string;
1563
+ title_link?: string;
1564
+ type?: string;
1565
+ actions?: Action[];
1566
+ fields?: Field[];
1567
+ giphy?: Images;
1568
+ }
1569
+ export interface GetOrCreateCallRequest {
1570
+ members_limit?: number;
1571
+ notify?: boolean;
1572
+ ring?: boolean;
1573
+ video?: boolean;
1574
+ data?: CallRequest;
1575
+ }
1576
+ export interface GetOrCreateCallResponse {
1577
+ created: boolean;
1578
+ duration: string;
1579
+ members: MemberResponse[];
1580
+ own_capabilities: OwnCapability[];
1581
+ call: CallResponse;
1582
+ }
1583
+ export interface GetRateLimitsResponse {
1584
+ duration: string;
1585
+ android?: Record<string, LimitInfo>;
1586
+ ios?: Record<string, LimitInfo>;
1587
+ server_side?: Record<string, LimitInfo>;
1588
+ web?: Record<string, LimitInfo>;
1589
+ }
1590
+ export interface GetReactionsResponse {
1591
+ duration: string;
1592
+ reactions: Reaction[];
1593
+ }
1594
+ export interface GetRepliesResponse {
1595
+ duration: string;
1596
+ messages: MessageResponse[];
1597
+ }
1598
+ export interface GetReviewQueueItemResponse {
1599
+ duration: string;
1600
+ history: ReviewQueueItem[];
1601
+ item?: ReviewQueueItem;
1602
+ }
1603
+ export interface GetTaskResponse {
1604
+ created_at: Date;
1605
+ duration: string;
1606
+ status: string;
1607
+ task_id: string;
1608
+ updated_at: Date;
1609
+ error?: ErrorResult;
1610
+ result?: Record<string, any>;
1611
+ }
1612
+ export interface GetThreadResponse {
1613
+ duration: string;
1614
+ thread: ThreadStateResponse;
1615
+ }
1616
+ export interface GetUserModerationReportResponse {
1617
+ duration: string;
1618
+ user_blocks: UserBlock[];
1619
+ user_mutes: UserMute[];
1620
+ user: UserResponse;
1621
+ }
1622
+ export interface GoLiveRequest {
1623
+ recording_storage_name?: string;
1624
+ start_hls?: boolean;
1625
+ start_recording?: boolean;
1626
+ start_rtmp_broadcasts?: boolean;
1627
+ start_transcription?: boolean;
1628
+ transcription_storage_name?: string;
1629
+ }
1630
+ export interface GoLiveResponse {
1631
+ duration: string;
1632
+ call: CallResponse;
1633
+ }
1634
+ export interface GoogleVisionConfig {
1635
+ enabled?: boolean;
1636
+ }
1637
+ export interface HLSSettings {
1638
+ auto_on: boolean;
1639
+ enabled: boolean;
1640
+ quality_tracks: string[];
1641
+ layout?: LayoutSettings;
1642
+ }
1643
+ export interface HLSSettingsRequest {
1644
+ quality_tracks: string[];
1645
+ auto_on?: boolean;
1646
+ enabled?: boolean;
1647
+ layout?: LayoutSettingsRequest;
1648
+ }
1649
+ export interface HLSSettingsResponse {
1650
+ auto_on: boolean;
1651
+ enabled: boolean;
1652
+ quality_tracks: string[];
1653
+ layout: LayoutSettingsResponse;
1654
+ }
1655
+ export interface HideChannelRequest {
1656
+ clear_history?: boolean;
1657
+ user_id?: string;
1658
+ user?: UserRequest;
1659
+ }
1660
+ export interface HideChannelResponse {
1661
+ duration: string;
1662
+ }
1663
+ export interface HuaweiConfig {
1664
+ disabled?: boolean;
1665
+ id?: string;
1666
+ secret?: string;
1667
+ }
1668
+ export interface HuaweiConfigFields {
1669
+ enabled: boolean;
1670
+ id?: string;
1671
+ secret?: string;
1672
+ }
1673
+ export interface ImageData {
1674
+ frames: string;
1675
+ height: string;
1676
+ size: string;
1677
+ url: string;
1678
+ width: string;
1679
+ }
1680
+ export interface ImageSize {
1681
+ crop?: 'top' | 'bottom' | 'left' | 'right' | 'center';
1682
+ height?: number;
1683
+ resize?: 'clip' | 'crop' | 'scale' | 'fill';
1684
+ width?: number;
1685
+ }
1686
+ export interface ImageUploadRequest {
1687
+ file?: string;
1688
+ upload_sizes?: ImageSize[];
1689
+ user?: OnlyUserID;
1690
+ }
1691
+ export interface ImageUploadResponse {
1692
+ duration: string;
1693
+ file?: string;
1694
+ thumb_url?: string;
1695
+ upload_sizes?: ImageSize[];
1696
+ }
1697
+ export interface Images {
1698
+ fixed_height: ImageData;
1699
+ fixed_height_downsampled: ImageData;
1700
+ fixed_height_still: ImageData;
1701
+ fixed_width: ImageData;
1702
+ fixed_width_downsampled: ImageData;
1703
+ fixed_width_still: ImageData;
1704
+ original: ImageData;
1705
+ }
1706
+ export interface ImportTask {
1707
+ created_at: Date;
1708
+ id: string;
1709
+ mode: string;
1710
+ path: string;
1711
+ state: string;
1712
+ updated_at: Date;
1713
+ history: ImportTaskHistory[];
1714
+ size?: number;
1715
+ }
1716
+ export interface ImportTaskHistory {
1717
+ created_at: Date;
1718
+ next_state: string;
1719
+ prev_state: string;
1720
+ }
1721
+ export interface Label {
1722
+ name: string;
1723
+ harm_labels?: string[];
1724
+ phrase_list_ids?: number[];
1725
+ }
1726
+ export interface LabelThresholds {
1727
+ block?: number;
1728
+ flag?: number;
1729
+ }
1730
+ export interface LayoutSettings {
1731
+ external_app_url: string;
1732
+ external_css_url: string;
1733
+ name: 'spotlight' | 'grid' | 'single-participant' | 'mobile' | 'custom';
1734
+ options?: Record<string, any>;
1735
+ }
1736
+ export interface LayoutSettingsRequest {
1737
+ name: 'spotlight' | 'grid' | 'single-participant' | 'mobile' | 'custom';
1738
+ external_app_url?: string;
1739
+ external_css_url?: string;
1740
+ options?: Record<string, any>;
1741
+ }
1742
+ export interface LayoutSettingsResponse {
1743
+ external_app_url: string;
1744
+ external_css_url: string;
1745
+ name: 'spotlight' | 'grid' | 'single-participant' | 'mobile' | 'custom';
1746
+ options?: Record<string, any>;
1747
+ }
1748
+ export interface LimitInfo {
1749
+ limit: number;
1750
+ remaining: number;
1751
+ reset: number;
1752
+ }
1753
+ export interface LimitsSettings {
1754
+ max_duration_seconds?: number;
1755
+ max_participants?: number;
1756
+ }
1757
+ export interface LimitsSettingsRequest {
1758
+ max_duration_seconds?: number;
1759
+ max_participants?: number;
1760
+ }
1761
+ export interface LimitsSettingsResponse {
1762
+ max_duration_seconds?: number;
1763
+ max_participants?: number;
1764
+ }
1765
+ export interface ListBlockListResponse {
1766
+ duration: string;
1767
+ blocklists: BlockListResponse[];
1768
+ }
1769
+ export interface ListCallTypeResponse {
1770
+ duration: string;
1771
+ call_types: Record<string, CallTypeResponse>;
1772
+ }
1773
+ export interface ListChannelTypesResponse {
1774
+ duration: string;
1775
+ channel_types: Record<string, ChannelTypeConfig>;
1776
+ }
1777
+ export interface ListCommandsResponse {
1778
+ duration: string;
1779
+ commands: Command[];
1780
+ }
1781
+ export interface ListDevicesResponse {
1782
+ duration: string;
1783
+ devices: Device[];
1784
+ }
1785
+ export interface ListExternalStorageResponse {
1786
+ duration: string;
1787
+ external_storages: Record<string, ExternalStorageResponse>;
1788
+ }
1789
+ export interface ListImportsResponse {
1790
+ duration: string;
1791
+ import_tasks: ImportTask[];
1792
+ }
1793
+ export interface ListPermissionsResponse {
1794
+ duration: string;
1795
+ permissions: Permission[];
1796
+ }
1797
+ export interface ListPushProvidersResponse {
1798
+ duration: string;
1799
+ push_providers: PushProviderResponse[];
1800
+ }
1801
+ export interface ListRecordingsResponse {
1802
+ duration: string;
1803
+ recordings: CallRecording[];
1804
+ }
1805
+ export interface ListRolesResponse {
1806
+ duration: string;
1807
+ roles: Role[];
1808
+ }
1809
+ export interface ListTranscriptionsResponse {
1810
+ duration: string;
1811
+ transcriptions: CallTranscription[];
1812
+ }
1813
+ export interface Location {
1814
+ continent_code: string;
1815
+ country_iso_code: string;
1816
+ subdivision_iso_code: string;
1817
+ }
1818
+ export interface MOSStats {
1819
+ average_score: number;
1820
+ max_score: number;
1821
+ min_score: number;
1822
+ hist_og_ram_duration_seconds: number[];
1823
+ }
1824
+ export interface MarkChannelsReadRequest {
1825
+ user_id?: string;
1826
+ read_by_channel?: Record<string, string>;
1827
+ user?: UserRequest;
1828
+ }
1829
+ export interface MarkReadRequest {
1830
+ message_id?: string;
1831
+ thread_id?: string;
1832
+ user_id?: string;
1833
+ user?: UserRequest;
1834
+ }
1835
+ export interface MarkReadResponse {
1836
+ duration: string;
1837
+ event?: MessageReadEvent;
1838
+ }
1839
+ export interface MarkUnreadRequest {
1840
+ message_id?: string;
1841
+ thread_id?: string;
1842
+ user_id?: string;
1843
+ user?: UserRequest;
1844
+ }
1845
+ export interface MediaPubSubHint {
1846
+ audio_published: boolean;
1847
+ audio_subscribed: boolean;
1848
+ video_published: boolean;
1849
+ video_subscribed: boolean;
1850
+ }
1851
+ export interface MemberRequest {
1852
+ user_id: string;
1853
+ role?: string;
1854
+ custom?: Record<string, any>;
1855
+ }
1856
+ export interface MemberResponse {
1857
+ created_at: Date;
1858
+ updated_at: Date;
1859
+ user_id: string;
1860
+ custom: Record<string, any>;
1861
+ user: UserResponse;
1862
+ deleted_at?: Date;
1863
+ role?: string;
1864
+ }
1865
+ export interface MembersResponse {
1866
+ duration: string;
1867
+ members: ChannelMember[];
1868
+ }
1869
+ export interface Message {
1870
+ cid: string;
1871
+ created_at: Date;
1872
+ deleted_reply_count: number;
1873
+ html: string;
1874
+ id: string;
1875
+ pinned: boolean;
1876
+ reply_count: number;
1877
+ shadowed: boolean;
1878
+ silent: boolean;
1879
+ text: string;
1880
+ type: 'regular' | 'ephemeral' | 'error' | 'reply' | 'system' | 'deleted';
1881
+ updated_at: Date;
1882
+ attachments: Attachment[];
1883
+ latest_reactions: Reaction[];
1884
+ mentioned_users: UserObject[];
1885
+ own_reactions: Reaction[];
1886
+ custom: Record<string, any>;
1887
+ reaction_counts: Record<string, number>;
1888
+ reaction_groups: Record<string, ReactionGroupResponse>;
1889
+ reaction_scores: Record<string, number>;
1890
+ before_message_send_failed?: boolean;
1891
+ command?: string;
1892
+ deleted_at?: Date;
1893
+ message_text_updated_at?: Date;
1894
+ mml?: string;
1895
+ parent_id?: string;
1896
+ pin_expires?: Date;
1897
+ pinned_at?: Date;
1898
+ poll_id?: string;
1899
+ quoted_message_id?: string;
1900
+ show_in_channel?: boolean;
1901
+ thread_participants?: UserObject[];
1902
+ i18n?: Record<string, string>;
1903
+ image_labels?: Record<string, string[]>;
1904
+ pinned_by?: UserObject;
1905
+ poll?: Poll;
1906
+ quoted_message?: Message;
1907
+ user?: UserObject;
1908
+ }
1909
+ export interface MessageActionRequest {
1910
+ form_data: Record<string, string>;
1911
+ user_id?: string;
1912
+ user?: UserRequest;
1913
+ }
1914
+ export interface MessageChangeSet {
1915
+ attachments: boolean;
1916
+ custom: boolean;
1917
+ html: boolean;
1918
+ mentioned_user_ids: boolean;
1919
+ mml: boolean;
1920
+ pin: boolean;
1921
+ quoted_message_id: boolean;
1922
+ silent: boolean;
1923
+ text: boolean;
1924
+ }
1925
+ export interface MessageFlagResponse {
1926
+ created_at: Date;
1927
+ created_by_automod: boolean;
1928
+ updated_at: Date;
1929
+ approved_at?: Date;
1930
+ reason?: string;
1931
+ rejected_at?: Date;
1932
+ reviewed_at?: Date;
1933
+ custom?: Record<string, any>;
1934
+ details?: FlagDetails;
1935
+ message?: Message;
1936
+ moderation_feedback?: FlagFeedback;
1937
+ moderation_result?: MessageModerationResult;
1938
+ reviewed_by?: UserResponse;
1939
+ user?: UserResponse;
1940
+ }
1941
+ export interface MessageHistoryEntryResponse {
1942
+ message_id: string;
1943
+ message_updated_at: Date;
1944
+ message_updated_by_id: string;
1945
+ text: string;
1946
+ attachments: Attachment[];
1947
+ custom: Record<string, any>;
1948
+ }
1949
+ export interface MessageModerationResult {
1950
+ action: string;
1951
+ created_at: Date;
1952
+ message_id: string;
1953
+ updated_at: Date;
1954
+ user_bad_karma: boolean;
1955
+ user_karma: number;
1956
+ blocked_word?: string;
1957
+ blocklist_name?: string;
1958
+ moderated_by?: string;
1959
+ ai_moderation_response?: ModerationResponse;
1960
+ moderation_thresholds?: Thresholds;
1961
+ }
1962
+ export interface MessagePaginationParams {
1963
+ }
1964
+ export interface MessageReadEvent {
1965
+ channel_id: string;
1966
+ channel_type: string;
1967
+ cid: string;
1968
+ created_at: Date;
1969
+ type: string;
1970
+ last_read_message_id?: string;
1971
+ team?: string;
1972
+ thread?: ThreadResponse;
1973
+ user?: UserObject;
1974
+ }
1975
+ export interface MessageRequest {
1976
+ html?: string;
1977
+ id?: string;
1978
+ mml?: string;
1979
+ parent_id?: string;
1980
+ pin_expires?: Date;
1981
+ pinned?: boolean;
1982
+ pinned_at?: Date;
1983
+ poll_id?: string;
1984
+ quoted_message_id?: string;
1985
+ show_in_channel?: boolean;
1986
+ silent?: boolean;
1987
+ text?: string;
1988
+ type?: "''regular" | 'system';
1989
+ user_id?: string;
1990
+ attachments?: Attachment[];
1991
+ mentioned_users?: string[];
1992
+ custom?: Record<string, any>;
1993
+ user?: UserRequest;
1994
+ }
1995
+ export interface MessageResponse {
1996
+ cid: string;
1997
+ created_at: Date;
1998
+ deleted_reply_count: number;
1999
+ html: string;
2000
+ id: string;
2001
+ pinned: boolean;
2002
+ reply_count: number;
2003
+ shadowed: boolean;
2004
+ silent: boolean;
2005
+ text: string;
2006
+ type: string;
2007
+ updated_at: Date;
2008
+ attachments: Attachment[];
2009
+ latest_reactions: ReactionResponse[];
2010
+ mentioned_users: UserResponse[];
2011
+ own_reactions: ReactionResponse[];
2012
+ custom: Record<string, any>;
2013
+ reaction_counts: Record<string, number>;
2014
+ reaction_scores: Record<string, number>;
2015
+ user: UserResponse;
2016
+ command?: string;
2017
+ deleted_at?: Date;
2018
+ message_text_updated_at?: Date;
2019
+ mml?: string;
2020
+ parent_id?: string;
2021
+ pin_expires?: Date;
2022
+ pinned_at?: Date;
2023
+ poll_id?: string;
2024
+ quoted_message_id?: string;
2025
+ show_in_channel?: boolean;
2026
+ thread_participants?: UserResponse[];
2027
+ i18n?: Record<string, string>;
2028
+ image_labels?: Record<string, string[]>;
2029
+ pinned_by?: UserResponse;
2030
+ poll?: Poll;
2031
+ quoted_message?: Message;
2032
+ reaction_groups?: Record<string, ReactionGroupResponse>;
2033
+ }
2034
+ export interface MessageUpdate {
2035
+ old_text?: string;
2036
+ change_set?: MessageChangeSet;
2037
+ }
2038
+ export interface MessageWithChannelResponse {
2039
+ cid: string;
2040
+ created_at: Date;
2041
+ deleted_reply_count: number;
2042
+ html: string;
2043
+ id: string;
2044
+ pinned: boolean;
2045
+ reply_count: number;
2046
+ shadowed: boolean;
2047
+ silent: boolean;
2048
+ text: string;
2049
+ type: string;
2050
+ updated_at: Date;
2051
+ attachments: Attachment[];
2052
+ latest_reactions: ReactionResponse[];
2053
+ mentioned_users: UserResponse[];
2054
+ own_reactions: ReactionResponse[];
2055
+ channel: ChannelResponse;
2056
+ custom: Record<string, any>;
2057
+ reaction_counts: Record<string, number>;
2058
+ reaction_scores: Record<string, number>;
2059
+ user: UserResponse;
2060
+ command?: string;
2061
+ deleted_at?: Date;
2062
+ message_text_updated_at?: Date;
2063
+ mml?: string;
2064
+ parent_id?: string;
2065
+ pin_expires?: Date;
2066
+ pinned_at?: Date;
2067
+ poll_id?: string;
2068
+ quoted_message_id?: string;
2069
+ show_in_channel?: boolean;
2070
+ thread_participants?: UserResponse[];
2071
+ i18n?: Record<string, string>;
2072
+ image_labels?: Record<string, string[]>;
2073
+ pinned_by?: UserResponse;
2074
+ poll?: Poll;
2075
+ quoted_message?: Message;
2076
+ reaction_groups?: Record<string, ReactionGroupResponse>;
2077
+ }
2078
+ export interface ModerationActionConfig {
2079
+ action: string;
2080
+ description: string;
2081
+ entity_type: string;
2082
+ icon: string;
2083
+ order: number;
2084
+ custom: Record<string, any>;
2085
+ }
2086
+ export interface ModerationPayload {
2087
+ created_at?: Date;
2088
+ images?: string[];
2089
+ texts?: string[];
2090
+ videos?: string[];
2091
+ custom?: Record<string, any>;
2092
+ }
2093
+ export interface ModerationResponse {
2094
+ action: string;
2095
+ explicit: number;
2096
+ spam: number;
2097
+ toxic: number;
2098
+ }
2099
+ export interface ModerationUsageStats {
2100
+ bucket: string;
2101
+ metric: string;
2102
+ updated_at: Date;
2103
+ value: number;
2104
+ }
2105
+ export interface ModeratorStats {
2106
+ id: string;
2107
+ items_reviewed: number;
2108
+ action_counts: Record<string, number>;
2109
+ }
2110
+ export interface ModeratorStatsResponse {
2111
+ duration: string;
2112
+ moderator_stats: ModeratorStats[];
2113
+ }
2114
+ export interface MuteChannelRequest {
2115
+ expiration?: number;
2116
+ user_id?: string;
2117
+ channel_cids?: string[];
2118
+ user?: UserRequest;
2119
+ }
2120
+ export interface MuteChannelResponse {
2121
+ duration: string;
2122
+ channel_mutes?: ChannelMute[];
2123
+ channel_mute?: ChannelMute;
2124
+ own_user?: OwnUser;
2125
+ }
2126
+ export interface MuteRequest {
2127
+ target_ids: string[];
2128
+ timeout?: number;
2129
+ user_id?: string;
2130
+ user?: UserRequest;
2131
+ }
2132
+ export interface MuteResponse {
2133
+ duration: string;
2134
+ mutes?: UserMute[];
2135
+ non_existing_users?: string[];
2136
+ own_user?: OwnUser;
2137
+ }
2138
+ export interface MuteUsersRequest {
2139
+ audio?: boolean;
2140
+ mute_all_users?: boolean;
2141
+ muted_by_id?: string;
2142
+ screenshare?: boolean;
2143
+ screenshare_audio?: boolean;
2144
+ video?: boolean;
2145
+ user_ids?: string[];
2146
+ muted_by?: UserRequest;
2147
+ }
2148
+ export interface MuteUsersResponse {
2149
+ duration: string;
2150
+ }
2151
+ export interface NoiseCancellationSettings {
2152
+ mode: 'available' | 'disabled' | 'auto-on';
2153
+ }
2154
+ export interface NotificationSettings {
2155
+ enabled: boolean;
2156
+ call_live_started: EventNotificationSettings;
2157
+ call_missed: EventNotificationSettings;
2158
+ call_notification: EventNotificationSettings;
2159
+ call_ring: EventNotificationSettings;
2160
+ session_started: EventNotificationSettings;
2161
+ }
2162
+ export interface NullBool {
2163
+ has_value?: boolean;
2164
+ value?: boolean;
2165
+ }
2166
+ export interface NullTime {
2167
+ has_value?: boolean;
2168
+ value?: Date;
2169
+ }
2170
+ export interface OnlyUserID {
2171
+ id: string;
2172
+ }
2173
+ export declare const OwnCapability: {
2174
+ readonly BLOCK_USERS: "block-users";
2175
+ readonly CHANGE_MAX_DURATION: "change-max-duration";
2176
+ readonly CREATE_CALL: "create-call";
2177
+ readonly CREATE_REACTION: "create-reaction";
2178
+ readonly ENABLE_NOISE_CANCELLATION: "enable-noise-cancellation";
2179
+ readonly END_CALL: "end-call";
2180
+ readonly JOIN_BACKSTAGE: "join-backstage";
2181
+ readonly JOIN_CALL: "join-call";
2182
+ readonly JOIN_ENDED_CALL: "join-ended-call";
2183
+ readonly MUTE_USERS: "mute-users";
2184
+ readonly PIN_FOR_EVERYONE: "pin-for-everyone";
2185
+ readonly READ_CALL: "read-call";
2186
+ readonly REMOVE_CALL_MEMBER: "remove-call-member";
2187
+ readonly SCREENSHARE: "screenshare";
2188
+ readonly SEND_AUDIO: "send-audio";
2189
+ readonly SEND_VIDEO: "send-video";
2190
+ readonly START_BROADCAST_CALL: "start-broadcast-call";
2191
+ readonly START_RECORD_CALL: "start-record-call";
2192
+ readonly START_TRANSCRIPTION_CALL: "start-transcription-call";
2193
+ readonly STOP_BROADCAST_CALL: "stop-broadcast-call";
2194
+ readonly STOP_RECORD_CALL: "stop-record-call";
2195
+ readonly STOP_TRANSCRIPTION_CALL: "stop-transcription-call";
2196
+ readonly UPDATE_CALL: "update-call";
2197
+ readonly UPDATE_CALL_MEMBER: "update-call-member";
2198
+ readonly UPDATE_CALL_PERMISSIONS: "update-call-permissions";
2199
+ readonly UPDATE_CALL_SETTINGS: "update-call-settings";
2200
+ };
2201
+ export type OwnCapability = (typeof OwnCapability)[keyof typeof OwnCapability];
2202
+ export interface OwnUser {
2203
+ banned: boolean;
2204
+ created_at: Date;
2205
+ id: string;
2206
+ language: string;
2207
+ online: boolean;
2208
+ role: string;
2209
+ total_unread_count: number;
2210
+ unread_channels: number;
2211
+ unread_count: number;
2212
+ unread_threads: number;
2213
+ updated_at: Date;
2214
+ channel_mutes: ChannelMute[];
2215
+ devices: Device[];
2216
+ mutes: UserMute[];
2217
+ custom: Record<string, any>;
2218
+ deactivated_at?: Date;
2219
+ deleted_at?: Date;
2220
+ invisible?: boolean;
2221
+ last_active?: Date;
2222
+ blocked_user_ids?: string[];
2223
+ latest_hidden_channels?: string[];
2224
+ teams?: string[];
2225
+ privacy_settings?: PrivacySettings;
2226
+ push_notifications?: PushNotificationSettings;
2227
+ }
2228
+ export interface PaginationParams {
2229
+ limit?: number;
2230
+ offset?: number;
2231
+ }
2232
+ export interface PendingMessage {
2233
+ channel?: Channel;
2234
+ message?: Message;
2235
+ metadata?: Record<string, string>;
2236
+ user?: UserObject;
2237
+ }
2238
+ export interface Permission {
2239
+ action: string;
2240
+ custom: boolean;
2241
+ description: string;
2242
+ id: string;
2243
+ level: 'app' | 'channel';
2244
+ name: string;
2245
+ owner: boolean;
2246
+ same_team: boolean;
2247
+ tags: string[];
2248
+ condition?: Record<string, any>;
2249
+ }
2250
+ export interface PinRequest {
2251
+ session_id: string;
2252
+ user_id: string;
2253
+ }
2254
+ export interface PinResponse {
2255
+ duration: string;
2256
+ }
2257
+ export interface Policy {
2258
+ action: number;
2259
+ created_at: Date;
2260
+ name: string;
2261
+ owner: boolean;
2262
+ priority: number;
2263
+ updated_at: Date;
2264
+ resources: string[];
2265
+ roles: string[];
2266
+ }
2267
+ export interface PolicyRequest {
2268
+ action: 'Deny' | 'Allow';
2269
+ name: string;
2270
+ owner: boolean;
2271
+ priority: number;
2272
+ resources: string[];
2273
+ roles: string[];
2274
+ }
2275
+ export interface Poll {
2276
+ allow_answers: boolean;
2277
+ allow_user_suggested_options: boolean;
2278
+ answers_count: number;
2279
+ created_at: Date;
2280
+ created_by_id: string;
2281
+ description: string;
2282
+ enforce_unique_vote: boolean;
2283
+ id: string;
2284
+ name: string;
2285
+ updated_at: Date;
2286
+ vote_count: number;
2287
+ latest_answers: PollVote[];
2288
+ options: PollOption[];
2289
+ own_votes: PollVote[];
2290
+ custom: Record<string, any>;
2291
+ latest_votes_by_option: Record<string, Array<PollVote | null>>;
2292
+ vote_counts_by_option: Record<string, number>;
2293
+ is_closed?: boolean;
2294
+ max_votes_allowed?: number;
2295
+ voting_visibility?: string;
2296
+ created_by?: UserObject;
2297
+ }
2298
+ export interface PollOption {
2299
+ id: string;
2300
+ text: string;
2301
+ custom: Record<string, any>;
2302
+ }
2303
+ export interface PollOptionInput {
2304
+ text?: string;
2305
+ custom?: Record<string, any>;
2306
+ }
2307
+ export interface PollOptionRequest {
2308
+ id: string;
2309
+ text?: string;
2310
+ custom?: Record<string, any>;
2311
+ }
2312
+ export interface PollOptionResponse {
2313
+ duration: string;
2314
+ poll_option: PollOptionResponseData;
2315
+ }
2316
+ export interface PollOptionResponseData {
2317
+ id: string;
2318
+ text: string;
2319
+ custom: Record<string, any>;
2320
+ }
2321
+ export interface PollResponse {
2322
+ duration: string;
2323
+ poll: PollResponseData;
2324
+ }
2325
+ export interface PollResponseData {
2326
+ allow_answers: boolean;
2327
+ allow_user_suggested_options: boolean;
2328
+ answers_count: number;
2329
+ created_at: Date;
2330
+ created_by_id: string;
2331
+ description: string;
2332
+ enforce_unique_vote: boolean;
2333
+ id: string;
2334
+ name: string;
2335
+ updated_at: Date;
2336
+ vote_count: number;
2337
+ voting_visibility: string;
2338
+ options: PollOptionResponseData[];
2339
+ own_votes: PollVoteResponseData[];
2340
+ custom: Record<string, any>;
2341
+ latest_votes_by_option: Record<string, Array<PollVoteResponseData | null>>;
2342
+ vote_counts_by_option: Record<string, number>;
2343
+ is_closed?: boolean;
2344
+ max_votes_allowed?: number;
2345
+ created_by?: UserResponse;
2346
+ }
2347
+ export interface PollVote {
2348
+ created_at: Date;
2349
+ id: string;
2350
+ option_id: string;
2351
+ poll_id: string;
2352
+ updated_at: Date;
2353
+ answer_text?: string;
2354
+ is_answer?: boolean;
2355
+ user_id?: string;
2356
+ user?: UserObject;
2357
+ }
2358
+ export interface PollVoteResponse {
2359
+ duration: string;
2360
+ vote?: PollVoteResponseData;
2361
+ }
2362
+ export interface PollVoteResponseData {
2363
+ created_at: Date;
2364
+ id: string;
2365
+ option_id: string;
2366
+ poll_id: string;
2367
+ updated_at: Date;
2368
+ answer_text?: string;
2369
+ is_answer?: boolean;
2370
+ user_id?: string;
2371
+ user?: UserResponse;
2372
+ }
2373
+ export interface PollVotesResponse {
2374
+ duration: string;
2375
+ votes: PollVoteResponseData[];
2376
+ next?: string;
2377
+ prev?: string;
2378
+ }
2379
+ export interface PrivacySettings {
2380
+ read_receipts?: ReadReceipts;
2381
+ typing_indicators?: TypingIndicators;
2382
+ }
2383
+ export interface PrivacySettingsResponse {
2384
+ read_receipts?: ReadReceiptsResponse;
2385
+ typing_indicators?: TypingIndicatorsResponse;
2386
+ }
2387
+ export interface PublishedTrackInfo {
2388
+ codec_mime_type?: string;
2389
+ duration_seconds?: number;
2390
+ track_type?: string;
2391
+ }
2392
+ export interface PublisherAggregateStats {
2393
+ by_track_type?: Record<string, Count>;
2394
+ total?: Count;
2395
+ }
2396
+ export interface PushConfig {
2397
+ version: 'v1' | 'v2';
2398
+ offline_only?: boolean;
2399
+ }
2400
+ export interface PushNotificationFields {
2401
+ offline_only: boolean;
2402
+ version: string;
2403
+ apn: APNConfigFields;
2404
+ firebase: FirebaseConfigFields;
2405
+ huawei: HuaweiConfigFields;
2406
+ xiaomi: XiaomiConfigFields;
2407
+ providers?: PushProvider[];
2408
+ }
2409
+ export interface PushNotificationSettings {
2410
+ disabled?: boolean;
2411
+ disabled_until?: Date;
2412
+ }
2413
+ export interface PushNotificationSettingsInput {
2414
+ disabled?: NullBool;
2415
+ disabled_until?: NullTime;
2416
+ }
2417
+ export interface PushNotificationSettingsResponse {
2418
+ disabled?: boolean;
2419
+ disabled_until?: Date;
2420
+ }
2421
+ export interface PushProvider {
2422
+ created_at: Date;
2423
+ name: string;
2424
+ type: string;
2425
+ updated_at: Date;
2426
+ apn_auth_key?: string;
2427
+ apn_auth_type?: string;
2428
+ apn_development?: boolean;
2429
+ apn_host?: string;
2430
+ apn_key_id?: string;
2431
+ apn_notification_template?: string;
2432
+ apn_p12_cert?: string;
2433
+ apn_team_id?: string;
2434
+ apn_topic?: string;
2435
+ description?: string;
2436
+ disabled_at?: Date;
2437
+ disabled_reason?: string;
2438
+ firebase_apn_template?: string;
2439
+ firebase_credentials?: string;
2440
+ firebase_data_template?: string;
2441
+ firebase_host?: string;
2442
+ firebase_notification_template?: string;
2443
+ firebase_server_key?: string;
2444
+ huawei_app_id?: string;
2445
+ huawei_app_secret?: string;
2446
+ xiaomi_app_secret?: string;
2447
+ xiaomi_package_name?: string;
2448
+ }
2449
+ export interface PushProviderResponse {
2450
+ created_at: Date;
2451
+ name: string;
2452
+ type: string;
2453
+ updated_at: Date;
2454
+ apn_auth_key?: string;
2455
+ apn_auth_type?: string;
2456
+ apn_development?: boolean;
2457
+ apn_host?: string;
2458
+ apn_key_id?: string;
2459
+ apn_p12_cert?: string;
2460
+ apn_sandbox_certificate?: boolean;
2461
+ apn_supports_remote_notifications?: boolean;
2462
+ apn_supports_voip_notifications?: boolean;
2463
+ apn_team_id?: string;
2464
+ apn_topic?: string;
2465
+ description?: string;
2466
+ disabled_at?: Date;
2467
+ disabled_reason?: string;
2468
+ firebase_apn_template?: string;
2469
+ firebase_credentials?: string;
2470
+ firebase_data_template?: string;
2471
+ firebase_host?: string;
2472
+ firebase_notification_template?: string;
2473
+ firebase_server_key?: string;
2474
+ huawei_app_id?: string;
2475
+ huawei_app_secret?: string;
2476
+ xiaomi_app_secret?: string;
2477
+ xiaomi_package_name?: string;
2478
+ }
2479
+ export interface QueryBannedUsersRequest {
2480
+ filter_conditions: Record<string, any>;
2481
+ exclude_expired_bans?: boolean;
2482
+ limit?: number;
2483
+ offset?: number;
2484
+ user_id?: string;
2485
+ sort?: SortParamRequest[];
2486
+ user?: UserRequest;
2487
+ }
2488
+ export interface QueryBannedUsersResponse {
2489
+ duration: string;
2490
+ bans: BanResponse[];
2491
+ }
2492
+ export interface QueryCallMembersRequest {
2493
+ id: string;
2494
+ type: string;
2495
+ limit?: number;
2496
+ next?: string;
2497
+ prev?: string;
2498
+ sort?: SortParamRequest[];
2499
+ filter_conditions?: Record<string, any>;
2500
+ }
2501
+ export interface QueryCallMembersResponse {
2502
+ duration: string;
2503
+ members: MemberResponse[];
2504
+ next?: string;
2505
+ prev?: string;
2506
+ }
2507
+ export interface QueryCallStatsRequest {
2508
+ limit?: number;
2509
+ next?: string;
2510
+ prev?: string;
2511
+ sort?: SortParamRequest[];
2512
+ filter_conditions?: Record<string, any>;
2513
+ }
2514
+ export interface QueryCallStatsResponse {
2515
+ duration: string;
2516
+ reports: CallStatsReportSummaryResponse[];
2517
+ next?: string;
2518
+ prev?: string;
2519
+ }
2520
+ export interface QueryCallsRequest {
2521
+ limit?: number;
2522
+ next?: string;
2523
+ prev?: string;
2524
+ sort?: SortParamRequest[];
2525
+ filter_conditions?: Record<string, any>;
2526
+ }
2527
+ export interface QueryCallsResponse {
2528
+ duration: string;
2529
+ calls: CallStateResponseFields[];
2530
+ next?: string;
2531
+ prev?: string;
2532
+ }
2533
+ export interface QueryChannelsRequest {
2534
+ limit?: number;
2535
+ member_limit?: number;
2536
+ message_limit?: number;
2537
+ offset?: number;
2538
+ state?: boolean;
2539
+ user_id?: string;
2540
+ sort?: SortParamRequest[];
2541
+ filter_conditions?: Record<string, any>;
2542
+ user?: UserRequest;
2543
+ }
2544
+ export interface QueryChannelsResponse {
2545
+ duration: string;
2546
+ channels: ChannelStateResponseFields[];
2547
+ }
2548
+ export interface QueryFeedModerationTemplate {
2549
+ created_at: Date;
2550
+ name: string;
2551
+ updated_at: Date;
2552
+ config?: FeedsModerationTemplateConfig;
2553
+ }
2554
+ export interface QueryFeedModerationTemplatesResponse {
2555
+ duration: string;
2556
+ templates: QueryFeedModerationTemplate[];
2557
+ }
2558
+ export interface QueryMembersRequest {
2559
+ type: string;
2560
+ filter_conditions: Record<string, any>;
2561
+ id?: string;
2562
+ limit?: number;
2563
+ offset?: number;
2564
+ user_id?: string;
2565
+ members?: ChannelMember[];
2566
+ sort?: SortParamRequest[];
2567
+ user?: UserRequest;
2568
+ }
2569
+ export interface QueryMessageFlagsRequest {
2570
+ limit?: number;
2571
+ offset?: number;
2572
+ show_deleted_messages?: boolean;
2573
+ user_id?: string;
2574
+ sort?: SortParam[];
2575
+ filter_conditions?: Record<string, any>;
2576
+ user?: UserRequest;
2577
+ }
2578
+ export interface QueryMessageFlagsResponse {
2579
+ duration: string;
2580
+ flags: MessageFlagResponse[];
2581
+ }
2582
+ export interface QueryMessageHistoryRequest {
2583
+ filter: Record<string, any>;
2584
+ limit?: number;
2585
+ next?: string;
2586
+ prev?: string;
2587
+ sort?: SortParamRequest[];
2588
+ }
2589
+ export interface QueryMessageHistoryResponse {
2590
+ duration: string;
2591
+ message_history: MessageHistoryEntryResponse[];
2592
+ next?: string;
2593
+ prev?: string;
2594
+ }
2595
+ export interface QueryModerationLogsRequest {
2596
+ limit?: number;
2597
+ next?: string;
2598
+ prev?: string;
2599
+ user_id?: string;
2600
+ sort?: SortParamRequest[];
2601
+ filter?: Record<string, any>;
2602
+ user?: UserRequest;
2603
+ }
2604
+ export interface QueryModerationLogsResponse {
2605
+ duration: string;
2606
+ l_og_s: ActionLogResponse[];
2607
+ next?: string;
2608
+ prev?: string;
2609
+ }
2610
+ export interface QueryPollVotesRequest {
2611
+ limit?: number;
2612
+ next?: string;
2613
+ prev?: string;
2614
+ sort?: SortParamRequest[];
2615
+ filter?: Record<string, any>;
2616
+ }
2617
+ export interface QueryPollsRequest {
2618
+ limit?: number;
2619
+ next?: string;
2620
+ prev?: string;
2621
+ sort?: SortParamRequest[];
2622
+ filter?: Record<string, any>;
2623
+ }
2624
+ export interface QueryPollsResponse {
2625
+ duration: string;
2626
+ polls: PollResponseData[];
2627
+ next?: string;
2628
+ prev?: string;
2629
+ }
2630
+ export interface QueryReactionsRequest {
2631
+ limit?: number;
2632
+ next?: string;
2633
+ prev?: string;
2634
+ user_id?: string;
2635
+ sort?: SortParamRequest[];
2636
+ filter?: Record<string, any>;
2637
+ user?: UserRequest;
2638
+ }
2639
+ export interface QueryReactionsResponse {
2640
+ duration: string;
2641
+ reactions: ReactionResponse[];
2642
+ next?: string;
2643
+ prev?: string;
2644
+ }
2645
+ export interface QueryReviewQueueRequest {
2646
+ limit?: number;
2647
+ lock_moderator_duration?: number;
2648
+ lock_moderator_id?: string;
2649
+ next?: string;
2650
+ prev?: string;
2651
+ stats_only?: boolean;
2652
+ user_id?: string;
2653
+ sort?: SortParamRequest[];
2654
+ filter?: Record<string, any>;
2655
+ user?: UserRequest;
2656
+ }
2657
+ export interface QueryReviewQueueResponse {
2658
+ duration: string;
2659
+ items: ReviewQueueItem[];
2660
+ action_config: Record<string, Array<ModerationActionConfig | null>>;
2661
+ stats: Record<string, number>;
2662
+ next?: string;
2663
+ prev?: string;
2664
+ }
2665
+ export interface QueryThreadsRequest {
2666
+ limit?: number;
2667
+ member_limit?: number;
2668
+ next?: string;
2669
+ participant_limit?: number;
2670
+ prev?: string;
2671
+ reply_limit?: number;
2672
+ user_id?: string;
2673
+ user?: UserRequest;
2674
+ }
2675
+ export interface QueryThreadsResponse {
2676
+ duration: string;
2677
+ threads: ThreadStateResponse[];
2678
+ next?: string;
2679
+ prev?: string;
2680
+ }
2681
+ export interface QueryUsageStatsRequest {
2682
+ limit?: number;
2683
+ next?: string;
2684
+ prev?: string;
2685
+ user_id?: string;
2686
+ sort?: SortParamRequest[];
2687
+ filter?: Record<string, any>;
2688
+ user?: UserRequest;
2689
+ }
2690
+ export interface QueryUsageStatsResponse {
2691
+ duration: string;
2692
+ items: ModerationUsageStats[];
2693
+ next?: string;
2694
+ prev?: string;
2695
+ }
2696
+ export interface QueryUsersPayload {
2697
+ filter_conditions: Record<string, any>;
2698
+ include_deactivated_users?: boolean;
2699
+ limit?: number;
2700
+ offset?: number;
2701
+ presence?: boolean;
2702
+ user_id?: string;
2703
+ sort?: SortParamRequest[];
2704
+ user?: UserRequest;
2705
+ }
2706
+ export interface QueryUsersResponse {
2707
+ duration: string;
2708
+ users: FullUserResponse[];
2709
+ }
2710
+ export interface QueueStatsResponse {
2711
+ avg_time_to_action: number;
2712
+ duration: string;
2713
+ time_to_action_buckets: Record<string, number>;
2714
+ }
2715
+ export interface RTMPBroadcastRequest {
2716
+ name: string;
2717
+ stream_url: string;
2718
+ quality?: '360p' | '480p' | '720p' | '1080p' | '1440p' | 'portrait-360x640' | 'portrait-480x854' | 'portrait-720x1280' | 'portrait-1080x1920' | 'portrait-1440x2560';
2719
+ stream_key?: string;
2720
+ layout?: LayoutSettingsRequest;
2721
+ }
2722
+ export interface RTMPIngress {
2723
+ address: string;
2724
+ }
2725
+ export interface RTMPLocation {
2726
+ name: string;
2727
+ stream_key: string;
2728
+ stream_url: string;
2729
+ }
2730
+ export interface RTMPSettings {
2731
+ enabled: boolean;
2732
+ quality_name?: string;
2733
+ layout?: LayoutSettings;
2734
+ location?: RTMPLocation;
2735
+ }
2736
+ export interface RTMPSettingsRequest {
2737
+ enabled?: boolean;
2738
+ quality?: '360p' | '480p' | '720p' | '1080p' | '1440p' | 'portrait-360x640' | 'portrait-480x854' | 'portrait-720x1280' | 'portrait-1080x1920' | 'portrait-1440x2560';
2739
+ layout?: LayoutSettingsRequest;
2740
+ }
2741
+ export interface RTMPSettingsResponse {
2742
+ enabled: boolean;
2743
+ quality: string;
2744
+ layout: LayoutSettingsResponse;
2745
+ }
2746
+ export interface Reaction {
2747
+ created_at: Date;
2748
+ message_id: string;
2749
+ score: number;
2750
+ type: string;
2751
+ updated_at: Date;
2752
+ custom: Record<string, any>;
2753
+ user_id?: string;
2754
+ user?: UserObject;
2755
+ }
2756
+ export interface ReactionGroupResponse {
2757
+ count: number;
2758
+ first_reaction_at: Date;
2759
+ last_reaction_at: Date;
2760
+ sum_scores: number;
2761
+ }
2762
+ export interface ReactionRemovalResponse {
2763
+ duration: string;
2764
+ message?: Message;
2765
+ reaction?: Reaction;
2766
+ }
2767
+ export interface ReactionRequest {
2768
+ type: string;
2769
+ created_at?: Date;
2770
+ score?: number;
2771
+ updated_at?: Date;
2772
+ user_id?: string;
2773
+ custom?: Record<string, any>;
2774
+ user?: UserRequest;
2775
+ }
2776
+ export interface ReactionResponse {
2777
+ created_at: Date;
2778
+ message_id: string;
2779
+ score: number;
2780
+ type: string;
2781
+ updated_at: Date;
2782
+ user_id: string;
2783
+ custom: Record<string, any>;
2784
+ user: UserResponse;
2785
+ }
2786
+ export interface ReactivateUserRequest {
2787
+ created_by_id?: string;
2788
+ name?: string;
2789
+ restore_messages?: boolean;
2790
+ }
2791
+ export interface ReactivateUserResponse {
2792
+ duration: string;
2793
+ user?: UserResponse;
2794
+ }
2795
+ export interface ReactivateUsersRequest {
2796
+ user_ids: string[];
2797
+ created_by_id?: string;
2798
+ restore_channels?: boolean;
2799
+ restore_messages?: boolean;
2800
+ }
2801
+ export interface ReactivateUsersResponse {
2802
+ duration: string;
2803
+ task_id: string;
2804
+ }
2805
+ export interface Read {
2806
+ last_read: Date;
2807
+ unread_messages: number;
2808
+ last_read_message_id?: string;
2809
+ user?: UserObject;
2810
+ }
2811
+ export interface ReadReceipts {
2812
+ enabled?: boolean;
2813
+ }
2814
+ export interface ReadReceiptsResponse {
2815
+ enabled: boolean;
2816
+ }
2817
+ export interface ReadStateResponse {
2818
+ last_read: Date;
2819
+ unread_messages: number;
2820
+ user: UserResponse;
2821
+ last_read_message_id?: string;
2822
+ }
2823
+ export interface RecordSettings {
2824
+ audio_only: boolean;
2825
+ mode: string;
2826
+ quality: string;
2827
+ layout?: LayoutSettings;
2828
+ }
2829
+ export interface RecordSettingsRequest {
2830
+ mode: 'available' | 'disabled' | 'auto-on';
2831
+ audio_only?: boolean;
2832
+ quality?: '360p' | '480p' | '720p' | '1080p' | '1440p' | 'portrait-360x640' | 'portrait-480x854' | 'portrait-720x1280' | 'portrait-1080x1920' | 'portrait-1440x2560';
2833
+ layout?: LayoutSettingsRequest;
2834
+ }
2835
+ export interface RecordSettingsResponse {
2836
+ audio_only: boolean;
2837
+ mode: string;
2838
+ quality: string;
2839
+ layout: LayoutSettingsResponse;
2840
+ }
2841
+ export interface Response {
2842
+ duration: string;
2843
+ }
2844
+ export interface RestoreActionRequest {
2845
+ }
2846
+ export interface RestoreUsersRequest {
2847
+ user_ids: string[];
2848
+ }
2849
+ export interface ReviewQueueItem {
2850
+ content_changed: boolean;
2851
+ created_at: Date;
2852
+ entity_id: string;
2853
+ entity_type: string;
2854
+ has_image: boolean;
2855
+ has_text: boolean;
2856
+ has_video: boolean;
2857
+ id: string;
2858
+ moderation_payload_hash: string;
2859
+ recommended_action: string;
2860
+ reviewed_by: string;
2861
+ severity: number;
2862
+ status: string;
2863
+ updated_at: Date;
2864
+ actions: ActionLog[];
2865
+ bans: Ban[];
2866
+ flags: Flag2[];
2867
+ languages: string[];
2868
+ completed_at: NullTime;
2869
+ reviewed_at: NullTime;
2870
+ assigned_to?: UserObject;
2871
+ entity_creator?: UserObject;
2872
+ feeds_v2_activity?: EnrichedActivity;
2873
+ feeds_v2_reaction?: Reaction;
2874
+ message?: Message;
2875
+ moderation_payload?: ModerationPayload;
2876
+ }
2877
+ export interface RingSettings {
2878
+ auto_cancel_timeout_ms: number;
2879
+ incoming_call_timeout_ms: number;
2880
+ missed_call_timeout_ms: number;
2881
+ }
2882
+ export interface RingSettingsRequest {
2883
+ auto_cancel_timeout_ms: number;
2884
+ incoming_call_timeout_ms: number;
2885
+ missed_call_timeout_ms?: number;
2886
+ }
2887
+ export interface RingSettingsResponse {
2888
+ auto_cancel_timeout_ms: number;
2889
+ incoming_call_timeout_ms: number;
2890
+ missed_call_timeout_ms: number;
2891
+ }
2892
+ export interface Role {
2893
+ created_at: Date;
2894
+ custom: boolean;
2895
+ name: string;
2896
+ updated_at: Date;
2897
+ scopes: string[];
2898
+ }
2899
+ export interface S3Request {
2900
+ s3_region: string;
2901
+ s3_api_key?: string;
2902
+ s3_secret?: string;
2903
+ }
2904
+ export interface SFULocationResponse {
2905
+ datacenter: string;
2906
+ id: string;
2907
+ coordinates: Coordinates;
2908
+ location: Location;
2909
+ }
2910
+ export interface ScreensharingSettings {
2911
+ access_request_enabled: boolean;
2912
+ enabled: boolean;
2913
+ target_resolution?: TargetResolution;
2914
+ }
2915
+ export interface ScreensharingSettingsRequest {
2916
+ access_request_enabled?: boolean;
2917
+ enabled?: boolean;
2918
+ target_resolution?: TargetResolution;
2919
+ }
2920
+ export interface ScreensharingSettingsResponse {
2921
+ access_request_enabled: boolean;
2922
+ enabled: boolean;
2923
+ target_resolution?: TargetResolution;
2924
+ }
2925
+ export interface SearchRequest {
2926
+ filter_conditions: Record<string, any>;
2927
+ limit?: number;
2928
+ next?: string;
2929
+ offset?: number;
2930
+ query?: string;
2931
+ sort?: SortParamRequest[];
2932
+ message_filter_conditions?: Record<string, any>;
2933
+ }
2934
+ export interface SearchResponse {
2935
+ duration: string;
2936
+ results: SearchResult[];
2937
+ next?: string;
2938
+ previous?: string;
2939
+ results_warning?: SearchWarning;
2940
+ }
2941
+ export interface SearchResult {
2942
+ message?: SearchResultMessage;
2943
+ }
2944
+ export interface SearchResultMessage {
2945
+ cid: string;
2946
+ created_at: Date;
2947
+ deleted_reply_count: number;
2948
+ html: string;
2949
+ id: string;
2950
+ pinned: boolean;
2951
+ reply_count: number;
2952
+ shadowed: boolean;
2953
+ silent: boolean;
2954
+ text: string;
2955
+ type: string;
2956
+ updated_at: Date;
2957
+ attachments: Attachment[];
2958
+ latest_reactions: Reaction[];
2959
+ mentioned_users: UserObject[];
2960
+ own_reactions: Reaction[];
2961
+ custom: Record<string, any>;
2962
+ reaction_counts: Record<string, number>;
2963
+ reaction_groups: Record<string, ReactionGroupResponse>;
2964
+ reaction_scores: Record<string, number>;
2965
+ before_message_send_failed?: boolean;
2966
+ command?: string;
2967
+ deleted_at?: Date;
2968
+ message_text_updated_at?: Date;
2969
+ mml?: string;
2970
+ parent_id?: string;
2971
+ pin_expires?: Date;
2972
+ pinned_at?: Date;
2973
+ poll_id?: string;
2974
+ quoted_message_id?: string;
2975
+ show_in_channel?: boolean;
2976
+ thread_participants?: UserObject[];
2977
+ channel?: ChannelResponse;
2978
+ i18n?: Record<string, string>;
2979
+ image_labels?: Record<string, string[]>;
2980
+ pinned_by?: UserObject;
2981
+ poll?: Poll;
2982
+ quoted_message?: Message;
2983
+ user?: UserObject;
2984
+ }
2985
+ export interface SearchWarning {
2986
+ warning_code: number;
2987
+ warning_description: string;
2988
+ channel_search_count?: number;
2989
+ channel_search_cids?: string[];
2990
+ }
2991
+ export interface SendCallEventRequest {
2992
+ user_id?: string;
2993
+ custom?: Record<string, any>;
2994
+ user?: UserRequest;
2995
+ }
2996
+ export interface SendCallEventResponse {
2997
+ duration: string;
2998
+ }
2999
+ export interface SendEventRequest {
3000
+ event: EventRequest;
3001
+ }
3002
+ export interface SendMessageRequest {
3003
+ message: MessageRequest;
3004
+ force_moderation?: boolean;
3005
+ keep_channel_hidden?: boolean;
3006
+ pending?: boolean;
3007
+ skip_enrich_url?: boolean;
3008
+ skip_push?: boolean;
3009
+ pending_message_metadata?: Record<string, string>;
3010
+ }
3011
+ export interface SendMessageResponse {
3012
+ duration: string;
3013
+ message: MessageResponse;
3014
+ pending_message_metadata?: Record<string, string>;
3015
+ }
3016
+ export interface SendReactionRequest {
3017
+ reaction: ReactionRequest;
3018
+ enforce_unique?: boolean;
3019
+ skip_push?: boolean;
3020
+ }
3021
+ export interface SendReactionResponse {
3022
+ duration: string;
3023
+ message: MessageResponse;
3024
+ reaction: ReactionResponse;
3025
+ }
3026
+ export interface SendUserCustomEventRequest {
3027
+ event: UserCustomEventRequest;
3028
+ }
3029
+ export interface ShowChannelRequest {
3030
+ user_id?: string;
3031
+ user?: UserRequest;
3032
+ }
3033
+ export interface ShowChannelResponse {
3034
+ duration: string;
3035
+ }
3036
+ export interface SortParam {
3037
+ direction?: number;
3038
+ field?: string;
3039
+ }
3040
+ export interface SortParamRequest {
3041
+ direction?: number;
3042
+ field?: string;
3043
+ }
3044
+ export interface StartHLSBroadcastingRequest {
3045
+ }
3046
+ export interface StartHLSBroadcastingResponse {
3047
+ duration: string;
3048
+ playlist_url: string;
3049
+ }
3050
+ export interface StartRTMPBroadcastsRequest {
3051
+ broadcasts: RTMPBroadcastRequest[];
3052
+ }
3053
+ export interface StartRTMPBroadcastsResponse {
3054
+ duration: string;
3055
+ }
3056
+ export interface StartRecordingRequest {
3057
+ recording_external_storage?: string;
3058
+ }
3059
+ export interface StartRecordingResponse {
3060
+ duration: string;
3061
+ }
3062
+ export interface StartTranscriptionRequest {
3063
+ transcription_external_storage?: string;
3064
+ }
3065
+ export interface StartTranscriptionResponse {
3066
+ duration: string;
3067
+ }
3068
+ export interface StopAllRTMPBroadcastsRequest {
3069
+ }
3070
+ export interface StopAllRTMPBroadcastsResponse {
3071
+ duration: string;
3072
+ }
3073
+ export interface StopHLSBroadcastingRequest {
3074
+ }
3075
+ export interface StopHLSBroadcastingResponse {
3076
+ duration: string;
3077
+ }
3078
+ export interface StopLiveRequest {
3079
+ }
3080
+ export interface StopLiveResponse {
3081
+ duration: string;
3082
+ call: CallResponse;
3083
+ }
3084
+ export interface StopRTMPBroadcastsRequest {
3085
+ }
3086
+ export interface StopRTMPBroadcastsResponse {
3087
+ duration: string;
3088
+ }
3089
+ export interface StopRecordingRequest {
3090
+ }
3091
+ export interface StopRecordingResponse {
3092
+ duration: string;
3093
+ }
3094
+ export interface StopTranscriptionRequest {
3095
+ }
3096
+ export interface StopTranscriptionResponse {
3097
+ duration: string;
3098
+ }
3099
+ export interface SubmitActionRequest {
3100
+ action_type: 'mark_safe' | 'delete_message' | 'delete_activity' | 'delete_reaction' | 'ban' | 'custom' | 'unban' | 'restore' | 'delete_user' | 'unblock';
3101
+ item_id: string;
3102
+ user_id?: string;
3103
+ ban?: BanActionRequest;
3104
+ custom?: CustomActionRequest;
3105
+ delete_message?: DeleteMessageRequest;
3106
+ delete_reaction?: DeleteReactionRequest;
3107
+ delete_user?: DeleteUserRequest;
3108
+ unban?: UnbanActionRequest;
3109
+ user?: UserRequest;
3110
+ }
3111
+ export interface SubmitActionResponse {
3112
+ duration: string;
3113
+ item?: ReviewQueueItem;
3114
+ }
3115
+ export interface Subsession {
3116
+ ended_at: number;
3117
+ joined_at: number;
3118
+ sfu_id: string;
3119
+ pub_sub_hint?: MediaPubSubHint;
3120
+ }
3121
+ export interface TURNAggregatedStats {
3122
+ tcp?: Count;
3123
+ total?: Count;
3124
+ }
3125
+ export interface TargetResolution {
3126
+ bitrate: number;
3127
+ height: number;
3128
+ width: number;
3129
+ }
3130
+ export interface ThreadParticipant {
3131
+ app_pk: number;
3132
+ channel_cid: string;
3133
+ created_at: Date;
3134
+ last_read_at: Date;
3135
+ custom: Record<string, any>;
3136
+ last_thread_message_at?: Date;
3137
+ left_thread_at?: Date;
3138
+ thread_id?: string;
3139
+ user_id?: string;
3140
+ user?: UserObject;
3141
+ }
3142
+ export interface ThreadResponse {
3143
+ channel_cid: string;
3144
+ created_at: Date;
3145
+ created_by_user_id: string;
3146
+ parent_message_id: string;
3147
+ title: string;
3148
+ updated_at: Date;
3149
+ custom: Record<string, any>;
3150
+ active_participant_count?: number;
3151
+ deleted_at?: Date;
3152
+ last_message_at?: Date;
3153
+ participant_count?: number;
3154
+ reply_count?: number;
3155
+ thread_participants?: ThreadParticipant[];
3156
+ channel?: ChannelResponse;
3157
+ created_by?: UserObject;
3158
+ parent_message?: Message;
3159
+ }
3160
+ export interface ThreadState {
3161
+ channel_cid: string;
3162
+ created_at: Date;
3163
+ parent_message_id: string;
3164
+ title: string;
3165
+ updated_at: Date;
3166
+ latest_replies: Message[];
3167
+ custom: Record<string, any>;
3168
+ active_participant_count?: number;
3169
+ deleted_at?: Date;
3170
+ last_message_at?: Date;
3171
+ participant_count?: number;
3172
+ reply_count?: number;
3173
+ read?: Read[];
3174
+ thread_participants?: ThreadParticipant[];
3175
+ channel?: Channel;
3176
+ created_by?: UserObject;
3177
+ parent_message?: Message;
3178
+ }
3179
+ export interface ThreadStateResponse {
3180
+ channel_cid: string;
3181
+ created_at: Date;
3182
+ created_by_user_id: string;
3183
+ parent_message_id: string;
3184
+ title: string;
3185
+ updated_at: Date;
3186
+ latest_replies: Message[];
3187
+ custom: Record<string, any>;
3188
+ active_participant_count?: number;
3189
+ deleted_at?: Date;
3190
+ last_message_at?: Date;
3191
+ participant_count?: number;
3192
+ reply_count?: number;
3193
+ read?: Read[];
3194
+ thread_participants?: ThreadParticipant[];
3195
+ channel?: ChannelResponse;
3196
+ created_by?: UserResponse;
3197
+ parent_message?: Message;
3198
+ }
3199
+ export interface Thresholds {
3200
+ explicit?: LabelThresholds;
3201
+ spam?: LabelThresholds;
3202
+ toxic?: LabelThresholds;
3203
+ }
3204
+ export interface ThumbnailResponse {
3205
+ image_url: string;
3206
+ }
3207
+ export interface ThumbnailsSettings {
3208
+ enabled: boolean;
3209
+ }
3210
+ export interface ThumbnailsSettingsRequest {
3211
+ enabled?: boolean;
3212
+ }
3213
+ export interface ThumbnailsSettingsResponse {
3214
+ enabled: boolean;
3215
+ }
3216
+ export interface Time {
3217
+ }
3218
+ export interface TimeStats {
3219
+ average_seconds: number;
3220
+ max_seconds: number;
3221
+ }
3222
+ export interface TranscriptionSettings {
3223
+ closed_caption_mode: string;
3224
+ mode: 'available' | 'disabled' | 'auto-on';
3225
+ languages: string[];
3226
+ }
3227
+ export interface TranscriptionSettingsRequest {
3228
+ mode: 'available' | 'disabled' | 'auto-on';
3229
+ closed_caption_mode?: string;
3230
+ languages?: string[];
3231
+ }
3232
+ export interface TranscriptionSettingsResponse {
3233
+ closed_caption_mode: string;
3234
+ mode: 'available' | 'disabled' | 'auto-on';
3235
+ languages: string[];
3236
+ }
3237
+ export interface TranslateMessageRequest {
3238
+ language: 'af' | 'sq' | 'am' | 'ar' | 'az' | 'bn' | 'bs' | 'bg' | 'zh' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'fa-AF' | 'nl' | 'en' | 'et' | 'fi' | 'fr' | 'fr-CA' | 'ka' | 'de' | 'el' | 'ha' | 'he' | 'hi' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lv' | 'ms' | 'no' | 'fa' | 'ps' | 'pl' | 'pt' | 'ro' | 'ru' | 'sr' | 'sk' | 'sl' | 'so' | 'es' | 'es-MX' | 'sw' | 'sv' | 'tl' | 'ta' | 'th' | 'tr' | 'uk' | 'ur' | 'vi';
3239
+ }
3240
+ export interface TruncateChannelRequest {
3241
+ hard_delete?: boolean;
3242
+ skip_push?: boolean;
3243
+ truncated_at?: Date;
3244
+ user_id?: string;
3245
+ message?: MessageRequest;
3246
+ user?: UserRequest;
3247
+ }
3248
+ export interface TruncateChannelResponse {
3249
+ duration: string;
3250
+ channel?: ChannelResponse;
3251
+ message?: Message;
3252
+ }
3253
+ export interface TypingIndicators {
3254
+ enabled?: boolean;
3255
+ }
3256
+ export interface TypingIndicatorsResponse {
3257
+ enabled: boolean;
3258
+ }
3259
+ export interface UnbanActionRequest {
3260
+ }
3261
+ export interface UnbanRequest {
3262
+ unbanned_by_id?: string;
3263
+ unbanned_by?: UserRequest;
3264
+ }
3265
+ export interface UnbanResponse {
3266
+ duration: string;
3267
+ }
3268
+ export interface UnblockActionRequest {
3269
+ }
3270
+ export interface UnblockUserRequest {
3271
+ user_id: string;
3272
+ }
3273
+ export interface UnblockUserResponse {
3274
+ duration: string;
3275
+ }
3276
+ export interface UnblockUsersRequest {
3277
+ blocked_user_id: string;
3278
+ user_id?: string;
3279
+ user?: UserRequest;
3280
+ }
3281
+ export interface UnblockUsersResponse {
3282
+ duration: string;
3283
+ }
3284
+ export interface UnmuteChannelRequest {
3285
+ expiration?: number;
3286
+ user_id?: string;
3287
+ channel_cids?: string[];
3288
+ user?: UserRequest;
3289
+ }
3290
+ export interface UnmuteRequest {
3291
+ target_ids: string[];
3292
+ user_id?: string;
3293
+ user?: UserRequest;
3294
+ }
3295
+ export interface UnmuteResponse {
3296
+ duration: string;
3297
+ non_existing_users?: string[];
3298
+ }
3299
+ export interface UnpinRequest {
3300
+ session_id: string;
3301
+ user_id: string;
3302
+ }
3303
+ export interface UnpinResponse {
3304
+ duration: string;
3305
+ }
3306
+ export interface UnreadCountsBatchRequest {
3307
+ user_ids: string[];
3308
+ }
3309
+ export interface UnreadCountsBatchResponse {
3310
+ duration: string;
3311
+ counts_by_user: Record<string, UnreadCountsResponse>;
3312
+ }
3313
+ export interface UnreadCountsChannel {
3314
+ channel_id: string;
3315
+ last_read: Date;
3316
+ unread_count: number;
3317
+ }
3318
+ export interface UnreadCountsChannelType {
3319
+ channel_count: number;
3320
+ channel_type: string;
3321
+ unread_count: number;
3322
+ }
3323
+ export interface UnreadCountsResponse {
3324
+ total_unread_count: number;
3325
+ total_unread_threads_count: number;
3326
+ channel_type: UnreadCountsChannelType[];
3327
+ channels: UnreadCountsChannel[];
3328
+ threads: UnreadCountsThread[];
3329
+ }
3330
+ export interface UnreadCountsThread {
3331
+ last_read: Date;
3332
+ last_read_message_id: string;
3333
+ parent_message_id: string;
3334
+ unread_count: number;
3335
+ }
3336
+ export interface UpdateAppRequest {
3337
+ async_url_enrich_enabled?: boolean;
3338
+ auto_translation_enabled?: boolean;
3339
+ before_message_send_hook_url?: string;
3340
+ cdn_expiration_seconds?: number;
3341
+ channel_hide_members_only?: boolean;
3342
+ custom_action_handler_url?: string;
3343
+ disable_auth_checks?: boolean;
3344
+ disable_permissions_checks?: boolean;
3345
+ enforce_unique_usernames?: 'no' | 'app' | 'team';
3346
+ feeds_moderation_enabled?: boolean;
3347
+ feeds_v2_region?: string;
3348
+ image_moderation_enabled?: boolean;
3349
+ migrate_permissions_to_v2?: boolean;
3350
+ moderation_enabled?: boolean;
3351
+ moderation_webhook_url?: string;
3352
+ multi_tenant_enabled?: boolean;
3353
+ permission_version?: 'v1' | 'v2';
3354
+ reminders_interval?: number;
3355
+ reminders_max_members?: number;
3356
+ revoke_tokens_issued_before?: Date;
3357
+ sns_key?: string;
3358
+ sns_secret?: string;
3359
+ sns_topic_arn?: string;
3360
+ sqs_key?: string;
3361
+ sqs_secret?: string;
3362
+ sqs_url?: string;
3363
+ video_provider?: 'agora' | 'hms';
3364
+ webhook_url?: string;
3365
+ allowed_flag_reasons?: string[];
3366
+ image_moderation_block_labels?: string[];
3367
+ image_moderation_labels?: string[];
3368
+ user_search_disallowed_roles?: string[];
3369
+ webhook_events?: string[];
3370
+ agora_options?: Config;
3371
+ apn_config?: APNConfig;
3372
+ async_moderation_config?: AsyncModerationConfiguration;
3373
+ datadog_info?: DataDogInfo;
3374
+ file_upload_config?: FileUploadConfig;
3375
+ firebase_config?: FirebaseConfig;
3376
+ grants?: Record<string, string[]>;
3377
+ hms_options?: Config;
3378
+ huawei_config?: HuaweiConfig;
3379
+ image_upload_config?: FileUploadConfig;
3380
+ push_config?: PushConfig;
3381
+ xiaomi_config?: XiaomiConfig;
3382
+ }
3383
+ export interface UpdateBlockListRequest {
3384
+ words?: string[];
3385
+ }
3386
+ export interface UpdateCallMembersRequest {
3387
+ remove_members?: string[];
3388
+ update_members?: MemberRequest[];
3389
+ }
3390
+ export interface UpdateCallMembersResponse {
3391
+ duration: string;
3392
+ members: MemberResponse[];
3393
+ }
3394
+ export interface UpdateCallRequest {
3395
+ starts_at?: Date;
3396
+ custom?: Record<string, any>;
3397
+ settings_override?: CallSettingsRequest;
3398
+ }
3399
+ export interface UpdateCallResponse {
3400
+ duration: string;
3401
+ members: MemberResponse[];
3402
+ own_capabilities: OwnCapability[];
3403
+ call: CallResponse;
3404
+ }
3405
+ export interface UpdateCallTypeRequest {
3406
+ external_storage?: string;
3407
+ grants?: Record<string, string[]>;
3408
+ notification_settings?: NotificationSettings;
3409
+ settings?: CallSettingsRequest;
3410
+ }
3411
+ export interface UpdateCallTypeResponse {
3412
+ created_at: Date;
3413
+ duration: string;
3414
+ name: string;
3415
+ updated_at: Date;
3416
+ grants: Record<string, string[]>;
3417
+ notification_settings: NotificationSettings;
3418
+ settings: CallSettingsResponse;
3419
+ external_storage?: string;
3420
+ }
3421
+ export interface UpdateChannelPartialRequest {
3422
+ user_id?: string;
3423
+ unset?: string[];
3424
+ set?: Record<string, any>;
3425
+ user?: UserRequest;
3426
+ }
3427
+ export interface UpdateChannelPartialResponse {
3428
+ duration: string;
3429
+ members: ChannelMemberResponse[];
3430
+ channel?: ChannelResponse;
3431
+ }
3432
+ export interface UpdateChannelRequest {
3433
+ accept_invite?: boolean;
3434
+ cooldown?: number;
3435
+ hide_history?: boolean;
3436
+ reject_invite?: boolean;
3437
+ skip_push?: boolean;
3438
+ user_id?: string;
3439
+ add_members?: ChannelMember[];
3440
+ add_moderators?: string[];
3441
+ assign_roles?: ChannelMember[];
3442
+ demote_moderators?: string[];
3443
+ invites?: ChannelMember[];
3444
+ remove_members?: string[];
3445
+ data?: ChannelInput;
3446
+ message?: MessageRequest;
3447
+ user?: UserRequest;
3448
+ }
3449
+ export interface UpdateChannelResponse {
3450
+ duration: string;
3451
+ members: ChannelMember[];
3452
+ channel?: ChannelResponse;
3453
+ message?: Message;
3454
+ }
3455
+ export interface UpdateChannelTypeRequest {
3456
+ automod: 'disabled' | 'simple' | 'AI';
3457
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
3458
+ max_message_length: number;
3459
+ blocklist?: string;
3460
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
3461
+ connect_events?: boolean;
3462
+ custom_events?: boolean;
3463
+ mark_messages_pending?: boolean;
3464
+ mutes?: boolean;
3465
+ partition_size?: number;
3466
+ partition_ttl?: string;
3467
+ polls?: boolean;
3468
+ push_notifications?: boolean;
3469
+ quotes?: boolean;
3470
+ reactions?: boolean;
3471
+ read_events?: boolean;
3472
+ reminders?: boolean;
3473
+ replies?: boolean;
3474
+ search?: boolean;
3475
+ typing_events?: boolean;
3476
+ uploads?: boolean;
3477
+ url_enrichment?: boolean;
3478
+ allowed_flag_reasons?: string[];
3479
+ blocklists?: BlockListOptions[];
3480
+ commands?: string[];
3481
+ permissions?: PolicyRequest[];
3482
+ automod_thresholds?: Thresholds;
3483
+ grants?: Record<string, string[]>;
3484
+ }
3485
+ export interface UpdateChannelTypeResponse {
3486
+ automod: 'disabled' | 'simple' | 'AI';
3487
+ automod_behavior: 'flag' | 'block' | 'shadow_block';
3488
+ connect_events: boolean;
3489
+ created_at: Date;
3490
+ custom_events: boolean;
3491
+ duration: string;
3492
+ mark_messages_pending: boolean;
3493
+ max_message_length: number;
3494
+ mutes: boolean;
3495
+ name: string;
3496
+ polls: boolean;
3497
+ push_notifications: boolean;
3498
+ quotes: boolean;
3499
+ reactions: boolean;
3500
+ read_events: boolean;
3501
+ reminders: boolean;
3502
+ replies: boolean;
3503
+ search: boolean;
3504
+ typing_events: boolean;
3505
+ updated_at: Date;
3506
+ uploads: boolean;
3507
+ url_enrichment: boolean;
3508
+ commands: string[];
3509
+ permissions: PolicyRequest[];
3510
+ grants: Record<string, string[]>;
3511
+ blocklist?: string;
3512
+ blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
3513
+ partition_size?: number;
3514
+ partition_ttl?: number;
3515
+ allowed_flag_reasons?: string[];
3516
+ blocklists?: BlockListOptions[];
3517
+ automod_thresholds?: Thresholds;
3518
+ }
3519
+ export interface UpdateCommandRequest {
3520
+ description: string;
3521
+ args?: string;
3522
+ set?: string;
3523
+ }
3524
+ export interface UpdateCommandResponse {
3525
+ duration: string;
3526
+ command?: Command;
3527
+ }
3528
+ export interface UpdateExternalStorageRequest {
3529
+ bucket: string;
3530
+ storage_type: 's3' | 'gcs' | 'abs';
3531
+ gcs_credentials?: string;
3532
+ path?: string;
3533
+ aws_s3?: S3Request;
3534
+ azure_blob?: AzureRequest;
3535
+ }
3536
+ export interface UpdateExternalStorageResponse {
3537
+ bucket: string;
3538
+ duration: string;
3539
+ name: string;
3540
+ path: string;
3541
+ type: 's3' | 'gcs' | 'abs';
3542
+ }
3543
+ export interface UpdateMessagePartialRequest {
3544
+ skip_enrich_url?: boolean;
3545
+ user_id?: string;
3546
+ unset?: string[];
3547
+ set?: Record<string, any>;
3548
+ user?: UserRequest;
3549
+ }
3550
+ export interface UpdateMessagePartialResponse {
3551
+ duration: string;
3552
+ message?: Message;
3553
+ pending_message_metadata?: Record<string, string>;
3554
+ }
3555
+ export interface UpdateMessageRequest {
3556
+ message: MessageRequest;
3557
+ skip_enrich_url?: boolean;
3558
+ }
3559
+ export interface UpdateMessageResponse {
3560
+ duration: string;
3561
+ message: Message;
3562
+ pending_message_metadata?: Record<string, string>;
3563
+ }
3564
+ export interface UpdatePollOptionRequest {
3565
+ id: string;
3566
+ text: string;
3567
+ user_id?: string;
3568
+ custom?: Record<string, any>;
3569
+ user?: UserRequest;
3570
+ }
3571
+ export interface UpdatePollPartialRequest {
3572
+ user_id?: string;
3573
+ unset?: string[];
3574
+ set?: Record<string, any>;
3575
+ user?: UserRequest;
3576
+ }
3577
+ export interface UpdatePollRequest {
3578
+ id: string;
3579
+ name: string;
3580
+ allow_answers?: boolean;
3581
+ allow_user_suggested_options?: boolean;
3582
+ description?: string;
3583
+ enforce_unique_vote?: boolean;
3584
+ is_closed?: boolean;
3585
+ max_votes_allowed?: number;
3586
+ user_id?: string;
3587
+ voting_visibility?: 'anonymous' | 'public';
3588
+ options?: PollOptionRequest[];
3589
+ custom?: Record<string, any>;
3590
+ user?: UserRequest;
3591
+ }
3592
+ export interface UpdateThreadPartialRequest {
3593
+ user_id?: string;
3594
+ unset?: string[];
3595
+ set?: Record<string, any>;
3596
+ user?: UserRequest;
3597
+ }
3598
+ export interface UpdateThreadPartialResponse {
3599
+ duration: string;
3600
+ thread: ThreadResponse;
3601
+ }
3602
+ export interface UpdateUserPartialRequest {
3603
+ id: string;
3604
+ unset?: string[];
3605
+ set?: Record<string, any>;
3606
+ }
3607
+ export interface UpdateUserPermissionsRequest {
3608
+ user_id: string;
3609
+ grant_permissions?: string[];
3610
+ revoke_permissions?: string[];
3611
+ }
3612
+ export interface UpdateUserPermissionsResponse {
3613
+ duration: string;
3614
+ }
3615
+ export interface UpdateUsersPartialRequest {
3616
+ users: UpdateUserPartialRequest[];
3617
+ }
3618
+ export interface UpdateUsersRequest {
3619
+ users: Record<string, UserRequest>;
3620
+ }
3621
+ export interface UpdateUsersResponse {
3622
+ duration: string;
3623
+ membership_deletion_task_id: string;
3624
+ users: Record<string, FullUserResponse>;
3625
+ }
3626
+ export interface UpsertConfigRequest {
3627
+ key: string;
3628
+ async?: boolean;
3629
+ automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
3630
+ automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
3631
+ automod_toxicity_config?: AutomodToxicityConfig;
3632
+ aws_rek_og_nition_config?: AWSRekognitionConfig;
3633
+ block_list_config?: BlockListConfig;
3634
+ bodyguard_config?: BodyguardConfig;
3635
+ go_og_le_vision_config?: GoogleVisionConfig;
3636
+ }
3637
+ export interface UpsertConfigResponse {
3638
+ duration: string;
3639
+ config?: ConfigResponse;
3640
+ }
3641
+ export interface UpsertModerationTemplateRequest {
3642
+ name: string;
3643
+ config: FeedsModerationTemplateConfig;
3644
+ }
3645
+ export interface UpsertModerationTemplateResponse {
3646
+ created_at: Date;
3647
+ duration: string;
3648
+ name: string;
3649
+ updated_at: Date;
3650
+ config?: FeedsModerationTemplateConfig;
3651
+ }
3652
+ export interface UpsertPushProviderRequest {
3653
+ push_provider?: PushProvider;
3654
+ }
3655
+ export interface UpsertPushProviderResponse {
3656
+ duration: string;
3657
+ push_provider: PushProviderResponse;
3658
+ }
3659
+ export interface UserBlock {
3660
+ blocked_by_user_id: string;
3661
+ blocked_user_id: string;
3662
+ created_at: Date;
3663
+ }
3664
+ export interface UserCustomEventRequest {
3665
+ type: string;
3666
+ custom?: Record<string, any>;
3667
+ }
3668
+ export interface UserInfoResponse {
3669
+ image: string;
3670
+ name: string;
3671
+ roles: string[];
3672
+ custom: Record<string, any>;
3673
+ }
3674
+ export interface UserMute {
3675
+ created_at: Date;
3676
+ updated_at: Date;
3677
+ expires?: Date;
3678
+ target?: UserObject;
3679
+ user?: UserObject;
3680
+ }
3681
+ export interface UserMuteResponse {
3682
+ created_at: Date;
3683
+ updated_at: Date;
3684
+ expires?: Date;
3685
+ target?: UserResponse;
3686
+ user?: UserResponse;
3687
+ }
3688
+ export interface UserObject {
3689
+ banned: boolean;
3690
+ id: string;
3691
+ online: boolean;
3692
+ role: string;
3693
+ custom: Record<string, any>;
3694
+ ban_expires?: Date;
3695
+ created_at?: Date;
3696
+ deactivated_at?: Date;
3697
+ deleted_at?: Date;
3698
+ invisible?: boolean;
3699
+ language?: string;
3700
+ last_active?: Date;
3701
+ revoke_tokens_issued_before?: Date;
3702
+ updated_at?: Date;
3703
+ teams?: string[];
3704
+ privacy_settings?: PrivacySettings;
3705
+ push_notifications?: PushNotificationSettings;
3706
+ }
3707
+ export interface UserRequest {
3708
+ id: string;
3709
+ image?: string;
3710
+ invisible?: boolean;
3711
+ language?: string;
3712
+ name?: string;
3713
+ role?: string;
3714
+ teams?: string[];
3715
+ custom?: Record<string, any>;
3716
+ privacy_settings?: PrivacySettings;
3717
+ push_notifications?: PushNotificationSettingsInput;
3718
+ }
3719
+ export interface UserResponse {
3720
+ banned: boolean;
3721
+ created_at: Date;
3722
+ id: string;
3723
+ invisible: boolean;
3724
+ language: string;
3725
+ online: boolean;
3726
+ role: string;
3727
+ shadow_banned: boolean;
3728
+ updated_at: Date;
3729
+ blocked_user_ids: string[];
3730
+ devices: Device[];
3731
+ teams: string[];
3732
+ custom: Record<string, any>;
3733
+ ban_expires?: Date;
3734
+ deactivated_at?: Date;
3735
+ deleted_at?: Date;
3736
+ image?: string;
3737
+ last_active?: Date;
3738
+ name?: string;
3739
+ revoke_tokens_issued_before?: Date;
3740
+ privacy_settings?: PrivacySettingsResponse;
3741
+ push_notifications?: PushNotificationSettingsResponse;
3742
+ }
3743
+ export interface UserSessionStats {
3744
+ freeze_duration_seconds: number;
3745
+ max_freeze_fraction: number;
3746
+ max_freezes_duration_seconds: number;
3747
+ packet_loss_fraction: number;
3748
+ publisher_packet_loss_fraction: number;
3749
+ publishing_duration_seconds: number;
3750
+ quality_score: number;
3751
+ receiving_duration_seconds: number;
3752
+ session_id: string;
3753
+ total_pixels_in: number;
3754
+ total_pixels_out: number;
3755
+ bro_ws_er?: string;
3756
+ browser_version?: string;
3757
+ current_ip?: string;
3758
+ current_sfu?: string;
3759
+ device_model?: string;
3760
+ device_version?: string;
3761
+ distance_to_sfu_kilometers?: number;
3762
+ max_fir_per_second?: number;
3763
+ max_freezes_per_second?: number;
3764
+ max_nack_per_second?: number;
3765
+ max_pli_per_second?: number;
3766
+ os?: string;
3767
+ os_version?: string;
3768
+ publisher_noise_cancellation_seconds?: number;
3769
+ publisher_quality_limitation_fraction?: number;
3770
+ publishing_audio_codec?: string;
3771
+ publishing_video_codec?: string;
3772
+ receiving_audio_codec?: string;
3773
+ receiving_video_codec?: string;
3774
+ sdk?: string;
3775
+ sdk_version?: string;
3776
+ subscriber_video_quality_throttled_duration_seconds?: number;
3777
+ truncated?: boolean;
3778
+ webrtc_version?: string;
3779
+ published_tracks?: PublishedTrackInfo[];
3780
+ subsessions?: Subsession[];
3781
+ geolocation?: GeolocationResult;
3782
+ jitter?: TimeStats;
3783
+ latency?: TimeStats;
3784
+ max_publishing_video_quality?: VideoQuality;
3785
+ max_receiving_video_quality?: VideoQuality;
3786
+ pub_sub_hints?: MediaPubSubHint;
3787
+ publisher_audio_mos?: MOSStats;
3788
+ publisher_jitter?: TimeStats;
3789
+ publisher_latency?: TimeStats;
3790
+ publisher_video_quality_limitation_duration_seconds?: Record<string, number>;
3791
+ subscriber_audio_mos?: MOSStats;
3792
+ subscriber_jitter?: TimeStats;
3793
+ subscriber_latency?: TimeStats;
3794
+ timeline?: CallTimeline;
3795
+ }
3796
+ export interface UserStats {
3797
+ min_event_ts: number;
3798
+ session_stats: UserSessionStats[];
3799
+ info: UserInfoResponse;
3800
+ rating?: number;
3801
+ }
3802
+ export interface VideoQuality {
3803
+ usage_type?: string;
3804
+ resolution?: VideoResolution;
3805
+ }
3806
+ export interface VideoResolution {
3807
+ height: number;
3808
+ width: number;
3809
+ }
3810
+ export interface VideoSettings {
3811
+ access_request_enabled: boolean;
3812
+ camera_default_on: boolean;
3813
+ camera_facing: 'front' | 'back' | 'external';
3814
+ enabled: boolean;
3815
+ target_resolution: TargetResolution;
3816
+ }
3817
+ export interface VideoSettingsRequest {
3818
+ access_request_enabled?: boolean;
3819
+ camera_default_on?: boolean;
3820
+ camera_facing?: 'front' | 'back' | 'external';
3821
+ enabled?: boolean;
3822
+ target_resolution?: TargetResolution;
3823
+ }
3824
+ export interface VideoSettingsResponse {
3825
+ access_request_enabled: boolean;
3826
+ camera_default_on: boolean;
3827
+ camera_facing: 'front' | 'back' | 'external';
3828
+ enabled: boolean;
3829
+ target_resolution: TargetResolution;
3830
+ }
3831
+ export interface VoteData {
3832
+ answer_text?: string;
3833
+ option_id?: string;
3834
+ option?: PollOption;
3835
+ }
3836
+ export interface WSEvent {
3837
+ created_at: Date;
3838
+ type: string;
3839
+ custom: Record<string, any>;
3840
+ automoderation?: boolean;
3841
+ channel_id?: string;
3842
+ channel_type?: string;
3843
+ cid?: string;
3844
+ connection_id?: string;
3845
+ parent_id?: string;
3846
+ reason?: string;
3847
+ team?: string;
3848
+ thread_id?: string;
3849
+ user_id?: string;
3850
+ watcher_count?: number;
3851
+ automoderation_scores?: ModerationResponse;
3852
+ channel?: ChannelResponse;
3853
+ created_by?: UserObject;
3854
+ me?: OwnUser;
3855
+ member?: ChannelMember;
3856
+ message?: Message;
3857
+ message_update?: MessageUpdate;
3858
+ poll?: Poll;
3859
+ poll_vote?: PollVote;
3860
+ reaction?: Reaction;
3861
+ thread?: ThreadResponse;
3862
+ user?: UserObject;
3863
+ }
3864
+ export interface WrappedUnreadCountsResponse {
3865
+ duration: string;
3866
+ total_unread_count: number;
3867
+ total_unread_threads_count: number;
3868
+ channel_type: UnreadCountsChannelType[];
3869
+ channels: UnreadCountsChannel[];
3870
+ threads: UnreadCountsThread[];
3871
+ }
3872
+ export interface XiaomiConfig {
3873
+ disabled?: boolean;
3874
+ package_name?: string;
3875
+ secret?: string;
3876
+ }
3877
+ export interface XiaomiConfigFields {
3878
+ enabled: boolean;
3879
+ package_name?: string;
3880
+ secret?: string;
3881
+ }