@stream-io/node-sdk 0.6.6 → 0.6.7

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.
@@ -49,6 +49,7 @@ import {
49
49
  GetCommentsResponse,
50
50
  GetFeedGroupResponse,
51
51
  GetFeedViewResponse,
52
+ GetFeedVisibilityResponse,
52
53
  GetFollowSuggestionsResponse,
53
54
  GetOrCreateFeedGroupRequest,
54
55
  GetOrCreateFeedGroupResponse,
@@ -58,6 +59,7 @@ import {
58
59
  GetOrCreateFeedViewResponse,
59
60
  ListFeedGroupsResponse,
60
61
  ListFeedViewsResponse,
62
+ ListFeedVisibilitiesResponse,
61
63
  MarkActivityRequest,
62
64
  PinActivityRequest,
63
65
  PinActivityResponse,
@@ -581,6 +583,7 @@ export class FeedsApi {
581
583
  user_id: request?.user_id,
582
584
  visibility: request?.visibility,
583
585
  attachments: request?.attachments,
586
+ feeds: request?.feeds,
584
587
  filter_tags: request?.filter_tags,
585
588
  interest_tags: request?.interest_tags,
586
589
  custom: request?.custom,
@@ -1621,6 +1624,34 @@ export class FeedsApi {
1621
1624
  return { ...response.body, metadata: response.metadata };
1622
1625
  }
1623
1626
 
1627
+ async listFeedVisibilities(): Promise<
1628
+ StreamResponse<ListFeedVisibilitiesResponse>
1629
+ > {
1630
+ const response = await this.apiClient.sendRequest<
1631
+ StreamResponse<ListFeedVisibilitiesResponse>
1632
+ >('GET', '/api/v2/feeds/feed_visibilities', undefined, undefined);
1633
+
1634
+ decoders.ListFeedVisibilitiesResponse?.(response.body);
1635
+
1636
+ return { ...response.body, metadata: response.metadata };
1637
+ }
1638
+
1639
+ async getFeedVisibility(request: {
1640
+ name: string;
1641
+ }): Promise<StreamResponse<GetFeedVisibilityResponse>> {
1642
+ const pathParams = {
1643
+ name: request?.name,
1644
+ };
1645
+
1646
+ const response = await this.apiClient.sendRequest<
1647
+ StreamResponse<GetFeedVisibilityResponse>
1648
+ >('GET', '/api/v2/feeds/feed_visibilities/{name}', pathParams, undefined);
1649
+
1650
+ decoders.GetFeedVisibilityResponse?.(response.body);
1651
+
1652
+ return { ...response.body, metadata: response.metadata };
1653
+ }
1654
+
1624
1655
  async createFeedsBatch(
1625
1656
  request: CreateFeedsBatchRequest,
1626
1657
  ): Promise<StreamResponse<CreateFeedsBatchResponse>> {
@@ -1157,6 +1157,8 @@ decoders.Channel = (input?: Record<string, any>) => {
1157
1157
 
1158
1158
  created_by: { type: 'User', isSingle: true },
1159
1159
 
1160
+ members_lookup: { type: 'ChannelMemberLookup', isSingle: false },
1161
+
1160
1162
  truncated_by: { type: 'User', isSingle: true },
1161
1163
  };
1162
1164
  return decode(typeMappings, input);
@@ -1239,6 +1241,17 @@ decoders.ChannelMember = (input?: Record<string, any>) => {
1239
1241
  return decode(typeMappings, input);
1240
1242
  };
1241
1243
 
1244
+ decoders.ChannelMemberLookup = (input?: Record<string, any>) => {
1245
+ const typeMappings: TypeMapping = {
1246
+ archived_at: { type: 'DatetimeType', isSingle: true },
1247
+
1248
+ ban_expires: { type: 'DatetimeType', isSingle: true },
1249
+
1250
+ pinned_at: { type: 'DatetimeType', isSingle: true },
1251
+ };
1252
+ return decode(typeMappings, input);
1253
+ };
1254
+
1242
1255
  decoders.ChannelMute = (input?: Record<string, any>) => {
1243
1256
  const typeMappings: TypeMapping = {
1244
1257
  created_at: { type: 'DatetimeType', isSingle: true },
@@ -1717,6 +1730,15 @@ decoders.DeleteCommentReactionResponse = (input?: Record<string, any>) => {
1717
1730
  return decode(typeMappings, input);
1718
1731
  };
1719
1732
 
1733
+ decoders.DeleteCommentResponse = (input?: Record<string, any>) => {
1734
+ const typeMappings: TypeMapping = {
1735
+ activity: { type: 'ActivityResponse', isSingle: true },
1736
+
1737
+ comment: { type: 'CommentResponse', isSingle: true },
1738
+ };
1739
+ return decode(typeMappings, input);
1740
+ };
1741
+
1720
1742
  decoders.DeleteMessageResponse = (input?: Record<string, any>) => {
1721
1743
  const typeMappings: TypeMapping = {
1722
1744
  message: { type: 'MessageResponse', isSingle: true },
@@ -2141,6 +2163,8 @@ decoders.GetCallReportResponse = (input?: Record<string, any>) => {
2141
2163
  video_reactions: { type: 'VideoReactionsResponse', isSingle: false },
2142
2164
 
2143
2165
  chat_activity: { type: 'ChatActivityStatsResponse', isSingle: true },
2166
+
2167
+ session: { type: 'CallSessionResponse', isSingle: true },
2144
2168
  };
2145
2169
  return decode(typeMappings, input);
2146
2170
  };
@@ -2687,6 +2711,8 @@ decoders.MessageReadEvent = (input?: Record<string, any>) => {
2687
2711
 
2688
2712
  channel_last_message_at: { type: 'DatetimeType', isSingle: true },
2689
2713
 
2714
+ channel: { type: 'ChannelResponse', isSingle: true },
2715
+
2690
2716
  thread: { type: 'ThreadResponse', isSingle: true },
2691
2717
 
2692
2718
  user: { type: 'UserResponseCommonFields', isSingle: true },
@@ -587,7 +587,7 @@ export interface ActivityResponse {
587
587
 
588
588
  moderation?: ModerationV2Response;
589
589
 
590
- notification_context?: Record<string, any>;
590
+ notification_context?: NotificationContext;
591
591
 
592
592
  parent?: ActivityResponse;
593
593
 
@@ -1821,6 +1821,10 @@ export interface CallHLSBroadcastingStoppedEvent {
1821
1821
 
1822
1822
  export interface CallIngressResponse {
1823
1823
  rtmp: RTMPIngress;
1824
+
1825
+ srt: SRTIngress;
1826
+
1827
+ whip: WHIPIngress;
1824
1828
  }
1825
1829
 
1826
1830
  export interface CallLiveStartedEvent {
@@ -2144,6 +2148,8 @@ export interface CallResponse {
2144
2148
 
2145
2149
  transcribing: boolean;
2146
2150
 
2151
+ translating: boolean;
2152
+
2147
2153
  type: string;
2148
2154
 
2149
2155
  updated_at: Date;
@@ -2317,6 +2323,8 @@ export interface CallSessionParticipantLeftEvent {
2317
2323
  participant: CallParticipantResponse;
2318
2324
 
2319
2325
  type: string;
2326
+
2327
+ reason?: string;
2320
2328
  }
2321
2329
 
2322
2330
  export interface CallSessionResponse {
@@ -2792,6 +2800,8 @@ export interface Channel {
2792
2800
 
2793
2801
  created_by?: User;
2794
2802
 
2803
+ members_lookup?: Record<string, ChannelMemberLookup>;
2804
+
2795
2805
  truncated_by?: User;
2796
2806
  }
2797
2807
 
@@ -3085,6 +3095,22 @@ export interface ChannelMember {
3085
3095
  user?: UserResponse;
3086
3096
  }
3087
3097
 
3098
+ export interface ChannelMemberLookup {
3099
+ archived: boolean;
3100
+
3101
+ banned: boolean;
3102
+
3103
+ hidden: boolean;
3104
+
3105
+ pinned: boolean;
3106
+
3107
+ archived_at?: Date;
3108
+
3109
+ ban_expires?: Date;
3110
+
3111
+ pinned_at?: Date;
3112
+ }
3113
+
3088
3114
  export interface ChannelMemberResponse {
3089
3115
  channel_role: string;
3090
3116
  }
@@ -4498,6 +4524,10 @@ export interface DeleteCommentReactionResponse {
4498
4524
 
4499
4525
  export interface DeleteCommentResponse {
4500
4526
  duration: string;
4527
+
4528
+ activity: ActivityResponse;
4529
+
4530
+ comment: CommentResponse;
4501
4531
  }
4502
4532
 
4503
4533
  export interface DeleteExternalStorageResponse {
@@ -4509,8 +4539,6 @@ export interface DeleteFeedGroupResponse {
4509
4539
  }
4510
4540
 
4511
4541
  export interface DeleteFeedResponse {
4512
- delete_feed_task_id: string;
4513
-
4514
4542
  duration: string;
4515
4543
 
4516
4544
  task_id: string;
@@ -5338,35 +5366,34 @@ export interface FeedMemberUpdatedEvent {
5338
5366
 
5339
5367
  export const FeedOwnCapability = {
5340
5368
  ADD_ACTIVITY: 'add-activity',
5369
+ ADD_ACTIVITY_BOOKMARK: 'add-activity-bookmark',
5341
5370
  ADD_ACTIVITY_REACTION: 'add-activity-reaction',
5342
5371
  ADD_COMMENT: 'add-comment',
5343
5372
  ADD_COMMENT_REACTION: 'add-comment-reaction',
5344
- BOOKMARK_ACTIVITY: 'bookmark-activity',
5345
5373
  CREATE_FEED: 'create-feed',
5346
- DELETE_BOOKMARK: 'delete-bookmark',
5347
- DELETE_COMMENT: 'delete-comment',
5374
+ DELETE_ANY_ACTIVITY: 'delete-any-activity',
5375
+ DELETE_ANY_COMMENT: 'delete-any-comment',
5348
5376
  DELETE_FEED: 'delete-feed',
5349
- EDIT_BOOKMARK: 'edit-bookmark',
5377
+ DELETE_OWN_ACTIVITY: 'delete-own-activity',
5378
+ DELETE_OWN_ACTIVITY_BOOKMARK: 'delete-own-activity-bookmark',
5379
+ DELETE_OWN_ACTIVITY_REACTION: 'delete-own-activity-reaction',
5380
+ DELETE_OWN_COMMENT: 'delete-own-comment',
5381
+ DELETE_OWN_COMMENT_REACTION: 'delete-own-comment-reaction',
5350
5382
  FOLLOW: 'follow',
5351
- INVITE_FEED: 'invite-feed',
5352
- JOIN_FEED: 'join-feed',
5353
- LEAVE_FEED: 'leave-feed',
5354
- MANAGE_FEED_GROUP: 'manage-feed-group',
5355
- MARK_ACTIVITY: 'mark-activity',
5356
5383
  PIN_ACTIVITY: 'pin-activity',
5357
5384
  QUERY_FEED_MEMBERS: 'query-feed-members',
5358
5385
  QUERY_FOLLOWS: 'query-follows',
5359
5386
  READ_ACTIVITIES: 'read-activities',
5360
5387
  READ_FEED: 'read-feed',
5361
- REMOVE_ACTIVITY: 'remove-activity',
5362
- REMOVE_ACTIVITY_REACTION: 'remove-activity-reaction',
5363
- REMOVE_COMMENT_REACTION: 'remove-comment-reaction',
5364
5388
  UNFOLLOW: 'unfollow',
5365
- UPDATE_ACTIVITY: 'update-activity',
5366
- UPDATE_COMMENT: 'update-comment',
5389
+ UPDATE_ANY_ACTIVITY: 'update-any-activity',
5390
+ UPDATE_ANY_COMMENT: 'update-any-comment',
5367
5391
  UPDATE_FEED: 'update-feed',
5368
5392
  UPDATE_FEED_FOLLOWERS: 'update-feed-followers',
5369
5393
  UPDATE_FEED_MEMBERS: 'update-feed-members',
5394
+ UPDATE_OWN_ACTIVITY: 'update-own-activity',
5395
+ UPDATE_OWN_ACTIVITY_BOOKMARK: 'update-own-activity-bookmark',
5396
+ UPDATE_OWN_COMMENT: 'update-own-comment',
5370
5397
  } as const;
5371
5398
 
5372
5399
  // eslint-disable-next-line @typescript-eslint/no-redeclare
@@ -5461,6 +5488,14 @@ export interface FeedViewResponse {
5461
5488
  ranking?: RankingConfig;
5462
5489
  }
5463
5490
 
5491
+ export interface FeedVisibilityResponse {
5492
+ description: string;
5493
+
5494
+ name: string;
5495
+
5496
+ grants: Record<string, string[]>;
5497
+ }
5498
+
5464
5499
  export interface FeedsModerationTemplateConfig {
5465
5500
  config_key: string;
5466
5501
 
@@ -5468,15 +5503,15 @@ export interface FeedsModerationTemplateConfig {
5468
5503
  }
5469
5504
 
5470
5505
  export interface FeedsPreferences {
5471
- comment?: string;
5506
+ comment?: 'all' | 'none';
5472
5507
 
5473
- comment_reaction?: string;
5508
+ comment_reaction?: 'all' | 'none';
5474
5509
 
5475
- follow?: string;
5510
+ follow?: 'all' | 'none';
5476
5511
 
5477
- mention?: string;
5512
+ mention?: 'all' | 'none';
5478
5513
 
5479
- reaction?: string;
5514
+ reaction?: 'all' | 'none';
5480
5515
 
5481
5516
  custom_activity_types?: Record<string, string>;
5482
5517
  }
@@ -5562,33 +5597,29 @@ export interface FirebaseConfigFields {
5562
5597
  export interface Flag {
5563
5598
  created_at: Date;
5564
5599
 
5565
- entity_id: string;
5566
-
5567
- entity_type: string;
5600
+ created_by_automod: boolean;
5568
5601
 
5569
5602
  updated_at: Date;
5570
5603
 
5571
- result: Array<Record<string, any>>;
5572
-
5573
- entity_creator_id?: string;
5574
-
5575
- is_streamed_content?: boolean;
5576
-
5577
- moderation_payload_hash?: string;
5604
+ approved_at?: Date;
5578
5605
 
5579
5606
  reason?: string;
5580
5607
 
5581
- review_queue_item_id?: string;
5608
+ rejected_at?: Date;
5582
5609
 
5583
- type?: string;
5610
+ reviewed_at?: Date;
5584
5611
 
5585
- labels?: string[];
5612
+ reviewed_by?: string;
5613
+
5614
+ target_message_id?: string;
5586
5615
 
5587
5616
  custom?: Record<string, any>;
5588
5617
 
5589
- moderation_payload?: ModerationPayload;
5618
+ details?: FlagDetails;
5590
5619
 
5591
- review_queue_item?: ReviewQueueItem;
5620
+ target_message?: Message;
5621
+
5622
+ target_user?: User;
5592
5623
 
5593
5624
  user?: User;
5594
5625
  }
@@ -5935,6 +5966,8 @@ export interface GetCallReportResponse {
5935
5966
  video_reactions?: VideoReactionsResponse[];
5936
5967
 
5937
5968
  chat_activity?: ChatActivityStatsResponse;
5969
+
5970
+ session?: CallSessionResponse;
5938
5971
  }
5939
5972
 
5940
5973
  export interface GetCallResponse {
@@ -6125,6 +6158,12 @@ export interface GetFeedViewResponse {
6125
6158
  feed_view: FeedViewResponse;
6126
6159
  }
6127
6160
 
6161
+ export interface GetFeedVisibilityResponse {
6162
+ duration: string;
6163
+
6164
+ feed_visibility: FeedVisibilityResponse;
6165
+ }
6166
+
6128
6167
  export interface GetFollowSuggestionsResponse {
6129
6168
  duration: string;
6130
6169
 
@@ -6905,6 +6944,12 @@ export interface ListFeedViewsResponse {
6905
6944
  views: Record<string, FeedViewResponse>;
6906
6945
  }
6907
6946
 
6947
+ export interface ListFeedVisibilitiesResponse {
6948
+ duration: string;
6949
+
6950
+ feed_visibilities: Record<string, FeedVisibilityResponse>;
6951
+ }
6952
+
6908
6953
  export interface ListImportsResponse {
6909
6954
  duration: string;
6910
6955
 
@@ -7374,6 +7419,8 @@ export interface MessageReadEvent {
7374
7419
 
7375
7420
  team?: string;
7376
7421
 
7422
+ channel?: ChannelResponse;
7423
+
7377
7424
  thread?: ThreadResponse;
7378
7425
 
7379
7426
  user?: UserResponseCommonFields;
@@ -7770,6 +7817,8 @@ export interface ModerationCustomActionEvent {
7770
7817
  }
7771
7818
 
7772
7819
  export interface ModerationDashboardPreferences {
7820
+ disable_flagging_reviewed_entity?: boolean;
7821
+
7773
7822
  flag_user_on_flagged_content?: boolean;
7774
7823
 
7775
7824
  media_queue_blur_enabled?: boolean;
@@ -7979,6 +8028,12 @@ export interface NotificationConfig {
7979
8028
  track_seen?: boolean;
7980
8029
  }
7981
8030
 
8031
+ export interface NotificationContext {
8032
+ target?: NotificationTarget;
8033
+
8034
+ trigger?: NotificationTrigger;
8035
+ }
8036
+
7982
8037
  export interface NotificationFeedUpdatedEvent {
7983
8038
  created_at: Date;
7984
8039
 
@@ -8065,6 +8120,26 @@ export interface NotificationStatusResponse {
8065
8120
  seen_activities?: string[];
8066
8121
  }
8067
8122
 
8123
+ export interface NotificationTarget {
8124
+ id: string;
8125
+
8126
+ name?: string;
8127
+
8128
+ text?: string;
8129
+
8130
+ type?: string;
8131
+
8132
+ user_id?: string;
8133
+
8134
+ attachments?: Attachment[];
8135
+ }
8136
+
8137
+ export interface NotificationTrigger {
8138
+ text: string;
8139
+
8140
+ type: string;
8141
+ }
8142
+
8068
8143
  export interface NullTime {}
8069
8144
 
8070
8145
  export interface OCRRule {
@@ -10533,6 +10608,10 @@ export interface SFUIDLastSeen {
10533
10608
  process_start_time: number;
10534
10609
  }
10535
10610
 
10611
+ export interface SRTIngress {
10612
+ address: string;
10613
+ }
10614
+
10536
10615
  export interface STTEgressConfig {
10537
10616
  closed_captions_enabled?: boolean;
10538
10617
 
@@ -11564,6 +11643,8 @@ export interface TranscriptionSettings {
11564
11643
  mode: 'available' | 'disabled' | 'auto-on';
11565
11644
 
11566
11645
  speech_segment_config?: SpeechSegmentConfig;
11646
+
11647
+ translation?: TranslationSettings;
11567
11648
  }
11568
11649
 
11569
11650
  export interface TranscriptionSettingsRequest {
@@ -11611,6 +11692,8 @@ export interface TranscriptionSettingsRequest {
11611
11692
  mode?: 'available' | 'disabled' | 'auto-on';
11612
11693
 
11613
11694
  speech_segment_config?: SpeechSegmentConfig;
11695
+
11696
+ translation?: TranslationSettings;
11614
11697
  }
11615
11698
 
11616
11699
  export interface TranscriptionSettingsResponse {
@@ -11658,6 +11741,8 @@ export interface TranscriptionSettingsResponse {
11658
11741
  mode: 'available' | 'disabled' | 'auto-on';
11659
11742
 
11660
11743
  speech_segment_config?: SpeechSegmentConfig;
11744
+
11745
+ translation?: TranslationSettings;
11661
11746
  }
11662
11747
 
11663
11748
  export interface TranslateMessageRequest {
@@ -11721,6 +11806,12 @@ export interface TranslateMessageRequest {
11721
11806
  | 'ht';
11722
11807
  }
11723
11808
 
11809
+ export interface TranslationSettings {
11810
+ enabled: boolean;
11811
+
11812
+ languages: string[];
11813
+ }
11814
+
11724
11815
  export interface TruncateChannelRequest {
11725
11816
  hard_delete?: boolean;
11726
11817
 
@@ -11936,6 +12027,8 @@ export interface UpdateActivityRequest {
11936
12027
 
11937
12028
  attachments?: Attachment[];
11938
12029
 
12030
+ feeds?: string[];
12031
+
11939
12032
  filter_tags?: string[];
11940
12033
 
11941
12034
  interest_tags?: string[];
@@ -12820,7 +12913,7 @@ export interface UpsertPushPreferencesResponse {
12820
12913
 
12821
12914
  user_channel_preferences: Record<
12822
12915
  string,
12823
- Record<string, ChannelPushPreferences>
12916
+ Record<string, ChannelPushPreferences | null>
12824
12917
  >;
12825
12918
 
12826
12919
  user_preferences: Record<string, PushPreferences>;
@@ -13418,6 +13511,10 @@ export interface VoteData {
13418
13511
  option_id?: string;
13419
13512
  }
13420
13513
 
13514
+ export interface WHIPIngress {
13515
+ address: string;
13516
+ }
13517
+
13421
13518
  export interface WSEvent {
13422
13519
  created_at: Date;
13423
13520
 
@@ -791,6 +791,7 @@ export class VideoApi {
791
791
  enable_transcription: request?.enable_transcription,
792
792
  external_storage: request?.external_storage,
793
793
  language: request?.language,
794
+ speech_segment_config: request?.speech_segment_config,
794
795
  };
795
796
 
796
797
  const response = await this.apiClient.sendRequest<