@stream-io/node-sdk 0.6.5 → 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
 
@@ -805,6 +805,8 @@ export interface AggregatedActivityResponse {
805
805
 
806
806
  user_count: number;
807
807
 
808
+ user_count_truncated: boolean;
809
+
808
810
  activities: ActivityResponse[];
809
811
  }
810
812
 
@@ -1819,6 +1821,10 @@ export interface CallHLSBroadcastingStoppedEvent {
1819
1821
 
1820
1822
  export interface CallIngressResponse {
1821
1823
  rtmp: RTMPIngress;
1824
+
1825
+ srt: SRTIngress;
1826
+
1827
+ whip: WHIPIngress;
1822
1828
  }
1823
1829
 
1824
1830
  export interface CallLiveStartedEvent {
@@ -2142,6 +2148,8 @@ export interface CallResponse {
2142
2148
 
2143
2149
  transcribing: boolean;
2144
2150
 
2151
+ translating: boolean;
2152
+
2145
2153
  type: string;
2146
2154
 
2147
2155
  updated_at: Date;
@@ -2315,6 +2323,8 @@ export interface CallSessionParticipantLeftEvent {
2315
2323
  participant: CallParticipantResponse;
2316
2324
 
2317
2325
  type: string;
2326
+
2327
+ reason?: string;
2318
2328
  }
2319
2329
 
2320
2330
  export interface CallSessionResponse {
@@ -2790,6 +2800,8 @@ export interface Channel {
2790
2800
 
2791
2801
  created_by?: User;
2792
2802
 
2803
+ members_lookup?: Record<string, ChannelMemberLookup>;
2804
+
2793
2805
  truncated_by?: User;
2794
2806
  }
2795
2807
 
@@ -3083,6 +3095,22 @@ export interface ChannelMember {
3083
3095
  user?: UserResponse;
3084
3096
  }
3085
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
+
3086
3114
  export interface ChannelMemberResponse {
3087
3115
  channel_role: string;
3088
3116
  }
@@ -4496,6 +4524,10 @@ export interface DeleteCommentReactionResponse {
4496
4524
 
4497
4525
  export interface DeleteCommentResponse {
4498
4526
  duration: string;
4527
+
4528
+ activity: ActivityResponse;
4529
+
4530
+ comment: CommentResponse;
4499
4531
  }
4500
4532
 
4501
4533
  export interface DeleteExternalStorageResponse {
@@ -4507,8 +4539,6 @@ export interface DeleteFeedGroupResponse {
4507
4539
  }
4508
4540
 
4509
4541
  export interface DeleteFeedResponse {
4510
- delete_feed_task_id: string;
4511
-
4512
4542
  duration: string;
4513
4543
 
4514
4544
  task_id: string;
@@ -5336,35 +5366,34 @@ export interface FeedMemberUpdatedEvent {
5336
5366
 
5337
5367
  export const FeedOwnCapability = {
5338
5368
  ADD_ACTIVITY: 'add-activity',
5369
+ ADD_ACTIVITY_BOOKMARK: 'add-activity-bookmark',
5339
5370
  ADD_ACTIVITY_REACTION: 'add-activity-reaction',
5340
5371
  ADD_COMMENT: 'add-comment',
5341
5372
  ADD_COMMENT_REACTION: 'add-comment-reaction',
5342
- BOOKMARK_ACTIVITY: 'bookmark-activity',
5343
5373
  CREATE_FEED: 'create-feed',
5344
- DELETE_BOOKMARK: 'delete-bookmark',
5345
- DELETE_COMMENT: 'delete-comment',
5374
+ DELETE_ANY_ACTIVITY: 'delete-any-activity',
5375
+ DELETE_ANY_COMMENT: 'delete-any-comment',
5346
5376
  DELETE_FEED: 'delete-feed',
5347
- 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',
5348
5382
  FOLLOW: 'follow',
5349
- INVITE_FEED: 'invite-feed',
5350
- JOIN_FEED: 'join-feed',
5351
- LEAVE_FEED: 'leave-feed',
5352
- MANAGE_FEED_GROUP: 'manage-feed-group',
5353
- MARK_ACTIVITY: 'mark-activity',
5354
5383
  PIN_ACTIVITY: 'pin-activity',
5355
5384
  QUERY_FEED_MEMBERS: 'query-feed-members',
5356
5385
  QUERY_FOLLOWS: 'query-follows',
5357
5386
  READ_ACTIVITIES: 'read-activities',
5358
5387
  READ_FEED: 'read-feed',
5359
- REMOVE_ACTIVITY: 'remove-activity',
5360
- REMOVE_ACTIVITY_REACTION: 'remove-activity-reaction',
5361
- REMOVE_COMMENT_REACTION: 'remove-comment-reaction',
5362
5388
  UNFOLLOW: 'unfollow',
5363
- UPDATE_ACTIVITY: 'update-activity',
5364
- UPDATE_COMMENT: 'update-comment',
5389
+ UPDATE_ANY_ACTIVITY: 'update-any-activity',
5390
+ UPDATE_ANY_COMMENT: 'update-any-comment',
5365
5391
  UPDATE_FEED: 'update-feed',
5366
5392
  UPDATE_FEED_FOLLOWERS: 'update-feed-followers',
5367
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',
5368
5397
  } as const;
5369
5398
 
5370
5399
  // eslint-disable-next-line @typescript-eslint/no-redeclare
@@ -5459,6 +5488,14 @@ export interface FeedViewResponse {
5459
5488
  ranking?: RankingConfig;
5460
5489
  }
5461
5490
 
5491
+ export interface FeedVisibilityResponse {
5492
+ description: string;
5493
+
5494
+ name: string;
5495
+
5496
+ grants: Record<string, string[]>;
5497
+ }
5498
+
5462
5499
  export interface FeedsModerationTemplateConfig {
5463
5500
  config_key: string;
5464
5501
 
@@ -5466,15 +5503,15 @@ export interface FeedsModerationTemplateConfig {
5466
5503
  }
5467
5504
 
5468
5505
  export interface FeedsPreferences {
5469
- comment?: string;
5506
+ comment?: 'all' | 'none';
5470
5507
 
5471
- comment_reaction?: string;
5508
+ comment_reaction?: 'all' | 'none';
5472
5509
 
5473
- follow?: string;
5510
+ follow?: 'all' | 'none';
5474
5511
 
5475
- mention?: string;
5512
+ mention?: 'all' | 'none';
5476
5513
 
5477
- reaction?: string;
5514
+ reaction?: 'all' | 'none';
5478
5515
 
5479
5516
  custom_activity_types?: Record<string, string>;
5480
5517
  }
@@ -5560,33 +5597,29 @@ export interface FirebaseConfigFields {
5560
5597
  export interface Flag {
5561
5598
  created_at: Date;
5562
5599
 
5563
- entity_id: string;
5564
-
5565
- entity_type: string;
5600
+ created_by_automod: boolean;
5566
5601
 
5567
5602
  updated_at: Date;
5568
5603
 
5569
- result: Array<Record<string, any>>;
5570
-
5571
- entity_creator_id?: string;
5572
-
5573
- is_streamed_content?: boolean;
5574
-
5575
- moderation_payload_hash?: string;
5604
+ approved_at?: Date;
5576
5605
 
5577
5606
  reason?: string;
5578
5607
 
5579
- review_queue_item_id?: string;
5608
+ rejected_at?: Date;
5580
5609
 
5581
- type?: string;
5610
+ reviewed_at?: Date;
5582
5611
 
5583
- labels?: string[];
5612
+ reviewed_by?: string;
5613
+
5614
+ target_message_id?: string;
5584
5615
 
5585
5616
  custom?: Record<string, any>;
5586
5617
 
5587
- moderation_payload?: ModerationPayload;
5618
+ details?: FlagDetails;
5588
5619
 
5589
- review_queue_item?: ReviewQueueItem;
5620
+ target_message?: Message;
5621
+
5622
+ target_user?: User;
5590
5623
 
5591
5624
  user?: User;
5592
5625
  }
@@ -5933,6 +5966,8 @@ export interface GetCallReportResponse {
5933
5966
  video_reactions?: VideoReactionsResponse[];
5934
5967
 
5935
5968
  chat_activity?: ChatActivityStatsResponse;
5969
+
5970
+ session?: CallSessionResponse;
5936
5971
  }
5937
5972
 
5938
5973
  export interface GetCallResponse {
@@ -6123,6 +6158,12 @@ export interface GetFeedViewResponse {
6123
6158
  feed_view: FeedViewResponse;
6124
6159
  }
6125
6160
 
6161
+ export interface GetFeedVisibilityResponse {
6162
+ duration: string;
6163
+
6164
+ feed_visibility: FeedVisibilityResponse;
6165
+ }
6166
+
6126
6167
  export interface GetFollowSuggestionsResponse {
6127
6168
  duration: string;
6128
6169
 
@@ -6903,6 +6944,12 @@ export interface ListFeedViewsResponse {
6903
6944
  views: Record<string, FeedViewResponse>;
6904
6945
  }
6905
6946
 
6947
+ export interface ListFeedVisibilitiesResponse {
6948
+ duration: string;
6949
+
6950
+ feed_visibilities: Record<string, FeedVisibilityResponse>;
6951
+ }
6952
+
6906
6953
  export interface ListImportsResponse {
6907
6954
  duration: string;
6908
6955
 
@@ -7372,6 +7419,8 @@ export interface MessageReadEvent {
7372
7419
 
7373
7420
  team?: string;
7374
7421
 
7422
+ channel?: ChannelResponse;
7423
+
7375
7424
  thread?: ThreadResponse;
7376
7425
 
7377
7426
  user?: UserResponseCommonFields;
@@ -7768,6 +7817,8 @@ export interface ModerationCustomActionEvent {
7768
7817
  }
7769
7818
 
7770
7819
  export interface ModerationDashboardPreferences {
7820
+ disable_flagging_reviewed_entity?: boolean;
7821
+
7771
7822
  flag_user_on_flagged_content?: boolean;
7772
7823
 
7773
7824
  media_queue_blur_enabled?: boolean;
@@ -7977,6 +8028,12 @@ export interface NotificationConfig {
7977
8028
  track_seen?: boolean;
7978
8029
  }
7979
8030
 
8031
+ export interface NotificationContext {
8032
+ target?: NotificationTarget;
8033
+
8034
+ trigger?: NotificationTrigger;
8035
+ }
8036
+
7980
8037
  export interface NotificationFeedUpdatedEvent {
7981
8038
  created_at: Date;
7982
8039
 
@@ -8063,6 +8120,26 @@ export interface NotificationStatusResponse {
8063
8120
  seen_activities?: string[];
8064
8121
  }
8065
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
+
8066
8143
  export interface NullTime {}
8067
8144
 
8068
8145
  export interface OCRRule {
@@ -10531,6 +10608,10 @@ export interface SFUIDLastSeen {
10531
10608
  process_start_time: number;
10532
10609
  }
10533
10610
 
10611
+ export interface SRTIngress {
10612
+ address: string;
10613
+ }
10614
+
10534
10615
  export interface STTEgressConfig {
10535
10616
  closed_captions_enabled?: boolean;
10536
10617
 
@@ -11562,6 +11643,8 @@ export interface TranscriptionSettings {
11562
11643
  mode: 'available' | 'disabled' | 'auto-on';
11563
11644
 
11564
11645
  speech_segment_config?: SpeechSegmentConfig;
11646
+
11647
+ translation?: TranslationSettings;
11565
11648
  }
11566
11649
 
11567
11650
  export interface TranscriptionSettingsRequest {
@@ -11609,6 +11692,8 @@ export interface TranscriptionSettingsRequest {
11609
11692
  mode?: 'available' | 'disabled' | 'auto-on';
11610
11693
 
11611
11694
  speech_segment_config?: SpeechSegmentConfig;
11695
+
11696
+ translation?: TranslationSettings;
11612
11697
  }
11613
11698
 
11614
11699
  export interface TranscriptionSettingsResponse {
@@ -11656,6 +11741,8 @@ export interface TranscriptionSettingsResponse {
11656
11741
  mode: 'available' | 'disabled' | 'auto-on';
11657
11742
 
11658
11743
  speech_segment_config?: SpeechSegmentConfig;
11744
+
11745
+ translation?: TranslationSettings;
11659
11746
  }
11660
11747
 
11661
11748
  export interface TranslateMessageRequest {
@@ -11719,6 +11806,12 @@ export interface TranslateMessageRequest {
11719
11806
  | 'ht';
11720
11807
  }
11721
11808
 
11809
+ export interface TranslationSettings {
11810
+ enabled: boolean;
11811
+
11812
+ languages: string[];
11813
+ }
11814
+
11722
11815
  export interface TruncateChannelRequest {
11723
11816
  hard_delete?: boolean;
11724
11817
 
@@ -11934,6 +12027,8 @@ export interface UpdateActivityRequest {
11934
12027
 
11935
12028
  attachments?: Attachment[];
11936
12029
 
12030
+ feeds?: string[];
12031
+
11937
12032
  filter_tags?: string[];
11938
12033
 
11939
12034
  interest_tags?: string[];
@@ -12818,7 +12913,7 @@ export interface UpsertPushPreferencesResponse {
12818
12913
 
12819
12914
  user_channel_preferences: Record<
12820
12915
  string,
12821
- Record<string, ChannelPushPreferences>
12916
+ Record<string, ChannelPushPreferences | null>
12822
12917
  >;
12823
12918
 
12824
12919
  user_preferences: Record<string, PushPreferences>;
@@ -13416,6 +13511,10 @@ export interface VoteData {
13416
13511
  option_id?: string;
13417
13512
  }
13418
13513
 
13514
+ export interface WHIPIngress {
13515
+ address: string;
13516
+ }
13517
+
13419
13518
  export interface WSEvent {
13420
13519
  created_at: Date;
13421
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<