@stream-io/node-sdk 0.8.3 → 0.8.5

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.
@@ -1,5 +1,5 @@
1
1
  import { ApiClient, StreamResponse } from '../../gen-imports';
2
- import { AddSegmentTargetsRequest, CampaignResponse, CastPollVoteRequest, ChannelBatchUpdateRequest, ChannelBatchUpdateResponse, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateCampaignRequest, CreateCampaignResponse, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreatePredefinedFilterRequest, CreatePredefinedFilterResponse, CreateReminderRequest, CreateSegmentRequest, CreateSegmentResponse, DeleteCampaignResponse, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, DeleteReactionResponse, DeleteReminderResponse, DeleteRetentionPolicyRequest, DeleteRetentionPolicyResponse, DeleteSegmentTargetsRequest, EventResponse, ExportChannelsRequest, ExportChannelsResponse, GetCampaignResponse, GetChannelTypeResponse, GetCommandResponse, GetDraftResponse, GetManyMessagesResponse, GetMessageResponse, GetPinnedMessagesResponse, GetPredefinedFilterResponse, GetReactionsResponse, GetRepliesResponse, GetRetentionPolicyResponse, GetRetentionPolicyRunsRequest, GetRetentionPolicyRunsResponse, GetSegmentResponse, GetThreadResponse, GroupedQueryChannelsRequest, GroupedQueryChannelsResponse, HideChannelRequest, HideChannelResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkDeliveredRequest, MarkDeliveredResponse, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageActionResponse, MuteChannelRequest, MuteChannelResponse, PollVoteResponse, QueryBannedUsersPayload, QueryBannedUsersResponse, QueryCampaignsRequest, QueryCampaignsResponse, QueryChannelsRequest, QueryChannelsResponse, QueryDraftsRequest, QueryDraftsResponse, QueryFutureChannelBansPayload, QueryFutureChannelBansResponse, QueryMembersPayload, QueryMessageFlagsPayload, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryPredefinedFiltersResponse, QueryReactionsRequest, QueryReactionsResponse, QueryRemindersRequest, QueryRemindersResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, QueryTeamUsageStatsRequest, QueryTeamUsageStatsResponse, QueryThreadsRequest, QueryThreadsResponse, ReminderResponseData, Response, SearchPayload, SearchResponse, SendEventRequest, SendMessageRequest, SendMessageResponse, SendReactionRequest, SendReactionResponse, SendUserCustomEventRequest, SetRetentionPolicyRequest, SetRetentionPolicyResponse, ShowChannelRequest, ShowChannelResponse, SortParamRequest, StartCampaignRequest, StartCampaignResponse, StopCampaignRequest, TranslateMessageRequest, TruncateChannelRequest, TruncateChannelResponse, UndeleteMessageRequest, UndeleteMessageResponse, UnmuteChannelRequest, UnmuteResponse, UnreadCountsBatchRequest, UnreadCountsBatchResponse, UpdateCampaignRequest, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateChannelTypeRequest, UpdateChannelTypeResponse, UpdateCommandRequest, UpdateCommandResponse, UpdateMemberPartialRequest, UpdateMemberPartialResponse, UpdateMessagePartialRequest, UpdateMessagePartialResponse, UpdateMessageRequest, UpdateMessageResponse, UpdatePredefinedFilterRequest, UpdatePredefinedFilterResponse, UpdateReminderRequest, UpdateReminderResponse, UpdateSegmentRequest, UpdateSegmentResponse, UpdateThreadPartialRequest, UpdateThreadPartialResponse, UploadChannelFileRequest, UploadChannelFileResponse, UploadChannelRequest, UploadChannelResponse, WrappedUnreadCountsResponse } from '../models';
2
+ import { AddSegmentTargetsRequest, CampaignResponse, CastPollVoteRequest, ChannelBatchUpdateRequest, ChannelBatchUpdateResponse, ChannelGetOrCreateRequest, ChannelStateResponse, CommitMessageRequest, CreateCampaignRequest, CreateCampaignResponse, CreateChannelTypeRequest, CreateChannelTypeResponse, CreateCommandRequest, CreateCommandResponse, CreatePredefinedFilterRequest, CreatePredefinedFilterResponse, CreateReminderRequest, CreateReminderResponse, CreateSegmentRequest, CreateSegmentResponse, DeleteCampaignResponse, DeleteChannelResponse, DeleteChannelsRequest, DeleteChannelsResponse, DeleteCommandResponse, DeleteMessageResponse, DeleteReactionResponse, DeleteReminderResponse, DeleteRetentionPolicyRequest, DeleteRetentionPolicyResponse, DeleteSegmentTargetsRequest, EventResponse, ExportChannelsRequest, ExportChannelsResponse, GetCampaignResponse, GetChannelTypeResponse, GetCommandResponse, GetDraftResponse, GetManyMessagesResponse, GetMessageResponse, GetPinnedMessagesResponse, GetPredefinedFilterResponse, GetReactionsResponse, GetRepliesResponse, GetRetentionPolicyResponse, GetRetentionPolicyRunsRequest, GetRetentionPolicyRunsResponse, GetSegmentResponse, GetThreadResponse, GroupedQueryChannelsRequest, GroupedQueryChannelsResponse, HideChannelRequest, HideChannelResponse, ListChannelTypesResponse, ListCommandsResponse, MarkChannelsReadRequest, MarkDeliveredRequest, MarkDeliveredResponse, MarkReadRequest, MarkReadResponse, MarkUnreadRequest, MembersResponse, MessageActionRequest, MessageActionResponse, MuteChannelRequest, MuteChannelResponse, PollVoteResponse, QueryBannedUsersPayload, QueryBannedUsersResponse, QueryCampaignsRequest, QueryCampaignsResponse, QueryChannelsRequest, QueryChannelsResponse, QueryDraftsRequest, QueryDraftsResponse, QueryFutureChannelBansPayload, QueryFutureChannelBansResponse, QueryMembersPayload, QueryMessageFlagsPayload, QueryMessageFlagsResponse, QueryMessageHistoryRequest, QueryMessageHistoryResponse, QueryPredefinedFiltersResponse, QueryReactionsRequest, QueryReactionsResponse, QueryRemindersRequest, QueryRemindersResponse, QuerySegmentTargetsRequest, QuerySegmentTargetsResponse, QuerySegmentsRequest, QuerySegmentsResponse, QueryTeamUsageStatsRequest, QueryTeamUsageStatsResponse, QueryThreadsRequest, QueryThreadsResponse, Response, SearchPayload, SearchResponse, SendEventRequest, SendMessageRequest, SendMessageResponse, SendReactionRequest, SendReactionResponse, SendUserCustomEventRequest, SetRetentionPolicyRequest, SetRetentionPolicyResponse, ShowChannelRequest, ShowChannelResponse, SortParamRequest, StartCampaignRequest, StartCampaignResponse, StopCampaignRequest, TranslateMessageRequest, TranslateMessageResponse, TruncateChannelRequest, TruncateChannelResponse, UndeleteMessageRequest, UndeleteMessageResponse, UnmuteChannelRequest, UnmuteResponse, UnreadCountsBatchRequest, UnreadCountsBatchResponse, UpdateCampaignRequest, UpdateChannelPartialRequest, UpdateChannelPartialResponse, UpdateChannelRequest, UpdateChannelResponse, UpdateChannelTypeRequest, UpdateChannelTypeResponse, UpdateCommandRequest, UpdateCommandResponse, UpdateMemberPartialRequest, UpdateMemberPartialResponse, UpdateMessagePartialRequest, UpdateMessagePartialResponse, UpdateMessageRequest, UpdateMessageResponse, UpdatePredefinedFilterRequest, UpdatePredefinedFilterResponse, UpdateReminderRequest, UpdateReminderResponse, UpdateSegmentRequest, UpdateSegmentResponse, UpdateThreadPartialRequest, UpdateThreadPartialResponse, UploadChannelFileRequest, UploadChannelFileResponse, UploadChannelRequest, UploadChannelResponse, WrappedUnreadCountsResponse } from '../models';
3
3
  export declare class ChatApi {
4
4
  readonly apiClient: ApiClient;
5
5
  constructor(apiClient: ApiClient);
@@ -224,7 +224,7 @@ export declare class ChatApi {
224
224
  }): Promise<StreamResponse<QueryReactionsResponse>>;
