@stream-io/node-sdk 0.8.13 → 0.8.15

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
  */
@@ -913,6 +917,10 @@ export interface ActivitySelectorConfig {
913
917
  * Maximum time in milliseconds this selector may take (25-5000). A selector that runs over its budget is dropped from that read instead of failing it, and stays out for the rest of that pagination session. The budget can only tighten the default, never extend it. Omit to use the default. Only supported on the popular, proximity, interest, query and follow_suggestion selectors
914
918
  */
915
919
  time_budget_ms?: number;
920
+ /**
921
+ * Radius in kilometers the proximity selector searches around the viewer's location (the request's viewer_location, else the user's custom.location) when its filter has no near or within_bounds. Greater than 0 and at most 250. Omit to use the default (10). Only supported on the proximity selector
922
+ */
923
+ viewer_location_radius_km?: number;
916
924
  /**
917
925
  * Sort parameters for activity selection
918
926
  */
@@ -957,6 +965,10 @@ export interface ActivitySelectorConfigResponse {
957
965
  * Maximum time in milliseconds this selector may take before it is dropped from the read
958
966
  */
959
967
  time_budget_ms?: number;
968
+ /**
969
+ * Radius in kilometers the proximity selector searches around the viewer's location
970
+ */
971
+ viewer_location_radius_km?: number;
960
972
  /**
961
973
  * Sort parameters for activity selection
962
974
  */
@@ -1054,6 +1066,7 @@ export interface AddActivityRequest {
1054
1066
  * Whether to skip URL enrichment for the activity
1055
1067
  */
1056
1068
  skip_enrich_url?: boolean;
1069
+ skip_existing?: boolean;
1057
1070
  /**
1058
1071
  * Whether to skip push notifications
1059
1072
  */
@@ -1116,6 +1129,10 @@ export interface AddActivityResponse {
1116
1129
  * Number of mention notification activities created for mentioned users
1117
1130
  */
1118
1131
  mention_notifications_created?: number;
1132
+ /**
1133
+ * Contains the activity ID when skip_existing is true and the activity already existed, so it was left unchanged.
1134
+ */
1135
+ skipped_existing?: Array<string>;
1119
1136
  }
1120
1137
 
1121
1138
  export interface AddBookmarkRequest {
@@ -1566,6 +1583,14 @@ export interface AnalyzeResponse {
1566
1583
  * `complete` (all fields screened), `partial` (mix of verdicts and per-field errors), or `pending` (async).
1567
1584
  */
1568
1585
  status: string;
1586
+ /**
1587
+ * 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`).
1588
+ */
1589
+ llm_model?: string;
1590
+ /**
1591
+ * reasoning_effort sent with the LLM request. Omitted when the request did not send one.
1592
+ */
1593
+ llm_reasoning_effort?: string;
1569
1594
  /**
1570
1595
  * Per-image moderation verdicts keyed by caller label.
1571
1596
  */
@@ -1603,6 +1628,17 @@ export interface AnalyzeTextField {
1603
1628
  classifications?: Array<Classification>;
1604
1629
  }
1605
1630
 
1631
+ export interface AppDefaults {
1632
+ /**
1633
+ * Defaults applied by the get-or-create channel endpoint.
1634
+ */
1635
+ get_or_create_channel: GetOrCreateChannelDefaults;
1636
+ /**
1637
+ * Defaults applied by the query channels endpoint.
1638
+ */
1639
+ query_channels: QueryChannelsDefaults;
1640
+ }
1641
+
1606
1642
  export interface AppResponseFields {
1607
1643
  allow_multi_user_devices: boolean;
1608
1644
  /**
@@ -1660,6 +1696,10 @@ export interface AppResponseFields {
1660
1696
  webhook_events: Array<string>;
1661
1697
  call_types: Record<string, CallType>;
1662
1698
  channel_configs: Record<string, ChannelConfig>;
1699
+ /**
1700
+ * Request limit defaults applied by the server when the corresponding field is omitted.
1701
+ */
1702
+ defaults: AppDefaults;
1663
1703
  file_upload_config: FileUploadConfig;
1664
1704
  grants: Record<string, Array<string>>;
1665
1705
  image_upload_config: FileUploadConfig;
@@ -1915,6 +1955,7 @@ export interface AsyncExportUsersEvent {
1915
1955
  export interface AsyncImportErrorEvent {
1916
1956
  created_at: Date;
1917
1957
  error: string;
1958
+ error_code: string;
1918
1959
  finished_at: Date;
1919
1960
  product: string;
1920
1961
  state: string;
@@ -3777,6 +3818,7 @@ export interface CallSettingsRequest {
3777
3818
  geofencing?: GeofenceSettingsRequest;
3778
3819
  individual_recording?: IndividualRecordingSettingsRequest;
3779
3820
  ingress?: IngressSettingsRequest;
3821
+ lifecycle?: LifecycleSettingsRequest;
3780
3822
  limits?: LimitsSettingsRequest;
3781
3823
  raw_recording?: RawRecordingSettingsRequest;
3782
3824
  recording?: RecordSettingsRequest;
@@ -3802,6 +3844,10 @@ export interface CallSettingsResponse {
3802
3844
  frame_recording: FrameRecordingSettingsResponse;
3803
3845
  geofencing: GeofenceSettingsResponse;
3804
3846
  individual_recording: IndividualRecordingSettingsResponse;
3847
+ /**
3848
+ * LifecycleSettings is the payload for call lifecycle settings
3849
+ */
3850
+ lifecycle: LifecycleSettingsResponse;
3805
3851
  limits: LimitsSettingsResponse;
3806
3852
  raw_recording: RawRecordingSettingsResponse;
3807
3853
  /**
@@ -4218,8 +4264,6 @@ export interface CampaignStatsResponse {
4218
4264
  stats_users_sent: number;
4219
4265
  }
4220
4266
 
4221
- export interface CancelImportV2TaskRequest {}
4222
-
4223
4267
  export interface CancelImportV2TaskResponse {
4224
4268
  /**
4225
4269
  * Duration of the request in milliseconds
@@ -4228,6 +4272,14 @@ export interface CancelImportV2TaskResponse {
4228
4272
  }
4229
4273
 
4230
4274
  export interface CastPollVoteRequest {
4275
+ /**
4276
+ * Key of the moderation configuration to use. Server-side only.
4277
+ */
4278
+ config_key?: string;
4279
+ /**
4280
+ * Team associated with the configuration. Server-side only.
4281
+ */
4282
+ config_team?: string;
4231
4283
  user_id?: string;
4232
4284
  /**
4233
4285
  * User request object
@@ -4252,6 +4304,33 @@ export interface ChangeFeedVisibilityResponse {
4252
4304
  feed: FeedResponse;
4253
4305
  }
4254
4306
 
4307
+ export interface ChannelBanResponse {
4308
+ created_at: Date;
4309
+ scopes: Array<string>;
4310
+ channel_ban?: ChannelBanScopeResponse;
4311
+ future_channel_ban?: ChannelBanScopeResponse;
4312
+ /**
4313
+ * User response object
4314
+ */
4315
+ user?: UserResponse;
4316
+ }
4317
+
4318
+ export interface ChannelBanScopeResponse {
4319
+ created_at: Date;
4320
+ shadow: boolean;
4321
+ expires?: Date;
4322
+ reason?: string;
4323
+ /**
4324
+ * User response object
4325
+ */
4326
+ banned_by?: UserResponse;
4327
+ }
4328
+
4329
+ export interface ChannelBansScopeTotals {
4330
+ channel: number;
4331
+ future_channel: number;
4332
+ }
4333
+
4255
4334
  export interface ChannelBatchCompletedEvent {
4256
4335
  batch_created_at: Date;
4257
4336
  created_at: Date;
@@ -4808,6 +4887,7 @@ export interface ChannelMemberResponse {
4808
4887
  * Date/time of the last update
4809
4888
  */
4810
4889
  updated_at: Date;
4890
+ user_id: string;
4811
4891
  custom: Record<string, any>;
4812
4892
  archived_at?: Date;
4813
4893
  /**
@@ -4845,7 +4925,6 @@ export interface ChannelMemberResponse {
4845
4925
  */
4846
4926
  role?: string;
4847
4927
  status?: string;
4848
- user_id?: string;
4849
4928
  deleted_messages?: Array<string>;
4850
4929
  /**
4851
4930
  * User response object
@@ -4946,6 +5025,7 @@ export const ChannelOwnCapability = {
4946
5025
  QUERY_POLL_VOTES: 'query-poll-votes',
4947
5026
  QUOTE_MESSAGE: 'quote-message',
4948
5027
  READ_EVENTS: 'read-events',
5028
+ SCHEDULE_MESSAGE: 'schedule-message',
4949
5029
  SEARCH_MESSAGES: 'search-messages',
4950
5030
  SEND_CUSTOM_EVENTS: 'send-custom-events',
4951
5031
  SEND_LINKS: 'send-links',
@@ -5013,6 +5093,10 @@ export interface ChannelResponse {
5013
5093
  * Custom data for this object
5014
5094
  */
5015
5095
  custom: Record<string, any>;
5096
+ /**
5097
+ * Number of members who are not deactivated or deleted
5098
+ */
5099
+ active_member_count?: number;
5016
5100
  /**
5017
5101
  * Whether auto translation is enabled or not
5018
5102
  */
@@ -5094,16 +5178,54 @@ export interface ChannelResponse {
5094
5178
 
5095
5179
  export interface ChannelStateResponse {
5096
5180
  duration: string;
5181
+ /**
5182
+ * List of channel members
5183
+ */
5097
5184
  members: Array<ChannelMemberResponse>;
5185
+ /**
5186
+ * List of channel messages
5187
+ */
5098
5188
  messages: Array<MessageResponse>;
5189
+ /**
5190
+ * List of pinned messages in the channel
5191
+ */
5099
5192
  pinned_messages: Array<MessageResponse>;
5100
5193
  threads: Array<ThreadStateResponse>;
5194
+ /**
5195
+ * 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
5196
+ */
5197
+ cooldown_remaining_ms?: number;
5198
+ /**
5199
+ * Whether this channel is hidden or not
5200
+ */
5101
5201
  hidden?: boolean;
5202
+ /**
5203
+ * Messages before this date are hidden from the user
5204
+ */
5102
5205
  hide_messages_before?: Date;
5206
+ /**
5207
+ * Number of channel watchers
5208
+ */
5103
5209
  watcher_count?: number;
5210
+ /**
5211
+ * Active live locations in the channel
5212
+ */
5104
5213
  active_live_locations?: Array<SharedLocationResponseData>;
5214
+ /**
5215
+ * Pending messages that this user has sent
5216
+ */
5105
5217
  pending_messages?: Array<PendingMessageResponse>;
5218
+ /**
5219
+ * List of read states
5220
+ */
5106
5221
  read?: Array<ReadStateResponse>;
5222
+ /**
5223
+ * 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
5224
+ */
5225
+ scheduled_messages?: Array<ScheduledMessageResponse>;
5226
+ /**
5227
+ * List of user who is watching the channel
5228
+ */
5107
5229
  watchers?: Array<UserResponse>;
5108
5230
  /**
5109
5231
  * Represents channel in chat
@@ -5131,6 +5253,10 @@ export interface ChannelStateResponseFields {
5131
5253
  */
5132
5254
  pinned_messages: Array<MessageResponse>;
5133
5255
  threads: Array<ThreadStateResponse>;
5256
+ /**
5257
+ * 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
5258
+ */
5259
+ cooldown_remaining_ms?: number;
5134
5260
  /**
5135
5261
  * Whether this channel is hidden or not
5136
5262
  */
@@ -5155,6 +5281,10 @@ export interface ChannelStateResponseFields {
5155
5281
  * List of read states
5156
5282
  */
5157
5283
  read?: Array<ReadStateResponse>;
5284
+ /**
5285
+ * 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
5286
+ */
5287
+ scheduled_messages?: Array<ScheduledMessageResponse>;
5158
5288
  /**
5159
5289
  * List of user who is watching the channel
5160
5290
  */
@@ -5625,14 +5755,20 @@ export interface CheckPushRequest {
5625
5755
  */
5626
5756
  apn_template?: string;
5627
5757
  /**
5628
- * Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due
5758
+ * 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
5759
  */
5630
5760
  event_type?:
5631
5761
  | 'message.new'
5632
5762
  | 'message.updated'
5633
5763
  | 'reaction.new'
5634
5764
  | 'reaction.updated'
5635
- | 'notification.reminder_due';
5765
+ | 'notification.reminder_due'
5766
+ | 'feeds.activity.added'
5767
+ | 'feeds.comment.added'
5768
+ | 'feeds.activity.reaction.added'
5769
+ | 'feeds.comment.reaction.added'
5770
+ | 'feeds.follow.created'
5771
+ | 'feeds.notification_feed.updated';
5636
5772
  /**
5637
5773
  * Push message data template for Firebase
5638
5774
  */
@@ -5744,25 +5880,21 @@ export interface CheckResponse {
5744
5880
  */
5745
5881
  status: string;
5746
5882
  /**
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
5883
+ * 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
5884
  */
5757
- intent_score_threshold?: number;
5885
+ llm_model?: string;
5758
5886
  /**
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
5887
+ * reasoning_effort sent with the LLM request that produced the verdict. Omitted when the request did not send one
5760
5888
  */
5761
- intent_would_fire?: boolean;
5889
+ llm_reasoning_effort?: string;
5762
5890
  /**
5763
5891
  * ID of the running moderation task
5764
5892
  */
5765
5893
  task_id?: string;
5894
+ /**
5895
+ * 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)
5896
+ */
5897
+ intent_scores?: Array<IntentScoreResponse>;
5766
5898
  /**
5767
5899
  * All moderation rules triggered by this check (content, user, and call rules), with their resolved actions
5768
5900
  */
@@ -5900,6 +6032,14 @@ export interface ClientEvent {
5900
6032
  * Reason the client initiated the join. Optional on CoordinatorJoin events; empty when not provided.
5901
6033
  */
5902
6034
  join_reason?: string;
6035
+ /**
6036
+ * 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.
6037
+ */
6038
+ leave_initiator?: string;
6039
+ /**
6040
+ * Internal reason or triggering event for the leave that aborted a join. Optional; sent on failure events. Maximum 200 characters.
6041
+ */
6042
+ leave_reason?: string;
5903
6043
  /**
5904
6044
  * Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event.
5905
6045
  */
@@ -6386,8 +6526,6 @@ export interface CommentUpdatedEvent {
6386
6526
  user?: UserResponseCommonFields;
6387
6527
  }
6388
6528
 
6389
- export interface CommitMessageRequest {}
6390
-
6391
6529
  export interface CompositeRecordingResponse {
6392
6530
  status: string;
6393
6531
  }
@@ -6756,7 +6894,7 @@ export interface CreateChannelTypeRequest {
6756
6894
  /**
6757
6895
  * Partition TTL
6758
6896
  */
6759
- partition_ttl?: string;
6897
+ partition_ttl?: string | null;
6760
6898
  /**
6761
6899
  * Polls
6762
6900
  */
@@ -6769,6 +6907,10 @@ export interface CreateChannelTypeRequest {
6769
6907
  * Push notifications
6770
6908
  */
6771
6909
  push_notifications?: boolean;
6910
+ /**
6911
+ * Enables message quotes
6912
+ */
6913
+ quotes?: boolean;
6772
6914
  /**
6773
6915
  * Reactions
6774
6916
  */
@@ -6777,6 +6919,10 @@ export interface CreateChannelTypeRequest {
6777
6919
  * Read events
6778
6920
  */
6779
6921
  read_events?: boolean;
6922
+ /**
6923
+ * Enables message reminders
6924
+ */
6925
+ reminders?: boolean;
6780
6926
  /**
6781
6927
  * Replies
6782
6928
  */
@@ -6815,11 +6961,15 @@ export interface CreateChannelTypeRequest {
6815
6961
  * List of permissions for the channel type
6816
6962
  */
6817
6963
  permissions?: Array<PolicyRequest>;
6964
+ /**
6965
+ * Sets thresholds for AI moderation
6966
+ */
6967
+ automod_thresholds?: Thresholds;
6818
6968
  chat_preferences?: ChatPreferences;
6819
6969
  /**
6820
6970
  * List of grants for the channel type
6821
6971
  */
6822
- grants?: Record<string, Array<string>>;
6972
+ grants?: Record<string, Array<string>> | null;
6823
6973
  }
6824
6974
 
6825
6975
  export interface CreateChannelTypeResponse {
@@ -7234,6 +7384,14 @@ export interface CreatePollOptionRequest {
7234
7384
  * Option text
7235
7385
  */
7236
7386
  text: string;
7387
+ /**
7388
+ * Key of the moderation configuration to use. Server-side only.
7389
+ */
7390
+ config_key?: string;
7391
+ /**
7392
+ * Team associated with the configuration. Server-side only.
7393
+ */
7394
+ config_team?: string;
7237
7395
  user_id?: string;
7238
7396
  /**
7239
7397
  * Custom data for this object
@@ -7255,6 +7413,14 @@ export interface CreatePollRequest {
7255
7413
  */
7256
7414
  allow_answers?: boolean;
7257
7415
  allow_user_suggested_options?: boolean;
7416
+ /**
7417
+ * Key of the moderation configuration to use. Server-side only.
7418
+ */
7419
+ config_key?: string;
7420
+ /**
7421
+ * Team associated with the configuration. Server-side only.
7422
+ */
7423
+ config_team?: string;
7258
7424
  /**
7259
7425
  * A description of the poll
7260
7426
  */
@@ -8023,6 +8189,31 @@ export interface DeleteModerationTemplateResponse {
8023
8189
  duration: string;
8024
8190
  }
8025
8191
 
8192
+ export interface DeletePollAnswerRequestPayload {
8193
+ /**
8194
+ * Reason for deletion
8195
+ */
8196
+ reason?: string;
8197
+ }
8198
+
8199
+ export interface DeletePollOptionRequestPayload {
8200
+ /**
8201
+ * 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
8202
+ */
8203
+ option_id?: string;
8204
+ /**
8205
+ * Reason for deletion
8206
+ */
8207
+ reason?: string;
8208
+ }
8209
+
8210
+ export interface DeletePollRequestPayload {
8211
+ /**
8212
+ * Reason for deletion
8213
+ */
8214
+ reason?: string;
8215
+ }
8216
+
8026
8217
  export interface DeleteQueueRequest {
8027
8218
  user_id?: string;
8028
8219
  /**
@@ -8095,6 +8286,17 @@ export interface DeleteSIPTrunkResponse {
8095
8286
  duration: string;
8096
8287
  }
8097
8288
 
8289
+ export interface DeleteScheduledMessageResponse {
8290
+ /**
8291
+ * Duration of the request in milliseconds
8292
+ */
8293
+ duration: string;
8294
+ /**
8295
+ * A message scheduled to be sent later
8296
+ */
8297
+ scheduled_message: ScheduledMessageResponse;
8298
+ }
8299
+
8098
8300
  export interface DeleteSegmentTargetsRequest {
8099
8301
  /**
8100
8302
  * Target IDs
@@ -8191,11 +8393,12 @@ export interface DeleteUsersRequest {
8191
8393
  /**
8192
8394
  * Conversation channels delete mode.
8193
8395
  * 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
8396
+ * * null or empty string - doesn't delete any conversation channels, unless user is 'hard', in which case it defaults to 'hard'
8195
8397
  * * soft - marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
8196
8398
  * * hard - deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
8399
+ * * keep - doesn't delete any conversation channels. Use it with user 'hard', where null or empty string defaults to 'hard'
8197
8400
  */
8198
- conversations?: 'soft' | 'hard';
8401
+ conversations?: 'soft' | 'hard' | 'keep';
8199
8402
  /**
8200
8403
  * Delete user files.
8201
8404
  * * false or empty string - doesn't delete any files
@@ -8216,7 +8419,7 @@ export interface DeleteUsersRequest {
8216
8419
  * User delete mode.
8217
8420
  * * soft - marks user as deleted and retains all user data
8218
8421
  * * pruning - marks user as deleted and nullifies user information
8219
- * * hard - deletes user completely. Requires 'hard' option for messages and conversations as well
8422
+ * * hard - deletes user completely. Requires 'hard' option for messages, and 'hard' or 'keep' option for conversations
8220
8423
  */
8221
8424
  user?: 'soft' | 'pruning' | 'hard';
8222
8425
  }
@@ -8455,8 +8658,6 @@ export interface EncryptionSettingsResponse {
8455
8658
  mode: 'available' | 'disabled' | 'auto-on';
8456
8659
  }
8457
8660
 
8458
- export interface EndCallRequest {}
8459
-
8460
8661
  export interface EndCallResponse {
8461
8662
  /**
8462
8663
  * Duration of the request in milliseconds
@@ -8468,6 +8669,7 @@ export interface EnrichedActivity {
8468
8669
  foreign_id?: string;
8469
8670
  id?: string;
8470
8671
  score?: number;
8672
+ time?: string;
8471
8673
  verb?: string;
8472
8674
  to?: Array<string>;
8473
8675
  actor?: Data;
@@ -8514,15 +8716,15 @@ export interface EnrichedReaction {
8514
8716
  activity_id: string;
8515
8717
  kind: string;
8516
8718
  user_id: string;
8719
+ created_at?: string;
8517
8720
  id?: string;
8518
8721
  parent?: string;
8722
+ updated_at?: string;
8519
8723
  target_feeds?: Array<string>;
8520
8724
  children_counts?: Record<string, number>;
8521
- created_at?: Time;
8522
8725
  data?: Record<string, any>;
8523
8726
  latest_children?: Record<string, Array<EnrichedReaction>>;
8524
8727
  own_children?: Record<string, Array<EnrichedReaction>>;
8525
- updated_at?: Time;
8526
8728
  user?: Data;
8527
8729
  }
8528
8730
 
@@ -8535,6 +8737,10 @@ export interface EnrichmentOptions {
8535
8737
  * 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
8738
  */
8537
8739
  include_flat_activities?: boolean;
8740
+ /**
8741
+ * 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.
8742
+ */
8743
+ include_ranking_config?: boolean;
8538
8744
  /**
8539
8745
  * Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.
8540
8746
  */
@@ -8796,8 +9002,6 @@ export interface ExportChannelsResponse {
8796
9002
  task_id: string;
8797
9003
  }
8798
9004
 
8799
- export interface ExportFeedUserDataRequest {}
8800
-
8801
9005
  export interface ExportFeedUserDataResponse {
8802
9006
  duration: string;
8803
9007
  /**
@@ -9514,6 +9718,7 @@ export interface FeedsNotificationComment {
9514
9718
  comment: string;
9515
9719
  id: string;
9516
9720
  user_id: string;
9721
+ parent_id?: string;
9517
9722
  attachments?: Array<Attachment>;
9518
9723
  }
9519
9724
 
@@ -9978,6 +10183,10 @@ export interface FollowBatchRequest {
9978
10183
  * List of follow relationships to create
9979
10184
  */
9980
10185
  follows: Array<FollowRequest>;
10186
+ /**
10187
+ * 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.
10188
+ */
10189
+ async?: boolean;
9981
10190
  /**
9982
10191
  * 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
10192
  */
@@ -9998,6 +10207,10 @@ export interface FollowBatchResponse {
9998
10207
  * List of current follow relationships
9999
10208
  */
10000
10209
  follows: Array<FollowResponse>;
10210
+ /**
10211
+ * ID of the background task when the request was sent with async: true
10212
+ */
10213
+ task_id?: string;
10001
10214
  }
10002
10215
 
10003
10216
  export interface FollowCreatedEvent {
@@ -10814,6 +11027,17 @@ export interface GetOrCreateCallResponse {
10814
11027
  call: CallResponse;
10815
11028
  }
10816
11029
 
11030
+ export interface GetOrCreateChannelDefaults {
11031
+ /**
11032
+ * Resolved defaults for a nested pagination object.
11033
+ */
11034
+ members: PagerDefaults;
11035
+ /**
11036
+ * Resolved defaults for a nested pagination object.
11037
+ */
11038
+ messages: PagerDefaults;
11039
+ }
11040
+
10817
11041
  export interface GetOrCreateFeedGroupRequest {
10818
11042
  /**
10819
11043
  * 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 +11137,7 @@ export interface GetOrCreateFeedResponse {
10913
11137
  following_pagination?: PagerResponse;
10914
11138
  member_pagination?: PagerResponse;
10915
11139
  notification_status?: NotificationStatusResponse;
11140
+ ranking_config?: RankingConfig;
10916
11141
  }
10917
11142
 
10918
11143
  export interface GetOrCreateFeedViewRequest {
@@ -11181,15 +11406,28 @@ export interface GroupedChannelsBucket {
11181
11406
  */
11182
11407
  prev?: string;
11183
11408
  /**
11184
- * Unread channels currently classified into this bucket
11409
+ * Total unread channels matching this bucket and its filters, independent of page size
11185
11410
  */
11186
11411
  unread_channels?: number;
11187
11412
  }
11188
11413
 
11189
11414
  export interface GroupedChannelsGroupRequest {
11415
+ /**
11416
+ * Max channels for this group; omitted or zero uses the request limit
11417
+ */
11190
11418
  limit?: number;
11419
+ /**
11420
+ * Cursor for the next page; only allowed when requesting one group
11421
+ */
11191
11422
  next?: string;
11423
+ /**
11424
+ * Cursor for the previous page; only allowed when requesting one group
11425
+ */
11192
11426
  prev?: string;
11427
+ /**
11428
+ * 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.
11429
+ */
11430
+ filter_conditions?: Record<string, any>;
11193
11431
  }
11194
11432
 
11195
11433
  export interface GroupedQueryChannelsRequest {
@@ -11199,7 +11437,11 @@ export interface GroupedQueryChannelsRequest {
11199
11437
  limit?: number;
11200
11438
  user_id?: string;
11201
11439
  /**
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.
11440
+ * Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats
11441
+ */
11442
+ sort?: Array<SortParamRequest>;
11443
+ /**
11444
+ * 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
11445
  */
11204
11446
  groups?: Record<string, GroupedChannelsGroupRequest>;
11205
11447
  /**
@@ -11214,7 +11456,7 @@ export interface GroupedQueryChannelsResponse {
11214
11456
  */
11215
11457
  duration: string;
11216
11458
  /**
11217
- * Predefined channel groups keyed by group name
11459
+ * Groups keyed by the requested stored group name
11218
11460
  */
11219
11461
  groups: Record<string, GroupedChannelsBucket>;
11220
11462
  }
@@ -11672,23 +11914,23 @@ export interface InsertActionLogResponse {
11672
11914
  duration: string;
11673
11915
  }
11674
11916
 
11675
- export interface IntentBufferedItem {
11917
+ export interface IntentConditionInfo {
11676
11918
  /**
11677
- * The ID of the user who authored the buffered message or comment
11919
+ * Whether the score reached the threshold.
11678
11920
  */
11679
- author_user_id: string;
11921
+ passed: boolean;
11680
11922
  /**
11681
- * When the buffered message or comment was created
11923
+ * Final (damped) score of the topic in this analysis; 0 when the topic is not defined in the policy.
11682
11924
  */
11683
- created_at: Date;
11925
+ score: number;
11684
11926
  /**
11685
- * The ID of the buffered message or comment
11927
+ * Minimum score (1-100) the condition requires.
11686
11928
  */
11687
- id: string;
11929
+ threshold: number;
11688
11930
  /**
11689
- * The text of the buffered message or comment
11931
+ * Policy intent topic label the condition references.
11690
11932
  */
11691
- text: string;
11933
+ topic: string;
11692
11934
  }
11693
11935
 
11694
11936
  export interface IntentConfigRequest {
@@ -11705,39 +11947,37 @@ export interface IntentConfigResponse {
11705
11947
  topics: Array<IntentTopicResponse>;
11706
11948
  }
11707
11949
 
11708
- export interface IntentDetectedEvent {
11950
+ export interface IntentEvaluationInfo {
11709
11951
  /**
11710
- * The channel CID (chat) or feed ID (feeds) the buffered conversation belongs to
11952
+ * The analyzed conversation: the channel CID for chat, the object ID for feeds.
11711
11953
  */
11712
11954
  conversation_id: string;
11713
- created_at: Date;
11714
11955
  /**
11715
- * The ID of the most recently buffered entity
11956
+ * Number of conversation messages sent to the model.
11716
11957
  */
11717
- entity_id: string;
11958
+ message_count: number;
11718
11959
  /**
11719
- * The type of the most recently buffered entity (chat message or feed comment)
11960
+ * One entry per `intent_rule` condition of the rule, flat conditions first, then group conditions.
11720
11961
  */
11721
- entity_type: string;
11962
+ conditions: Array<IntentConditionInfo>;
11722
11963
  /**
11723
- * The configured intent topic label that started the buffer
11964
+ * Score (0-100) the model gave every topic in the analysis call, keyed by topic label, before message-count damping.
11724
11965
  */
11725
- matched_topic: string;
11966
+ raw_scores: Record<string, number>;
11726
11967
  /**
11727
- * The Stage 2 conversation score (0-100) that cleared score_threshold
11968
+ * Final score (0-100) of every topic after message-count damping, keyed by topic label. Conditions compare against these.
11728
11969
  */
11970
+ scores: Record<string, number>;
11971
+ }
11972
+
11973
+ export interface IntentRuleParameters {
11974
+ topic: string;
11975
+ threshold?: number;
11976
+ }
11977
+
11978
+ export interface IntentScoreResponse {
11729
11979
  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;
11980
+ topic: string;
11741
11981
  }
11742
11982
 
11743
11983
  export interface IntentTopicRequest {
@@ -11745,61 +11985,21 @@ export interface IntentTopicRequest {
11745
11985
  * Unique topic label (e.g. purchase_intent)
11746
11986
  */
11747
11987
  label: string;
11748
- /**
11749
- * How long the buffer collects items before scoring runs
11750
- */
11751
- analysis_cooldown_seconds?: number;
11752
11988
  /**
11753
11989
  * Optional description used in the classification prompt; the label alone is used when empty
11754
11990
  */
11755
11991
  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
11992
  }
11773
11993
 
11774
11994
  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
11995
  /**
11784
11996
  * Unique topic label (e.g. purchase_intent)
11785
11997
  */
11786
11998
  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
11999
  /**
11796
12000
  * Optional description used in the classification prompt; the label alone is used when empty
11797
12001
  */
11798
12002
  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
12003
  }
11804
12004
 
11805
12005
  export interface InterestTagResponse {
@@ -11894,7 +12094,9 @@ export interface KickedUserEvent {
11894
12094
  export interface LLMConfig {
11895
12095
  app_context?: string;
11896
12096
  async?: boolean;
12097
+ custom_keys_context_description?: string;
11897
12098
  enabled?: boolean;
12099
+ context_custom_keys?: Array<string>;
11898
12100
  rules?: Array<LLMRule>;
11899
12101
  severity_descriptions?: Record<string, string>;
11900
12102
  }
@@ -12086,6 +12288,20 @@ export interface LayoutSettingsResponse {
12086
12288
  options?: Record<string, any>;
12087
12289
  }
12088
12290
 
12291
+ export interface LifecycleSettingsRequest {
12292
+ /**
12293
+ * 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
12294
+ */
12295
+ mode?: 'reusable' | 'single_use';
12296
+ }
12297
+
12298
+ export interface LifecycleSettingsResponse {
12299
+ /**
12300
+ * 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
12301
+ */
12302
+ mode: 'reusable' | 'single_use';
12303
+ }
12304
+
12089
12305
  export interface LimitInfoResponse {
12090
12306
  /**
12091
12307
  * The maximum number of API calls allowed per time window
@@ -13121,7 +13337,7 @@ export interface MessageRequest {
13121
13337
  /**
13122
13338
  * Date when pinned message expires
13123
13339
  */
13124
- pin_expires?: Date;
13340
+ pin_expires?: Date | null;
13125
13341
  /**
13126
13342
  * Whether message is pinned or not
13127
13343
  */
@@ -13129,7 +13345,7 @@ export interface MessageRequest {
13129
13345
  /**
13130
13346
  * Date when message got pinned
13131
13347
  */
13132
- pinned_at?: Date;
13348
+ pinned_at?: Date | null;
13133
13349
  /**
13134
13350
  * Identifier of the poll to include in the message
13135
13351
  */
@@ -14109,6 +14325,7 @@ export interface ModerationRulesTriggeredEvent {
14109
14325
  * Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
14110
14326
  */
14111
14327
  matched_contents?: Array<MatchedContent>;
14328
+ intent?: IntentEvaluationInfo;
14112
14329
  }
14113
14330
 
14114
14331
  export interface ModerationTextAnalysisCompleteEvent {
@@ -14244,9 +14461,25 @@ export interface NoiseCancellationSettings {
14244
14461
  }
14245
14462
 
14246
14463
  export interface NotificationComment {
14464
+ /**
14465
+ * The text of the comment
14466
+ */
14247
14467
  comment: string;
14468
+ /**
14469
+ * The ID of the comment
14470
+ */
14248
14471
  id: string;
14472
+ /**
14473
+ * The ID of the user who wrote the comment
14474
+ */
14249
14475
  user_id: string;
14476
+ /**
14477
+ * The ID of the parent comment when this comment is a reply; omitted for top-level comments
14478
+ */
14479
+ parent_id?: string;
14480
+ /**
14481
+ * Attachments on the comment
14482
+ */
14250
14483
  attachments?: Array<Attachment>;
14251
14484
  }
14252
14485
 
@@ -14645,6 +14878,7 @@ export interface OwnUserResponse {
14645
14878
  unread_count: number;
14646
14879
  unread_threads: number;
14647
14880
  updated_at: Date;
14881
+ blocked_user_ids: Array<string>;
14648
14882
  channel_mutes: Array<ChannelMute>;
14649
14883
  devices: Array<DeviceResponse>;
14650
14884
  mutes: Array<UserMuteResponse>;
@@ -14657,7 +14891,6 @@ export interface OwnUserResponse {
14657
14891
  last_active?: Date;
14658
14892
  name?: string;
14659
14893
  revoke_tokens_issued_before?: Date;
14660
- blocked_user_ids?: Array<string>;
14661
14894
  latest_hidden_channels?: Array<string>;
14662
14895
  /**
14663
14896
  * The privacy settings of the user.
@@ -14671,6 +14904,13 @@ export interface OwnUserResponse {
14671
14904
  total_unread_count_by_team?: Record<string, number>;
14672
14905
  }
14673
14906
 
14907
+ export interface PagerDefaults {
14908
+ /**
14909
+ * Number of records returned when `limit` is omitted.
14910
+ */
14911
+ limit: number;
14912
+ }
14913
+
14674
14914
  export interface PagerRequest {
14675
14915
  limit?: number;
14676
14916
  next?: string;
@@ -15151,6 +15391,52 @@ export interface PolicyTestTotals {
15151
15391
  unscored: number;
15152
15392
  }
15153
15393
 
15394
+ export interface PollClosedEvent {
15395
+ /**
15396
+ * Date/time of creation
15397
+ */
15398
+ created_at: Date;
15399
+ custom: Record<string, any>;
15400
+ poll: PollResponseData;
15401
+ /**
15402
+ * The type of event: "poll.closed" in this case
15403
+ */
15404
+ type: string;
15405
+ activity_id?: string;
15406
+ /**
15407
+ * The CID of the channel containing the poll
15408
+ */
15409
+ cid?: string;
15410
+ /**
15411
+ * The ID of the message containing the poll
15412
+ */
15413
+ message_id?: string;
15414
+ received_at?: Date;
15415
+ }
15416
+
15417
+ export interface PollDeletedEvent {
15418
+ /**
15419
+ * Date/time of creation
15420
+ */
15421
+ created_at: Date;
15422
+ custom: Record<string, any>;
15423
+ poll: PollResponseData;
15424
+ /**
15425
+ * The type of event: "poll.deleted" in this case
15426
+ */
15427
+ type: string;
15428
+ activity_id?: string;
15429
+ /**
15430
+ * The CID of the channel containing the poll
15431
+ */
15432
+ cid?: string;
15433
+ /**
15434
+ * The ID of the message containing the poll
15435
+ */
15436
+ message_id?: string;
15437
+ received_at?: Date;
15438
+ }
15439
+
15154
15440
  export interface PollOptionInput {
15155
15441
  text?: string;
15156
15442
  custom?: Record<string, any>;
@@ -15217,6 +15503,101 @@ export interface PollResponseData {
15217
15503
  name_i18n?: Record<string, string>;
15218
15504
  }
15219
15505
 
15506
+ export interface PollUpdatedEvent {
15507
+ /**
15508
+ * Date/time of creation
15509
+ */
15510
+ created_at: Date;
15511
+ custom: Record<string, any>;
15512
+ poll: PollResponseData;
15513
+ /**
15514
+ * The type of event: "poll.updated" in this case
15515
+ */
15516
+ type: string;
15517
+ activity_id?: string;
15518
+ /**
15519
+ * The CID of the channel containing the poll
15520
+ */
15521
+ cid?: string;
15522
+ /**
15523
+ * The ID of the message containing the poll
15524
+ */
15525
+ message_id?: string;
15526
+ received_at?: Date;
15527
+ }
15528
+
15529
+ export interface PollVoteCastedEvent {
15530
+ /**
15531
+ * Date/time of creation
15532
+ */
15533
+ created_at: Date;
15534
+ custom: Record<string, any>;
15535
+ poll: PollResponseData;
15536
+ poll_vote: PollVoteResponseData;
15537
+ /**
15538
+ * The type of event: "poll.vote_casted" in this case
15539
+ */
15540
+ type: string;
15541
+ activity_id?: string;
15542
+ /**
15543
+ * The CID of the channel containing the poll
15544
+ */
15545
+ cid?: string;
15546
+ /**
15547
+ * The ID of the message containing the poll
15548
+ */
15549
+ message_id?: string;
15550
+ received_at?: Date;
15551
+ }
15552
+
15553
+ export interface PollVoteChangedEvent {
15554
+ /**
15555
+ * Date/time of creation
15556
+ */
15557
+ created_at: Date;
15558
+ custom: Record<string, any>;
15559
+ poll: PollResponseData;
15560
+ poll_vote: PollVoteResponseData;
15561
+ /**
15562
+ * The type of event: "poll.vote_changed" in this case
15563
+ */
15564
+ type: string;
15565
+ activity_id?: string;
15566
+ /**
15567
+ * The CID of the channel containing the poll
15568
+ */
15569
+ cid?: string;
15570
+ /**
15571
+ * The ID of the message containing the poll
15572
+ */
15573
+ message_id?: string;
15574
+ received_at?: Date;
15575
+ }
15576
+
15577
+ export interface PollVoteRemovedEvent {
15578
+ /**
15579
+ * Date/time of creation
15580
+ */
15581
+ created_at: Date;
15582
+ custom: Record<string, any>;
15583
+ poll: PollResponseData;
15584
+ poll_vote: PollVoteResponseData;
15585
+ /**
15586
+ * The type of event: "poll.vote_removed" in this case
15587
+ */
15588
+ type: string;
15589
+ activity_id?: string;
15590
+ /**
15591
+ * The CID of the channel containing the poll
15592
+ */
15593
+ cid?: string;
15594
+ /**
15595
+ * The ID of the message containing the poll
15596
+ */
15597
+ message_id?: string;
15598
+ received_at?: Date;
15599
+ }
15600
+
15220
15601
  export interface PollVoteResponse {
15221
15602
  /**
15222
15603
  * Duration of the request in milliseconds
@@ -15428,12 +15809,20 @@ export interface PushPreferenceInput {
15428
15809
  * Remove the disabled until time. (IE stop snoozing notifications)
15429
15810
  */
15430
15811
  remove_disable?: boolean;
15812
+ /**
15813
+ * 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.
15814
+ */
15815
+ remove_schedule?: boolean;
15431
15816
  /**
15432
15817
  * 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
15818
  */
15434
15819
  user_id?: string;
15435
15820
  chat_preferences?: ChatPreferencesInput;
15436
15821
  feeds_preferences?: FeedsPreferences;
15822
+ /**
15823
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
15824
+ */
15825
+ schedule?: PushScheduleInput;
15437
15826
  }
15438
15827
 
15439
15828
  export interface PushPreferencesResponse {
@@ -15449,6 +15838,10 @@ export interface PushPreferencesResponse {
15449
15838
  feeds_level?: string;
15450
15839
  chat_preferences?: ChatPreferencesResponse;
15451
15840
  feeds_preferences?: FeedsPreferencesResponse;
15841
+ /**
15842
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
15843
+ */
15844
+ schedule?: PushScheduleResponse;
15452
15845
  }
15453
15846
 
15454
15847
  export interface PushProvider {
@@ -15540,6 +15933,28 @@ export interface PushProviderResponse {
15540
15933
  xiaomi_package_name?: string;
15541
15934
  }
15542
15935
 
15936
+ export interface PushScheduleInput {
15937
+ /**
15938
+ * 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.
15939
+ */
15940
+ timezone?: string;
15941
+ /**
15942
+ * 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.
15943
+ */
15944
+ quiet_hours?: Array<QuietHoursRuleInput>;
15945
+ }
15946
+
15947
+ export interface PushScheduleResponse {
15948
+ /**
15949
+ * IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
15950
+ */
15951
+ timezone: string;
15952
+ /**
15953
+ * The quiet windows. Push is suppressed while any rule is active.
15954
+ */
15955
+ quiet_hours: Array<QuietHoursRuleResponse>;
15956
+ }
15957
+
15543
15958
  export interface PushTemplate {
15544
15959
  created_at: Date;
15545
15960
  enable_push: boolean;
@@ -16094,7 +16509,71 @@ export interface QueryCampaignsResponse {
16094
16509
  prev?: string;
16095
16510
  }
16096
16511
 
16512
+ export interface QueryChannelBansRequest {
16513
+ /**
16514
+ * Whether to exclude expired bans or not
16515
+ */
16516
+ exclude_expired_bans?: boolean;
16517
+ /**
16518
+ * When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging
16519
+ */
16520
+ include_total?: boolean;
16521
+ limit?: number;
16522
+ next?: string;
16523
+ prev?: string;
16524
+ user_id?: string;
16525
+ /**
16526
+ * Filter conditions to apply to the query
16527
+ */
16528
+ filter_conditions?: Record<string, any>;
16529
+ /**
16530
+ * User request object
16531
+ */
16532
+ user?: UserRequest;
16533
+ }
16534
+
16535
+ export interface QueryChannelBansResponse {
16536
+ /**
16537
+ * Duration of the request in milliseconds
16538
+ */
16539
+ duration: string;
16540
+ /**
16541
+ * Users banned from the channel, one entry per user, newest ban first
16542
+ */
16543
+ bans: Array<ChannelBanResponse>;
16544
+ next?: string;
16545
+ prev?: string;
16546
+ /**
16547
+ * 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
16548
+ */
16549
+ total?: number;
16550
+ total_by_scope?: ChannelBansScopeTotals;
16551
+ }
16552
+
16553
+ export interface QueryChannelsDefaults {
16554
+ /**
16555
+ * Number of channels returned when `limit` is omitted.
16556
+ */
16557
+ limit: number;
16558
+ /**
16559
+ * 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.
16560
+ */
16561
+ max_limit: number;
16562
+ /**
16563
+ * Number of members returned per channel when `member_limit` is omitted.
16564
+ */
16565
+ member_limit: number;
16566
+ /**
16567
+ * Number of messages returned per channel when `message_limit` is omitted.
16568
+ */
16569
+ message_limit: number;
16570
+ }
16571
+
16097
16572
  export interface QueryChannelsRequest {
16573
+ /**
16574
+ * Whether to include active_member_count for each channel
16575
+ */
16576
+ include_active_member_count?: boolean;
16098
16577
  /**
16099
16578
  * Number of channels to limit
16100
16579
  */
@@ -16396,12 +16875,19 @@ export interface QueryFeedsUsageStatsResponse {
16396
16875
  duration: string;
16397
16876
  activities: DailyMetricStatsResponse;
16398
16877
  api_requests: DailyMetricStatsResponse;
16878
+ collections: DailyMetricStatsResponse;
16879
+ comments: DailyMetricStatsResponse;
16399
16880
  follows: DailyMetricStatsResponse;
16400
16881
  openai_requests: DailyMetricStatsResponse;
16882
+ reactions: DailyMetricStatsResponse;
16401
16883
  emau?: EMAUStatsResponse;
16402
16884
  }
16403
16885
 
16404
16886
  export interface QueryFollowsRequest {
16887
+ /**
16888
+ * 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.
16889
+ */
16890
+ include_group_counts?: boolean;
16405
16891
  limit?: number;
16406
16892
  next?: string;
16407
16893
  prev?: string;
@@ -16429,6 +16915,10 @@ export interface QueryFollowsResponse {
16429
16915
  * Cursor for previous page
16430
16916
  */
16431
16917
  prev?: string;
16918
+ /**
16919
+ * Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality.
16920
+ */
16921
+ group_counts?: Record<string, number>;
16432
16922
  }
16433
16923
 
16434
16924
  export interface QueryFutureChannelBansPayload {
@@ -17009,6 +17499,45 @@ export interface QueryRevisionHistoryResponse {
17009
17499
  prev?: string;
17010
17500
  }
17011
17501
 
17502
+ export interface QueryScheduledMessagesRequest {
17503
+ /**
17504
+ * Page size, 1 to 100. Defaults to 20
17505
+ */
17506
+ limit?: number;
17507
+ /**
17508
+ * Cursor from the previous page
17509
+ */
17510
+ next?: string;
17511
+ user_id?: string;
17512
+ /**
17513
+ * Only scheduled_at ascending is supported. Pending messages come before failed ones
17514
+ */
17515
+ sort?: Array<SortParamRequest>;
17516
+ /**
17517
+ * Filter for querying scheduled messages
17518
+ */
17519
+ filter?: ScheduledMessagesFilter;
17520
+ /**
17521
+ * User request object
17522
+ */
17523
+ user?: UserRequest;
17524
+ }
17525
+
17526
+ export interface QueryScheduledMessagesResponse {
17527
+ /**
17528
+ * Duration of the request in milliseconds
17529
+ */
17530
+ duration: string;
17531
+ /**
17532
+ * Pending messages first, then failed ones, each by scheduled_at
17533
+ */
17534
+ scheduled_messages: Array<ScheduledMessageResponse>;
17535
+ /**
17536
+ * Cursor for the next page; empty on the last page
17537
+ */
17538
+ next?: string;
17539
+ }
17540
+
17012
17541
  export interface QuerySegmentTargetsRequest {
17013
17542
  /**
17014
17543
  * Limit
@@ -17216,6 +17745,36 @@ export interface QueueResponse {
17216
17745
  queue?: ModerationQueueResponse;
17217
17746
  }
17218
17747
 
17748
+ export interface QuietHoursRuleInput {
17749
+ /**
17750
+ * 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.
17751
+ */
17752
+ end: string;
17753
+ /**
17754
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59. Must differ from end.
17755
+ */
17756
+ start: string;
17757
+ /**
17758
+ * 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.
17759
+ */
17760
+ days?: Array<string>;
17761
+ }
17762
+
17763
+ export interface QuietHoursRuleResponse {
17764
+ /**
17765
+ * 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.
17766
+ */
17767
+ end: string;
17768
+ /**
17769
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.
17770
+ */
17771
+ start: string;
17772
+ /**
17773
+ * 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.
17774
+ */
17775
+ days?: Array<string>;
17776
+ }
17777
+
17219
17778
  export interface RTMPBroadcastRequest {
17220
17779
  /**
17221
17780
  * Name identifier for RTMP broadcast, must be unique in call
@@ -18089,8 +18648,6 @@ export interface RestoreCommentResponse {
18089
18648
  comment: CommentResponse;
18090
18649
  }
18091
18650
 
18092
- export interface RestoreFeedGroupRequest {}
18093
-
18094
18651
  export interface RestoreFeedGroupResponse {
18095
18652
  duration: string;
18096
18653
  feed_group: FeedGroupResponse;
@@ -18238,6 +18795,7 @@ export interface ReviewQueueItemResponse {
18238
18795
  * Content payload for moderation
18239
18796
  */
18240
18797
  moderation_payload?: ModerationPayloadResponse;
18798
+ poll?: PollResponseData;
18241
18799
  reaction?: Reaction;
18242
18800
  }
18243
18801
 
@@ -18504,6 +19062,10 @@ export interface RuleBuilderCondition {
18504
19062
  flood_similar_params?: FloodSimilarRuleParameters;
18505
19063
  image_content_params?: ImageContentParameters;
18506
19064
  image_rule_params?: ImageRuleParameters;
19065
+ /**
19066
+ * intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition
19067
+ */
19068
+ intent_rule_params?: IntentRuleParameters;
18507
19069
  ip_content_count_rule_params?: IPContentCountRuleParameters;
18508
19070
  ip_flag_count_rule_params?: IPFlagCountRuleParameters;
18509
19071
  keyframe_ocr_rule_params?: KeyframeOCRRuleParameters;
@@ -18511,6 +19073,7 @@ export interface RuleBuilderCondition {
18511
19073
  ocr_content_params?: OCRContentParameters;
18512
19074
  text_content_params?: TextContentParameters;
18513
19075
  text_rule_params?: TextRuleParameters;
19076
+ user_channel_ban_count_params?: UserChannelBanCountRuleParameters;
18514
19077
  user_channel_count_params?: UserChannelCountRuleParameters;
18515
19078
  user_created_within_params?: UserCreatedWithinParameters;
18516
19079
  user_custom_property_params?: UserCustomPropertyParameters;
@@ -18775,164 +19338,386 @@ export interface SIPInboundRoutingRuleRequest {
18775
19338
  /**
18776
19339
  * Configuration for SIP caller settings
18777
19340
  */
18778
- caller_configs: SIPCallerConfigsRequest;
19341
+ caller_configs: SIPCallerConfigsRequest;
19342
+ /**
19343
+ * List of called numbers
19344
+ */
19345
+ called_numbers?: Array<string>;
19346
+ /**
19347
+ * List of caller numbers (optional)
19348
+ */
19349
+ caller_numbers?: Array<string>;
19350
+ /**
19351
+ * Configuration for SIP call settings
19352
+ */
19353
+ call_configs?: SIPCallConfigsRequest;
19354
+ /**
19355
+ * Configuration for direct routing rule calls
19356
+ */
19357
+ direct_routing_configs?: SIPDirectRoutingRuleCallConfigsRequest;
19358
+ /**
19359
+ * Configuration for PIN protection settings
19360
+ */
19361
+ pin_protection_configs?: SIPPinProtectionConfigsRequest;
19362
+ /**
19363
+ * Configuration for PIN routing rule calls
19364
+ */
19365
+ pin_routing_configs?: SIPInboundRoutingRulePinConfigsRequest;
19366
+ }
19367
+
19368
+ export interface SIPInboundRoutingRuleResponse {
19369
+ /**
19370
+ * Creation timestamp
19371
+ */
19372
+ created_at: Date;
19373
+ duration: string;
19374
+ /**
19375
+ * Unique identifier of the SIP Inbound Routing Rule
19376
+ */
19377
+ id: string;
19378
+ /**
19379
+ * Name of the SIP Inbound Routing Rule
19380
+ */
19381
+ name: string;
19382
+ /**
19383
+ * Last update timestamp
19384
+ */
19385
+ updated_at: Date;
19386
+ /**
19387
+ * List of called numbers
19388
+ */
19389
+ called_numbers: Array<string>;
19390
+ /**
19391
+ * List of SIP trunk IDs
19392
+ */
19393
+ trunk_ids: Array<string>;
19394
+ /**
19395
+ * List of caller numbers
19396
+ */
19397
+ caller_numbers?: Array<string>;
19398
+ /**
19399
+ * SIP call configuration response
19400
+ */
19401
+ call_configs?: SIPCallConfigsResponse;
19402
+ /**
19403
+ * SIP caller configuration response
19404
+ */
19405
+ caller_configs?: SIPCallerConfigsResponse;
19406
+ /**
19407
+ * Direct routing rule call configuration response
19408
+ */
19409
+ direct_routing_configs?: SIPDirectRoutingRuleCallConfigsResponse;
19410
+ /**
19411
+ * PIN protection configuration response
19412
+ */
19413
+ pin_protection_configs?: SIPPinProtectionConfigsResponse;
19414
+ /**
19415
+ * PIN routing rule call configuration response
19416
+ */
19417
+ pin_routing_configs?: SIPInboundRoutingRulePinConfigsResponse;
19418
+ }
19419
+
19420
+ export interface SIPPinProtectionConfigsRequest {
19421
+ /**
19422
+ * Default PIN to use if there is no PIN set on the call object
19423
+ */
19424
+ default_pin?: string;
19425
+ /**
19426
+ * Whether PIN protection is enabled
19427
+ */
19428
+ enabled?: boolean;
19429
+ /**
19430
+ * Maximum number of PIN attempts allowed
19431
+ */
19432
+ max_attempts?: number;
19433
+ /**
19434
+ * Number of digits required for the PIN
19435
+ */
19436
+ required_pin_digits?: number;
19437
+ }
19438
+
19439
+ export interface SIPPinProtectionConfigsResponse {
19440
+ /**
19441
+ * Whether PIN protection is enabled
19442
+ */
19443
+ enabled: boolean;
19444
+ /**
19445
+ * Default PIN to use if there is no PIN set on the call object
19446
+ */
19447
+ default_pin?: string;
19448
+ /**
19449
+ * Maximum number of PIN attempts allowed
19450
+ */
19451
+ max_attempts?: number;
19452
+ /**
19453
+ * Number of digits required for the PIN
19454
+ */
19455
+ required_pin_digits?: number;
19456
+ }
19457
+
19458
+ export interface SIPTrunkResponse {
19459
+ /**
19460
+ * Creation timestamp
19461
+ */
19462
+ created_at: Date;
19463
+ /**
19464
+ * Unique identifier for the SIP trunk
19465
+ */
19466
+ id: string;
19467
+ /**
19468
+ * Name of the SIP trunk
19469
+ */
19470
+ name: string;
19471
+ /**
19472
+ * Password for SIP trunk authentication
19473
+ */
19474
+ password: string;
19475
+ /**
19476
+ * Last update timestamp
19477
+ */
19478
+ updated_at: Date;
19479
+ /**
19480
+ * The URI for the SIP trunk
19481
+ */
19482
+ uri: string;
19483
+ /**
19484
+ * Username for SIP trunk authentication
19485
+ */
19486
+ username: string;
19487
+ /**
19488
+ * Allowed IPv4/IPv6 addresses or CIDR blocks
19489
+ */
19490
+ allowed_ips: Array<string>;
19491
+ /**
19492
+ * Phone numbers associated with this SIP trunk
19493
+ */
19494
+ numbers: Array<string>;
19495
+ }
19496
+
19497
+ export interface SRTIngress {
19498
+ address: string;
19499
+ }
19500
+
19501
+ export interface ScheduledMessageChannelResponse {
19502
+ /**
19503
+ * Channel CID (<type>:<id>)
19504
+ */
19505
+ cid: string;
19506
+ /**
19507
+ * Channel ID
19508
+ */
19509
+ id: string;
19510
+ /**
19511
+ * Channel type
19512
+ */
19513
+ type: string;
19514
+ /**
19515
+ * Channel image, from its custom data
19516
+ */
19517
+ image?: string;
19518
+ /**
19519
+ * Channel name, from its custom data
19520
+ */
19521
+ name?: string;
19522
+ }
19523
+
19524
+ export interface ScheduledMessageContentResponse {
18779
19525
  /**
18780
- * List of called numbers
19526
+ * Text of the message
18781
19527
  */
18782
- called_numbers?: Array<string>;
19528
+ text: string;
19529
+ custom: Record<string, any>;
18783
19530
  /**
18784
- * List of caller numbers (optional)
19531
+ * Contains HTML markup of the message
18785
19532
  */
18786
- caller_numbers?: Array<string>;
19533
+ html?: string;
18787
19534
  /**
18788
- * Configuration for SIP call settings
19535
+ * Whether the message mentions the whole channel
18789
19536
  */
18790
- call_configs?: SIPCallConfigsRequest;
19537
+ mentioned_channel?: boolean;
18791
19538
  /**
18792
- * Configuration for direct routing rule calls
19539
+ * Whether the message mentions the online channel members
18793
19540
  */
18794
- direct_routing_configs?: SIPDirectRoutingRuleCallConfigsRequest;
19541
+ mentioned_here?: boolean;
18795
19542
  /**
18796
- * Configuration for PIN protection settings
19543
+ * MML content of the message
18797
19544
  */
18798
- pin_protection_configs?: SIPPinProtectionConfigsRequest;
19545
+ mml?: string;
18799
19546
  /**
18800
- * Configuration for PIN routing rule calls
19547
+ * ID of parent message (thread)
18801
19548
  */
18802
- pin_routing_configs?: SIPInboundRoutingRulePinConfigsRequest;
18803
- }
18804
-
18805
- export interface SIPInboundRoutingRuleResponse {
19549
+ parent_id?: string;
18806
19550
  /**
18807
- * Creation timestamp
19551
+ * Date/time the pin expires
18808
19552
  */
18809
- created_at: Date;
18810
- duration: string;
19553
+ pin_expires?: Date;
18811
19554
  /**
18812
- * Unique identifier of the SIP Inbound Routing Rule
19555
+ * Whether the message will be pinned when sent
18813
19556
  */
18814
- id: string;
19557
+ pinned?: boolean;
18815
19558
  /**
18816
- * Name of the SIP Inbound Routing Rule
19559
+ * Identifier of the poll to include in the message
18817
19560
  */
18818
- name: string;
19561
+ poll_id?: string;
19562
+ quoted_message_id?: string;
18819
19563
  /**
18820
- * Last update timestamp
19564
+ * Whether thread reply should be shown in the channel as well
18821
19565
  */
18822
- updated_at: Date;
19566
+ show_in_channel?: boolean;
18823
19567
  /**
18824
- * List of called numbers
19568
+ * Whether message is silent or not
18825
19569
  */
18826
- called_numbers: Array<string>;
19570
+ silent?: boolean;
18827
19571
  /**
18828
- * List of SIP trunk IDs
19572
+ * Contains type of the message. One of: regular, system
18829
19573
  */
18830
- trunk_ids: Array<string>;
19574
+ type?: string;
18831
19575
  /**
18832
- * List of caller numbers
19576
+ * Array of message attachments
18833
19577
  */
18834
- caller_numbers?: Array<string>;
19578
+ attachments?: Array<Attachment>;
18835
19579
  /**
18836
- * SIP call configuration response
19580
+ * IDs of the user groups mentioned in the message
18837
19581
  */
18838
- call_configs?: SIPCallConfigsResponse;
19582
+ mentioned_group_ids?: Array<string>;
18839
19583
  /**
18840
- * SIP caller configuration response
19584
+ * Roles mentioned in the message
18841
19585
  */
18842
- caller_configs?: SIPCallerConfigsResponse;
19586
+ mentioned_roles?: Array<string>;
18843
19587
  /**
18844
- * Direct routing rule call configuration response
19588
+ * IDs of the users mentioned in the message
18845
19589
  */
18846
- direct_routing_configs?: SIPDirectRoutingRuleCallConfigsResponse;
19590
+ mentioned_users?: Array<string>;
18847
19591
  /**
18848
- * PIN protection configuration response
19592
+ * IDs of the users the message will be visible to
18849
19593
  */
18850
- pin_protection_configs?: SIPPinProtectionConfigsResponse;
19594
+ restricted_visibility?: Array<string>;
18851
19595
  /**
18852
- * PIN routing rule call configuration response
19596
+ * The location a scheduled message will share
18853
19597
  */
18854
- pin_routing_configs?: SIPInboundRoutingRulePinConfigsResponse;
19598
+ shared_location?: ScheduledMessageLocation;
18855
19599
  }
18856
19600
 
18857
- export interface SIPPinProtectionConfigsRequest {
19601
+ export interface ScheduledMessageFailedEvent {
18858
19602
  /**
18859
- * Default PIN to use if there is no PIN set on the call object
19603
+ * Date/time of creation
18860
19604
  */
18861
- default_pin?: string;
19605
+ created_at: Date;
19606
+ custom: Record<string, any>;
19607
+ user: UserResponseCommonFields;
18862
19608
  /**
18863
- * Whether PIN protection is enabled
19609
+ * The type of event: "scheduled_message.failed" in this case
18864
19610
  */
18865
- enabled?: boolean;
19611
+ type: string;
18866
19612
  /**
18867
- * Maximum number of PIN attempts allowed
19613
+ * The CID of the channel the message is scheduled in
18868
19614
  */
18869
- max_attempts?: number;
19615
+ cid?: string;
19616
+ received_at?: Date;
18870
19617
  /**
18871
- * Number of digits required for the PIN
19618
+ * A message scheduled to be sent later
18872
19619
  */
18873
- required_pin_digits?: number;
19620
+ scheduled_message?: ScheduledMessageResponse;
18874
19621
  }
18875
19622
 
18876
- export interface SIPPinProtectionConfigsResponse {
19623
+ export interface ScheduledMessageLocation {
18877
19624
  /**
18878
- * Whether PIN protection is enabled
19625
+ * The ID of the device that created the location.
18879
19626
  */
18880
- enabled: boolean;
19627
+ created_by_device_id: string;
18881
19628
  /**
18882
- * Default PIN to use if there is no PIN set on the call object
19629
+ * The date when the location sharing ends.
19630
+ * If it's empty, it means the location sharing is static instead of live.
18883
19631
  */
18884
- default_pin?: string;
19632
+ end_at?: Date;
18885
19633
  /**
18886
- * Maximum number of PIN attempts allowed
19634
+ * The latitude of the location.
18887
19635
  */
18888
- max_attempts?: number;
19636
+ latitude?: number;
18889
19637
  /**
18890
- * Number of digits required for the PIN
19638
+ * The longitude of the location.
18891
19639
  */
18892
- required_pin_digits?: number;
19640
+ longitude?: number;
18893
19641
  }
18894
19642
 
18895
- export interface SIPTrunkResponse {
19643
+ export interface ScheduledMessageResponse {
18896
19644
  /**
18897
- * Creation timestamp
19645
+ * The CID of the channel the message will be sent to
19646
+ */
19647
+ cid: string;
19648
+ /**
19649
+ * Date/time of creation
18898
19650
  */
18899
19651
  created_at: Date;
18900
19652
  /**
18901
- * Unique identifier for the SIP trunk
19653
+ * Unique identifier of the scheduled message
18902
19654
  */
18903
19655
  id: string;
18904
19656
  /**
18905
- * Name of the SIP trunk
19657
+ * Date/time the message is scheduled to be sent
18906
19658
  */
18907
- name: string;
19659
+ scheduled_at: Date;
18908
19660
  /**
18909
- * Password for SIP trunk authentication
19661
+ * 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
19662
  */
18911
- password: string;
19663
+ status: string;
18912
19664
  /**
18913
- * Last update timestamp
19665
+ * Date/time of the last update
18914
19666
  */
18915
19667
  updated_at: Date;
18916
19668
  /**
18917
- * The URI for the SIP trunk
19669
+ * The message a scheduled message will send
18918
19670
  */
18919
- uri: string;
19671
+ message: ScheduledMessageContentResponse;
18920
19672
  /**
18921
- * Username for SIP trunk authentication
19673
+ * User response object
18922
19674
  */
18923
- username: string;
19675
+ user: UserResponse;
18924
19676
  /**
18925
- * Allowed IPv4/IPv6 addresses or CIDR blocks
19677
+ * 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
19678
  */
18927
- allowed_ips: Array<string>;
19679
+ failure_reason?: string;
18928
19680
  /**
18929
- * Phone numbers associated with this SIP trunk
19681
+ * The channel of a scheduled message
18930
19682
  */
18931
- numbers: Array<string>;
19683
+ channel?: ScheduledMessageChannelResponse;
18932
19684
  }
18933
19685
 
18934
- export interface SRTIngress {
18935
- address: string;
19686
+ export interface ScheduledMessageSentEvent {
19687
+ /**
19688
+ * Date/time of creation
19689
+ */
19690
+ created_at: Date;
19691
+ /**
19692
+ * The ID of the message that was sent
19693
+ */
19694
+ message_id: string;
19695
+ custom: Record<string, any>;
19696
+ user: UserResponseCommonFields;
19697
+ /**
19698
+ * The type of event: "scheduled_message.sent" in this case
19699
+ */
19700
+ type: string;
19701
+ /**
19702
+ * The CID of the channel the message was sent to
19703
+ */
19704
+ cid?: string;
19705
+ received_at?: Date;
19706
+ /**
19707
+ * A message scheduled to be sent later
19708
+ */
19709
+ scheduled_message?: ScheduledMessageResponse;
19710
+ }
19711
+
19712
+ export interface ScheduledMessagesFilter {
19713
+ /**
19714
+ * Only scheduled messages of this channel
19715
+ */
19716
+ cid?: string;
19717
+ /**
19718
+ * Only these statuses, as reported in each scheduled message's status. One or more of: scheduled, sending, failed
19719
+ */
19720
+ status?: Array<string>;
18936
19721
  }
18937
19722
 
18938
19723
  export interface ScoreBands {
@@ -19218,6 +20003,10 @@ export interface SendMessageRequest {
19218
20003
  include_mentioned_members?: boolean;
19219
20004
  keep_channel_hidden?: boolean;
19220
20005
  pending?: boolean;
20006
+ /**
20007
+ * 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
20008
+ */
20009
+ scheduled_at?: Date;
19221
20010
  skip_enrich_url?: boolean;
19222
20011
  skip_push?: boolean;
19223
20012
  pending_message_metadata?: Record<string, string>;
@@ -19244,6 +20033,10 @@ export interface SendMessageResponse {
19244
20033
  * Pending message metadata
19245
20034
  */
19246
20035
  pending_message_metadata?: Record<string, string>;
20036
+ /**
20037
+ * A message scheduled to be sent later
20038
+ */
20039
+ scheduled_message?: ScheduledMessageResponse;
19247
20040
  }
19248
20041
 
19249
20042
  export interface SendReactionRequest {
@@ -19273,6 +20066,17 @@ export interface SendReactionResponse {
19273
20066
  reaction: ReactionResponse;
19274
20067
  }
19275
20068
 
20069
+ export interface SendScheduledMessageNowResponse {
20070
+ /**
20071
+ * Duration of the request in milliseconds
20072
+ */
20073
+ duration: string;
20074
+ /**
20075
+ * A message scheduled to be sent later
20076
+ */
20077
+ scheduled_message: ScheduledMessageResponse;
20078
+ }
20079
+
19276
20080
  export interface SendUserCustomEventRequest {
19277
20081
  event: UserCustomEventRequest;
19278
20082
  }
@@ -19648,8 +20452,6 @@ export interface StartFrameRecordingResponse {
19648
20452
  duration: string;
19649
20453
  }
19650
20454
 
19651
- export interface StartHLSBroadcastingRequest {}
19652
-
19653
20455
  export interface StartHLSBroadcastingResponse {
19654
20456
  duration: string;
19655
20457
  /**
@@ -19658,8 +20460,6 @@ export interface StartHLSBroadcastingResponse {
19658
20460
  playlist_url: string;
19659
20461
  }
19660
20462
 
19661
- export interface StartPolicyTestRunRequest {}
19662
-
19663
20463
  export interface StartRTMPBroadcastsRequest {
19664
20464
  /**
19665
20465
  * List of broadcasts to start
@@ -19744,8 +20544,6 @@ export interface StartTranscriptionResponse {
19744
20544
  duration: string;
19745
20545
  }
19746
20546
 
19747
- export interface StopAllRTMPBroadcastsRequest {}
19748
-
19749
20547
  export interface StopAllRTMPBroadcastsResponse {
19750
20548
  /**
19751
20549
  * Duration of the request in milliseconds
@@ -19753,7 +20551,13 @@ export interface StopAllRTMPBroadcastsResponse {
19753
20551
  duration: string;
19754
20552
  }
19755
20553
 
19756
- export interface StopCampaignRequest {}
20554
+ export interface StopCampaignResponse {
20555
+ /**
20556
+ * Duration of the request in milliseconds
20557
+ */
20558
+ duration: string;
20559
+ campaign?: CampaignResponse;
20560
+ }
19757
20561
 
19758
20562
  export interface StopClosedCaptionsRequest {
19759
20563
  stop_transcription?: boolean;
@@ -19766,8 +20570,6 @@ export interface StopClosedCaptionsResponse {
19766
20570
  duration: string;
19767
20571
  }
19768
20572
 
19769
- export interface StopFrameRecordingRequest {}
19770
-
19771
20573
  export interface StopFrameRecordingResponse {
19772
20574
  /**
19773
20575
  * Duration of the request in milliseconds
@@ -19775,8 +20577,6 @@ export interface StopFrameRecordingResponse {
19775
20577
  duration: string;
19776
20578
  }
19777
20579
 
19778
- export interface StopHLSBroadcastingRequest {}
19779
-
19780
20580
  export interface StopHLSBroadcastingResponse {
19781
20581
  /**
19782
20582
  * Duration of the request in milliseconds
@@ -19872,7 +20672,7 @@ export interface StoriesFeedUpdatedEvent {
19872
20672
 
19873
20673
  export interface SubmitActionRequest {
19874
20674
  /**
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
20675
+ * 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
20676
  */
19877
20677
  action_type:
19878
20678
  | 'flag'
@@ -19881,6 +20681,9 @@ export interface SubmitActionRequest {
19881
20681
  | 'delete_activity'
19882
20682
  | 'delete_comment'
19883
20683
  | 'delete_reaction'
20684
+ | 'delete_poll'
20685
+ | 'delete_poll_option'
20686
+ | 'delete_poll_answer'
19884
20687
  | 'ban'
19885
20688
  | 'custom'
19886
20689
  | 'unban'
@@ -19931,6 +20734,18 @@ export interface SubmitActionRequest {
19931
20734
  * Configuration for message deletion action
19932
20735
  */
19933
20736
  delete_message?: DeleteMessageRequestPayload;
20737
+ /**
20738
+ * Configuration for poll deletion action. Poll deletion is always permanent.
20739
+ */
20740
+ delete_poll?: DeletePollRequestPayload;
20741
+ /**
20742
+ * 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.
20743
+ */
20744
+ delete_poll_answer?: DeletePollAnswerRequestPayload;
20745
+ /**
20746
+ * Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.
20747
+ */
20748
+ delete_poll_option?: DeletePollOptionRequestPayload;
19934
20749
  /**
19935
20750
  * Configuration for reaction deletion action
19936
20751
  */
@@ -20408,8 +21223,6 @@ export interface ThumbnailsSettingsResponse {
20408
21223
  enabled: boolean;
20409
21224
  }
20410
21225
 
20411
- export interface Time {}
20412
-
20413
21226
  export interface TimeWindow {
20414
21227
  from: string;
20415
21228
  to: string;
@@ -20912,6 +21725,10 @@ export interface UnfollowBatchRequest {
20912
21725
  * List of follow relationships to remove, each with optional keep_history
20913
21726
  */
20914
21727
  follows: Array<UnfollowPair>;
21728
+ /**
21729
+ * 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.
21730
+ */
21731
+ async?: boolean;
20915
21732
  /**
20916
21733
  * Whether to delete the corresponding notification activity (default: false)
20917
21734
  */
@@ -20928,6 +21745,10 @@ export interface UnfollowBatchResponse {
20928
21745
  * List of follow relationships that were removed
20929
21746
  */
20930
21747
  follows: Array<FollowResponse>;
21748
+ /**
21749
+ * ID of the background task when the request was sent with async: true
21750
+ */
21751
+ task_id?: string;
20931
21752
  }
20932
21753
 
20933
21754
  export interface UnfollowPair {
@@ -21313,7 +22134,10 @@ export interface UpdateAppRequest {
21313
22134
  reminders_interval?: number;
21314
22135
  reminders_max_members?: number;
21315
22136
  reminders_max_per_user?: number;
21316
- revoke_tokens_issued_before?: Date;
22137
+ /**
22138
+ * Revokes tokens issued before this date
22139
+ */
22140
+ revoke_tokens_issued_before?: Date | null;
21317
22141
  sns_key?: string;
21318
22142
  sns_secret?: string;
21319
22143
  sns_topic_arn?: string;
@@ -21342,7 +22166,7 @@ export interface UpdateAppRequest {
21342
22166
  datadog_info?: DataDogInfo;
21343
22167
  file_upload_config?: FileUploadConfig;
21344
22168
  firebase_config?: FirebaseConfig;
21345
- grants?: Record<string, Array<string>>;
22169
+ grants?: Record<string, Array<string>> | null;
21346
22170
  huawei_config?: HuaweiConfig;
21347
22171
  image_upload_config?: FileUploadConfig;
21348
22172
  moderation_dashboard_preferences?: ModerationDashboardPreferences;
@@ -21516,6 +22340,15 @@ export interface UpdateCampaignRequest {
21516
22340
  channel_template?: CampaignChannelTemplate;
21517
22341
  }
21518
22342
 
22343
+ export interface UpdateCampaignResponse {
22344
+ /**
22345
+ * Duration of the request in milliseconds
22346
+ */
22347
+ duration: string;
22348
+ campaign?: CampaignResponse;
22349
+ users?: PagerResponse;
22350
+ }
22351
+
21519
22352
  export interface UpdateChannelPartialRequest {
21520
22353
  user_id?: string;
21521
22354
  unset?: Array<string>;
@@ -21630,9 +22463,8 @@ export interface UpdateChannelResponse {
21630
22463
  }
21631
22464
 
21632
22465
  export interface UpdateChannelTypeRequest {
21633
- automod: 'disabled' | 'simple' | 'AI';
21634
- automod_behavior: 'flag' | 'block' | 'shadow_block';
21635
- max_message_length: number;
22466
+ automod?: 'disabled' | 'simple' | 'AI';
22467
+ automod_behavior?: 'flag' | 'block' | 'shadow_block';
21636
22468
  blocklist?: string;
21637
22469
  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
21638
22470
  connect_events?: boolean;
@@ -21640,10 +22472,11 @@ export interface UpdateChannelTypeRequest {
21640
22472
  custom_events?: boolean;
21641
22473
  delivery_events?: boolean;
21642
22474
  mark_messages_pending?: boolean;
22475
+ max_message_length?: number;
21643
22476
  message_retention?: string;
21644
22477
  mutes?: boolean;
21645
22478
  partition_size?: number;
21646
- partition_ttl?: string;
22479
+ partition_ttl?: string | null;
21647
22480
  polls?: boolean;
21648
22481
  /**
21649
22482
  * Sets the push notification level for a channel type
@@ -21674,7 +22507,7 @@ export interface UpdateChannelTypeRequest {
21674
22507
  */
21675
22508
  automod_thresholds?: Thresholds;
21676
22509
  chat_preferences?: ChatPreferences;
21677
- grants?: Record<string, Array<string>>;
22510
+ grants?: Record<string, Array<string>> | null;
21678
22511
  }
21679
22512
 
21680
22513
  export interface UpdateChannelTypeResponse {
@@ -22247,6 +23080,14 @@ export interface UpdatePollOptionRequest {
22247
23080
  * Option text
22248
23081
  */
22249
23082
  text: string;
23083
+ /**
23084
+ * Key of the moderation configuration to use. Server-side only.
23085
+ */
23086
+ config_key?: string;
23087
+ /**
23088
+ * Team associated with the configuration. Server-side only.
23089
+ */
23090
+ config_team?: string;
22250
23091
  user_id?: string;
22251
23092
  /**
22252
23093
  * Custom data for this object
@@ -22259,6 +23100,14 @@ export interface UpdatePollOptionRequest {
22259
23100
  }
22260
23101
 
22261
23102
  export interface UpdatePollPartialRequest {
23103
+ /**
23104
+ * Key of the moderation configuration to use. Server-side only.
23105
+ */
23106
+ config_key?: string;
23107
+ /**
23108
+ * Team associated with the configuration. Server-side only.
23109
+ */
23110
+ config_team?: string;
22262
23111
  user_id?: string;
22263
23112
  /**
22264
23113
  * Array of field names to unset
@@ -22291,6 +23140,14 @@ export interface UpdatePollRequest {
22291
23140
  * Allow user suggested options
22292
23141
  */
22293
23142
  allow_user_suggested_options?: boolean;
23143
+ /**
23144
+ * Key of the moderation configuration to use. Server-side only.
23145
+ */
23146
+ config_key?: string;
23147
+ /**
23148
+ * Team associated with the configuration. Server-side only.
23149
+ */
23150
+ config_team?: string;
22294
23151
  /**
22295
23152
  * Poll description
22296
23153
  */
@@ -22454,6 +23311,28 @@ export interface UpdateSIPTrunkResponse {
22454
23311
  sip_trunk?: SIPTrunkResponse;
22455
23312
  }
22456
23313
 
23314
+ export interface UpdateScheduledMessageRequest {
23315
+ /**
23316
+ * New send time (UTC). Must be at least 1 minute and at most the app's maximum lead time from now
23317
+ */
23318
+ scheduled_at?: Date;
23319
+ /**
23320
+ * Message data for creating or updating a message
23321
+ */
23322
+ message?: MessageRequest;
23323
+ }
23324
+
23325
+ export interface UpdateScheduledMessageResponse {
23326
+ /**
23327
+ * Duration of the request in milliseconds
23328
+ */
23329
+ duration: string;
23330
+ /**
23331
+ * A message scheduled to be sent later
23332
+ */
23333
+ scheduled_message: ScheduledMessageResponse;
23334
+ }
23335
+
22457
23336
  export interface UpdateSegmentRequest {
22458
23337
  /**
22459
23338
  * The description of the segment (max 256 characters)
@@ -22710,6 +23589,10 @@ export interface UpsertActivitiesRequest {
22710
23589
  * 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
23590
  */
22712
23591
  force_moderation?: boolean;
23592
+ /**
23593
+ * 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.
23594
+ */
23595
+ skip_existing?: boolean;
22713
23596
  }
22714
23597
 
22715
23598
  export interface UpsertActivitiesResponse {
@@ -22722,6 +23605,10 @@ export interface UpsertActivitiesResponse {
22722
23605
  * Total number of mention notification activities created for mentioned users across all activities
22723
23606
  */
22724
23607
  mention_notifications_created?: number;
23608
+ /**
23609
+ * IDs of activities left unchanged because they already existed. Only set when skip_existing is true.
23610
+ */
23611
+ skipped_existing?: Array<string>;
22725
23612
  }
22726
23613
 
22727
23614
  export interface UpsertCollectionsRequest {
@@ -23074,6 +23961,12 @@ export interface UserBannedEvent {
23074
23961
  created_by?: UserResponseCommonFields;
23075
23962
  }
23076
23963
 
23964
+ export interface UserChannelBanCountRuleParameters {
23965
+ banned_by?: string;
23966
+ threshold?: number;
23967
+ time_window?: string;
23968
+ }
23969
+
23077
23970
  export interface UserChannelCountRuleParameters {
23078
23971
  threshold?: number;
23079
23972
  time_window?: string;
@@ -23735,10 +24628,6 @@ export interface VideoContentParameters {
23735
24628
  harm_labels?: Array<string>;
23736
24629
  }
23737
24630
 
23738
- export interface VideoEndCallRequestPayload {}
23739
-
23740
- export interface VideoKickUserRequestPayload {}
23741
-
23742
24631
  export interface VideoReactionOverTimeResponse {
23743
24632
  by_minute?: Array<CountByMinuteResponse>;
23744
24633
  }
@@ -23971,7 +24860,6 @@ export type WHEvent =
23971
24860
  | ({
23972
24861
  type: 'moderation.image_analysis.complete';
23973
24862
  } & ModerationImageAnalysisCompleteEvent)
23974
- | ({ type: 'moderation.intent_detected' } & IntentDetectedEvent)
23975
24863
  | ({ type: 'moderation.mark_reviewed' } & ModerationMarkReviewedEvent)
23976
24864
  | ({
23977
24865
  type: 'moderation.text_analysis.complete';
@@ -23983,6 +24871,12 @@ export type WHEvent =
23983
24871
  | ({
23984
24872
  type: 'notification.thread_message_new';
23985
24873
  } & NotificationThreadMessageNewEvent)
24874
+ | ({ type: 'poll.closed' } & PollClosedEvent)
24875
+ | ({ type: 'poll.deleted' } & PollDeletedEvent)
24876
+ | ({ type: 'poll.updated' } & PollUpdatedEvent)
24877
+ | ({ type: 'poll.vote_casted' } & PollVoteCastedEvent)
24878
+ | ({ type: 'poll.vote_changed' } & PollVoteChangedEvent)
24879
+ | ({ type: 'poll.vote_removed' } & PollVoteRemovedEvent)
23986
24880
  | ({ type: 'reaction.deleted' } & ReactionDeletedEvent)
23987
24881
  | ({ type: 'reaction.new' } & ReactionNewEvent)
23988
24882
  | ({ type: 'reaction.updated' } & ReactionUpdatedEvent)
@@ -23991,6 +24885,8 @@ export type WHEvent =
23991
24885
  | ({ type: 'reminder.updated' } & ReminderUpdatedEvent)
23992
24886
  | ({ type: 'review_queue_item.new' } & ReviewQueueItemNewEvent)
23993
24887
  | ({ type: 'review_queue_item.updated' } & ReviewQueueItemUpdatedEvent)
24888
+ | ({ type: 'scheduled_message.failed' } & ScheduledMessageFailedEvent)
24889
+ | ({ type: 'scheduled_message.sent' } & ScheduledMessageSentEvent)
23994
24890
  | ({ type: 'thread.updated' } & ThreadUpdatedEvent)
23995
24891
  | ({ type: 'user.banned' } & UserBannedEvent)
23996
24892
  | ({ type: 'user.deactivated' } & UserDeactivatedEvent)