@stream-io/node-sdk 0.4.10 → 0.4.12

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.
@@ -167,8 +167,6 @@ export interface ActionLogResponse {
167
167
  }
168
168
 
169
169
  export interface AggregatedStats {
170
- countrywise_aggregate_stats?: Record<string, CountrywiseAggregateStats>;
171
-
172
170
  publisher_aggregate_stats?: PublisherAggregateStats;
173
171
 
174
172
  turn?: TURNAggregatedStats;
@@ -201,6 +199,8 @@ export interface AppResponseFields {
201
199
 
202
200
  moderation_enabled: boolean;
203
201
 
202
+ moderation_multitenant_blocklist_enabled: boolean;
203
+
204
204
  moderation_webhook_url: string;
205
205
 
206
206
  multi_tenant_enabled: boolean;
@@ -545,6 +545,10 @@ export interface BlockListResponse {
545
545
 
546
546
  created_at?: Date;
547
547
 
548
+ id?: string;
549
+
550
+ team?: string;
551
+
548
552
  updated_at?: Date;
549
553
  }
550
554
 
@@ -558,6 +562,8 @@ export interface BlockListRule {
558
562
  | 'bounce_remove';
559
563
 
560
564
  name: string;
565
+
566
+ team: string;
561
567
  }
562
568
 
563
569
  export interface BlockUserRequest {
@@ -799,6 +805,8 @@ export interface CallHLSBroadcastingStartedEvent {
799
805
 
800
806
  hls_playlist_url: string;
801
807
 
808
+ call: CallResponse;
809
+
802
810
  type: string;
803
811
  }
804
812
 
@@ -951,6 +959,8 @@ export interface CallRecordingFailedEvent {
951
959
 
952
960
  created_at: Date;
953
961
 
962
+ egress_id: string;
963
+
954
964
  type: string;
955
965
  }
956
966
 
@@ -959,6 +969,8 @@ export interface CallRecordingReadyEvent {
959
969
 
960
970
  created_at: Date;
961
971
 
972
+ egress_id: string;
973
+
962
974
  call_recording: CallRecording;
963
975
 
964
976
  type: string;
@@ -969,6 +981,8 @@ export interface CallRecordingStartedEvent {
969
981
 
970
982
  created_at: Date;
971
983
 
984
+ egress_id: string;
985
+
972
986
  type: string;
973
987
  }
974
988
 
@@ -977,6 +991,8 @@ export interface CallRecordingStoppedEvent {
977
991
 
978
992
  created_at: Date;
979
993
 
994
+ egress_id: string;
995
+
980
996
  type: string;
981
997
  }
982
998
 
@@ -1313,6 +1329,8 @@ export interface CallTranscriptionFailedEvent {
1313
1329
 
1314
1330
  created_at: Date;
1315
1331
 
1332
+ egress_id: string;
1333
+
1316
1334
  type: string;
1317
1335
  }
1318
1336
 
@@ -1321,6 +1339,8 @@ export interface CallTranscriptionReadyEvent {
1321
1339
 
1322
1340
  created_at: Date;
1323
1341
 
1342
+ egress_id: string;
1343
+
1324
1344
  call_transcription: CallTranscription;
1325
1345
 
1326
1346
  type: string;
@@ -1331,6 +1351,8 @@ export interface CallTranscriptionStartedEvent {
1331
1351
 
1332
1352
  created_at: Date;
1333
1353
 
1354
+ egress_id: string;
1355
+
1334
1356
  type: string;
1335
1357
  }
1336
1358
 
@@ -1339,6 +1361,8 @@ export interface CallTranscriptionStoppedEvent {
1339
1361
 
1340
1362
  created_at: Date;
1341
1363
 
1364
+ egress_id: string;
1365
+
1342
1366
  type: string;
1343
1367
  }
1344
1368
 
@@ -1423,6 +1447,8 @@ export interface CampaignChannelTemplate {
1423
1447
  export interface CampaignCompletedEvent {
1424
1448
  created_at: Date;
1425
1449
 
1450
+ custom: Record<string, any>;
1451
+
1426
1452
  type: string;
1427
1453
 
1428
1454
  received_at?: Date;
@@ -1487,6 +1513,8 @@ export interface CampaignResponse {
1487
1513
  export interface CampaignStartedEvent {
1488
1514
  created_at: Date;
1489
1515
 
1516
+ custom: Record<string, any>;
1517
+
1490
1518
  type: string;
1491
1519
 
1492
1520
  received_at?: Date;
@@ -1939,6 +1967,12 @@ export const ChannelOwnCapability = {
1939
1967
  export type ChannelOwnCapability =
1940
1968
  (typeof ChannelOwnCapability)[keyof typeof ChannelOwnCapability];
1941
1969
 
1970
+ export interface ChannelPushPreferences {
1971
+ chat_level?: string;
1972
+
1973
+ disabled_until?: Date;
1974
+ }
1975
+
1942
1976
  export interface ChannelResponse {
1943
1977
  cid: string;
1944
1978
 
@@ -2019,6 +2053,8 @@ export interface ChannelStateResponse {
2019
2053
  channel?: ChannelResponse;
2020
2054
 
2021
2055
  membership?: ChannelMember;
2056
+
2057
+ push_preferences?: ChannelPushPreferences;
2022
2058
  }
2023
2059
 
2024
2060
  export interface ChannelStateResponseFields {
@@ -2045,6 +2081,8 @@ export interface ChannelStateResponseFields {
2045
2081
  channel?: ChannelResponse;
2046
2082
 
2047
2083
  membership?: ChannelMember;
2084
+
2085
+ push_preferences?: ChannelPushPreferences;
2048
2086
  }
2049
2087
 
2050
2088
  export interface ChannelTruncatedEvent {
@@ -2234,6 +2272,8 @@ export interface CheckRequest {
2234
2272
 
2235
2273
  entity_type: string;
2236
2274
 
2275
+ config_team?: string;
2276
+
2237
2277
  test_mode?: boolean;
2238
2278
 
2239
2279
  user_id?: string;
@@ -2409,26 +2449,22 @@ export interface Count {
2409
2449
  value: number;
2410
2450
  }
2411
2451
 
2412
- export interface CountrywiseAggregateStats {
2413
- participant_count?: Count;
2414
-
2415
- publisher_jitter?: TimeStats;
2416
-
2417
- publisher_latency?: TimeStats;
2418
-
2419
- subscriber_jitter?: TimeStats;
2420
-
2421
- subscriber_latency?: TimeStats;
2422
- }
2423
-
2424
2452
  export interface CreateBlockListRequest {
2425
2453
  name: string;
2426
2454
 
2427
2455
  words: string[];
2428
2456
 
2457
+ team?: string;
2458
+
2429
2459
  type?: 'regex' | 'domain' | 'email' | 'word';
2430
2460
  }
2431
2461
 
2462
+ export interface CreateBlockListResponse {
2463
+ duration: string;
2464
+
2465
+ blocklist?: BlockListResponse;
2466
+ }
2467
+
2432
2468
  export interface CreateCallTypeRequest {
2433
2469
  name: string;
2434
2470
 
@@ -3049,6 +3085,8 @@ export interface EdgeResponse {
3049
3085
 
3050
3086
  export interface EgressHLSResponse {
3051
3087
  playlist_url: string;
3088
+
3089
+ status: string;
3052
3090
  }
3053
3091
 
3054
3092
  export interface EgressRTMPResponse {
@@ -3167,8 +3205,6 @@ export interface EntityCreator {
3167
3205
  teams?: string[];
3168
3206
 
3169
3207
  privacy_settings?: PrivacySettings;
3170
-
3171
- push_notifications?: PushNotificationSettings;
3172
3208
  }
3173
3209
 
3174
3210
  export interface EntityCreatorResponse {
@@ -3196,8 +3232,6 @@ export interface EntityCreatorResponse {
3196
3232
 
3197
3233
  blocked_user_ids: string[];
3198
3234
 
3199
- devices: DeviceResponse[];
3200
-
3201
3235
  teams: string[];
3202
3236
 
3203
3237
  custom: Record<string, any>;
@@ -3216,6 +3250,8 @@ export interface EntityCreatorResponse {
3216
3250
 
3217
3251
  revoke_tokens_issued_before?: Date;
3218
3252
 
3253
+ devices?: DeviceResponse[];
3254
+
3219
3255
  privacy_settings?: PrivacySettingsResponse;
3220
3256
 
3221
3257
  push_notifications?: PushNotificationSettingsResponse;
@@ -3522,6 +3558,8 @@ export interface FlagResponse {
3522
3558
  export interface FlagUpdatedEvent {
3523
3559
  created_at: Date;
3524
3560
 
3561
+ custom: Record<string, any>;
3562
+
3525
3563
  type: string;
3526
3564
 
3527
3565
  received_at?: Date;
@@ -3587,8 +3625,6 @@ export interface FullUserResponse {
3587
3625
  latest_hidden_channels?: string[];
3588
3626
 
3589
3627
  privacy_settings?: PrivacySettingsResponse;
3590
-
3591
- push_notifications?: PushNotificationSettingsResponse;
3592
3628
  }
3593
3629
 
3594
3630
  export interface GeofenceResponse {
@@ -4726,13 +4762,15 @@ export interface MessageReadEvent {
4726
4762
 
4727
4763
  type: string;
4728
4764
 
4765
+ channel_last_message_at?: Date;
4766
+
4729
4767
  last_read_message_id?: string;
4730
4768
 
4731
4769
  team?: string;
4732
4770
 
4733
4771
  thread?: ThreadResponse;
4734
4772
 
4735
- user?: UserResponse;
4773
+ user?: UserResponseCommonFields;
4736
4774
  }
4737
4775
 
4738
4776
  export interface MessageRequest {
@@ -5020,6 +5058,8 @@ export interface ModerationCustomActionEvent {
5020
5058
  export interface ModerationEvent {
5021
5059
  created_at: Date;
5022
5060
 
5061
+ custom: Record<string, any>;
5062
+
5023
5063
  type: string;
5024
5064
 
5025
5065
  received_at?: Date;
@@ -5249,17 +5289,7 @@ export interface NotificationSettings {
5249
5289
  session_started: EventNotificationSettings;
5250
5290
  }
5251
5291
 
5252
- export interface NullBool {
5253
- has_value?: boolean;
5254
-
5255
- value?: boolean;
5256
- }
5257
-
5258
- export interface NullTime {
5259
- has_value?: boolean;
5260
-
5261
- value?: Date;
5262
- }
5292
+ export interface NullTime {}
5263
5293
 
5264
5294
  export interface OnlyUserID {
5265
5295
  id: string;
@@ -5348,7 +5378,7 @@ export interface OwnUser {
5348
5378
 
5349
5379
  privacy_settings?: PrivacySettings;
5350
5380
 
5351
- push_notifications?: PushNotificationSettings;
5381
+ push_preferences?: PushPreferences;
5352
5382
  }
5353
5383
 
5354
5384
  export interface OwnUserResponse {
@@ -5404,7 +5434,7 @@ export interface OwnUserResponse {
5404
5434
 
5405
5435
  privacy_settings?: PrivacySettingsResponse;
5406
5436
 
5407
- push_notifications?: PushNotificationSettingsResponse;
5437
+ push_preferences?: PushPreferences;
5408
5438
  }
5409
5439
 
5410
5440
  export interface PaginationParams {
@@ -5753,20 +5783,28 @@ export interface PushNotificationFields {
5753
5783
  providers?: PushProvider[];
5754
5784
  }
5755
5785
 
5756
- export interface PushNotificationSettings {
5786
+ export interface PushNotificationSettingsResponse {
5757
5787
  disabled?: boolean;
5758
5788
 
5759
5789
  disabled_until?: Date;
5760
5790
  }
5761
5791
 
5762
- export interface PushNotificationSettingsInput {
5763
- disabled?: NullBool;
5792
+ export interface PushPreferenceInput {
5793
+ channel_cid?: string;
5794
+
5795
+ chat_level?: 'all' | 'mentions' | 'none' | 'default';
5764
5796
 
5765
- disabled_until?: NullTime;
5797
+ disabled_until?: Date;
5798
+
5799
+ remove_disable?: boolean;
5800
+
5801
+ user_id?: string;
5766
5802
  }
5767
5803
 
5768
- export interface PushNotificationSettingsResponse {
5769
- disabled?: boolean;
5804
+ export interface PushPreferences {
5805
+ call_level?: string;
5806
+
5807
+ chat_level?: string;
5770
5808
 
5771
5809
  disabled_until?: Date;
5772
5810
  }
@@ -6280,7 +6318,7 @@ export interface QueryReviewQueueResponse {
6280
6318
 
6281
6319
  action_config: Record<string, ModerationActionConfig[]>;
6282
6320
 
6283
- stats: Record<string, number>;
6321
+ stats: Record<string, any>;
6284
6322
 
6285
6323
  next?: string;
6286
6324
 
@@ -6728,8 +6766,6 @@ export interface ReportByHistogramBucket {
6728
6766
 
6729
6767
  count: number;
6730
6768
 
6731
- mean: number;
6732
-
6733
6769
  sum: number;
6734
6770
 
6735
6771
  lower_bound?: Bound;
@@ -6756,6 +6792,8 @@ export interface RestoreUsersRequest {
6756
6792
  }
6757
6793
 
6758
6794
  export interface ReviewQueueItem {
6795
+ ai_text_severity: string;
6796
+
6759
6797
  bounce_count: number;
6760
6798
 
6761
6799
  content_changed: boolean;
@@ -6796,8 +6834,6 @@ export interface ReviewQueueItem {
6796
6834
 
6797
6835
  teams: string[];
6798
6836
 
6799
- completed_at: NullTime;
6800
-
6801
6837
  reviewed_at: NullTime;
6802
6838
 
6803
6839
  assigned_to?: User;
@@ -6814,6 +6850,8 @@ export interface ReviewQueueItem {
6814
6850
  }
6815
6851
 
6816
6852
  export interface ReviewQueueItemResponse {
6853
+ ai_text_severity: string;
6854
+
6817
6855
  created_at: Date;
6818
6856
 
6819
6857
  entity_id: string;
@@ -7969,9 +8007,17 @@ export interface UpdateAppRequest {
7969
8007
  }
7970
8008
 
7971
8009
  export interface UpdateBlockListRequest {
8010
+ team?: string;
8011
+
7972
8012
  words?: string[];
7973
8013
  }
7974
8014
 
8015
+ export interface UpdateBlockListResponse {
8016
+ duration: string;
8017
+
8018
+ blocklist?: BlockListResponse;
8019
+ }
8020
+
7975
8021
  export interface UpdateCallMembersRequest {
7976
8022
  remove_members?: string[];
7977
8023
 
@@ -8476,6 +8522,21 @@ export interface UpsertModerationTemplateResponse {
8476
8522
  config?: FeedsModerationTemplateConfig;
8477
8523
  }
8478
8524
 
8525
+ export interface UpsertPushPreferencesRequest {
8526
+ preferences: PushPreferenceInput[];
8527
+ }
8528
+
8529
+ export interface UpsertPushPreferencesResponse {
8530
+ duration: string;
8531
+
8532
+ user_channel_preferences: Record<
8533
+ string,
8534
+ Record<string, ChannelPushPreferences>
8535
+ >;
8536
+
8537
+ user_preferences: Record<string, PushPreferences>;
8538
+ }
8539
+
8479
8540
  export interface UpsertPushProviderRequest {
8480
8541
  push_provider?: PushProvider;
8481
8542
  }
@@ -8520,8 +8581,6 @@ export interface User {
8520
8581
  teams?: string[];
8521
8582
 
8522
8583
  privacy_settings?: PrivacySettings;
8523
-
8524
- push_notifications?: PushNotificationSettings;
8525
8584
  }
8526
8585
 
8527
8586
  export interface UserBannedEvent {
@@ -8586,44 +8645,6 @@ export interface UserDeletedEvent {
8586
8645
  user?: User;
8587
8646
  }
8588
8647
 
8589
- export interface UserEventPayload {
8590
- banned: boolean;
8591
-
8592
- created_at: Date;
8593
-
8594
- id: string;
8595
-
8596
- language: string;
8597
-
8598
- online: boolean;
8599
-
8600
- role: string;
8601
-
8602
- updated_at: Date;
8603
-
8604
- blocked_user_ids: string[];
8605
-
8606
- teams: string[];
8607
-
8608
- custom: Record<string, any>;
8609
-
8610
- deactivated_at?: Date;
8611
-
8612
- deleted_at?: Date;
8613
-
8614
- image?: string;
8615
-
8616
- invisible?: boolean;
8617
-
8618
- last_active?: Date;
8619
-
8620
- name?: string;
8621
-
8622
- revoke_tokens_issued_before?: Date;
8623
-
8624
- privacy_settings?: PrivacySettingsResponse;
8625
- }
8626
-
8627
8648
  export interface UserFeedbackReport {
8628
8649
  unreported_count: number;
8629
8650
 
@@ -8746,8 +8767,6 @@ export interface UserRequest {
8746
8767
  custom?: Record<string, any>;
8747
8768
 
8748
8769
  privacy_settings?: PrivacySettingsResponse;
8749
-
8750
- push_notifications?: PushNotificationSettingsInput;
8751
8770
  }
8752
8771
 
8753
8772
  export interface UserResponse {
@@ -8771,8 +8790,6 @@ export interface UserResponse {
8771
8790
 
8772
8791
  blocked_user_ids: string[];
8773
8792
 
8774
- devices: DeviceResponse[];
8775
-
8776
8793
  teams: string[];
8777
8794
 
8778
8795
  custom: Record<string, any>;
@@ -8791,11 +8808,85 @@ export interface UserResponse {
8791
8808
 
8792
8809
  revoke_tokens_issued_before?: Date;
8793
8810
 
8811
+ devices?: DeviceResponse[];
8812
+
8794
8813
  privacy_settings?: PrivacySettingsResponse;
8795
8814
 
8796
8815
  push_notifications?: PushNotificationSettingsResponse;
8797
8816
  }
8798
8817
 
8818
+ export interface UserResponseCommonFields {
8819
+ banned: boolean;
8820
+
8821
+ created_at: Date;
8822
+
8823
+ id: string;
8824
+
8825
+ language: string;
8826
+
8827
+ online: boolean;
8828
+
8829
+ role: string;
8830
+
8831
+ updated_at: Date;
8832
+
8833
+ blocked_user_ids: string[];
8834
+
8835
+ teams: string[];
8836
+
8837
+ custom: Record<string, any>;
8838
+
8839
+ deactivated_at?: Date;
8840
+
8841
+ deleted_at?: Date;
8842
+
8843
+ image?: string;
8844
+
8845
+ last_active?: Date;
8846
+
8847
+ name?: string;
8848
+
8849
+ revoke_tokens_issued_before?: Date;
8850
+ }
8851
+
8852
+ export interface UserResponsePrivacyFields {
8853
+ banned: boolean;
8854
+
8855
+ created_at: Date;
8856
+
8857
+ id: string;
8858
+
8859
+ language: string;
8860
+
8861
+ online: boolean;
8862
+
8863
+ role: string;
8864
+
8865
+ updated_at: Date;
8866
+
8867
+ blocked_user_ids: string[];
8868
+
8869
+ teams: string[];
8870
+
8871
+ custom: Record<string, any>;
8872
+
8873
+ deactivated_at?: Date;
8874
+
8875
+ deleted_at?: Date;
8876
+
8877
+ image?: string;
8878
+
8879
+ invisible?: boolean;
8880
+
8881
+ last_active?: Date;
8882
+
8883
+ name?: string;
8884
+
8885
+ revoke_tokens_issued_before?: Date;
8886
+
8887
+ privacy_settings?: PrivacySettingsResponse;
8888
+ }
8889
+
8799
8890
  export interface UserSessionStats {
8800
8891
  freeze_duration_seconds: number;
8801
8892
 
@@ -8955,7 +9046,9 @@ export interface UserUnreadReminderEvent {
8955
9046
  export interface UserUpdatedEvent {
8956
9047
  created_at: Date;
8957
9048
 
8958
- user: UserEventPayload;
9049
+ custom: Record<string, any>;
9050
+
9051
+ user: UserResponsePrivacyFields;
8959
9052
 
8960
9053
  type: string;
8961
9054
 
@@ -9067,6 +9160,8 @@ export interface WSEvent {
9067
9160
 
9068
9161
  channel_id?: string;
9069
9162
 
9163
+ channel_last_message_at?: Date;
9164
+
9070
9165
  channel_type?: string;
9071
9166
 
9072
9167
  cid?: string;
@@ -74,6 +74,7 @@ export class ModerationApi extends BaseApi {
74
74
  entity_creator_id: request?.entity_creator_id,
75
75
  entity_id: request?.entity_id,
76
76
  entity_type: request?.entity_type,
77
+ config_team: request?.config_team,
77
78
  test_mode: request?.test_mode,
78
79
  user_id: request?.user_id,
79
80
  moderation_payload: request?.moderation_payload,