@stream-io/node-sdk 0.6.7 → 0.7.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.
@@ -332,6 +332,13 @@ export interface ActivityResponse {
332
332
  poll?: PollResponseData;
333
333
  }
334
334
  export interface ActivitySelectorConfig {
335
+ cutoff_time?: string;
336
+ min_popularity?: number;
337
+ type?: string;
338
+ sort?: SortParam[];
339
+ filter?: Record<string, any>;
340
+ }
341
+ export interface ActivitySelectorConfigResponse {
335
342
  cutoff_time?: Date;
336
343
  min_popularity?: number;
337
344
  type?: string;
@@ -395,6 +402,7 @@ export interface AddBookmarkResponse {
395
402
  export interface AddCommentReactionRequest {
396
403
  type: string;
397
404
  create_notification_activity?: boolean;
405
+ enforce_unique?: boolean;
398
406
  skip_push?: boolean;
399
407
  user_id?: string;
400
408
  custom?: Record<string, any>;
@@ -436,6 +444,7 @@ export interface AddFolderRequest {
436
444
  export interface AddReactionRequest {
437
445
  type: string;
438
446
  create_notification_activity?: boolean;
447
+ enforce_unique?: boolean;
439
448
  skip_push?: boolean;
440
449
  user_id?: string;
441
450
  custom?: Record<string, any>;
@@ -690,6 +699,7 @@ export interface BanActionRequest {
690
699
  timeout?: number;
691
700
  }
692
701
  export interface BanOptions {
702
+ delete_messages?: 'soft' | 'pruning' | 'hard';
693
703
  duration?: number;
694
704
  ip_ban?: boolean;
695
705
  reason?: string;
@@ -715,9 +725,6 @@ export interface BanResponse {
715
725
  channel?: ChannelResponse;
716
726
  user?: UserResponse;
717
727
  }
718
- export interface BlockContentOptions {
719
- reason?: string;
720
- }
721
728
  export interface BlockListConfig {
722
729
  async?: boolean;
723
730
  enabled?: boolean;
@@ -1477,6 +1484,7 @@ export interface CallUserMutedEvent {
1477
1484
  call_cid: string;
1478
1485
  created_at: Date;
1479
1486
  from_user_id: string;
1487
+ reason: string;
1480
1488
  muted_user_ids: string[];
1481
1489
  type: string;
1482
1490
  }
@@ -1514,6 +1522,7 @@ export interface CampaignResponse {
1514
1522
  name: string;
1515
1523
  sender_id: string;
1516
1524
  sender_mode: string;
1525
+ sender_visibility: string;
1517
1526
  show_channels: boolean;
1518
1527
  skip_push: boolean;
1519
1528
  skip_webhook: boolean;
@@ -2167,6 +2176,7 @@ export interface ConfigResponse {
2167
2176
  key: string;
2168
2177
  team: string;
2169
2178
  updated_at: Date;
2179
+ supported_video_call_harm_types: string[];
2170
2180
  ai_image_config?: AIImageConfig;
2171
2181
  ai_text_config?: AITextConfig;
2172
2182
  ai_video_config?: AIVideoConfig;
@@ -2988,7 +2998,7 @@ export interface FeedGroupResponse {
2988
2998
  updated_at: Date;
2989
2999
  default_visibility?: string;
2990
3000
  activity_processors?: ActivityProcessorConfig[];
2991
- activity_selectors?: ActivitySelectorConfig[];
3001
+ activity_selectors?: ActivitySelectorConfigResponse[];
2992
3002
  aggregation?: AggregationConfig;
2993
3003
  custom?: Record<string, any>;
2994
3004
  notification?: NotificationConfig;
@@ -3111,8 +3121,10 @@ export interface FeedResponse {
3111
3121
  deleted_at?: Date;
3112
3122
  visibility?: string;
3113
3123
  filter_tags?: string[];
3124
+ own_capabilities?: FeedOwnCapability[];
3114
3125
  own_follows?: FollowResponse[];
3115
3126
  custom?: Record<string, any>;
3127
+ own_membership?: FeedMemberResponse;
3116
3128
  }
3117
3129
  export interface FeedUpdatedEvent {
3118
3130
  created_at: Date;
@@ -3128,7 +3140,7 @@ export interface FeedViewResponse {
3128
3140
  id: string;
3129
3141
  last_used_at?: Date;
3130
3142
  activity_processors?: ActivityProcessorConfig[];
3131
- activity_selectors?: ActivitySelectorConfig[];
3143
+ activity_selectors?: ActivitySelectorConfigResponse[];
3132
3144
  aggregation?: AggregationConfig;
3133
3145
  ranking?: RankingConfig;
3134
3146
  }
@@ -3197,23 +3209,22 @@ export interface FirebaseConfigFields {
3197
3209
  }
3198
3210
  export interface Flag {
3199
3211
  created_at: Date;
3200
- created_by_automod: boolean;
3212
+ entity_id: string;
3213
+ entity_type: string;
3201
3214
  updated_at: Date;
3202
- approved_at?: Date;
3215
+ result: Array<Record<string, any>>;
3216
+ entity_creator_id?: string;
3217
+ is_streamed_content?: boolean;
3218
+ moderation_payload_hash?: string;
3203
3219
  reason?: string;
3204
- rejected_at?: Date;
3205
- reviewed_at?: Date;
3206
- reviewed_by?: string;
3207
- target_message_id?: string;
3220
+ review_queue_item_id?: string;
3221
+ type?: string;
3222
+ labels?: string[];
3208
3223
  custom?: Record<string, any>;
3209
- details?: FlagDetails;
3210
- target_message?: Message;
3211
- target_user?: User;
3224
+ moderation_payload?: ModerationPayload;
3225
+ review_queue_item?: ReviewQueueItem;
3212
3226
  user?: User;
3213
3227
  }
3214
- export interface FlagContentOptions {
3215
- reason?: string;
3216
- }
3217
3228
  export interface FlagDetails {
3218
3229
  original_text: string;
3219
3230
  extra: Record<string, any>;
@@ -3628,17 +3639,14 @@ export interface GetOrCreateFeedResponse {
3628
3639
  followers: FollowResponse[];
3629
3640
  following: FollowResponse[];
3630
3641
  members: FeedMemberResponse[];
3631
- own_capabilities: FeedOwnCapability[];
3632
3642
  pinned_activities: ActivityPinResponse[];
3633
3643
  feed: FeedResponse;
3634
3644
  next?: string;
3635
3645
  prev?: string;
3636
- own_follows?: FollowResponse[];
3637
3646
  followers_pagination?: PagerResponse;
3638
3647
  following_pagination?: PagerResponse;
3639
3648
  member_pagination?: PagerResponse;
3640
3649
  notification_status?: NotificationStatusResponse;
3641
- own_membership?: FeedMemberResponse;
3642
3650
  }
3643
3651
  export interface GetOrCreateFeedViewRequest {
3644
3652
  activity_processors?: ActivityProcessorConfig[];
@@ -3735,8 +3743,11 @@ export interface HLSSettingsResponse {
3735
3743
  layout: LayoutSettingsResponse;
3736
3744
  }
3737
3745
  export interface HarmConfig {
3746
+ cooldown_period?: number;
3738
3747
  severity?: number;
3748
+ threshold?: number;
3739
3749
  action_sequences?: ActionSequence[];
3750
+ harm_types?: string[];
3740
3751
  }
3741
3752
  export interface HideChannelRequest {
3742
3753
  clear_history?: boolean;
@@ -4453,6 +4464,7 @@ export interface ModerationConfig {
4453
4464
  key?: string;
4454
4465
  team?: string;
4455
4466
  updated_at?: Date;
4467
+ supported_video_call_harm_types?: string[];
4456
4468
  ai_image_config?: AIImageConfig;
4457
4469
  ai_image_lite_config?: BodyguardImageAnalysisConfig;
4458
4470
  ai_text_config?: AITextConfig;
@@ -6018,9 +6030,7 @@ export interface Role {
6018
6030
  export interface RuleBuilderAction {
6019
6031
  type?: string;
6020
6032
  ban_options?: BanOptions;
6021
- flag_content_options?: FlagContentOptions;
6022
6033
  flag_user_options?: FlagUserOptions;
6023
- remove_content_options?: BlockContentOptions;
6024
6034
  }
6025
6035
  export interface RuleBuilderCondition {
6026
6036
  confidence?: number;
@@ -7578,7 +7588,9 @@ export interface VelocityFilterConfigRule {
7578
7588
  url_only?: boolean;
7579
7589
  }
7580
7590
  export interface VideoCallRuleConfig {
7581
- rules?: Record<string, HarmConfig>;
7591
+ flag_all_labels?: boolean;
7592
+ flagged_labels?: string[];
7593
+ rules?: HarmConfig[];
7582
7594
  }
7583
7595
  export interface VideoContentParameters {
7584
7596
  harm_labels?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.6.7",
3
+ "version": "0.7.1",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -426,6 +426,7 @@ export class FeedsApi {
426
426
  const body = {
427
427
  type: request?.type,
428
428
  create_notification_activity: request?.create_notification_activity,
429
+ enforce_unique: request?.enforce_unique,
429
430
  skip_push: request?.skip_push,
430
431
  user_id: request?.user_id,
431
432
  custom: request?.custom,
@@ -897,6 +898,7 @@ export class FeedsApi {
897
898
  const body = {
898
899
  type: request?.type,
899
900
  create_notification_activity: request?.create_notification_activity,
901
+ enforce_unique: request?.enforce_unique,
900
902
  skip_push: request?.skip_push,
901
903
  user_id: request?.user_id,
902
904
  custom: request?.custom,
@@ -225,6 +225,13 @@ decoders.ActivityResponse = (input?: Record<string, any>) => {
225
225
  };
226
226
 
227
227
  decoders.ActivitySelectorConfig = (input?: Record<string, any>) => {
228
+ const typeMappings: TypeMapping = {
229
+ cutoff_time: { type: 'StringType', isSingle: true },
230
+ };
231
+ return decode(typeMappings, input);
232
+ };
233
+
234
+ decoders.ActivitySelectorConfigResponse = (input?: Record<string, any>) => {
228
235
  const typeMappings: TypeMapping = {
229
236
  cutoff_time: { type: 'DatetimeType', isSingle: true },
230
237
  };
@@ -1903,7 +1910,10 @@ decoders.FeedGroupResponse = (input?: Record<string, any>) => {
1903
1910
 
1904
1911
  updated_at: { type: 'DatetimeType', isSingle: true },
1905
1912
 
1906
- activity_selectors: { type: 'ActivitySelectorConfig', isSingle: false },
1913
+ activity_selectors: {
1914
+ type: 'ActivitySelectorConfigResponse',
1915
+ isSingle: false,
1916
+ },
1907
1917
  };
1908
1918
  return decode(typeMappings, input);
1909
1919
  };
@@ -1973,6 +1983,8 @@ decoders.FeedResponse = (input?: Record<string, any>) => {
1973
1983
  deleted_at: { type: 'DatetimeType', isSingle: true },
1974
1984
 
1975
1985
  own_follows: { type: 'FollowResponse', isSingle: false },
1986
+
1987
+ own_membership: { type: 'FeedMemberResponse', isSingle: true },
1976
1988
  };
1977
1989
  return decode(typeMappings, input);
1978
1990
  };
@@ -1994,7 +2006,10 @@ decoders.FeedViewResponse = (input?: Record<string, any>) => {
1994
2006
  const typeMappings: TypeMapping = {
1995
2007
  last_used_at: { type: 'DatetimeType', isSingle: true },
1996
2008
 
1997
- activity_selectors: { type: 'ActivitySelectorConfig', isSingle: false },
2009
+ activity_selectors: {
2010
+ type: 'ActivitySelectorConfigResponse',
2011
+ isSingle: false,
2012
+ },
1998
2013
  };
1999
2014
  return decode(typeMappings, input);
2000
2015
  };
@@ -2326,11 +2341,7 @@ decoders.GetOrCreateFeedResponse = (input?: Record<string, any>) => {
2326
2341
 
2327
2342
  feed: { type: 'FeedResponse', isSingle: true },
2328
2343
 
2329
- own_follows: { type: 'FollowResponse', isSingle: false },
2330
-
2331
2344
  notification_status: { type: 'NotificationStatusResponse', isSingle: true },
2332
-
2333
- own_membership: { type: 'FeedMemberResponse', isSingle: true },
2334
2345
  };
2335
2346
  return decode(typeMappings, input);
2336
2347
  };
@@ -595,6 +595,18 @@ export interface ActivityResponse {
595
595
  }
596
596
 
597
597
  export interface ActivitySelectorConfig {
598
+ cutoff_time?: string;
599
+
600
+ min_popularity?: number;
601
+
602
+ type?: string;
603
+
604
+ sort?: SortParam[];
605
+
606
+ filter?: Record<string, any>;
607
+ }
608
+
609
+ export interface ActivitySelectorConfigResponse {
598
610
  cutoff_time?: Date;
599
611
 
600
612
  min_popularity?: number;
@@ -707,6 +719,8 @@ export interface AddCommentReactionRequest {
707
719
 
708
720
  create_notification_activity?: boolean;
709
721
 
722
+ enforce_unique?: boolean;
723
+
710
724
  skip_push?: boolean;
711
725
 
712
726
  user_id?: string;
@@ -775,6 +789,8 @@ export interface AddReactionRequest {
775
789
 
776
790
  create_notification_activity?: boolean;
777
791
 
792
+ enforce_unique?: boolean;
793
+
778
794
  skip_push?: boolean;
779
795
 
780
796
  user_id?: string;
@@ -1231,6 +1247,8 @@ export interface BanActionRequest {
1231
1247
  }
1232
1248
 
1233
1249
  export interface BanOptions {
1250
+ delete_messages?: 'soft' | 'pruning' | 'hard';
1251
+
1234
1252
  duration?: number;
1235
1253
 
1236
1254
  ip_ban?: boolean;
@@ -1276,10 +1294,6 @@ export interface BanResponse {
1276
1294
  user?: UserResponse;
1277
1295
  }
1278
1296
 
1279
- export interface BlockContentOptions {
1280
- reason?: string;
1281
- }
1282
-
1283
1297
  export interface BlockListConfig {
1284
1298
  async?: boolean;
1285
1299
 
@@ -2622,6 +2636,8 @@ export interface CallUserMutedEvent {
2622
2636
 
2623
2637
  from_user_id: string;
2624
2638
 
2639
+ reason: string;
2640
+
2625
2641
  muted_user_ids: string[];
2626
2642
 
2627
2643
  type: string;
@@ -2684,6 +2700,8 @@ export interface CampaignResponse {
2684
2700
 
2685
2701
  sender_mode: string;
2686
2702
 
2703
+ sender_visibility: string;
2704
+
2687
2705
  show_channels: boolean;
2688
2706
 
2689
2707
  skip_push: boolean;
@@ -3850,6 +3868,8 @@ export interface ConfigResponse {
3850
3868
 
3851
3869
  updated_at: Date;
3852
3870
 
3871
+ supported_video_call_harm_types: string[];
3872
+
3853
3873
  ai_image_config?: AIImageConfig;
3854
3874
 
3855
3875
  ai_text_config?: AITextConfig;
@@ -5249,7 +5269,7 @@ export interface FeedGroupResponse {
5249
5269
 
5250
5270
  activity_processors?: ActivityProcessorConfig[];
5251
5271
 
5252
- activity_selectors?: ActivitySelectorConfig[];
5272
+ activity_selectors?: ActivitySelectorConfigResponse[];
5253
5273
 
5254
5274
  aggregation?: AggregationConfig;
5255
5275
 
@@ -5451,9 +5471,13 @@ export interface FeedResponse {
5451
5471
 
5452
5472
  filter_tags?: string[];
5453
5473
 
5474
+ own_capabilities?: FeedOwnCapability[];
5475
+
5454
5476
  own_follows?: FollowResponse[];
5455
5477
 
5456
5478
  custom?: Record<string, any>;
5479
+
5480
+ own_membership?: FeedMemberResponse;
5457
5481
  }
5458
5482
 
5459
5483
  export interface FeedUpdatedEvent {
@@ -5481,7 +5505,7 @@ export interface FeedViewResponse {
5481
5505
 
5482
5506
  activity_processors?: ActivityProcessorConfig[];
5483
5507
 
5484
- activity_selectors?: ActivitySelectorConfig[];
5508
+ activity_selectors?: ActivitySelectorConfigResponse[];
5485
5509
 
5486
5510
  aggregation?: AggregationConfig;
5487
5511
 
@@ -5597,35 +5621,35 @@ export interface FirebaseConfigFields {
5597
5621
  export interface Flag {
5598
5622
  created_at: Date;
5599
5623
 
5600
- created_by_automod: boolean;
5624
+ entity_id: string;
5625
+
5626
+ entity_type: string;
5601
5627
 
5602
5628
  updated_at: Date;
5603
5629
 
5604
- approved_at?: Date;
5630
+ result: Array<Record<string, any>>;
5605
5631
 
5606
- reason?: string;
5632
+ entity_creator_id?: string;
5607
5633
 
5608
- rejected_at?: Date;
5634
+ is_streamed_content?: boolean;
5609
5635
 
5610
- reviewed_at?: Date;
5636
+ moderation_payload_hash?: string;
5611
5637
 
5612
- reviewed_by?: string;
5638
+ reason?: string;
5613
5639
 
5614
- target_message_id?: string;
5640
+ review_queue_item_id?: string;
5615
5641
 
5616
- custom?: Record<string, any>;
5642
+ type?: string;
5617
5643
 
5618
- details?: FlagDetails;
5644
+ labels?: string[];
5619
5645
 
5620
- target_message?: Message;
5646
+ custom?: Record<string, any>;
5621
5647
 
5622
- target_user?: User;
5648
+ moderation_payload?: ModerationPayload;
5623
5649
 
5624
- user?: User;
5625
- }
5650
+ review_queue_item?: ReviewQueueItem;
5626
5651
 
5627
- export interface FlagContentOptions {
5628
- reason?: string;
5652
+ user?: User;
5629
5653
  }
5630
5654
 
5631
5655
  export interface FlagDetails {
@@ -6346,8 +6370,6 @@ export interface GetOrCreateFeedResponse {
6346
6370
 
6347
6371
  members: FeedMemberResponse[];
6348
6372
 
6349
- own_capabilities: FeedOwnCapability[];
6350
-
6351
6373
  pinned_activities: ActivityPinResponse[];
6352
6374
 
6353
6375
  feed: FeedResponse;
@@ -6356,8 +6378,6 @@ export interface GetOrCreateFeedResponse {
6356
6378
 
6357
6379
  prev?: string;
6358
6380
 
6359
- own_follows?: FollowResponse[];
6360
-
6361
6381
  followers_pagination?: PagerResponse;
6362
6382
 
6363
6383
  following_pagination?: PagerResponse;
@@ -6365,8 +6385,6 @@ export interface GetOrCreateFeedResponse {
6365
6385
  member_pagination?: PagerResponse;
6366
6386
 
6367
6387
  notification_status?: NotificationStatusResponse;
6368
-
6369
- own_membership?: FeedMemberResponse;
6370
6388
  }
6371
6389
 
6372
6390
  export interface GetOrCreateFeedViewRequest {
@@ -6522,9 +6540,15 @@ export interface HLSSettingsResponse {
6522
6540
  }
6523
6541
 
6524
6542
  export interface HarmConfig {
6543
+ cooldown_period?: number;
6544
+
6525
6545
  severity?: number;
6526
6546
 
6547
+ threshold?: number;
6548
+
6527
6549
  action_sequences?: ActionSequence[];
6550
+
6551
+ harm_types?: string[];
6528
6552
  }
6529
6553
 
6530
6554
  export interface HideChannelRequest {
@@ -7779,6 +7803,8 @@ export interface ModerationConfig {
7779
7803
 
7780
7804
  updated_at?: Date;
7781
7805
 
7806
+ supported_video_call_harm_types?: string[];
7807
+
7782
7808
  ai_image_config?: AIImageConfig;
7783
7809
 
7784
7810
  ai_image_lite_config?: BodyguardImageAnalysisConfig;
@@ -10521,11 +10547,7 @@ export interface RuleBuilderAction {
10521
10547
 
10522
10548
  ban_options?: BanOptions;
10523
10549
 
10524
- flag_content_options?: FlagContentOptions;
10525
-
10526
10550
  flag_user_options?: FlagUserOptions;
10527
-
10528
- remove_content_options?: BlockContentOptions;
10529
10551
  }
10530
10552
 
10531
10553
  export interface RuleBuilderCondition {
@@ -13436,7 +13458,11 @@ export interface VelocityFilterConfigRule {
13436
13458
  }
13437
13459
 
13438
13460
  export interface VideoCallRuleConfig {
13439
- rules?: Record<string, HarmConfig>;
13461
+ flag_all_labels?: boolean;
13462
+
13463
+ flagged_labels?: string[];
13464
+
13465
+ rules?: HarmConfig[];
13440
13466
  }
13441
13467
 
13442
13468
  export interface VideoContentParameters {