225
225
  translateMessage(request: TranslateMessageRequest & {
226
226
  id: string;
227
- }): Promise<StreamResponse<MessageActionResponse>>;
227
+ }): Promise<StreamResponse<TranslateMessageResponse>>;
228
228
  undeleteMessage(request: UndeleteMessageRequest & {
229
229
  id: string;
230
230
  }): Promise<StreamResponse<UndeleteMessageResponse>>;
@@ -247,7 +247,7 @@ export declare class ChatApi {
247
247
  }): Promise<StreamResponse<UpdateReminderResponse>>;
248
248
  createReminder(request: CreateReminderRequest & {
249
249
  message_id: string;
250
- }): Promise<StreamResponse<ReminderResponseData>>;
250
+ }): Promise<StreamResponse<CreateReminderResponse>>;
251
251
  getReplies(request: {
252
252
  parent_id: string;
253
253
  limit?: number;
@@ -29,8 +29,19 @@ export interface AITextConfig {
29
29
  export interface AIVideoConfig {
30
30
  async?: boolean;
31
31
  enabled?: boolean;
32
+ provider?: string;
32
33
  rules?: Array<AWSRekognitionRule>;
33
34
  }
35
+ export interface AIVideoConfigRequest {
36
+ async?: boolean;
37
+ enabled?: boolean;
38
+ rules?: Array<AWSRekognitionRule>;
39
+ }
40
+ export interface AIVideoConfigResponse {
41
+ enabled: boolean;
42
+ rules: Array<AWSRekognitionRule>;
43
+ async?: boolean;
44
+ }
34
45
  export interface APIError {
35
46
  /**
36
47
  * API error code
@@ -136,7 +147,7 @@ export interface AcceptFollowRequest {
136
147
  */
137
148
  target: string;
138
149
  /**
139
- * Optional role for the follower in the follow relationship
150
+ * Optional role for the follower in the follow relationship. Server-side only. Either a built-in ('feed_follower' (the default) or 'feed_member_viewer') or any role your app has defined; grants are not inspected.
140
151
  */
141
152
  follower_role?: string;
142
153
  }
@@ -410,6 +421,20 @@ export interface ActivityPinnedEvent {
410
421
  received_at?: Date;
411
422
  user?: UserResponseCommonFields;
412
423
  }
424
+ export interface ActivityProcessingConfig {
425
+ /**
426
+ * When true, this feed group's allowed_tags is given to the model as a constrained vocabulary so it maps its own wording onto a configured tag instead of that output being discarded. Improves how often a tag is produced, at the cost of sending the list on every request. Scoped to this group's own list: leaving it false keeps this group's tags out of the request even when another feed group on the same activity sets it true. Requires allowed_tags. Off by default.
427
+ */
428
+ send_allowed_tags_to_ai?: boolean;
429
+ /**
430
+ * When set, the LLM activity processors may only write interest tags from this list. By default the model is not told about the list, so a tag is only written when the model happens to produce that exact word after lower-casing and trimming, which for any vocabulary is often not the case; set send_allowed_tags_to_ai to have the model choose from the list instead. Mutually exclusive with blocked_tags.
431
+ */
432
+ allowed_tags?: Array<string>;
433
+ /**
434
+ * Interest tags the LLM activity processors are never allowed to write. Mutually exclusive with allowed_tags.
435
+ */
436
+ blocked_tags?: Array<string>;
437
+ }
413
438
  export interface ActivityProcessorConfig {
414
439
  /**
415
440
  * Type of activity processor (required)
@@ -420,7 +445,7 @@ export interface ActivityProcessorConfig {
420
445
  */
421
446
  min_text_length?: number;
422
447
  /**
423
- * Minimum number of words the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags.
448
+ * Minimum number of words the activity text must have before this processor runs. 0 (the default) disables the check. Only applies to text_interest_tags. Words are whitespace-separated, so scripts written without word spacing (Chinese, Japanese, Thai) always count as 1 word regardless of length — use min_text_length for those.
424
449
  */
425
450
  min_word_count?: number;
426
451
  }
@@ -1367,7 +1392,7 @@ export interface AnalyzeRequest {
1367
1392
  export interface AnalyzeResponse {
1368
1393
  duration: string;
1369
1394
  /**
1370
- * Always `complete` — /analyze is sync-only and the full verdict is in the response.
1395
+ * `complete` (all fields screened), `partial` (mix of verdicts and per-field errors), or `pending` (async).
1371
1396
  */
1372
1397
  status: string;
1373
1398
  /**
@@ -1420,9 +1445,12 @@ export interface AppResponseFields {
1420
1445
  id: number;
1421
1446
  image_moderation_enabled: boolean;
1422
1447
  max_aggregated_activities_length: number;
1448
+ member_custom_on_mentioned_users_enabled: boolean;
1423
1449
  member_custom_on_messages_enabled: boolean;
1450
+ member_custom_on_typing_events_enabled: boolean;
1424
1451
  moderation_audio_call_moderation_enabled: boolean;
1425
1452
  moderation_enabled: boolean;
1453
+ moderation_keyframe_video_enabled: boolean;
1426
1454
  moderation_llm_configurability_enabled: boolean;
1427
1455
  moderation_multitenant_blocklist_enabled: boolean;
1428
1456
  moderation_video_call_moderation_enabled: boolean;
@@ -3762,7 +3790,15 @@ export interface ChannelBatchUpdateRequest {
3762
3790
  * Filter to apply to the query
3763
3791
  */
3764
3792
  filter: Record<string, any>;
3793
+ /**
3794
+ * `updateData` only. Deletes these keys from each channel's existing custom object, leaving every other custom key untouched. Keys are dot-paths; deleting a key that does not exist is a no-op. Cannot be combined with `data.custom`
3795
+ */
3796
+ custom_unset?: Array<string>;
3765
3797
  members?: Array<ChannelBatchMemberRequest>;
3798
+ /**
3799
+ * `updateData` only. Merges these keys into each channel's existing custom object, leaving every other custom key untouched. Keys are dot-paths, so `a.b` sets key `b` inside object `a` (the parent object must already exist). Cannot be combined with `data.custom`
3800
+ */
3801
+ custom_set?: Record<string, any>;
3766
3802
  data?: ChannelDataUpdate;
3767
3803
  }
3768
3804
  export interface ChannelBatchUpdateResponse {
@@ -4193,16 +4229,13 @@ export interface ChannelMemberPartialResponse {
4193
4229
  custom?: Record<string, any>;
4194
4230
  }
4195
4231
  export interface ChannelMemberRequest {
4196
- user_id: string;
4197
4232
  /**
4198
4233
  * Role of the member in the channel
4199
4234
  */
4200
4235
  channel_role?: string;
4236
+ user_id?: string;
4201
4237
  custom?: Record<string, any>;
4202
- /**
4203
- * User response object
4204
- */
4205
- user?: UserResponse;
4238
+ user?: MemberUserRequest;
4206
4239
  }
4207
4240
  export interface ChannelMemberResponse {
4208
4241
  /**
@@ -5708,7 +5741,7 @@ export interface ConfigResponse {
5708
5741
  */
5709
5742
  ai_image_subclassifications?: Record<string, Array<string>>;
5710
5743
  ai_text_config?: AITextConfig;
5711
- ai_video_config?: AIVideoConfig;
5744
+ ai_video_config?: AIVideoConfigResponse;
5712
5745
  automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
5713
5746
  automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
5714
5747
  automod_toxicity_config?: AutomodToxicityConfig;
@@ -6158,6 +6191,10 @@ export interface CreateFeedGroupRequest {
6158
6191
  * Unique identifier for the feed group
6159
6192
  */
6160
6193
  id: string;
6194
+ /**
6195
+ * Role new followers of feeds in this group are given. Either a built-in (feed_follower, feed_member_viewer) or any role your app has defined. Empty means feed_follower. Applied when the follow is accepted, so a follow that starts pending picks it up on approval
6196
+ */
6197
+ default_follower_role?: string;
6161
6198
  /**
6162
6199
  * Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'private'. Defaults to 'visible' if not provided.
6163
6200
  */
@@ -6171,6 +6208,7 @@ export interface CreateFeedGroupRequest {
6171
6208
  */
6172
6209
  activity_selectors?: Array<ActivitySelectorConfig>;
6173
6210
  activity_filter?: ActivityFilterConfig;
6211
+ activity_processing?: ActivityProcessingConfig;
6174
6212
  aggregation?: AggregationConfig;
6175
6213
  /**
6176
6214
  * Custom data for the feed group
@@ -6206,6 +6244,10 @@ export interface CreateFeedsBatchRequest {
6206
6244
  * List of feeds to create
6207
6245
  */
6208
6246
  feeds: Array<FeedRequest>;
6247
+ /**
6248
+ * Server-side only. If true, auto-creates users referenced by feeds[].created_by_id that don't already exist. Default: false.
6249
+ */
6250
+ create_users?: boolean;
6209
6251
  /**
6210
6252
  * If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
6211
6253
  */
@@ -6466,6 +6508,13 @@ export interface CreateReminderRequest {
6466
6508
  */
6467
6509
  user?: UserRequest;
6468
6510
  }
6511
+ export interface CreateReminderResponse {
6512
+ /**
6513
+ * Duration of the request in milliseconds
6514
+ */
6515
+ duration: string;
6516
+ reminder: ReminderResponseData;
6517
+ }
6469
6518
  export interface CreateRoleRequest {
6470
6519
  /**
6471
6520
  * Role name
@@ -7858,6 +7907,7 @@ export interface FeedGroup {
7858
7907
  aggregation_version: number;
7859
7908
  app_pk: number;
7860
7909
  created_at: Date;
7910
+ default_follower_role: string;
7861
7911
  default_visibility: string;
7862
7912
  group_id: string;
7863
7913
  updated_at: Date;
@@ -7920,6 +7970,10 @@ export interface FeedGroupResponse {
7920
7970
  * When the feed group was last updated
7921
7971
  */
7922
7972
  updated_at: Date;
7973
+ /**
7974
+ * Role new followers of feeds in this group are given. Either a built-in (feed_follower, feed_member_viewer) or any role your app has defined. Empty means feed_follower. Applied when the follow is accepted, so a follow that starts pending picks it up on approval
7975
+ */
7976
+ default_follower_role?: string;
7923
7977
  /**
7924
7978
  * Default visibility for activities. One of: public, visible, followers, members, private
7925
7979
  */
@@ -7934,6 +7988,7 @@ export interface FeedGroupResponse {
7934
7988
  */
7935
7989
  activity_selectors?: Array<ActivitySelectorConfigResponse>;
7936
7990
  activity_filter?: ActivityFilterConfig;
7991
+ activity_processing?: ActivityProcessingConfig;
7937
7992
  aggregation?: AggregationConfig;
7938
7993
  /**
7939
7994
  * Custom data for the feed group
@@ -8934,7 +8989,7 @@ export interface FollowResponse {
8934
8989
  */
8935
8990
  created_at: Date;
8936
8991
  /**
8937
- * Role of the follower (source user) in the follow relationship
8992
+ * Role of the follower (source user) in the follow relationship, as stored. A reserved name, or a role your app no longer defines, is reported as stored but evaluated as 'feed_follower'.
8938
8993
  */
8939
8994
  follower_role: string;
8940
8995
  /**
@@ -9546,6 +9601,10 @@ export interface GetOrCreateCallResponse {
9546
9601
  call: CallResponse;
9547
9602
  }
9548
9603
  export interface GetOrCreateFeedGroupRequest {
9604
+ /**
9605
+ * Role new followers of feeds in this group are given. Either a built-in (feed_follower, feed_member_viewer) or any role your app has defined. Empty means feed_follower. Applied when the follow is accepted, so a follow that starts pending picks it up on approval
9606
+ */
9607
+ default_follower_role?: string;
9549
9608
  /**
9550
9609
  * Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'private'. Defaults to 'visible' if not provided.
9551
9610
  */
@@ -9559,6 +9618,7 @@ export interface GetOrCreateFeedGroupRequest {
9559
9618
  */
9560
9619
  activity_selectors?: Array<ActivitySelectorConfig>;
9561
9620
  activity_filter?: ActivityFilterConfig;
9621
+ activity_processing?: ActivityProcessingConfig;
9562
9622
  aggregation?: AggregationConfig;
9563
9623
  /**
9564
9624
  * Custom data for the feed group
@@ -11057,6 +11117,18 @@ export interface MemberUpdatedEvent {
11057
11117
  channel_custom?: Record<string, any>;
11058
11118
  user?: UserResponseCommonFields;
11059
11119
  }
11120
+ export interface MemberUserRequest {
11121
+ id: string;
11122
+ image?: string;
11123
+ invisible?: boolean;
11124
+ language?: string;
11125
+ name?: string;
11126
+ role?: string;
11127
+ teams?: Array<string>;
11128
+ custom?: Record<string, any>;
11129
+ privacy_settings?: PrivacySettingsResponse;
11130
+ teams_role?: Record<string, string>;
11131
+ }
11060
11132
  export interface MembersResponse {
11061
11133
  /**
11062
11134
  * Duration of the request in milliseconds
@@ -11711,6 +11783,10 @@ export interface MessageResponse {
11711
11783
  */
11712
11784
  image_labels?: Record<string, Array<string>>;
11713
11785
  member?: ChannelMemberPartialResponse;
11786
+ /**
11787
+ * Channel member data for the users mentioned in the message, keyed by user id. Only present when the app has member custom on mentioned users enabled, and only for the first two mentioned users of each message
11788
+ */
11789
+ mentioned_channel_members?: Record<string, ChannelMemberPartialResponse>;
11714
11790
  moderation?: ModerationV2Response;
11715
11791
  /**
11716
11792
  * User response object
@@ -11992,6 +12068,10 @@ export interface MessageWithChannelResponse {
11992
12068
  */
11993
12069
  image_labels?: Record<string, Array<string>>;
11994
12070
  member?: ChannelMemberPartialResponse;
12071
+ /**
12072
+ * Channel member data for the users mentioned in the message, keyed by user id. Only present when the app has member custom on mentioned users enabled, and only for the first two mentioned users of each message
12073
+ */
12074
+ mentioned_channel_members?: Record<string, ChannelMemberPartialResponse>;
11995
12075
  moderation?: ModerationV2Response;
11996
12076
  /**
11997
12077
  * User response object
@@ -12194,6 +12274,7 @@ export interface ModerationDashboardPreferences {
12194
12274
  custom_views_enabled?: boolean;
12195
12275
  disable_audit_logs?: boolean;
12196
12276
  disable_flagging_reviewed_entity?: boolean;
12277
+ enforce_shadow_server_side?: boolean;
12197
12278
  escalation_queue_enabled?: boolean;
12198
12279
  flag_user_on_flagged_content?: boolean;
12199
12280
  include_attachment_payload?: boolean;
@@ -12212,6 +12293,7 @@ export interface ModerationFlagResponse {
12212
12293
  updated_at: Date;
12213
12294
  user_id: string;
12214
12295
  result: Array<Record<string, any>>;
12296
+ content_published_at?: Date;
12215
12297
  entity_creator_id?: string;
12216
12298
  reason?: string;
12217
12299
  review_queue_item_id?: string;
@@ -13433,7 +13515,10 @@ export interface PollResponseData {
13433
13515
  name: string;
13434
13516
  updated_at: Date;
13435
13517
  vote_count: number;
13436
- voting_visibility: string;
13518
+ /**
13519
+ * Voting visibility of the poll
13520
+ */
13521
+ voting_visibility: 'anonymous' | 'public';
13437
13522
  latest_answers: Array<PollVoteResponseData>;
13438
13523
  options: Array<PollOptionResponseData>;
13439
13524
  own_votes: Array<PollVoteResponseData>;
@@ -14564,10 +14649,6 @@ export interface QueryLabelResultsResponse {
14564
14649
  }
14565
14650
  export interface QueryMembersPayload {
14566
14651
  type: string;
14567
- /**
14568
- * Filter conditions to apply to the query
14569
- */
14570
- filter_conditions: Record<string, any>;
14571
14652
  id?: string;
14572
14653
  limit?: number;
14573
14654
  offset?: number;
@@ -14577,6 +14658,10 @@ export interface QueryMembersPayload {
14577
14658
  * Array of sort parameters
14578
14659
  */
14579
14660
  sort?: Array<SortParamRequest>;
14661
+ /**
14662
+ * Filter conditions to apply to the query
14663
+ */
14664
+ filter_conditions?: Record<string, any>;
14580
14665
  /**
14581
14666
  * User request object
14582
14667
  */
@@ -15696,6 +15781,7 @@ export interface ReminderCreatedEvent {
15696
15781
  */
15697
15782
  user_id: string;
15698
15783
  custom: Record<string, any>;
15784
+ reminder: ReminderResponseData;
15699
15785
  /**
15700
15786
  * The type of event: "reminder.created" in this case
15701
15787
  */
@@ -15705,7 +15791,6 @@ export interface ReminderCreatedEvent {
15705
15791
  */
15706
15792
  parent_id?: string;
15707
15793
  received_at?: Date;
15708
- reminder?: ReminderResponseData;
15709
15794
  }
15710
15795
  export interface ReminderDeletedEvent {
15711
15796
  /**
@@ -15725,6 +15810,7 @@ export interface ReminderDeletedEvent {
15725
15810
  */
15726
15811
  user_id: string;
15727
15812
  custom: Record<string, any>;
15813
+ reminder: ReminderResponseData;
15728
15814
  /**
15729
15815
  * The type of event: "reminder.deleted" in this case
15730
15816
  */
@@ -15734,7 +15820,6 @@ export interface ReminderDeletedEvent {
15734
15820
  */
15735
15821
  parent_id?: string;
15736
15822
  received_at?: Date;
15737
- reminder?: ReminderResponseData;
15738
15823
  }
15739
15824
  export interface ReminderNotificationEvent {
15740
15825
  /**
@@ -15754,13 +15839,13 @@ export interface ReminderNotificationEvent {
15754
15839
  */
15755
15840
  user_id: string;
15756
15841
  custom: Record<string, any>;
15842
+ reminder: ReminderResponseData;
15757
15843
  /**
15758
15844
  * The type of event: "notification.reminder_due" in this case
15759
15845
  */
15760
15846
  type: string;
15761
15847
  parent_id?: string;
15762
15848
  received_at?: Date;
15763
- reminder?: ReminderResponseData;
15764
15849
  }
15765
15850
  export interface ReminderResponseData {
15766
15851
  channel_cid: string;
@@ -15800,6 +15885,7 @@ export interface ReminderUpdatedEvent {
15800
15885
  */
15801
15886
  user_id: string;
15802
15887
  custom: Record<string, any>;
15888
+ reminder: ReminderResponseData;
15803
15889
  /**
15804
15890
  * The type of event: "reminder.updated" in this case
15805
15891
  */
@@ -15809,7 +15895,6 @@ export interface ReminderUpdatedEvent {
15809
15895
  */
15810
15896
  parent_id?: string;
15811
15897
  received_at?: Date;
15812
- reminder?: ReminderResponseData;
15813
15898
  }
15814
15899
  export interface RemoveUserGroupMembersRequest {
15815
15900
  /**
@@ -16759,6 +16844,7 @@ export interface SearchResultMessage {
16759
16844
  i18n?: Record<string, string>;
16760
16845
  image_labels?: Record<string, Array<string>>;
16761
16846
  member?: ChannelMemberPartialResponse;
16847
+ mentioned_channel_members?: Record<string, ChannelMemberPartialResponse>;
16762
16848
  moderation?: ModerationV2Response;
16763
16849
  /**
16764
16850
  * User response object
@@ -17991,6 +18077,16 @@ export interface TranslateMessageRequest {
17991
18077
  */
17992
18078
  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' | 'lt' | 'ht';
17993
18079
  }
18080
+ export interface TranslateMessageResponse {
18081
+ /**
18082
+ * Duration of the request in milliseconds
18083
+ */
18084
+ duration: string;
18085
+ /**
18086
+ * Represents any chat message
18087
+ */
18088
+ message: MessageResponse;
18089
+ }
17994
18090
  export interface TranslationSettings {
17995
18091
  enabled?: boolean;
17996
18092
  languages?: Array<string>;
@@ -18082,7 +18178,8 @@ export interface UnbanActionRequestPayload {
18082
18178
  }
18083
18179
  export interface UnbanRequest {
18084
18180
  /**
18085
- * ID of the user performing the unban
18181
+ * @deprecated
18182
+ * ID of the user performing the unban Deprecated: not used by the unban flow
18086
18183
  */
18087
18184
  unbanned_by_id?: string;
18088
18185
  /**
@@ -18479,7 +18576,9 @@ export interface UpdateAppRequest {
18479
18576
  guest_user_creation_disabled?: boolean;
18480
18577
  image_moderation_enabled?: boolean;
18481
18578
  max_aggregated_activities_length?: number;
18579
+ member_custom_on_mentioned_users_enabled?: boolean;
18482
18580
  member_custom_on_messages_enabled?: boolean;
18581
+ member_custom_on_typing_events_enabled?: boolean;
18483
18582
  migrate_permissions_to_v2?: boolean;
18484
18583
  moderation_analytics_enabled?: boolean;
18485
18584
  moderation_enabled?: boolean;
@@ -19067,6 +19166,13 @@ export interface UpdateExternalStorageResponse {
19067
19166
  type: 's3' | 'gcs' | 'abs';
19068
19167
  }
19069
19168
  export interface UpdateFeedGroupRequest {
19169
+ /**
19170
+ * Role new followers of feeds in this group are given. Either a built-in (feed_follower, feed_member_viewer) or any role your app has defined. Empty means feed_follower. Applied when the follow is accepted, so a follow that starts pending picks it up on approval
19171
+ */
19172
+ default_follower_role?: string;
19173
+ /**
19174
+ * Default visibility for the feed group. One of: public, visible, followers, members, private
19175
+ */
19070
19176
  default_visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';
19071
19177
  /**
19072
19178
  * Configuration for activity processors
@@ -19077,6 +19183,7 @@ export interface UpdateFeedGroupRequest {
19077
19183
  */
19078
19184
  activity_selectors?: Array<ActivitySelectorConfig>;
19079
19185
  activity_filter?: ActivityFilterConfig;
19186
+ activity_processing?: ActivityProcessingConfig;
19080
19187
  aggregation?: AggregationConfig;
19081
19188
  /**
19082
19189
  * Custom data for the feed group
@@ -19200,6 +19307,9 @@ export interface UpdateFollowRequest {
19200
19307
  * If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
19201
19308
  */
19202
19309
  enrich_own_fields?: boolean;
19310
+ /**
19311
+ * Optional role for the follower in the follow relationship. Server-side only. Either a built-in ('feed_follower' (the default) or 'feed_member_viewer') or any role your app has defined; grants are not inspected.
19312
+ */
19203
19313
  follower_role?: string;
19204
19314
  /**
19205
19315
  * Push preference for the follow relationship
@@ -19627,6 +19737,10 @@ export interface UpdateUsersResponse {
19627
19737
  * Duration of the request in milliseconds
19628
19738
  */
19629
19739
  duration: string;
19740
+ /**
19741
+ * @deprecated
19742
+ * Deprecated: always empty. Removing a user from a team no longer deletes their memberships in that team's channels, so there is no task to poll
19743
+ */
19630
19744
  membership_deletion_task_id: string;
19631
19745
  /**
19632
19746
  * Object containing users
@@ -19813,7 +19927,7 @@ export interface UpsertConfigRequest {
19813
19927
  ai_audio_config?: AIAudioConfigRequest;
19814
19928
  ai_image_config?: AIImageConfig;
19815
19929
  ai_text_config?: AITextConfig;
19816
- ai_video_config?: AIVideoConfig;
19930
+ ai_video_config?: AIVideoConfigRequest;
19817
19931
  automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;
19818
19932
  automod_semantic_filters_config?: AutomodSemanticFiltersConfig;
19819
19933
  automod_toxicity_config?: AutomodToxicityConfig;
@@ -268,6 +268,6 @@ export declare class VideoApi {
268
268
  queryAggregateCallStats(request?: QueryAggregateCallStatsRequest): Promise<StreamResponse<QueryAggregateCallStatsResponse>>;
269
269
  getDailyDigest(request?: {
270
270
  date?: string;
271
- app_id?: string;
271
+ target_app_id?: string;
272
272
  }): Promise<StreamResponse<GetDailyDigestResponse>>;
273
273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/node-sdk",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": {
@@ -17,6 +17,7 @@ import {
17
17
  CreatePredefinedFilterRequest,
18
18
  CreatePredefinedFilterResponse,
19
19
  CreateReminderRequest,
20
+ CreateReminderResponse,
20
21
  CreateSegmentRequest,
21
22
  CreateSegmentResponse,
22
23
  DeleteCampaignResponse,
@@ -94,7 +95,6 @@ import {
94
95
  QueryTeamUsageStatsResponse,
95
96
  QueryThreadsRequest,
96
97
  QueryThreadsResponse,
97
- ReminderResponseData,
98
98
  Response,
99
99
  SearchPayload,
100
100
  SearchResponse,
@@ -113,6 +113,7 @@ import {
113
113
  StartCampaignResponse,
114
114
  StopCampaignRequest,
115
115
  TranslateMessageRequest,
116
+ TranslateMessageResponse,
116
117
  TruncateChannelRequest,
117
118
  TruncateChannelResponse,
118
119
  UndeleteMessageRequest,
@@ -390,7 +391,9 @@ export class ChatApi {
390
391
  const body = {
391
392
  operation: request?.operation,
392
393
  filter: request?.filter,
394
+ custom_unset: request?.custom_unset,
393
395
  members: request?.members,
396
+ custom_set: request?.custom_set,
394
397
  data: request?.data,
395
398
  };
396
399
 
@@ -1865,7 +1868,7 @@ export class ChatApi {
1865
1868
 
1866
1869
  async translateMessage(
1867
1870
  request: TranslateMessageRequest & { id: string },
1868
- ): Promise<StreamResponse<MessageActionResponse>> {
1871
+ ): Promise<StreamResponse<TranslateMessageResponse>> {
1869
1872
  const pathParams = {
1870
1873
  id: request?.id,
1871
1874
  };
@@ -1874,7 +1877,7 @@ export class ChatApi {
1874
1877
  };
1875
1878
 
1876
1879
  const response = await this.apiClient.sendRequest<
1877
- StreamResponse<MessageActionResponse>
1880
+ StreamResponse<TranslateMessageResponse>
1878
1881
  >(
1879
1882
  'POST',
1880
1883
  '/api/v2/chat/messages/{id}/translate',
@@ -1884,7 +1887,7 @@ export class ChatApi {
1884
1887
  'application/json',
1885
1888
  );
1886
1889
 
1887
- decoders['MessageActionResponse']?.(response.body);
1890
+ decoders['TranslateMessageResponse']?.(response.body);
1888
1891
 
1889
1892
  return { ...response.body, metadata: response.metadata };
1890
1893
  }
@@ -2028,7 +2031,7 @@ export class ChatApi {
2028
2031
 
2029
2032
  async createReminder(
2030
2033
  request: CreateReminderRequest & { message_id: string },
2031
- ): Promise<StreamResponse<ReminderResponseData>> {
2034
+ ): Promise<StreamResponse<CreateReminderResponse>> {
2032
2035
  const pathParams = {
2033
2036
  message_id: request?.message_id,
2034
2037
  };
@@ -2039,7 +2042,7 @@ export class ChatApi {
2039
2042
  };
2040
2043
 
2041
2044
  const response = await this.apiClient.sendRequest<
2042
- StreamResponse<ReminderResponseData>
2045
+ StreamResponse<CreateReminderResponse>
2043
2046
  >(
2044
2047
  'POST',
2045
2048
  '/api/v2/chat/messages/{message_id}/reminders',
@@ -2049,7 +2052,7 @@ export class ChatApi {
2049
2052
  'application/json',
2050
2053
  );
2051
2054
 
2052
- decoders['ReminderResponseData']?.(response.body);
2055
+ decoders['CreateReminderResponse']?.(response.body);
2053
2056
 
2054
2057
  return { ...response.body, metadata: response.metadata };
2055
2058
  }
@@ -156,8 +156,12 @@ export class CommonApi {
156
156
  image_moderation_enabled: request?.image_moderation_enabled,
157
157
  max_aggregated_activities_length:
158
158
  request?.max_aggregated_activities_length,
159
+ member_custom_on_mentioned_users_enabled:
160
+ request?.member_custom_on_mentioned_users_enabled,
159
161
  member_custom_on_messages_enabled:
160
162
  request?.member_custom_on_messages_enabled,
163
+ member_custom_on_typing_events_enabled:
164
+ request?.member_custom_on_typing_events_enabled,
161
165
  migrate_permissions_to_v2: request?.migrate_permissions_to_v2,
162
166
  moderation_analytics_enabled: request?.moderation_analytics_enabled,
163
167
  moderation_enabled: request?.moderation_enabled,
@@ -1715,10 +1715,12 @@ export class FeedsApi {
1715
1715
  ): Promise<StreamResponse<CreateFeedGroupResponse>> {
1716
1716
  const body = {
1717
1717
  id: request?.id,
1718
+ default_follower_role: request?.default_follower_role,
1718
1719
  default_visibility: request?.default_visibility,
1719
1720
  activity_processors: request?.activity_processors,
1720
1721
  activity_selectors: request?.activity_selectors,
1721
1722
  activity_filter: request?.activity_filter,
1723
+ activity_processing: request?.activity_processing,
1722
1724
  aggregation: request?.aggregation,
1723
1725
  custom: request?.custom,
1724
1726
  notification: request?.notification,
@@ -2275,10 +2277,12 @@ export class FeedsApi {
2275
2277
  id: request?.id,
2276
2278
  };
2277
2279
  const body = {
2280
+ default_follower_role: request?.default_follower_role,
2278
2281
  default_visibility: request?.default_visibility,
2279
2282
  activity_processors: request?.activity_processors,
2280
2283
  activity_selectors: request?.activity_selectors,
2281
2284
  activity_filter: request?.activity_filter,
2285
+ activity_processing: request?.activity_processing,
2282
2286
  aggregation: request?.aggregation,
2283
2287
  custom: request?.custom,
2284
2288
  notification: request?.notification,
@@ -2310,10 +2314,12 @@ export class FeedsApi {
2310
2314
  id: request?.id,
2311
2315
  };
2312
2316
  const body = {
2317
+ default_follower_role: request?.default_follower_role,
2313
2318
  default_visibility: request?.default_visibility,
2314
2319
  activity_processors: request?.activity_processors,
2315
2320
  activity_selectors: request?.activity_selectors,
2316
2321
  activity_filter: request?.activity_filter,
2322
+ activity_processing: request?.activity_processing,
2317
2323
  aggregation: request?.aggregation,
2318
2324
  custom: request?.custom,
2319
2325
  notification: request?.notification,
@@ -2521,6 +2527,7 @@ export class FeedsApi {
2521
2527
  ): Promise<StreamResponse<CreateFeedsBatchResponse>> {
2522
2528
  const body = {
2523
2529
  feeds: request?.feeds,
2530
+ create_users: request?.create_users,
2524
2531
  enrich_own_fields: request?.enrich_own_fields,
2525
2532
  };
2526
2533