@stream-io/node-sdk 0.8.13 → 0.8.14

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.
@@ -93,6 +93,10 @@ export interface APIError {
93
93
  * Additional error-specific information
94
94
  */
95
95
  details: Array<number>;
96
+ /**
97
+ * Milliseconds until the user's slow mode cool down period ends. Only set on code 60 (cool down) errors
98
+ */
99
+ cooldown_remaining_ms?: number;
96
100
  /**
97
101
  * Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it
98
102
  */
@@ -1054,6 +1058,7 @@ export interface AddActivityRequest {
1054
1058
  * Whether to skip URL enrichment for the activity
1055
1059
  */
1056
1060
  skip_enrich_url?: boolean;
1061
+ skip_existing?: boolean;
1057
1062
  /**
1058
1063
  * Whether to skip push notifications
1059
1064
  */
@@ -1116,6 +1121,10 @@ export interface AddActivityResponse {
1116
1121
  * Number of mention notification activities created for mentioned users
1117
1122
  */
1118
1123
  mention_notifications_created?: number;
1124
+ /**
1125
+ * Contains the activity ID when skip_existing is true and the activity already existed, so it was left unchanged.
1126
+ */
1127
+ skipped_existing?: Array<string>;
1119
1128
  }
1120
1129
 
1121
1130
  export interface AddBookmarkRequest {
@@ -1566,6 +1575,14 @@ export interface AnalyzeResponse {
1566
1575
  * `complete` (all fields screened), `partial` (mix of verdicts and per-field errors), or `pending` (async).
1567
1576
  */
1568
1577
  status: string;
1578
+ /**
1579
+ * ID of the LLM model that scored the content (e.g. gpt-4o-mini). Omitted when no LLM verdict was used (e.g. Bodyguard-only, or `pending`).
1580
+ */
1581
+ llm_model?: string;
1582
+ /**
1583
+ * reasoning_effort sent with the LLM request. Omitted when the request did not send one.
1584
+ */
1585
+ llm_reasoning_effort?: string;
1569
1586
  /**
1570
1587
  * Per-image moderation verdicts keyed by caller label.
1571
1588
  */
@@ -1603,6 +1620,17 @@ export interface AnalyzeTextField {
1603
1620
  classifications?: Array<Classification>;
1604
1621
  }
1605
1622
 
1623
+ export interface AppDefaults {
1624
+ /**
1625
+ * Defaults applied by the get-or-create channel endpoint.
1626
+ */
1627
+ get_or_create_channel: GetOrCreateChannelDefaults;
1628
+ /**
1629
+ * Defaults applied by the query channels endpoint.
1630
+ */
1631
+ query_channels: QueryChannelsDefaults;
1632
+ }
1633
+
1606
1634
  export interface AppResponseFields {
1607
1635
  allow_multi_user_devices: boolean;
1608
1636
  /**
@@ -1660,6 +1688,10 @@ export interface AppResponseFields {
1660
1688
  webhook_events: Array<string>;
1661
1689
  call_types: Record<string, CallType>;
1662
1690
  channel_configs: Record<string, ChannelConfig>;
1691
+ /**
1692
+ * Request limit defaults applied by the server when the corresponding field is omitted.
1693
+ */
1694
+ defaults: AppDefaults;
1663
1695
  file_upload_config: FileUploadConfig;
1664
1696
  grants: Record<string, Array<string>>;
1665
1697
  image_upload_config: FileUploadConfig;
@@ -1915,6 +1947,7 @@ export interface AsyncExportUsersEvent {
1915
1947
  export interface AsyncImportErrorEvent {
1916
1948
  created_at: Date;
1917
1949
  error: string;
1950
+ error_code: string;
1918
1951
  finished_at: Date;
1919
1952
  product: string;
1920
1953
  state: string;
@@ -3777,6 +3810,7 @@ export interface CallSettingsRequest {
3777
3810
  geofencing?: GeofenceSettingsRequest;
3778
3811
  individual_recording?: IndividualRecordingSettingsRequest;
3779
3812
  ingress?: IngressSettingsRequest;
3813
+ lifecycle?: LifecycleSettingsRequest;
3780
3814
  limits?: LimitsSettingsRequest;
3781
3815
  raw_recording?: RawRecordingSettingsRequest;
3782
3816
  recording?: RecordSettingsRequest;
@@ -3802,6 +3836,10 @@ export interface CallSettingsResponse {
3802
3836
  frame_recording: FrameRecordingSettingsResponse;
3803
3837
  geofencing: GeofenceSettingsResponse;
3804
3838
  individual_recording: IndividualRecordingSettingsResponse;
3839
+ /**
3840
+ * LifecycleSettings is the payload for call lifecycle settings
3841
+ */
3842
+ lifecycle: LifecycleSettingsResponse;
3805
3843
  limits: LimitsSettingsResponse;
3806
3844
  raw_recording: RawRecordingSettingsResponse;
3807
3845
  /**
@@ -4218,8 +4256,6 @@ export interface CampaignStatsResponse {
4218
4256
  stats_users_sent: number;
4219
4257
  }
4220
4258
 
4221
- export interface CancelImportV2TaskRequest {}
4222
-
4223
4259
  export interface CancelImportV2TaskResponse {
4224
4260
  /**
4225
4261
  * Duration of the request in milliseconds
@@ -4228,6 +4264,14 @@ export interface CancelImportV2TaskResponse {
4228
4264
  }
4229
4265
 
4230
4266
  export interface CastPollVoteRequest {
4267
+ /**
4268
+ * Key of the moderation configuration to use. Server-side only.
4269
+ */
4270
+ config_key?: string;
4271
+ /**
4272
+ * Team associated with the configuration. Server-side only.
4273
+ */
4274
+ config_team?: string;
4231
4275
  user_id?: string;
4232
4276
  /**
4233
4277
  * User request object
@@ -4252,6 +4296,33 @@ export interface ChangeFeedVisibilityResponse {
4252
4296
  feed: FeedResponse;
4253
4297
  }
4254
4298
 
4299
+ export interface ChannelBanResponse {
4300
+ created_at: Date;
4301
+ scopes: Array<string>;
4302
+ channel_ban?: ChannelBanScopeResponse;
4303
+ future_channel_ban?: ChannelBanScopeResponse;
4304
+ /**
4305
+ * User response object
4306
+ */
4307
+ user?: UserResponse;
4308
+ }
4309
+
4310
+ export interface ChannelBanScopeResponse {
4311
+ created_at: Date;
4312
+ shadow: boolean;
4313
+ expires?: Date;
4314
+ reason?: string;
4315
+ /**
4316
+ * User response object
4317
+ */
4318
+ banned_by?: UserResponse;
4319
+ }
4320
+
4321
+ export interface ChannelBansScopeTotals {
4322
+ channel: number;
4323
+ future_channel: number;
4324
+ }
4325
+
4255
4326
  export interface ChannelBatchCompletedEvent {
4256
4327
  batch_created_at: Date;
4257
4328
  created_at: Date;
@@ -4808,6 +4879,7 @@ export interface ChannelMemberResponse {
4808
4879
  * Date/time of the last update
4809
4880
  */
4810
4881
  updated_at: Date;
4882
+ user_id: string;
4811
4883
  custom: Record<string, any>;
4812
4884
  archived_at?: Date;
4813
4885
  /**
@@ -4845,7 +4917,6 @@ export interface ChannelMemberResponse {
4845
4917
  */
4846
4918
  role?: string;
4847
4919
  status?: string;
4848
- user_id?: string;
4849
4920
  deleted_messages?: Array<string>;
4850
4921
  /**
4851
4922
  * User response object
@@ -4946,6 +5017,7 @@ export const ChannelOwnCapability = {
4946
5017
  QUERY_POLL_VOTES: 'query-poll-votes',
4947
5018
  QUOTE_MESSAGE: 'quote-message',
4948
5019
  READ_EVENTS: 'read-events',
5020
+ SCHEDULE_MESSAGE: 'schedule-message',
4949
5021
  SEARCH_MESSAGES: 'search-messages',
4950
5022
  SEND_CUSTOM_EVENTS: 'send-custom-events',
4951
5023
  SEND_LINKS: 'send-links',
@@ -5013,6 +5085,10 @@ export interface ChannelResponse {
5013
5085
  * Custom data for this object
5014
5086
  */
5015
5087
  custom: Record<string, any>;
5088
+ /**
5089
+ * Number of members who are not deactivated or deleted
5090
+ */
5091
+ active_member_count?: number;
5016
5092
  /**
5017
5093
  * Whether auto translation is enabled or not
5018
5094
  */
@@ -5094,16 +5170,54 @@ export interface ChannelResponse {
5094
5170
 
5095
5171
  export interface ChannelStateResponse {
5096
5172
  duration: string;
5173
+ /**
5174
+ * List of channel members
5175
+ */
5097
5176
  members: Array<ChannelMemberResponse>;
5177
+ /**
5178
+ * List of channel messages
5179
+ */
5098
5180
  messages: Array<MessageResponse>;
5181
+ /**
5182
+ * List of pinned messages in the channel
5183
+ */
5099
5184
  pinned_messages: Array<MessageResponse>;
5100
5185
  threads: Array<ThreadStateResponse>;
5186
+ /**
5187
+ * Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down
5188
+ */
5189
+ cooldown_remaining_ms?: number;
5190
+ /**
5191
+ * Whether this channel is hidden or not
5192
+ */
5101
5193
  hidden?: boolean;
5194
+ /**
5195
+ * Messages before this date are hidden from the user
5196
+ */
5102
5197
  hide_messages_before?: Date;
5198
+ /**
5199
+ * Number of channel watchers
5200
+ */
5103
5201
  watcher_count?: number;
5202
+ /**
5203
+ * Active live locations in the channel
5204
+ */
5104
5205
  active_live_locations?: Array<SharedLocationResponseData>;
5206
+ /**
5207
+ * Pending messages that this user has sent
5208
+ */
5105
5209
  pending_messages?: Array<PendingMessageResponse>;
5210
+ /**
5211
+ * List of read states
5212
+ */
5106
5213
  read?: Array<ReadStateResponse>;
5214
+ /**
5215
+ * The caller's own scheduled, sending and failed messages in this channel. Set only by a client-side GetOrCreateChannel or QueryChannels with include_scheduled_messages; absent when not requested or not known, in which case use the scheduled messages query
5216
+ */
5217
+ scheduled_messages?: Array<ScheduledMessageResponse>;
5218
+ /**
5219
+ * List of user who is watching the channel
5220
+ */
5107
5221
  watchers?: Array<UserResponse>;
5108
5222
  /**
5109
5223
  * Represents channel in chat
@@ -5131,6 +5245,10 @@ export interface ChannelStateResponseFields {
5131
5245
  */
5132
5246
  pinned_messages: Array<MessageResponse>;
5133
5247
  threads: Array<ThreadStateResponse>;
5248
+ /**
5249
+ * Milliseconds until the current user's slow mode cool down period ends. Only set on client-side get or create channel and get channel requests while the user is under cool down
5250
+ */
5251
+ cooldown_remaining_ms?: number;
5134
5252
  /**
5135
5253
  * Whether this channel is hidden or not
5136
5254
  */
@@ -5155,6 +5273,10 @@ export interface ChannelStateResponseFields {
5155
5273
  * List of read states
5156
5274
  */
5157
5275
  read?: Array<ReadStateResponse>;
5276
+ /**
5277
+ * The caller's own scheduled, sending and failed messages in this channel. Set only by a client-side GetOrCreateChannel or QueryChannels with include_scheduled_messages; absent when not requested or not known, in which case use the scheduled messages query
5278
+ */
5279
+ scheduled_messages?: Array<ScheduledMessageResponse>;
5158
5280
  /**
5159
5281
  * List of user who is watching the channel
5160
5282
  */
@@ -5625,14 +5747,20 @@ export interface CheckPushRequest {
5625
5747
  */
5626
5748
  apn_template?: string;
5627
5749
  /**
5628
- * Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due
5750
+ * Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due, feeds.activity.added, feeds.comment.added, feeds.activity.reaction.added, feeds.comment.reaction.added, feeds.follow.created, feeds.notification_feed.updated
5629
5751
  */
5630
5752
  event_type?:
5631
5753
  | 'message.new'
5632
5754
  | 'message.updated'
5633
5755
  | 'reaction.new'
5634
5756
  | 'reaction.updated'
5635
- | 'notification.reminder_due';
5757
+ | 'notification.reminder_due'
5758
+ | 'feeds.activity.added'
5759
+ | 'feeds.comment.added'
5760
+ | 'feeds.activity.reaction.added'
5761
+ | 'feeds.comment.reaction.added'
5762
+ | 'feeds.follow.created'
5763
+ | 'feeds.notification_feed.updated';
5636
5764
  /**
5637
5765
  * Push message data template for Firebase
5638
5766
  */
@@ -5744,25 +5872,21 @@ export interface CheckResponse {
5744
5872
  */
5745
5873
  status: string;
5746
5874
  /**
5747
- * Intent topic label matched by this request's text (test mode only; omitted when no topic matched)
5748
- */
5749
- intent_matched_topic?: string;
5750
- /**
5751
- * Stage 2 conversation score (0-100) computed synchronously against this request's texts (test mode only). Omitted -- not zero -- when intent_matched_topic is set but scoring could not be completed (matched topic disabled/removed, or the scoring call itself failed); only present when a real score was computed
5752
- */
5753
- intent_score?: number;
5754
- /**
5755
- * The matched topic's configured score_threshold, for comparison against intent_score (test mode only). Same omitted-not-zero rule as intent_score
5875
+ * ID of the LLM model that produced the verdict (e.g. gpt-4o-mini). Omitted when no LLM ran synchronously (e.g. Bodyguard-only checks or async moderation)
5756
5876
  */
5757
- intent_score_threshold?: number;
5877
+ llm_model?: string;
5758
5878
  /**
5759
- * Whether intent_score clears intent_score_threshold, i.e. whether this would fire moderation.intent_detected in production (test mode only). Same omitted-not-zero rule as intent_score
5879
+ * reasoning_effort sent with the LLM request that produced the verdict. Omitted when the request did not send one
5760
5880
  */
5761
- intent_would_fire?: boolean;
5881
+ llm_reasoning_effort?: string;
5762
5882
  /**
5763
5883
  * ID of the running moderation task
5764
5884
  */
5765
5885
  task_id?: string;
5886
+ /**
5887
+ * Score (0-100) of each policy intent topic against this request's text, in policy order (test mode only; omitted when the policy has no topics or scoring failed)
5888
+ */
5889
+ intent_scores?: Array<IntentScoreResponse>;
5766
5890
  /**
5767
5891
  * All moderation rules triggered by this check (content, user, and call rules), with their resolved actions
5768
5892
  */
@@ -5900,6 +6024,14 @@ export interface ClientEvent {
5900
6024
  * Reason the client initiated the join. Optional on CoordinatorJoin events; empty when not provided.
5901
6025
  */
5902
6026
  join_reason?: string;
6027
+ /**
6028
+ * Source of the leave that aborted a join: user, app, callkit, remote_event, sdk_error, or unknown. Not validated against this set, so SDKs may report new values. Optional; sent on failure events. Maximum 32 characters.
6029
+ */
6030
+ leave_initiator?: string;
6031
+ /**
6032
+ * Internal reason or triggering event for the leave that aborted a join. Optional; sent on failure events. Maximum 200 characters.
6033
+ */
6034
+ leave_reason?: string;
5903
6035
  /**
5904
6036
  * Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event.
5905
6037
  */
@@ -6386,8 +6518,6 @@ export interface CommentUpdatedEvent {
6386
6518
  user?: UserResponseCommonFields;
6387
6519
  }
6388
6520
 
6389
- export interface CommitMessageRequest {}
6390
-
6391
6521
  export interface CompositeRecordingResponse {
6392
6522
  status: string;
6393
6523
  }
@@ -6756,7 +6886,7 @@ export interface CreateChannelTypeRequest {
6756
6886
  /**
6757
6887
  * Partition TTL
6758
6888
  */
6759
- partition_ttl?: string;
6889
+ partition_ttl?: string | null;
6760
6890
  /**
6761
6891
  * Polls
6762
6892
  */
@@ -6769,6 +6899,10 @@ export interface CreateChannelTypeRequest {
6769
6899
  * Push notifications
6770
6900
  */
6771
6901
  push_notifications?: boolean;
6902
+ /**
6903
+ * Enables message quotes
6904
+ */
6905
+ quotes?: boolean;
6772
6906
  /**
6773
6907
  * Reactions
6774
6908
  */
@@ -6777,6 +6911,10 @@ export interface CreateChannelTypeRequest {
6777
6911
  * Read events
6778
6912
  */
6779
6913
  read_events?: boolean;
6914
+ /**
6915
+ * Enables message reminders
6916
+ */
6917
+ reminders?: boolean;
6780
6918
  /**
6781
6919
  * Replies
6782
6920
  */
@@ -6815,11 +6953,15 @@ export interface CreateChannelTypeRequest {
6815
6953
  * List of permissions for the channel type
6816
6954
  */
6817
6955
  permissions?: Array<PolicyRequest>;
6956
+ /**
6957
+ * Sets thresholds for AI moderation
6958
+ */
6959
+ automod_thresholds?: Thresholds;
6818
6960
  chat_preferences?: ChatPreferences;
6819
6961
  /**
6820
6962
  * List of grants for the channel type
6821
6963
  */
6822
- grants?: Record<string, Array<string>>;
6964
+ grants?: Record<string, Array<string>> | null;
6823
6965
  }
6824
6966
 
6825
6967
  export interface CreateChannelTypeResponse {
@@ -7234,6 +7376,14 @@ export interface CreatePollOptionRequest {
7234
7376
  * Option text
7235
7377
  */
7236
7378
  text: string;
7379
+ /**
7380
+ * Key of the moderation configuration to use. Server-side only.
7381
+ */
7382
+ config_key?: string;
7383
+ /**
7384
+ * Team associated with the configuration. Server-side only.
7385
+ */
7386
+ config_team?: string;
7237
7387
  user_id?: string;
7238
7388
  /**
7239
7389
  * Custom data for this object
@@ -7255,6 +7405,14 @@ export interface CreatePollRequest {
7255
7405
  */
7256
7406
  allow_answers?: boolean;
7257
7407
  allow_user_suggested_options?: boolean;
7408
+ /**
7409
+ * Key of the moderation configuration to use. Server-side only.
7410
+ */
7411
+ config_key?: string;
7412
+ /**
7413
+ * Team associated with the configuration. Server-side only.
7414
+ */
7415
+ config_team?: string;
7258
7416
  /**
7259
7417
  * A description of the poll
7260
7418
  */
@@ -8023,6 +8181,31 @@ export interface DeleteModerationTemplateResponse {
8023
8181
  duration: string;
8024
8182
  }
8025
8183
 
8184
+ export interface DeletePollAnswerRequestPayload {
8185
+ /**
8186
+ * Reason for deletion
8187
+ */
8188
+ reason?: string;
8189
+ }
8190
+
8191
+ export interface DeletePollOptionRequestPayload {
8192
+ /**
8193
+ * Option to delete. Required on an item for a whole poll (create or edit); defaults to the option an add_option / update_option item was raised for
8194
+ */
8195
+ option_id?: string;
8196
+ /**
8197
+ * Reason for deletion
8198
+ */
8199
+ reason?: string;
8200
+ }
8201
+
8202
+ export interface DeletePollRequestPayload {
8203
+ /**
8204
+ * Reason for deletion
8205
+ */
8206
+ reason?: string;
8207
+ }
8208
+
8026
8209
  export interface DeleteQueueRequest {
8027
8210
  user_id?: string;
8028
8211
  /**
@@ -8095,6 +8278,17 @@ export interface DeleteSIPTrunkResponse {
8095
8278
  duration: string;
8096
8279
  }
8097
8280
 
8281
+ export interface DeleteScheduledMessageResponse {
8282
+ /**
8283
+ * Duration of the request in milliseconds
8284
+ */
8285
+ duration: string;
8286
+ /**
8287
+ * A message scheduled to be sent later
8288
+ */
8289
+ scheduled_message: ScheduledMessageResponse;
8290
+ }
8291
+
8098
8292
  export interface DeleteSegmentTargetsRequest {
8099
8293
  /**
8100
8294
  * Target IDs
@@ -8191,11 +8385,12 @@ export interface DeleteUsersRequest {
8191
8385
  /**
8192
8386
  * Conversation channels delete mode.
8193
8387
  * Conversation channel is any channel which only has two members one of which is the user being deleted.
8194
- * * null or empty string - doesn't delete any conversation channels
8388
+ * * null or empty string - doesn't delete any conversation channels, unless user is 'hard', in which case it defaults to 'hard'
8195
8389
  * * soft - marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
8196
8390
  * * hard - deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
8391
+ * * keep - doesn't delete any conversation channels. Use it with user 'hard', where null or empty string defaults to 'hard'
8197
8392
  */
8198
- conversations?: 'soft' | 'hard';
8393
+ conversations?: 'soft' | 'hard' | 'keep';
8199
8394
  /**
8200
8395
  * Delete user files.
8201
8396
  * * false or empty string - doesn't delete any files
@@ -8216,7 +8411,7 @@ export interface DeleteUsersRequest {
8216
8411
  * User delete mode.
8217
8412
  * * soft - marks user as deleted and retains all user data
8218
8413
  * * pruning - marks user as deleted and nullifies user information
8219
- * * hard - deletes user completely. Requires 'hard' option for messages and conversations as well
8414
+ * * hard - deletes user completely. Requires 'hard' option for messages, and 'hard' or 'keep' option for conversations
8220
8415
  */
8221
8416
  user?: 'soft' | 'pruning' | 'hard';
8222
8417
  }
@@ -8455,8 +8650,6 @@ export interface EncryptionSettingsResponse {
8455
8650
  mode: 'available' | 'disabled' | 'auto-on';
8456
8651
  }
8457
8652
 
8458
- export interface EndCallRequest {}
8459
-
8460
8653
  export interface EndCallResponse {
8461
8654
  /**
8462
8655
  * Duration of the request in milliseconds
@@ -8468,6 +8661,7 @@ export interface EnrichedActivity {
8468
8661
  foreign_id?: string;
8469
8662
  id?: string;
8470
8663
  score?: number;
8664
+ time?: string;
8471
8665
  verb?: string;
8472
8666
  to?: Array<string>;
8473
8667
  actor?: Data;
@@ -8514,15 +8708,15 @@ export interface EnrichedReaction {
8514
8708
  activity_id: string;
8515
8709
  kind: string;
8516
8710
  user_id: string;
8711
+ created_at?: string;
8517
8712
  id?: string;
8518
8713
  parent?: string;
8714
+ updated_at?: string;
8519
8715
  target_feeds?: Array<string>;
8520
8716
  children_counts?: Record<string, number>;
8521
- created_at?: Time;
8522
8717
  data?: Record<string, any>;
8523
8718
  latest_children?: Record<string, Array<EnrichedReaction>>;
8524
8719
  own_children?: Record<string, Array<EnrichedReaction>>;
8525
- updated_at?: Time;
8526
8720
  user?: Data;
8527
8721
  }
8528
8722
 
@@ -8535,6 +8729,10 @@ export interface EnrichmentOptions {
8535
8729
  * Controls the top-level flat 'activities' array for aggregated feeds. For new apps, defaults to false (excluded); set to true to include. For older apps, defaults to true (included) for backward compatibility; set to false to exclude.
8536
8730
  */
8537
8731
  include_flat_activities?: boolean;
8732
+ /**
8733
+ * Default: false. Server-side only. When true, the response includes ranking_config: the ranking configuration (from the feed view, or the feed group as fallback) used to rank this read.
8734
+ */
8735
+ include_ranking_config?: boolean;
8538
8736
  /**
8539
8737
  * Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.
8540
8738
  */
@@ -8796,8 +8994,6 @@ export interface ExportChannelsResponse {
8796
8994
  task_id: string;
8797
8995
  }
8798
8996
 
8799
- export interface ExportFeedUserDataRequest {}
8800
-
8801
8997
  export interface ExportFeedUserDataResponse {
8802
8998
  duration: string;
8803
8999
  /**
@@ -9514,6 +9710,7 @@ export interface FeedsNotificationComment {
9514
9710
  comment: string;
9515
9711
  id: string;
9516
9712
  user_id: string;
9713
+ parent_id?: string;
9517
9714
  attachments?: Array<Attachment>;
9518
9715
  }
9519
9716
 
@@ -9978,6 +10175,10 @@ export interface FollowBatchRequest {
9978
10175
  * List of follow relationships to create
9979
10176
  */
9980
10177
  follows: Array<FollowRequest>;
10178
+ /**
10179
+ * If true, the batch is queued as a background task, paced per app, and the response has empty follows and a task_id. Server-side only. Supported by the get-or-create endpoint (GetOrCreateFollows); FollowBatch rejects it. Async batches can apply out of order with other follow writes. Defaults to false.
10180
+ */
10181
+ async?: boolean;
9981
10182
  /**
9982
10183
  * If true, auto-creates users referenced by source/target FIDs in the batch when they don't already exist. Server-side only. Defaults to false. This top-level field is the only supported batch/upsert create_users control.
9983
10184
  */
@@ -9998,6 +10199,10 @@ export interface FollowBatchResponse {
9998
10199
  * List of current follow relationships
9999
10200
  */
10000
10201
  follows: Array<FollowResponse>;
10202
+ /**
10203
+ * ID of the background task when the request was sent with async: true
10204
+ */
10205
+ task_id?: string;
10001
10206
  }
10002
10207
 
10003
10208
  export interface FollowCreatedEvent {
@@ -10814,6 +11019,17 @@ export interface GetOrCreateCallResponse {
10814
11019
  call: CallResponse;
10815
11020
  }
10816
11021
 
11022
+ export interface GetOrCreateChannelDefaults {
11023
+ /**
11024
+ * Resolved defaults for a nested pagination object.
11025
+ */
11026
+ members: PagerDefaults;
11027
+ /**
11028
+ * Resolved defaults for a nested pagination object.
11029
+ */
11030
+ messages: PagerDefaults;
11031
+ }
11032
+
10817
11033
  export interface GetOrCreateFeedGroupRequest {
10818
11034
  /**
10819
11035
  * 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
@@ -10913,6 +11129,7 @@ export interface GetOrCreateFeedResponse {
10913
11129
  following_pagination?: PagerResponse;
10914
11130
  member_pagination?: PagerResponse;
10915
11131
  notification_status?: NotificationStatusResponse;
11132
+ ranking_config?: RankingConfig;
10916
11133
  }
10917
11134
 
10918
11135
  export interface GetOrCreateFeedViewRequest {
@@ -11181,15 +11398,28 @@ export interface GroupedChannelsBucket {
11181
11398
  */
11182
11399
  prev?: string;
11183
11400
  /**
11184
- * Unread channels currently classified into this bucket
11401
+ * Total unread channels matching this bucket and its filters, independent of page size
11185
11402
  */
11186
11403
  unread_channels?: number;
11187
11404
  }
11188
11405
 
11189
11406
  export interface GroupedChannelsGroupRequest {
11407
+ /**
11408
+ * Max channels for this group; omitted or zero uses the request limit
11409
+ */
11190
11410
  limit?: number;
11411
+ /**
11412
+ * Cursor for the next page; only allowed when requesting one group
11413
+ */
11191
11414
  next?: string;
11415
+ /**
11416
+ * Cursor for the previous page; only allowed when requesting one group
11417
+ */
11192
11418
  prev?: string;
11419
+ /**
11420
+ * Optional query_timestamp $gte bound for a stored group, requiring query_timestamp sort; do not repeat its group name. For all, combine group equality/$in and date bounds with $or, or use one standalone group $ne exclusion. An empty object matches a stored group; omitted or null preserves legacy grouping.
11421
+ */
11422
+ filter_conditions?: Record<string, any>;
11193
11423
  }
11194
11424
 
11195
11425
  export interface GroupedQueryChannelsRequest {
@@ -11199,7 +11429,11 @@ export interface GroupedQueryChannelsRequest {
11199
11429
  limit?: number;
11200
11430
  user_id?: string;
11201
11431
  /**
11202
- * Groups to return, keyed by group name. Each group can define limit, next, or prev. 'next' and 'prev' cursors are only allowed when the request contains exactly one group; multi-group pagination is rejected.
11432
+ * Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats
11433
+ */
11434
+ sort?: Array<SortParamRequest>;
11435
+ /**
11436
+ * Groups to return, keyed by stored group name. Each entry can define limit, next, prev, and optional filter_conditions: date bounds for stored groups; all supports combined group/date branches or one group $ne exclusion. Cursors are only allowed when requesting exactly one group. Omitted or null filters preserve legacy grouping, including all.
11203
11437
  */
11204
11438
  groups?: Record<string, GroupedChannelsGroupRequest>;
11205
11439
  /**
@@ -11214,7 +11448,7 @@ export interface GroupedQueryChannelsResponse {
11214
11448
  */
11215
11449
  duration: string;
11216
11450
  /**
11217
- * Predefined channel groups keyed by group name
11451
+ * Groups keyed by the requested stored group name
11218
11452
  */
11219
11453
  groups: Record<string, GroupedChannelsBucket>;
11220
11454
  }
@@ -11672,23 +11906,23 @@ export interface InsertActionLogResponse {
11672
11906
  duration: string;
11673
11907
  }
11674
11908
 
11675
- export interface IntentBufferedItem {
11909
+ export interface IntentConditionInfo {
11676
11910
  /**
11677
- * The ID of the user who authored the buffered message or comment
11911
+ * Whether the score reached the threshold.
11678
11912
  */
11679
- author_user_id: string;
11913
+ passed: boolean;
11680
11914
  /**
11681
- * When the buffered message or comment was created
11915
+ * Final (damped) score of the topic in this analysis; 0 when the topic is not defined in the policy.
11682
11916
  */
11683
- created_at: Date;
11917
+ score: number;
11684
11918
  /**
11685
- * The ID of the buffered message or comment
11919
+ * Minimum score (1-100) the condition requires.
11686
11920
  */
11687
- id: string;
11921
+ threshold: number;
11688
11922
  /**
11689
- * The text of the buffered message or comment
11923
+ * Policy intent topic label the condition references.
11690
11924
  */
11691
- text: string;
11925
+ topic: string;
11692
11926
  }
11693
11927
 
11694
11928
  export interface IntentConfigRequest {
@@ -11705,39 +11939,37 @@ export interface IntentConfigResponse {
11705
11939
  topics: Array<IntentTopicResponse>;
11706
11940
  }
11707
11941
 
11708
- export interface IntentDetectedEvent {
11942
+ export interface IntentEvaluationInfo {
11709
11943
  /**
11710
- * The channel CID (chat) or feed ID (feeds) the buffered conversation belongs to
11944
+ * The analyzed conversation: the channel CID for chat, the object ID for feeds.
11711
11945
  */
11712
11946
  conversation_id: string;
11713
- created_at: Date;
11714
11947
  /**
11715
- * The ID of the most recently buffered entity
11948
+ * Number of conversation messages sent to the model.
11716
11949
  */
11717
- entity_id: string;
11950
+ message_count: number;
11718
11951
  /**
11719
- * The type of the most recently buffered entity (chat message or feed comment)
11952
+ * One entry per `intent_rule` condition of the rule, flat conditions first, then group conditions.
11720
11953
  */
11721
- entity_type: string;
11954
+ conditions: Array<IntentConditionInfo>;
11722
11955
  /**
11723
- * The configured intent topic label that started the buffer
11956
+ * Score (0-100) the model gave every topic in the analysis call, keyed by topic label, before message-count damping.
11724
11957
  */
11725
- matched_topic: string;
11958
+ raw_scores: Record<string, number>;
11726
11959
  /**
11727
- * The Stage 2 conversation score (0-100) that cleared score_threshold
11960
+ * Final score (0-100) of every topic after message-count damping, keyed by topic label. Conditions compare against these.
11728
11961
  */
11962
+ scores: Record<string, number>;
11963
+ }
11964
+
11965
+ export interface IntentRuleParameters {
11966
+ topic: string;
11967
+ threshold?: number;
11968
+ }
11969
+
11970
+ export interface IntentScoreResponse {
11729
11971
  score: number;
11730
- /**
11731
- * The ID of the user whose conversation was scored
11732
- */
11733
- user_id: string;
11734
- /**
11735
- * The buffered items that were scored, in the order they were captured
11736
- */
11737
- items: Array<IntentBufferedItem>;
11738
- custom: Record<string, any>;
11739
- type: string;
11740
- received_at?: Date;
11972
+ topic: string;
11741
11973
  }
11742
11974
 
11743
11975
  export interface IntentTopicRequest {
@@ -11745,61 +11977,21 @@ export interface IntentTopicRequest {
11745
11977
  * Unique topic label (e.g. purchase_intent)
11746
11978
  */
11747
11979
  label: string;
11748
- /**
11749
- * How long the buffer collects items before scoring runs
11750
- */
11751
- analysis_cooldown_seconds?: number;
11752
11980
  /**
11753
11981
  * Optional description used in the classification prompt; the label alone is used when empty
11754
11982
  */
11755
11983
  description?: string;
11756
- /**
11757
- * Whether this topic is evaluated
11758
- */
11759
- enabled?: boolean;
11760
- /**
11761
- * Items buffered per conversation before scoring runs early
11762
- */
11763
- max_captured_items?: number;
11764
- /**
11765
- * Suppresses this topic for a user and conversation after it fires; 0 uses the default
11766
- */
11767
- refire_cooldown_seconds?: number;
11768
- /**
11769
- * Conversation score (0-100) required to fire moderation.intent_detected
11770
- */
11771
- score_threshold?: number;
11772
11984
  }
11773
11985
 
11774
11986
  export interface IntentTopicResponse {
11775
- /**
11776
- * How long the buffer collects items before scoring runs
11777
- */
11778
- analysis_cooldown_seconds: number;
11779
- /**
11780
- * Whether this topic is evaluated
11781
- */
11782
- enabled: boolean;
11783
11987
  /**
11784
11988
  * Unique topic label (e.g. purchase_intent)
11785
11989
  */
11786
11990
  label: string;
11787
- /**
11788
- * Items buffered per conversation before scoring runs early
11789
- */
11790
- max_captured_items: number;
11791
- /**
11792
- * Conversation score (0-100) required to fire moderation.intent_detected
11793
- */
11794
- score_threshold: number;
11795
11991
  /**
11796
11992
  * Optional description used in the classification prompt; the label alone is used when empty
11797
11993
  */
11798
11994
  description?: string;
11799
- /**
11800
- * Suppresses this topic for a user and conversation after it fires; 0 uses the default
11801
- */
11802
- refire_cooldown_seconds?: number;
11803
11995
  }
11804
11996
 
11805
11997
  export interface InterestTagResponse {
@@ -11894,7 +12086,9 @@ export interface KickedUserEvent {
11894
12086
  export interface LLMConfig {
11895
12087
  app_context?: string;
11896
12088
  async?: boolean;
12089
+ custom_keys_context_description?: string;
11897
12090
  enabled?: boolean;
12091
+ context_custom_keys?: Array<string>;
11898
12092
  rules?: Array<LLMRule>;
11899
12093
  severity_descriptions?: Record<string, string>;
11900
12094
  }
@@ -12086,6 +12280,20 @@ export interface LayoutSettingsResponse {
12086
12280
  options?: Record<string, any>;
12087
12281
  }
12088
12282
 
12283
+ export interface LifecycleSettingsRequest {
12284
+ /**
12285
+ * Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation
12286
+ */
12287
+ mode?: 'reusable' | 'single_use';
12288
+ }
12289
+
12290
+ export interface LifecycleSettingsResponse {
12291
+ /**
12292
+ * Call lifecycle mode. One of: reusable, single_use. A single_use call cannot be reused once it has ended; the server ends it when its ring settles without an answer (currently: when the caller cancels the ring). Fixed at call creation
12293
+ */
12294
+ mode: 'reusable' | 'single_use';
12295
+ }
12296
+
12089
12297
  export interface LimitInfoResponse {
12090
12298
  /**
12091
12299
  * The maximum number of API calls allowed per time window
@@ -13121,7 +13329,7 @@ export interface MessageRequest {
13121
13329
  /**
13122
13330
  * Date when pinned message expires
13123
13331
  */
13124
- pin_expires?: Date;
13332
+ pin_expires?: Date | null;
13125
13333
  /**
13126
13334
  * Whether message is pinned or not
13127
13335
  */
@@ -13129,7 +13337,7 @@ export interface MessageRequest {
13129
13337
  /**
13130
13338
  * Date when message got pinned
13131
13339
  */
13132
- pinned_at?: Date;
13340
+ pinned_at?: Date | null;
13133
13341
  /**
13134
13342
  * Identifier of the poll to include in the message
13135
13343
  */
@@ -14109,6 +14317,7 @@ export interface ModerationRulesTriggeredEvent {
14109
14317
  * Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
14110
14318
  */
14111
14319
  matched_contents?: Array<MatchedContent>;
14320
+ intent?: IntentEvaluationInfo;
14112
14321
  }
14113
14322
 
14114
14323
  export interface ModerationTextAnalysisCompleteEvent {
@@ -14244,9 +14453,25 @@ export interface NoiseCancellationSettings {
14244
14453
  }
14245
14454
 
14246
14455
  export interface NotificationComment {
14456
+ /**
14457
+ * The text of the comment
14458
+ */
14247
14459
  comment: string;
14460
+ /**
14461
+ * The ID of the comment
14462
+ */
14248
14463
  id: string;
14464
+ /**
14465
+ * The ID of the user who wrote the comment
14466
+ */
14249
14467
  user_id: string;
14468
+ /**
14469
+ * The ID of the parent comment when this comment is a reply; omitted for top-level comments
14470
+ */
14471
+ parent_id?: string;
14472
+ /**
14473
+ * Attachments on the comment
14474
+ */
14250
14475
  attachments?: Array<Attachment>;
14251
14476
  }
14252
14477
 
@@ -14645,6 +14870,7 @@ export interface OwnUserResponse {
14645
14870
  unread_count: number;
14646
14871
  unread_threads: number;
14647
14872
  updated_at: Date;
14873
+ blocked_user_ids: Array<string>;
14648
14874
  channel_mutes: Array<ChannelMute>;
14649
14875
  devices: Array<DeviceResponse>;
14650
14876
  mutes: Array<UserMuteResponse>;
@@ -14657,7 +14883,6 @@ export interface OwnUserResponse {
14657
14883
  last_active?: Date;
14658
14884
  name?: string;
14659
14885
  revoke_tokens_issued_before?: Date;
14660
- blocked_user_ids?: Array<string>;
14661
14886
  latest_hidden_channels?: Array<string>;
14662
14887
  /**
14663
14888
  * The privacy settings of the user.
@@ -14671,10 +14896,17 @@ export interface OwnUserResponse {
14671
14896
  total_unread_count_by_team?: Record<string, number>;
14672
14897
  }
14673
14898
 
14674
- export interface PagerRequest {
14675
- limit?: number;
14676
- next?: string;
14677
- prev?: string;
14899
+ export interface PagerDefaults {
14900
+ /**
14901
+ * Number of records returned when `limit` is omitted.
14902
+ */
14903
+ limit: number;
14904
+ }
14905
+
14906
+ export interface PagerRequest {
14907
+ limit?: number;
14908
+ next?: string;
14909
+ prev?: string;
14678
14910
  }
14679
14911
 
14680
14912
  export interface PagerResponse {
@@ -15151,6 +15383,52 @@ export interface PolicyTestTotals {
15151
15383
  unscored: number;
15152
15384
  }
15153
15385
 
15386
+ export interface PollClosedEvent {
15387
+ /**
15388
+ * Date/time of creation
15389
+ */
15390
+ created_at: Date;
15391
+ custom: Record<string, any>;
15392
+ poll: PollResponseData;
15393
+ /**
15394
+ * The type of event: "poll.closed" in this case
15395
+ */
15396
+ type: string;
15397
+ activity_id?: string;
15398
+ /**
15399
+ * The CID of the channel containing the poll
15400
+ */
15401
+ cid?: string;
15402
+ /**
15403
+ * The ID of the message containing the poll
15404
+ */
15405
+ message_id?: string;
15406
+ received_at?: Date;
15407
+ }
15408
+
15409
+ export interface PollDeletedEvent {
15410
+ /**
15411
+ * Date/time of creation
15412
+ */
15413
+ created_at: Date;
15414
+ custom: Record<string, any>;
15415
+ poll: PollResponseData;
15416
+ /**
15417
+ * The type of event: "poll.deleted" in this case
15418
+ */
15419
+ type: string;
15420
+ activity_id?: string;
15421
+ /**
15422
+ * The CID of the channel containing the poll
15423
+ */
15424
+ cid?: string;
15425
+ /**
15426
+ * The ID of the message containing the poll
15427
+ */
15428
+ message_id?: string;
15429
+ received_at?: Date;
15430
+ }
15431
+
15154
15432
  export interface PollOptionInput {
15155
15433
  text?: string;
15156
15434
  custom?: Record<string, any>;
@@ -15217,6 +15495,101 @@ export interface PollResponseData {
15217
15495
  name_i18n?: Record<string, string>;
15218
15496
  }
15219
15497
 
15498
+ export interface PollUpdatedEvent {
15499
+ /**
15500
+ * Date/time of creation
15501
+ */
15502
+ created_at: Date;
15503
+ custom: Record<string, any>;
15504
+ poll: PollResponseData;
15505
+ /**
15506
+ * The type of event: "poll.updated" in this case
15507
+ */
15508
+ type: string;
15509
+ activity_id?: string;
15510
+ /**
15511
+ * The CID of the channel containing the poll
15512
+ */
15513
+ cid?: string;
15514
+ /**
15515
+ * The ID of the message containing the poll
15516
+ */
15517
+ message_id?: string;
15518
+ received_at?: Date;
15519
+ }
15520
+
15521
+ export interface PollVoteCastedEvent {
15522
+ /**
15523
+ * Date/time of creation
15524
+ */
15525
+ created_at: Date;
15526
+ custom: Record<string, any>;
15527
+ poll: PollResponseData;
15528
+ poll_vote: PollVoteResponseData;
15529
+ /**
15530
+ * The type of event: "poll.vote_casted" in this case
15531
+ */
15532
+ type: string;
15533
+ activity_id?: string;
15534
+ /**
15535
+ * The CID of the channel containing the poll
15536
+ */
15537
+ cid?: string;
15538
+ /**
15539
+ * The ID of the message containing the poll
15540
+ */
15541
+ message_id?: string;
15542
+ received_at?: Date;
15543
+ }
15544
+
15545
+ export interface PollVoteChangedEvent {
15546
+ /**
15547
+ * Date/time of creation
15548
+ */
15549
+ created_at: Date;
15550
+ custom: Record<string, any>;
15551
+ poll: PollResponseData;
15552
+ poll_vote: PollVoteResponseData;
15553
+ /**
15554
+ * The type of event: "poll.vote_changed" in this case
15555
+ */
15556
+ type: string;
15557
+ activity_id?: string;
15558
+ /**
15559
+ * The CID of the channel containing the poll
15560
+ */
15561
+ cid?: string;
15562
+ /**
15563
+ * The ID of the message containing the poll
15564
+ */
15565
+ message_id?: string;
15566
+ received_at?: Date;
15567
+ }
15568
+
15569
+ export interface PollVoteRemovedEvent {
15570
+ /**
15571
+ * Date/time of creation
15572
+ */
15573
+ created_at: Date;
15574
+ custom: Record<string, any>;
15575
+ poll: PollResponseData;
15576
+ poll_vote: PollVoteResponseData;
15577
+ /**
15578
+ * The type of event: "poll.vote_removed" in this case
15579
+ */
15580
+ type: string;
15581
+ activity_id?: string;
15582
+ /**
15583
+ * The CID of the channel containing the poll
15584
+ */
15585
+ cid?: string;
15586
+ /**
15587
+ * The ID of the message containing the poll
15588
+ */
15589
+ message_id?: string;
15590
+ received_at?: Date;
15591
+ }
15592
+
15220
15593
  export interface PollVoteResponse {
15221
15594
  /**
15222
15595
  * Duration of the request in milliseconds
@@ -15428,12 +15801,20 @@ export interface PushPreferenceInput {
15428
15801
  * Remove the disabled until time. (IE stop snoozing notifications)
15429
15802
  */
15430
15803
  remove_disable?: boolean;
15804
+ /**
15805
+ * Remove the user's quiet-hours schedule, the counterpart of remove_disable. It is applied before schedule, so sending both in one item replaces the stored schedule instead of merging into it. Cannot be combined with channel_cid. To switch from a schedule to a snooze, send remove_schedule together with disabled_until.
15806
+ */
15807
+ remove_schedule?: boolean;
15431
15808
  /**
15432
15809
  * The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.
15433
15810
  */
15434
15811
  user_id?: string;
15435
15812
  chat_preferences?: ChatPreferencesInput;
15436
15813
  feeds_preferences?: FeedsPreferences;
15814
+ /**
15815
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
15816
+ */
15817
+ schedule?: PushScheduleInput;
15437
15818
  }
15438
15819
 
15439
15820
  export interface PushPreferencesResponse {
@@ -15449,6 +15830,10 @@ export interface PushPreferencesResponse {
15449
15830
  feeds_level?: string;
15450
15831
  chat_preferences?: ChatPreferencesResponse;
15451
15832
  feeds_preferences?: FeedsPreferencesResponse;
15833
+ /**
15834
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
15835
+ */
15836
+ schedule?: PushScheduleResponse;
15452
15837
  }
15453
15838
 
15454
15839
  export interface PushProvider {
@@ -15540,6 +15925,28 @@ export interface PushProviderResponse {
15540
15925
  xiaomi_package_name?: string;
15541
15926
  }
15542
15927
 
15928
+ export interface PushScheduleInput {
15929
+ /**
15930
+ * IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam or America/New_York. Daylight saving time is followed automatically for region-based names. Offsets such as +02:00 and the name "Local" are rejected; fixed-offset zones such as UTC or Etc/GMT-2 are accepted but never shift for daylight saving time. When updating an existing schedule, a non-empty timezone replaces the stored one and leaves the stored quiet_hours untouched.
15931
+ */
15932
+ timezone?: string;
15933
+ /**
15934
+ * The quiet windows, 1 to 7 rules. Push is suppressed while any rule is active. When present it replaces all stored rules; omit it to keep them, for example to change only the timezone. An empty array counts as omitted, so it cannot be used to clear the rules: use remove_schedule for that.
15935
+ */
15936
+ quiet_hours?: Array<QuietHoursRuleInput>;
15937
+ }
15938
+
15939
+ export interface PushScheduleResponse {
15940
+ /**
15941
+ * IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
15942
+ */
15943
+ timezone: string;
15944
+ /**
15945
+ * The quiet windows. Push is suppressed while any rule is active.
15946
+ */
15947
+ quiet_hours: Array<QuietHoursRuleResponse>;
15948
+ }
15949
+
15543
15950
  export interface PushTemplate {
15544
15951
  created_at: Date;
15545
15952
  enable_push: boolean;
@@ -16094,7 +16501,71 @@ export interface QueryCampaignsResponse {
16094
16501
  prev?: string;
16095
16502
  }
16096
16503
 
16504
+ export interface QueryChannelBansRequest {
16505
+ /**
16506
+ * Whether to exclude expired bans or not
16507
+ */
16508
+ exclude_expired_bans?: boolean;
16509
+ /**
16510
+ * When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging
16511
+ */
16512
+ include_total?: boolean;
16513
+ limit?: number;
16514
+ next?: string;
16515
+ prev?: string;
16516
+ user_id?: string;
16517
+ /**
16518
+ * Filter conditions to apply to the query
16519
+ */
16520
+ filter_conditions?: Record<string, any>;
16521
+ /**
16522
+ * User request object
16523
+ */
16524
+ user?: UserRequest;
16525
+ }
16526
+
16527
+ export interface QueryChannelBansResponse {
16528
+ /**
16529
+ * Duration of the request in milliseconds
16530
+ */
16531
+ duration: string;
16532
+ /**
16533
+ * Users banned from the channel, one entry per user, newest ban first
16534
+ */
16535
+ bans: Array<ChannelBanResponse>;
16536
+ next?: string;
16537
+ prev?: string;
16538
+ /**
16539
+ * Number of banned users, each counted once, ignoring paging. Counted per scope with a cap of 100000 each, so it can reach 200000. Only present when include_total is set on the request; omitted when counting timed out
16540
+ */
16541
+ total?: number;
16542
+ total_by_scope?: ChannelBansScopeTotals;
16543
+ }
16544
+
16545
+ export interface QueryChannelsDefaults {
16546
+ /**
16547
+ * Number of channels returned when `limit` is omitted.
16548
+ */
16549
+ limit: number;
16550
+ /**
16551
+ * Largest number of channels returned for one request. A bigger `limit` is silently clamped to this value rather than rejected. An app with no per-app override gets a higher ceiling for the narrow case of a request asking for at most one message and one member per channel.
16552
+ */
16553
+ max_limit: number;
16554
+ /**
16555
+ * Number of members returned per channel when `member_limit` is omitted.
16556
+ */
16557
+ member_limit: number;
16558
+ /**
16559
+ * Number of messages returned per channel when `message_limit` is omitted.
16560
+ */
16561
+ message_limit: number;
16562
+ }
16563
+
16097
16564
  export interface QueryChannelsRequest {
16565
+ /**
16566
+ * Whether to include active_member_count for each channel
16567
+ */
16568
+ include_active_member_count?: boolean;
16098
16569
  /**
16099
16570
  * Number of channels to limit
16100
16571
  */
@@ -16396,12 +16867,19 @@ export interface QueryFeedsUsageStatsResponse {
16396
16867
  duration: string;
16397
16868
  activities: DailyMetricStatsResponse;
16398
16869
  api_requests: DailyMetricStatsResponse;
16870
+ collections: DailyMetricStatsResponse;
16871
+ comments: DailyMetricStatsResponse;
16399
16872
  follows: DailyMetricStatsResponse;
16400
16873
  openai_requests: DailyMetricStatsResponse;
16874
+ reactions: DailyMetricStatsResponse;
16401
16875
  emau?: EMAUStatsResponse;
16402
16876
  }
16403
16877
 
16404
16878
  export interface QueryFollowsRequest {
16879
+ /**
16880
+ * When true (server-side only), the response includes group_counts: accepted following counts keyed by the followed feed's group. Requires exactly one source_feed / source_fid string equality. HTTP 400 if target_feed appears, if two source FIDs are given, or if $in / $or / $nor mentions those keys. Independent of paging and of other filters, including status.
16881
+ */
16882
+ include_group_counts?: boolean;
16405
16883
  limit?: number;
16406
16884
  next?: string;
16407
16885
  prev?: string;
@@ -16429,6 +16907,10 @@ export interface QueryFollowsResponse {
16429
16907
  * Cursor for previous page
16430
16908
  */
16431
16909
  prev?: string;
16910
+ /**
16911
+ * Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality.
16912
+ */
16913
+ group_counts?: Record<string, number>;
16432
16914
  }
16433
16915
 
16434
16916
  export interface QueryFutureChannelBansPayload {
@@ -17009,6 +17491,45 @@ export interface QueryRevisionHistoryResponse {
17009
17491
  prev?: string;
17010
17492
  }
17011
17493
 
17494
+ export interface QueryScheduledMessagesRequest {
17495
+ /**
17496
+ * Page size, 1 to 100. Defaults to 20
17497
+ */
17498
+ limit?: number;
17499
+ /**
17500
+ * Cursor from the previous page
17501
+ */
17502
+ next?: string;
17503
+ user_id?: string;
17504
+ /**
17505
+ * Only scheduled_at ascending is supported. Pending messages come before failed ones
17506
+ */
17507
+ sort?: Array<SortParamRequest>;
17508
+ /**
17509
+ * Filter for querying scheduled messages
17510
+ */
17511
+ filter?: ScheduledMessagesFilter;
17512
+ /**
17513
+ * User request object
17514
+ */
17515
+ user?: UserRequest;
17516
+ }
17517
+
17518
+ export interface QueryScheduledMessagesResponse {
17519
+ /**
17520
+ * Duration of the request in milliseconds
17521
+ */
17522
+ duration: string;
17523
+ /**
17524
+ * Pending messages first, then failed ones, each by scheduled_at
17525
+ */
17526
+ scheduled_messages: Array<ScheduledMessageResponse>;
17527
+ /**
17528
+ * Cursor for the next page; empty on the last page
17529
+ */
17530
+ next?: string;
17531
+ }
17532
+
17012
17533
  export interface QuerySegmentTargetsRequest {
17013
17534
  /**
17014
17535
  * Limit
@@ -17216,6 +17737,36 @@ export interface QueueResponse {
17216
17737
  queue?: ModerationQueueResponse;
17217
17738
  }
17218
17739
 
17740
+ export interface QuietHoursRuleInput {
17741
+ /**
17742
+ * When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00. The end is exclusive: a window ending at 07:00 is already over at 07:00. An end earlier than start wraps past midnight into the next day (start 22:00, end 07:00). 24:00 means the end of the day, so start 00:00 with end 24:00 covers the whole day.
17743
+ */
17744
+ end: string;
17745
+ /**
17746
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59. Must differ from end.
17747
+ */
17748
+ start: string;
17749
+ /**
17750
+ * The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun, each at most once. A window belongs to the day it opens: ["fri"] with 22:00 to 07:00 is quiet from Friday 22:00 until Saturday 07:00, and not on Saturday night. Empty or omitted means every day.
17751
+ */
17752
+ days?: Array<string>;
17753
+ }
17754
+
17755
+ export interface QuietHoursRuleResponse {
17756
+ /**
17757
+ * When the window closes, as HH:MM local wall-clock time between 00:00 and 24:00. The end is exclusive. An end earlier than start wraps past midnight into the next day.
17758
+ */
17759
+ end: string;
17760
+ /**
17761
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.
17762
+ */
17763
+ start: string;
17764
+ /**
17765
+ * The days of the week the window opens on, any of mon, tue, wed, thu, fri, sat, sun. A window belongs to the day it opens: ["fri"] with 22:00 to 07:00 is quiet from Friday 22:00 until Saturday 07:00. Omitted means every day.
17766
+ */
17767
+ days?: Array<string>;
17768
+ }
17769
+
17219
17770
  export interface RTMPBroadcastRequest {
17220
17771
  /**
17221
17772
  * Name identifier for RTMP broadcast, must be unique in call
@@ -18089,8 +18640,6 @@ export interface RestoreCommentResponse {
18089
18640
  comment: CommentResponse;
18090
18641
  }
18091
18642
 
18092
- export interface RestoreFeedGroupRequest {}
18093
-
18094
18643
  export interface RestoreFeedGroupResponse {
18095
18644
  duration: string;
18096
18645
  feed_group: FeedGroupResponse;
@@ -18238,6 +18787,7 @@ export interface ReviewQueueItemResponse {
18238
18787
  * Content payload for moderation
18239
18788
  */
18240
18789
  moderation_payload?: ModerationPayloadResponse;
18790
+ poll?: PollResponseData;
18241
18791
  reaction?: Reaction;
18242
18792
  }
18243
18793
 
@@ -18504,6 +19054,10 @@ export interface RuleBuilderCondition {
18504
19054
  flood_similar_params?: FloodSimilarRuleParameters;
18505
19055
  image_content_params?: ImageContentParameters;
18506
19056
  image_rule_params?: ImageRuleParameters;
19057
+ /**
19058
+ * intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition
19059
+ */
19060
+ intent_rule_params?: IntentRuleParameters;
18507
19061
  ip_content_count_rule_params?: IPContentCountRuleParameters;
18508
19062
  ip_flag_count_rule_params?: IPFlagCountRuleParameters;
18509
19063
  keyframe_ocr_rule_params?: KeyframeOCRRuleParameters;
@@ -18511,6 +19065,7 @@ export interface RuleBuilderCondition {
18511
19065
  ocr_content_params?: OCRContentParameters;
18512
19066
  text_content_params?: TextContentParameters;
18513
19067
  text_rule_params?: TextRuleParameters;
19068
+ user_channel_ban_count_params?: UserChannelBanCountRuleParameters;
18514
19069
  user_channel_count_params?: UserChannelCountRuleParameters;
18515
19070
  user_created_within_params?: UserCreatedWithinParameters;
18516
19071
  user_custom_property_params?: UserCustomPropertyParameters;
@@ -18775,164 +19330,386 @@ export interface SIPInboundRoutingRuleRequest {
18775
19330
  /**
18776
19331
  * Configuration for SIP caller settings
18777
19332
  */
18778
- caller_configs: SIPCallerConfigsRequest;
19333
+ caller_configs: SIPCallerConfigsRequest;
19334
+ /**
19335
+ * List of called numbers
19336
+ */
19337
+ called_numbers?: Array<string>;
19338
+ /**
19339
+ * List of caller numbers (optional)
19340
+ */
19341
+ caller_numbers?: Array<string>;
19342
+ /**
19343
+ * Configuration for SIP call settings
19344
+ */
19345
+ call_configs?: SIPCallConfigsRequest;
19346
+ /**
19347
+ * Configuration for direct routing rule calls
19348
+ */
19349
+ direct_routing_configs?: SIPDirectRoutingRuleCallConfigsRequest;
19350
+ /**
19351
+ * Configuration for PIN protection settings
19352
+ */
19353
+ pin_protection_configs?: SIPPinProtectionConfigsRequest;
19354
+ /**
19355
+ * Configuration for PIN routing rule calls
19356
+ */
19357
+ pin_routing_configs?: SIPInboundRoutingRulePinConfigsRequest;
19358
+ }
19359
+
19360
+ export interface SIPInboundRoutingRuleResponse {
19361
+ /**
19362
+ * Creation timestamp
19363
+ */
19364
+ created_at: Date;
19365
+ duration: string;
19366
+ /**
19367
+ * Unique identifier of the SIP Inbound Routing Rule
19368
+ */
19369
+ id: string;
19370
+ /**
19371
+ * Name of the SIP Inbound Routing Rule
19372
+ */
19373
+ name: string;
19374
+ /**
19375
+ * Last update timestamp
19376
+ */
19377
+ updated_at: Date;
19378
+ /**
19379
+ * List of called numbers
19380
+ */
19381
+ called_numbers: Array<string>;
19382
+ /**
19383
+ * List of SIP trunk IDs
19384
+ */
19385
+ trunk_ids: Array<string>;
19386
+ /**
19387
+ * List of caller numbers
19388
+ */
19389
+ caller_numbers?: Array<string>;
19390
+ /**
19391
+ * SIP call configuration response
19392
+ */
19393
+ call_configs?: SIPCallConfigsResponse;
19394
+ /**
19395
+ * SIP caller configuration response
19396
+ */
19397
+ caller_configs?: SIPCallerConfigsResponse;
19398
+ /**
19399
+ * Direct routing rule call configuration response
19400
+ */
19401
+ direct_routing_configs?: SIPDirectRoutingRuleCallConfigsResponse;
19402
+ /**
19403
+ * PIN protection configuration response
19404
+ */
19405
+ pin_protection_configs?: SIPPinProtectionConfigsResponse;
19406
+ /**
19407
+ * PIN routing rule call configuration response
19408
+ */
19409
+ pin_routing_configs?: SIPInboundRoutingRulePinConfigsResponse;
19410
+ }
19411
+
19412
+ export interface SIPPinProtectionConfigsRequest {
19413
+ /**
19414
+ * Default PIN to use if there is no PIN set on the call object
19415
+ */
19416
+ default_pin?: string;
19417
+ /**
19418
+ * Whether PIN protection is enabled
19419
+ */
19420
+ enabled?: boolean;
19421
+ /**
19422
+ * Maximum number of PIN attempts allowed
19423
+ */
19424
+ max_attempts?: number;
19425
+ /**
19426
+ * Number of digits required for the PIN
19427
+ */
19428
+ required_pin_digits?: number;
19429
+ }
19430
+
19431
+ export interface SIPPinProtectionConfigsResponse {
19432
+ /**
19433
+ * Whether PIN protection is enabled
19434
+ */
19435
+ enabled: boolean;
19436
+ /**
19437
+ * Default PIN to use if there is no PIN set on the call object
19438
+ */
19439
+ default_pin?: string;
19440
+ /**
19441
+ * Maximum number of PIN attempts allowed
19442
+ */
19443
+ max_attempts?: number;
19444
+ /**
19445
+ * Number of digits required for the PIN
19446
+ */
19447
+ required_pin_digits?: number;
19448
+ }
19449
+
19450
+ export interface SIPTrunkResponse {
19451
+ /**
19452
+ * Creation timestamp
19453
+ */
19454
+ created_at: Date;
19455
+ /**
19456
+ * Unique identifier for the SIP trunk
19457
+ */
19458
+ id: string;
19459
+ /**
19460
+ * Name of the SIP trunk
19461
+ */
19462
+ name: string;
19463
+ /**
19464
+ * Password for SIP trunk authentication
19465
+ */
19466
+ password: string;
19467
+ /**
19468
+ * Last update timestamp
19469
+ */
19470
+ updated_at: Date;
19471
+ /**
19472
+ * The URI for the SIP trunk
19473
+ */
19474
+ uri: string;
19475
+ /**
19476
+ * Username for SIP trunk authentication
19477
+ */
19478
+ username: string;
19479
+ /**
19480
+ * Allowed IPv4/IPv6 addresses or CIDR blocks
19481
+ */
19482
+ allowed_ips: Array<string>;
19483
+ /**
19484
+ * Phone numbers associated with this SIP trunk
19485
+ */
19486
+ numbers: Array<string>;
19487
+ }
19488
+
19489
+ export interface SRTIngress {
19490
+ address: string;
19491
+ }
19492
+
19493
+ export interface ScheduledMessageChannelResponse {
19494
+ /**
19495
+ * Channel CID (<type>:<id>)
19496
+ */
19497
+ cid: string;
19498
+ /**
19499
+ * Channel ID
19500
+ */
19501
+ id: string;
19502
+ /**
19503
+ * Channel type
19504
+ */
19505
+ type: string;
19506
+ /**
19507
+ * Channel image, from its custom data
19508
+ */
19509
+ image?: string;
19510
+ /**
19511
+ * Channel name, from its custom data
19512
+ */
19513
+ name?: string;
19514
+ }
19515
+
19516
+ export interface ScheduledMessageContentResponse {
18779
19517
  /**
18780
- * List of called numbers
19518
+ * Text of the message
18781
19519
  */
18782
- called_numbers?: Array<string>;
19520
+ text: string;
19521
+ custom: Record<string, any>;
18783
19522
  /**
18784
- * List of caller numbers (optional)
19523
+ * Contains HTML markup of the message
18785
19524
  */
18786
- caller_numbers?: Array<string>;
19525
+ html?: string;
18787
19526
  /**
18788
- * Configuration for SIP call settings
19527
+ * Whether the message mentions the whole channel
18789
19528
  */
18790
- call_configs?: SIPCallConfigsRequest;
19529
+ mentioned_channel?: boolean;
18791
19530
  /**
18792
- * Configuration for direct routing rule calls
19531
+ * Whether the message mentions the online channel members
18793
19532
  */
18794
- direct_routing_configs?: SIPDirectRoutingRuleCallConfigsRequest;
19533
+ mentioned_here?: boolean;
18795
19534
  /**
18796
- * Configuration for PIN protection settings
19535
+ * MML content of the message
18797
19536
  */
18798
- pin_protection_configs?: SIPPinProtectionConfigsRequest;
19537
+ mml?: string;
18799
19538
  /**
18800
- * Configuration for PIN routing rule calls
19539
+ * ID of parent message (thread)
18801
19540
  */
18802
- pin_routing_configs?: SIPInboundRoutingRulePinConfigsRequest;
18803
- }
18804
-
18805
- export interface SIPInboundRoutingRuleResponse {
19541
+ parent_id?: string;
18806
19542
  /**
18807
- * Creation timestamp
19543
+ * Date/time the pin expires
18808
19544
  */
18809
- created_at: Date;
18810
- duration: string;
19545
+ pin_expires?: Date;
18811
19546
  /**
18812
- * Unique identifier of the SIP Inbound Routing Rule
19547
+ * Whether the message will be pinned when sent
18813
19548
  */
18814
- id: string;
19549
+ pinned?: boolean;
18815
19550
  /**
18816
- * Name of the SIP Inbound Routing Rule
19551
+ * Identifier of the poll to include in the message
18817
19552
  */
18818
- name: string;
19553
+ poll_id?: string;
19554
+ quoted_message_id?: string;
18819
19555
  /**
18820
- * Last update timestamp
19556
+ * Whether thread reply should be shown in the channel as well
18821
19557
  */
18822
- updated_at: Date;
19558
+ show_in_channel?: boolean;
18823
19559
  /**
18824
- * List of called numbers
19560
+ * Whether message is silent or not
18825
19561
  */
18826
- called_numbers: Array<string>;
19562
+ silent?: boolean;
18827
19563
  /**
18828
- * List of SIP trunk IDs
19564
+ * Contains type of the message. One of: regular, system
18829
19565
  */
18830
- trunk_ids: Array<string>;
19566
+ type?: string;
18831
19567
  /**
18832
- * List of caller numbers
19568
+ * Array of message attachments
18833
19569
  */
18834
- caller_numbers?: Array<string>;
19570
+ attachments?: Array<Attachment>;
18835
19571
  /**
18836
- * SIP call configuration response
19572
+ * IDs of the user groups mentioned in the message
18837
19573
  */
18838
- call_configs?: SIPCallConfigsResponse;
19574
+ mentioned_group_ids?: Array<string>;
18839
19575
  /**
18840
- * SIP caller configuration response
19576
+ * Roles mentioned in the message
18841
19577
  */
18842
- caller_configs?: SIPCallerConfigsResponse;
19578
+ mentioned_roles?: Array<string>;
18843
19579
  /**
18844
- * Direct routing rule call configuration response
19580
+ * IDs of the users mentioned in the message
18845
19581
  */
18846
- direct_routing_configs?: SIPDirectRoutingRuleCallConfigsResponse;
19582
+ mentioned_users?: Array<string>;
18847
19583
  /**
18848
- * PIN protection configuration response
19584
+ * IDs of the users the message will be visible to
18849
19585
  */
18850
- pin_protection_configs?: SIPPinProtectionConfigsResponse;
19586
+ restricted_visibility?: Array<string>;
18851
19587
  /**
18852
- * PIN routing rule call configuration response
19588
+ * The location a scheduled message will share
18853
19589
  */
18854
- pin_routing_configs?: SIPInboundRoutingRulePinConfigsResponse;
19590
+ shared_location?: ScheduledMessageLocation;
18855
19591
  }
18856
19592
 
18857
- export interface SIPPinProtectionConfigsRequest {
19593
+ export interface ScheduledMessageFailedEvent {
18858
19594
  /**
18859
- * Default PIN to use if there is no PIN set on the call object
19595
+ * Date/time of creation
18860
19596
  */
18861
- default_pin?: string;
19597
+ created_at: Date;
19598
+ custom: Record<string, any>;
19599
+ user: UserResponseCommonFields;
18862
19600
  /**
18863
- * Whether PIN protection is enabled
19601
+ * The type of event: "scheduled_message.failed" in this case
18864
19602
  */
18865
- enabled?: boolean;
19603
+ type: string;
18866
19604
  /**
18867
- * Maximum number of PIN attempts allowed
19605
+ * The CID of the channel the message is scheduled in
18868
19606
  */
18869
- max_attempts?: number;
19607
+ cid?: string;
19608
+ received_at?: Date;
18870
19609
  /**
18871
- * Number of digits required for the PIN
19610
+ * A message scheduled to be sent later
18872
19611
  */
18873
- required_pin_digits?: number;
19612
+ scheduled_message?: ScheduledMessageResponse;
18874
19613
  }
18875
19614
 
18876
- export interface SIPPinProtectionConfigsResponse {
19615
+ export interface ScheduledMessageLocation {
18877
19616
  /**
18878
- * Whether PIN protection is enabled
19617
+ * The ID of the device that created the location.
18879
19618
  */
18880
- enabled: boolean;
19619
+ created_by_device_id: string;
18881
19620
  /**
18882
- * Default PIN to use if there is no PIN set on the call object
19621
+ * The date when the location sharing ends.
19622
+ * If it's empty, it means the location sharing is static instead of live.
18883
19623
  */
18884
- default_pin?: string;
19624
+ end_at?: Date;
18885
19625
  /**
18886
- * Maximum number of PIN attempts allowed
19626
+ * The latitude of the location.
18887
19627
  */
18888
- max_attempts?: number;
19628
+ latitude?: number;
18889
19629
  /**
18890
- * Number of digits required for the PIN
19630
+ * The longitude of the location.
18891
19631
  */
18892
- required_pin_digits?: number;
19632
+ longitude?: number;
18893
19633
  }
18894
19634
 
18895
- export interface SIPTrunkResponse {
19635
+ export interface ScheduledMessageResponse {
18896
19636
  /**
18897
- * Creation timestamp
19637
+ * The CID of the channel the message will be sent to
19638
+ */
19639
+ cid: string;
19640
+ /**
19641
+ * Date/time of creation
18898
19642
  */
18899
19643
  created_at: Date;
18900
19644
  /**
18901
- * Unique identifier for the SIP trunk
19645
+ * Unique identifier of the scheduled message
18902
19646
  */
18903
19647
  id: string;
18904
19648
  /**
18905
- * Name of the SIP trunk
19649
+ * Date/time the message is scheduled to be sent
18906
19650
  */
18907
- name: string;
19651
+ scheduled_at: Date;
18908
19652
  /**
18909
- * Password for SIP trunk authentication
19653
+ * Status of the scheduled message. One of: scheduled, sending, failed, canceled, sent. A message is sending from its first send attempt until it is sent or fails, including while it waits to retry a failed attempt; it cannot be edited, canceled or sent now while sending
18910
19654
  */
18911
- password: string;
19655
+ status: string;
18912
19656
  /**
18913
- * Last update timestamp
19657
+ * Date/time of the last update
18914
19658
  */
18915
19659
  updated_at: Date;
18916
19660
  /**
18917
- * The URI for the SIP trunk
19661
+ * The message a scheduled message will send
18918
19662
  */
18919
- uri: string;
19663
+ message: ScheduledMessageContentResponse;
18920
19664
  /**
18921
- * Username for SIP trunk authentication
19665
+ * User response object
18922
19666
  */
18923
- username: string;
19667
+ user: UserResponse;
18924
19668
  /**
18925
- * Allowed IPv4/IPv6 addresses or CIDR blocks
19669
+ * Why sending the message failed. Only set when status is failed. One of: banned, no_permission, channel_frozen, channel_deleted, user_deleted, moderation_blocked, hook_rejected, expired, internal_error, invalid_message, pending_not_supported
18926
19670
  */
18927
- allowed_ips: Array<string>;
19671
+ failure_reason?: string;
18928
19672
  /**
18929
- * Phone numbers associated with this SIP trunk
19673
+ * The channel of a scheduled message
18930
19674
  */
18931
- numbers: Array<string>;
19675
+ channel?: ScheduledMessageChannelResponse;
18932
19676
  }
18933
19677
 
18934
- export interface SRTIngress {
18935
- address: string;
19678
+ export interface ScheduledMessageSentEvent {
19679
+ /**
19680
+ * Date/time of creation
19681
+ */
19682
+ created_at: Date;
19683
+ /**
19684
+ * The ID of the message that was sent
19685
+ */
19686
+ message_id: string;
19687
+ custom: Record<string, any>;
19688
+ user: UserResponseCommonFields;
19689
+ /**
19690
+ * The type of event: "scheduled_message.sent" in this case
19691
+ */
19692
+ type: string;
19693
+ /**
19694
+ * The CID of the channel the message was sent to
19695
+ */
19696
+ cid?: string;
19697
+ received_at?: Date;
19698
+ /**
19699
+ * A message scheduled to be sent later
19700
+ */
19701
+ scheduled_message?: ScheduledMessageResponse;
19702
+ }
19703
+
19704
+ export interface ScheduledMessagesFilter {
19705
+ /**
19706
+ * Only scheduled messages of this channel
19707
+ */
19708
+ cid?: string;
19709
+ /**
19710
+ * Only these statuses, as reported in each scheduled message's status. One or more of: scheduled, sending, failed
19711
+ */
19712
+ status?: Array<string>;
18936
19713
  }
18937
19714
 
18938
19715
  export interface ScoreBands {
@@ -19218,6 +19995,10 @@ export interface SendMessageRequest {
19218
19995
  include_mentioned_members?: boolean;
19219
19996
  keep_channel_hidden?: boolean;
19220
19997
  pending?: boolean;
19998
+ /**
19999
+ * When set, the message is not sent now: it is stored and sent at this time (UTC). The response then carries scheduled_message. Must be at least 1 minute and at most the app's maximum lead time (120 days by default) from now. Slash commands cannot be scheduled
20000
+ */
20001
+ scheduled_at?: Date;
19221
20002
  skip_enrich_url?: boolean;
19222
20003
  skip_push?: boolean;
19223
20004
  pending_message_metadata?: Record<string, string>;
@@ -19244,6 +20025,10 @@ export interface SendMessageResponse {
19244
20025
  * Pending message metadata
19245
20026
  */
19246
20027
  pending_message_metadata?: Record<string, string>;
20028
+ /**
20029
+ * A message scheduled to be sent later
20030
+ */
20031
+ scheduled_message?: ScheduledMessageResponse;
19247
20032
  }
19248
20033
 
19249
20034
  export interface SendReactionRequest {
@@ -19273,6 +20058,17 @@ export interface SendReactionResponse {
19273
20058
  reaction: ReactionResponse;
19274
20059
  }
19275
20060
 
20061
+ export interface SendScheduledMessageNowResponse {
20062
+ /**
20063
+ * Duration of the request in milliseconds
20064
+ */
20065
+ duration: string;
20066
+ /**
20067
+ * A message scheduled to be sent later
20068
+ */
20069
+ scheduled_message: ScheduledMessageResponse;
20070
+ }
20071
+
19276
20072
  export interface SendUserCustomEventRequest {
19277
20073
  event: UserCustomEventRequest;
19278
20074
  }
@@ -19648,8 +20444,6 @@ export interface StartFrameRecordingResponse {
19648
20444
  duration: string;
19649
20445
  }
19650
20446
 
19651
- export interface StartHLSBroadcastingRequest {}
19652
-
19653
20447
  export interface StartHLSBroadcastingResponse {
19654
20448
  duration: string;
19655
20449
  /**
@@ -19658,8 +20452,6 @@ export interface StartHLSBroadcastingResponse {
19658
20452
  playlist_url: string;
19659
20453
  }
19660
20454
 
19661
- export interface StartPolicyTestRunRequest {}
19662
-
19663
20455
  export interface StartRTMPBroadcastsRequest {
19664
20456
  /**
19665
20457
  * List of broadcasts to start
@@ -19744,8 +20536,6 @@ export interface StartTranscriptionResponse {
19744
20536
  duration: string;
19745
20537
  }
19746
20538
 
19747
- export interface StopAllRTMPBroadcastsRequest {}
19748
-
19749
20539
  export interface StopAllRTMPBroadcastsResponse {
19750
20540
  /**
19751
20541
  * Duration of the request in milliseconds
@@ -19753,7 +20543,13 @@ export interface StopAllRTMPBroadcastsResponse {
19753
20543
  duration: string;
19754
20544
  }
19755
20545
 
19756
- export interface StopCampaignRequest {}
20546
+ export interface StopCampaignResponse {
20547
+ /**
20548
+ * Duration of the request in milliseconds
20549
+ */
20550
+ duration: string;
20551
+ campaign?: CampaignResponse;
20552
+ }
19757
20553
 
19758
20554
  export interface StopClosedCaptionsRequest {
19759
20555
  stop_transcription?: boolean;
@@ -19766,8 +20562,6 @@ export interface StopClosedCaptionsResponse {
19766
20562
  duration: string;
19767
20563
  }
19768
20564
 
19769
- export interface StopFrameRecordingRequest {}
19770
-
19771
20565
  export interface StopFrameRecordingResponse {
19772
20566
  /**
19773
20567
  * Duration of the request in milliseconds
@@ -19775,8 +20569,6 @@ export interface StopFrameRecordingResponse {
19775
20569
  duration: string;
19776
20570
  }
19777
20571
 
19778
- export interface StopHLSBroadcastingRequest {}
19779
-
19780
20572
  export interface StopHLSBroadcastingResponse {
19781
20573
  /**
19782
20574
  * Duration of the request in milliseconds
@@ -19872,7 +20664,7 @@ export interface StoriesFeedUpdatedEvent {
19872
20664
 
19873
20665
  export interface SubmitActionRequest {
19874
20666
  /**
19875
- * Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate
20667
+ * Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, delete_poll, delete_poll_option, delete_poll_answer, ban, custom, unban, restore, delete_user, delete_user_messages, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalate
19876
20668
  */
19877
20669
  action_type:
19878
20670
  | 'flag'
@@ -19881,6 +20673,9 @@ export interface SubmitActionRequest {
19881
20673
  | 'delete_activity'
19882
20674
  | 'delete_comment'
19883
20675
  | 'delete_reaction'
20676
+ | 'delete_poll'
20677
+ | 'delete_poll_option'
20678
+ | 'delete_poll_answer'
19884
20679
  | 'ban'
19885
20680
  | 'custom'
19886
20681
  | 'unban'
@@ -19931,6 +20726,18 @@ export interface SubmitActionRequest {
19931
20726
  * Configuration for message deletion action
19932
20727
  */
19933
20728
  delete_message?: DeleteMessageRequestPayload;
20729
+ /**
20730
+ * Configuration for poll deletion action. Poll deletion is always permanent.
20731
+ */
20732
+ delete_poll?: DeletePollRequestPayload;
20733
+ /**
20734
+ * Configuration for deleting the free-text poll answer a review item was raised for. Chat polls only. Deletion is permanent; the poll and other votes are kept.
20735
+ */
20736
+ delete_poll_answer?: DeletePollAnswerRequestPayload;
20737
+ /**
20738
+ * Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.
20739
+ */
20740
+ delete_poll_option?: DeletePollOptionRequestPayload;
19934
20741
  /**
19935
20742
  * Configuration for reaction deletion action
19936
20743
  */
@@ -20408,8 +21215,6 @@ export interface ThumbnailsSettingsResponse {
20408
21215
  enabled: boolean;
20409
21216
  }
20410
21217
 
20411
- export interface Time {}
20412
-
20413
21218
  export interface TimeWindow {
20414
21219
  from: string;
20415
21220
  to: string;
@@ -20912,6 +21717,10 @@ export interface UnfollowBatchRequest {
20912
21717
  * List of follow relationships to remove, each with optional keep_history
20913
21718
  */
20914
21719
  follows: Array<UnfollowPair>;
21720
+ /**
21721
+ * If true, the batch is queued as a background task, paced per app, and the response has empty follows and a task_id. Server-side only. Supported by the get-or-create endpoint (GetOrCreateUnfollows); UnfollowBatch rejects it. Async batches can apply out of order with other follow writes. Defaults to false.
21722
+ */
21723
+ async?: boolean;
20915
21724
  /**
20916
21725
  * Whether to delete the corresponding notification activity (default: false)
20917
21726
  */
@@ -20928,6 +21737,10 @@ export interface UnfollowBatchResponse {
20928
21737
  * List of follow relationships that were removed
20929
21738
  */
20930
21739
  follows: Array<FollowResponse>;
21740
+ /**
21741
+ * ID of the background task when the request was sent with async: true
21742
+ */
21743
+ task_id?: string;
20931
21744
  }
20932
21745
 
20933
21746
  export interface UnfollowPair {
@@ -21313,7 +22126,10 @@ export interface UpdateAppRequest {
21313
22126
  reminders_interval?: number;
21314
22127
  reminders_max_members?: number;
21315
22128
  reminders_max_per_user?: number;
21316
- revoke_tokens_issued_before?: Date;
22129
+ /**
22130
+ * Revokes tokens issued before this date
22131
+ */
22132
+ revoke_tokens_issued_before?: Date | null;
21317
22133
  sns_key?: string;
21318
22134
  sns_secret?: string;
21319
22135
  sns_topic_arn?: string;
@@ -21342,7 +22158,7 @@ export interface UpdateAppRequest {
21342
22158
  datadog_info?: DataDogInfo;
21343
22159
  file_upload_config?: FileUploadConfig;
21344
22160
  firebase_config?: FirebaseConfig;
21345
- grants?: Record<string, Array<string>>;
22161
+ grants?: Record<string, Array<string>> | null;
21346
22162
  huawei_config?: HuaweiConfig;
21347
22163
  image_upload_config?: FileUploadConfig;
21348
22164
  moderation_dashboard_preferences?: ModerationDashboardPreferences;
@@ -21516,6 +22332,15 @@ export interface UpdateCampaignRequest {
21516
22332
  channel_template?: CampaignChannelTemplate;
21517
22333
  }
21518
22334
 
22335
+ export interface UpdateCampaignResponse {
22336
+ /**
22337
+ * Duration of the request in milliseconds
22338
+ */
22339
+ duration: string;
22340
+ campaign?: CampaignResponse;
22341
+ users?: PagerResponse;
22342
+ }
22343
+
21519
22344
  export interface UpdateChannelPartialRequest {
21520
22345
  user_id?: string;
21521
22346
  unset?: Array<string>;
@@ -21630,9 +22455,8 @@ export interface UpdateChannelResponse {
21630
22455
  }
21631
22456
 
21632
22457
  export interface UpdateChannelTypeRequest {
21633
- automod: 'disabled' | 'simple' | 'AI';
21634
- automod_behavior: 'flag' | 'block' | 'shadow_block';
21635
- max_message_length: number;
22458
+ automod?: 'disabled' | 'simple' | 'AI';
22459
+ automod_behavior?: 'flag' | 'block' | 'shadow_block';
21636
22460
  blocklist?: string;
21637
22461
  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
21638
22462
  connect_events?: boolean;
@@ -21640,10 +22464,11 @@ export interface UpdateChannelTypeRequest {
21640
22464
  custom_events?: boolean;
21641
22465
  delivery_events?: boolean;
21642
22466
  mark_messages_pending?: boolean;
22467
+ max_message_length?: number;
21643
22468
  message_retention?: string;
21644
22469
  mutes?: boolean;
21645
22470
  partition_size?: number;
21646
- partition_ttl?: string;
22471
+ partition_ttl?: string | null;
21647
22472
  polls?: boolean;
21648
22473
  /**
21649
22474
  * Sets the push notification level for a channel type
@@ -21674,7 +22499,7 @@ export interface UpdateChannelTypeRequest {
21674
22499
  */
21675
22500
  automod_thresholds?: Thresholds;
21676
22501
  chat_preferences?: ChatPreferences;
21677
- grants?: Record<string, Array<string>>;
22502
+ grants?: Record<string, Array<string>> | null;
21678
22503
  }
21679
22504
 
21680
22505
  export interface UpdateChannelTypeResponse {
@@ -22247,6 +23072,14 @@ export interface UpdatePollOptionRequest {
22247
23072
  * Option text
22248
23073
  */
22249
23074
  text: string;
23075
+ /**
23076
+ * Key of the moderation configuration to use. Server-side only.
23077
+ */
23078
+ config_key?: string;
23079
+ /**
23080
+ * Team associated with the configuration. Server-side only.
23081
+ */
23082
+ config_team?: string;
22250
23083
  user_id?: string;
22251
23084
  /**
22252
23085
  * Custom data for this object
@@ -22259,6 +23092,14 @@ export interface UpdatePollOptionRequest {
22259
23092
  }
22260
23093
 
22261
23094
  export interface UpdatePollPartialRequest {
23095
+ /**
23096
+ * Key of the moderation configuration to use. Server-side only.
23097
+ */
23098
+ config_key?: string;
23099
+ /**
23100
+ * Team associated with the configuration. Server-side only.
23101
+ */
23102
+ config_team?: string;
22262
23103
  user_id?: string;
22263
23104
  /**
22264
23105
  * Array of field names to unset
@@ -22291,6 +23132,14 @@ export interface UpdatePollRequest {
22291
23132
  * Allow user suggested options
22292
23133
  */
22293
23134
  allow_user_suggested_options?: boolean;
23135
+ /**
23136
+ * Key of the moderation configuration to use. Server-side only.
23137
+ */
23138
+ config_key?: string;
23139
+ /**
23140
+ * Team associated with the configuration. Server-side only.
23141
+ */
23142
+ config_team?: string;
22294
23143
  /**
22295
23144
  * Poll description
22296
23145
  */
@@ -22454,6 +23303,28 @@ export interface UpdateSIPTrunkResponse {
22454
23303
  sip_trunk?: SIPTrunkResponse;
22455
23304
  }
22456
23305
 
23306
+ export interface UpdateScheduledMessageRequest {
23307
+ /**
23308
+ * New send time (UTC). Must be at least 1 minute and at most the app's maximum lead time from now
23309
+ */
23310
+ scheduled_at?: Date;
23311
+ /**
23312
+ * Message data for creating or updating a message
23313
+ */
23314
+ message?: MessageRequest;
23315
+ }
23316
+
23317
+ export interface UpdateScheduledMessageResponse {
23318
+ /**
23319
+ * Duration of the request in milliseconds
23320
+ */
23321
+ duration: string;
23322
+ /**
23323
+ * A message scheduled to be sent later
23324
+ */
23325
+ scheduled_message: ScheduledMessageResponse;
23326
+ }
23327
+
22457
23328
  export interface UpdateSegmentRequest {
22458
23329
  /**
22459
23330
  * The description of the segment (max 256 characters)
@@ -22710,6 +23581,10 @@ export interface UpsertActivitiesRequest {
22710
23581
  * If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
22711
23582
  */
22712
23583
  force_moderation?: boolean;
23584
+ /**
23585
+ * Server-side only. If true, activities whose id already exists are left unchanged instead of updated: no write, events or notifications. They are listed in skipped_existing and returned as stored. Soft-deleted activities count as existing and are returned with deleted_at set. Default: false.
23586
+ */
23587
+ skip_existing?: boolean;
22713
23588
  }
22714
23589
 
22715
23590
  export interface UpsertActivitiesResponse {
@@ -22722,6 +23597,10 @@ export interface UpsertActivitiesResponse {
22722
23597
  * Total number of mention notification activities created for mentioned users across all activities
22723
23598
  */
22724
23599
  mention_notifications_created?: number;
23600
+ /**
23601
+ * IDs of activities left unchanged because they already existed. Only set when skip_existing is true.
23602
+ */
23603
+ skipped_existing?: Array<string>;
22725
23604
  }
22726
23605
 
22727
23606
  export interface UpsertCollectionsRequest {
@@ -23074,6 +23953,12 @@ export interface UserBannedEvent {
23074
23953
  created_by?: UserResponseCommonFields;
23075
23954
  }
23076
23955
 
23956
+ export interface UserChannelBanCountRuleParameters {
23957
+ banned_by?: string;
23958
+ threshold?: number;
23959
+ time_window?: string;
23960
+ }
23961
+
23077
23962
  export interface UserChannelCountRuleParameters {
23078
23963
  threshold?: number;
23079
23964
  time_window?: string;
@@ -23735,10 +24620,6 @@ export interface VideoContentParameters {
23735
24620
  harm_labels?: Array<string>;
23736
24621
  }
23737
24622
 
23738
- export interface VideoEndCallRequestPayload {}
23739
-
23740
- export interface VideoKickUserRequestPayload {}
23741
-
23742
24623
  export interface VideoReactionOverTimeResponse {
23743
24624
  by_minute?: Array<CountByMinuteResponse>;
23744
24625
  }
@@ -23971,7 +24852,6 @@ export type WHEvent =
23971
24852
  | ({
23972
24853
  type: 'moderation.image_analysis.complete';
23973
24854
  } & ModerationImageAnalysisCompleteEvent)
23974
- | ({ type: 'moderation.intent_detected' } & IntentDetectedEvent)
23975
24855
  | ({ type: 'moderation.mark_reviewed' } & ModerationMarkReviewedEvent)
23976
24856
  | ({
23977
24857
  type: 'moderation.text_analysis.complete';
@@ -23983,6 +24863,12 @@ export type WHEvent =
23983
24863
  | ({
23984
24864
  type: 'notification.thread_message_new';
23985
24865
  } & NotificationThreadMessageNewEvent)
24866
+ | ({ type: 'poll.closed' } & PollClosedEvent)
24867
+ | ({ type: 'poll.deleted' } & PollDeletedEvent)
24868
+ | ({ type: 'poll.updated' } & PollUpdatedEvent)
24869
+ | ({ type: 'poll.vote_casted' } & PollVoteCastedEvent)
24870
+ | ({ type: 'poll.vote_changed' } & PollVoteChangedEvent)
24871
+ | ({ type: 'poll.vote_removed' } & PollVoteRemovedEvent)
23986
24872
  | ({ type: 'reaction.deleted' } & ReactionDeletedEvent)
23987
24873
  | ({ type: 'reaction.new' } & ReactionNewEvent)
23988
24874
  | ({ type: 'reaction.updated' } & ReactionUpdatedEvent)
@@ -23991,6 +24877,8 @@ export type WHEvent =
23991
24877
  | ({ type: 'reminder.updated' } & ReminderUpdatedEvent)
23992
24878
  | ({ type: 'review_queue_item.new' } & ReviewQueueItemNewEvent)
23993
24879
  | ({ type: 'review_queue_item.updated' } & ReviewQueueItemUpdatedEvent)
24880
+ | ({ type: 'scheduled_message.failed' } & ScheduledMessageFailedEvent)
24881
+ | ({ type: 'scheduled_message.sent' } & ScheduledMessageSentEvent)
23994
24882
  | ({ type: 'thread.updated' } & ThreadUpdatedEvent)
23995
24883
  | ({ type: 'user.banned' } & UserBannedEvent)
23996
24884
  | ({ type: 'user.deactivated' } & UserDeactivatedEvent)