@stream-io/node-sdk 0.8.12 → 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
@@ -10887,6 +11103,7 @@ export interface GetOrCreateFeedRequest {
10887
11103
  * User request object
10888
11104
  */
10889
11105
  user?: UserRequest;
11106
+ viewer_location?: Location;
10890
11107
  }
10891
11108
 
10892
11109
  export interface GetOrCreateFeedResponse {
@@ -10912,6 +11129,7 @@ export interface GetOrCreateFeedResponse {
10912
11129
  following_pagination?: PagerResponse;
10913
11130
  member_pagination?: PagerResponse;
10914
11131
  notification_status?: NotificationStatusResponse;
11132
+ ranking_config?: RankingConfig;
10915
11133
  }
10916
11134
 
10917
11135
  export interface GetOrCreateFeedViewRequest {
@@ -11180,15 +11398,28 @@ export interface GroupedChannelsBucket {
11180
11398
  */
11181
11399
  prev?: string;
11182
11400
  /**
11183
- * Unread channels currently classified into this bucket
11401
+ * Total unread channels matching this bucket and its filters, independent of page size
11184
11402
  */
11185
11403
  unread_channels?: number;
11186
11404
  }
11187
11405
 
11188
11406
  export interface GroupedChannelsGroupRequest {
11407
+ /**
11408
+ * Max channels for this group; omitted or zero uses the request limit
11409
+ */
11189
11410
  limit?: number;
11411
+ /**
11412
+ * Cursor for the next page; only allowed when requesting one group
11413
+ */
11190
11414
  next?: string;
11415
+ /**
11416
+ * Cursor for the previous page; only allowed when requesting one group
11417
+ */
11191
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>;
11192
11423
  }
11193
11424
 
11194
11425
  export interface GroupedQueryChannelsRequest {
@@ -11198,7 +11429,11 @@ export interface GroupedQueryChannelsRequest {
11198
11429
  limit?: number;
11199
11430
  user_id?: string;
11200
11431
  /**
11201
- * 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.
11202
11437
  */
11203
11438
  groups?: Record<string, GroupedChannelsGroupRequest>;
11204
11439
  /**
@@ -11213,7 +11448,7 @@ export interface GroupedQueryChannelsResponse {
11213
11448
  */
11214
11449
  duration: string;
11215
11450
  /**
11216
- * Predefined channel groups keyed by group name
11451
+ * Groups keyed by the requested stored group name
11217
11452
  */
11218
11453
  groups: Record<string, GroupedChannelsBucket>;
11219
11454
  }
@@ -11671,23 +11906,23 @@ export interface InsertActionLogResponse {
11671
11906
  duration: string;
11672
11907
  }
11673
11908
 
11674
- export interface IntentBufferedItem {
11909
+ export interface IntentConditionInfo {
11675
11910
  /**
11676
- * The ID of the user who authored the buffered message or comment
11911
+ * Whether the score reached the threshold.
11677
11912
  */
11678
- author_user_id: string;
11913
+ passed: boolean;
11679
11914
  /**
11680
- * 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.
11681
11916
  */
11682
- created_at: Date;
11917
+ score: number;
11683
11918
  /**
11684
- * The ID of the buffered message or comment
11919
+ * Minimum score (1-100) the condition requires.
11685
11920
  */
11686
- id: string;
11921
+ threshold: number;
11687
11922
  /**
11688
- * The text of the buffered message or comment
11923
+ * Policy intent topic label the condition references.
11689
11924
  */
11690
- text: string;
11925
+ topic: string;
11691
11926
  }
11692
11927
 
11693
11928
  export interface IntentConfigRequest {
@@ -11704,39 +11939,37 @@ export interface IntentConfigResponse {
11704
11939
  topics: Array<IntentTopicResponse>;
11705
11940
  }
11706
11941
 
11707
- export interface IntentDetectedEvent {
11942
+ export interface IntentEvaluationInfo {
11708
11943
  /**
11709
- * 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.
11710
11945
  */
11711
11946
  conversation_id: string;
11712
- created_at: Date;
11713
11947
  /**
11714
- * The ID of the most recently buffered entity
11948
+ * Number of conversation messages sent to the model.
11715
11949
  */
11716
- entity_id: string;
11950
+ message_count: number;
11717
11951
  /**
11718
- * 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.
11719
11953
  */
11720
- entity_type: string;
11954
+ conditions: Array<IntentConditionInfo>;
11721
11955
  /**
11722
- * 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.
11723
11957
  */
11724
- matched_topic: string;
11958
+ raw_scores: Record<string, number>;
11725
11959
  /**
11726
- * 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.
11727
11961
  */
11962
+ scores: Record<string, number>;
11963
+ }
11964
+
11965
+ export interface IntentRuleParameters {
11966
+ topic: string;
11967
+ threshold?: number;
11968
+ }
11969
+
11970
+ export interface IntentScoreResponse {
11728
11971
  score: number;
11729
- /**
11730
- * The ID of the user whose conversation was scored
11731
- */
11732
- user_id: string;
11733
- /**
11734
- * The buffered items that were scored, in the order they were captured
11735
- */
11736
- items: Array<IntentBufferedItem>;
11737
- custom: Record<string, any>;
11738
- type: string;
11739
- received_at?: Date;
11972
+ topic: string;
11740
11973
  }
11741
11974
 
11742
11975
  export interface IntentTopicRequest {
@@ -11744,61 +11977,21 @@ export interface IntentTopicRequest {
11744
11977
  * Unique topic label (e.g. purchase_intent)
11745
11978
  */
11746
11979
  label: string;
11747
- /**
11748
- * How long the buffer collects items before scoring runs
11749
- */
11750
- analysis_cooldown_seconds?: number;
11751
11980
  /**
11752
11981
  * Optional description used in the classification prompt; the label alone is used when empty
11753
11982
  */
11754
11983
  description?: string;
11755
- /**
11756
- * Whether this topic is evaluated
11757
- */
11758
- enabled?: boolean;
11759
- /**
11760
- * Items buffered per conversation before scoring runs early
11761
- */
11762
- max_captured_items?: number;
11763
- /**
11764
- * Suppresses this topic for a user and conversation after it fires; 0 uses the default
11765
- */
11766
- refire_cooldown_seconds?: number;
11767
- /**
11768
- * Conversation score (0-100) required to fire moderation.intent_detected
11769
- */
11770
- score_threshold?: number;
11771
11984
  }
11772
11985
 
11773
11986
  export interface IntentTopicResponse {
11774
- /**
11775
- * How long the buffer collects items before scoring runs
11776
- */
11777
- analysis_cooldown_seconds: number;
11778
- /**
11779
- * Whether this topic is evaluated
11780
- */
11781
- enabled: boolean;
11782
11987
  /**
11783
11988
  * Unique topic label (e.g. purchase_intent)
11784
11989
  */
11785
11990
  label: string;
11786
- /**
11787
- * Items buffered per conversation before scoring runs early
11788
- */
11789
- max_captured_items: number;
11790
- /**
11791
- * Conversation score (0-100) required to fire moderation.intent_detected
11792
- */
11793
- score_threshold: number;
11794
11991
  /**
11795
11992
  * Optional description used in the classification prompt; the label alone is used when empty
11796
11993
  */
11797
11994
  description?: string;
11798
- /**
11799
- * Suppresses this topic for a user and conversation after it fires; 0 uses the default
11800
- */
11801
- refire_cooldown_seconds?: number;
11802
11995
  }
11803
11996
 
11804
11997
  export interface InterestTagResponse {
@@ -11893,7 +12086,9 @@ export interface KickedUserEvent {
11893
12086
  export interface LLMConfig {
11894
12087
  app_context?: string;
11895
12088
  async?: boolean;
12089
+ custom_keys_context_description?: string;
11896
12090
  enabled?: boolean;
12091
+ context_custom_keys?: Array<string>;
11897
12092
  rules?: Array<LLMRule>;
11898
12093
  severity_descriptions?: Record<string, string>;
11899
12094
  }
@@ -12085,6 +12280,20 @@ export interface LayoutSettingsResponse {
12085
12280
  options?: Record<string, any>;
12086
12281
  }
12087
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
+
12088
12297
  export interface LimitInfoResponse {
12089
12298
  /**
12090
12299
  * The maximum number of API calls allowed per time window
@@ -13120,7 +13329,7 @@ export interface MessageRequest {
13120
13329
  /**
13121
13330
  * Date when pinned message expires
13122
13331
  */
13123
- pin_expires?: Date;
13332
+ pin_expires?: Date | null;
13124
13333
  /**
13125
13334
  * Whether message is pinned or not
13126
13335
  */
@@ -13128,7 +13337,7 @@ export interface MessageRequest {
13128
13337
  /**
13129
13338
  * Date when message got pinned
13130
13339
  */
13131
- pinned_at?: Date;
13340
+ pinned_at?: Date | null;
13132
13341
  /**
13133
13342
  * Identifier of the poll to include in the message
13134
13343
  */
@@ -14108,6 +14317,7 @@ export interface ModerationRulesTriggeredEvent {
14108
14317
  * Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
14109
14318
  */
14110
14319
  matched_contents?: Array<MatchedContent>;
14320
+ intent?: IntentEvaluationInfo;
14111
14321
  }
14112
14322
 
14113
14323
  export interface ModerationTextAnalysisCompleteEvent {
@@ -14243,9 +14453,25 @@ export interface NoiseCancellationSettings {
14243
14453
  }
14244
14454
 
14245
14455
  export interface NotificationComment {
14456
+ /**
14457
+ * The text of the comment
14458
+ */
14246
14459
  comment: string;
14460
+ /**
14461
+ * The ID of the comment
14462
+ */
14247
14463
  id: string;
14464
+ /**
14465
+ * The ID of the user who wrote the comment
14466
+ */
14248
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
+ */
14249
14475
  attachments?: Array<Attachment>;
14250
14476
  }
14251
14477
 
@@ -14644,6 +14870,7 @@ export interface OwnUserResponse {
14644
14870
  unread_count: number;
14645
14871
  unread_threads: number;
14646
14872
  updated_at: Date;
14873
+ blocked_user_ids: Array<string>;
14647
14874
  channel_mutes: Array<ChannelMute>;
14648
14875
  devices: Array<DeviceResponse>;
14649
14876
  mutes: Array<UserMuteResponse>;
@@ -14656,7 +14883,6 @@ export interface OwnUserResponse {
14656
14883
  last_active?: Date;
14657
14884
  name?: string;
14658
14885
  revoke_tokens_issued_before?: Date;
14659
- blocked_user_ids?: Array<string>;
14660
14886
  latest_hidden_channels?: Array<string>;
14661
14887
  /**
14662
14888
  * The privacy settings of the user.
@@ -14670,10 +14896,17 @@ export interface OwnUserResponse {
14670
14896
  total_unread_count_by_team?: Record<string, number>;
14671
14897
  }
14672
14898
 
14673
- export interface PagerRequest {
14674
- limit?: number;
14675
- next?: string;
14676
- 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;
14677
14910
  }
14678
14911
 
14679
14912
  export interface PagerResponse {
@@ -15150,6 +15383,52 @@ export interface PolicyTestTotals {
15150
15383
  unscored: number;
15151
15384
  }
15152
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
+
15153
15432
  export interface PollOptionInput {
15154
15433
  text?: string;
15155
15434
  custom?: Record<string, any>;
@@ -15216,6 +15495,101 @@ export interface PollResponseData {
15216
15495
  name_i18n?: Record<string, string>;
15217
15496
  }
15218
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
+
15219
15593
  export interface PollVoteResponse {
15220
15594
  /**
15221
15595
  * Duration of the request in milliseconds
@@ -15427,12 +15801,20 @@ export interface PushPreferenceInput {
15427
15801
  * Remove the disabled until time. (IE stop snoozing notifications)
15428
15802
  */
15429
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;
15430
15808
  /**
15431
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.
15432
15810
  */
15433
15811
  user_id?: string;
15434
15812
  chat_preferences?: ChatPreferencesInput;
15435
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;
15436
15818
  }
15437
15819
 
15438
15820
  export interface PushPreferencesResponse {
@@ -15448,6 +15830,10 @@ export interface PushPreferencesResponse {
15448
15830
  feeds_level?: string;
15449
15831
  chat_preferences?: ChatPreferencesResponse;
15450
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;
15451
15837
  }
15452
15838
 
15453
15839
  export interface PushProvider {
@@ -15539,6 +15925,28 @@ export interface PushProviderResponse {
15539
15925
  xiaomi_package_name?: string;
15540
15926
  }
15541
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
+
15542
15950
  export interface PushTemplate {
15543
15951
  created_at: Date;
15544
15952
  enable_push: boolean;
@@ -16093,7 +16501,71 @@ export interface QueryCampaignsResponse {
16093
16501
  prev?: string;
16094
16502
  }
16095
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
+
16096
16564
  export interface QueryChannelsRequest {
16565
+ /**
16566
+ * Whether to include active_member_count for each channel
16567
+ */
16568
+ include_active_member_count?: boolean;
16097
16569
  /**
16098
16570
  * Number of channels to limit
16099
16571
  */
@@ -16395,12 +16867,19 @@ export interface QueryFeedsUsageStatsResponse {
16395
16867
  duration: string;
16396
16868
  activities: DailyMetricStatsResponse;
16397
16869
  api_requests: DailyMetricStatsResponse;
16870
+ collections: DailyMetricStatsResponse;
16871
+ comments: DailyMetricStatsResponse;
16398
16872
  follows: DailyMetricStatsResponse;
16399
16873
  openai_requests: DailyMetricStatsResponse;
16874
+ reactions: DailyMetricStatsResponse;
16400
16875
  emau?: EMAUStatsResponse;
16401
16876
  }
16402
16877
 
16403
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;
16404
16883
  limit?: number;
16405
16884
  next?: string;
16406
16885
  prev?: string;
@@ -16428,6 +16907,10 @@ export interface QueryFollowsResponse {
16428
16907
  * Cursor for previous page
16429
16908
  */
16430
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>;
16431
16914
  }
16432
16915
 
16433
16916
  export interface QueryFutureChannelBansPayload {
@@ -17008,6 +17491,45 @@ export interface QueryRevisionHistoryResponse {
17008
17491
  prev?: string;
17009
17492
  }
17010
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
+
17011
17533
  export interface QuerySegmentTargetsRequest {
17012
17534
  /**
17013
17535
  * Limit
@@ -17215,6 +17737,36 @@ export interface QueueResponse {
17215
17737
  queue?: ModerationQueueResponse;
17216
17738
  }
17217
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
+
17218
17770
  export interface RTMPBroadcastRequest {
17219
17771
  /**
17220
17772
  * Name identifier for RTMP broadcast, must be unique in call
@@ -18088,8 +18640,6 @@ export interface RestoreCommentResponse {
18088
18640
  comment: CommentResponse;
18089
18641
  }
18090
18642
 
18091
- export interface RestoreFeedGroupRequest {}
18092
-
18093
18643
  export interface RestoreFeedGroupResponse {
18094
18644
  duration: string;
18095
18645
  feed_group: FeedGroupResponse;
@@ -18237,6 +18787,7 @@ export interface ReviewQueueItemResponse {
18237
18787
  * Content payload for moderation
18238
18788
  */
18239
18789
  moderation_payload?: ModerationPayloadResponse;
18790
+ poll?: PollResponseData;
18240
18791
  reaction?: Reaction;
18241
18792
  }
18242
18793
 
@@ -18503,6 +19054,10 @@ export interface RuleBuilderCondition {
18503
19054
  flood_similar_params?: FloodSimilarRuleParameters;
18504
19055
  image_content_params?: ImageContentParameters;
18505
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;
18506
19061
  ip_content_count_rule_params?: IPContentCountRuleParameters;
18507
19062
  ip_flag_count_rule_params?: IPFlagCountRuleParameters;
18508
19063
  keyframe_ocr_rule_params?: KeyframeOCRRuleParameters;
@@ -18510,6 +19065,7 @@ export interface RuleBuilderCondition {
18510
19065
  ocr_content_params?: OCRContentParameters;
18511
19066
  text_content_params?: TextContentParameters;
18512
19067
  text_rule_params?: TextRuleParameters;
19068
+ user_channel_ban_count_params?: UserChannelBanCountRuleParameters;
18513
19069
  user_channel_count_params?: UserChannelCountRuleParameters;
18514
19070
  user_created_within_params?: UserCreatedWithinParameters;
18515
19071
  user_custom_property_params?: UserCustomPropertyParameters;
@@ -18774,164 +19330,386 @@ export interface SIPInboundRoutingRuleRequest {
18774
19330
  /**
18775
19331
  * Configuration for SIP caller settings
18776
19332
  */
18777
- 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 {
18778
19517
  /**
18779
- * List of called numbers
19518
+ * Text of the message
18780
19519
  */
18781
- called_numbers?: Array<string>;
19520
+ text: string;
19521
+ custom: Record<string, any>;
18782
19522
  /**
18783
- * List of caller numbers (optional)
19523
+ * Contains HTML markup of the message
18784
19524
  */
18785
- caller_numbers?: Array<string>;
19525
+ html?: string;
18786
19526
  /**
18787
- * Configuration for SIP call settings
19527
+ * Whether the message mentions the whole channel
18788
19528
  */
18789
- call_configs?: SIPCallConfigsRequest;
19529
+ mentioned_channel?: boolean;
18790
19530
  /**
18791
- * Configuration for direct routing rule calls
19531
+ * Whether the message mentions the online channel members
18792
19532
  */
18793
- direct_routing_configs?: SIPDirectRoutingRuleCallConfigsRequest;
19533
+ mentioned_here?: boolean;
18794
19534
  /**
18795
- * Configuration for PIN protection settings
19535
+ * MML content of the message
18796
19536
  */
18797
- pin_protection_configs?: SIPPinProtectionConfigsRequest;
19537
+ mml?: string;
18798
19538
  /**
18799
- * Configuration for PIN routing rule calls
19539
+ * ID of parent message (thread)
18800
19540
  */
18801
- pin_routing_configs?: SIPInboundRoutingRulePinConfigsRequest;
18802
- }
18803
-
18804
- export interface SIPInboundRoutingRuleResponse {
19541
+ parent_id?: string;
18805
19542
  /**
18806
- * Creation timestamp
19543
+ * Date/time the pin expires
18807
19544
  */
18808
- created_at: Date;
18809
- duration: string;
19545
+ pin_expires?: Date;
18810
19546
  /**
18811
- * Unique identifier of the SIP Inbound Routing Rule
19547
+ * Whether the message will be pinned when sent
18812
19548
  */
18813
- id: string;
19549
+ pinned?: boolean;
18814
19550
  /**
18815
- * Name of the SIP Inbound Routing Rule
19551
+ * Identifier of the poll to include in the message
18816
19552
  */
18817
- name: string;
19553
+ poll_id?: string;
19554
+ quoted_message_id?: string;
18818
19555
  /**
18819
- * Last update timestamp
19556
+ * Whether thread reply should be shown in the channel as well
18820
19557
  */
18821
- updated_at: Date;
19558
+ show_in_channel?: boolean;
18822
19559
  /**
18823
- * List of called numbers
19560
+ * Whether message is silent or not
18824
19561
  */
18825
- called_numbers: Array<string>;
19562
+ silent?: boolean;
18826
19563
  /**
18827
- * List of SIP trunk IDs
19564
+ * Contains type of the message. One of: regular, system
18828
19565
  */
18829
- trunk_ids: Array<string>;
19566
+ type?: string;
18830
19567
  /**
18831
- * List of caller numbers
19568
+ * Array of message attachments
18832
19569
  */
18833
- caller_numbers?: Array<string>;
19570
+ attachments?: Array<Attachment>;
18834
19571
  /**
18835
- * SIP call configuration response
19572
+ * IDs of the user groups mentioned in the message
18836
19573
  */
18837
- call_configs?: SIPCallConfigsResponse;
19574
+ mentioned_group_ids?: Array<string>;
18838
19575
  /**
18839
- * SIP caller configuration response
19576
+ * Roles mentioned in the message
18840
19577
  */
18841
- caller_configs?: SIPCallerConfigsResponse;
19578
+ mentioned_roles?: Array<string>;
18842
19579
  /**
18843
- * Direct routing rule call configuration response
19580
+ * IDs of the users mentioned in the message
18844
19581
  */
18845
- direct_routing_configs?: SIPDirectRoutingRuleCallConfigsResponse;
19582
+ mentioned_users?: Array<string>;
18846
19583
  /**
18847
- * PIN protection configuration response
19584
+ * IDs of the users the message will be visible to
18848
19585
  */
18849
- pin_protection_configs?: SIPPinProtectionConfigsResponse;
19586
+ restricted_visibility?: Array<string>;
18850
19587
  /**
18851
- * PIN routing rule call configuration response
19588
+ * The location a scheduled message will share
18852
19589
  */
18853
- pin_routing_configs?: SIPInboundRoutingRulePinConfigsResponse;
19590
+ shared_location?: ScheduledMessageLocation;
18854
19591
  }
18855
19592
 
18856
- export interface SIPPinProtectionConfigsRequest {
19593
+ export interface ScheduledMessageFailedEvent {
18857
19594
  /**
18858
- * Default PIN to use if there is no PIN set on the call object
19595
+ * Date/time of creation
18859
19596
  */
18860
- default_pin?: string;
19597
+ created_at: Date;
19598
+ custom: Record<string, any>;
19599
+ user: UserResponseCommonFields;
18861
19600
  /**
18862
- * Whether PIN protection is enabled
19601
+ * The type of event: "scheduled_message.failed" in this case
18863
19602
  */
18864
- enabled?: boolean;
19603
+ type: string;
18865
19604
  /**
18866
- * Maximum number of PIN attempts allowed
19605
+ * The CID of the channel the message is scheduled in
18867
19606
  */
18868
- max_attempts?: number;
19607
+ cid?: string;
19608
+ received_at?: Date;
18869
19609
  /**
18870
- * Number of digits required for the PIN
19610
+ * A message scheduled to be sent later
18871
19611
  */
18872
- required_pin_digits?: number;
19612
+ scheduled_message?: ScheduledMessageResponse;
18873
19613
  }
18874
19614
 
18875
- export interface SIPPinProtectionConfigsResponse {
19615
+ export interface ScheduledMessageLocation {
18876
19616
  /**
18877
- * Whether PIN protection is enabled
19617
+ * The ID of the device that created the location.
18878
19618
  */
18879
- enabled: boolean;
19619
+ created_by_device_id: string;
18880
19620
  /**
18881
- * 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.
18882
19623
  */
18883
- default_pin?: string;
19624
+ end_at?: Date;
18884
19625
  /**
18885
- * Maximum number of PIN attempts allowed
19626
+ * The latitude of the location.
18886
19627
  */
18887
- max_attempts?: number;
19628
+ latitude?: number;
18888
19629
  /**
18889
- * Number of digits required for the PIN
19630
+ * The longitude of the location.
18890
19631
  */
18891
- required_pin_digits?: number;
19632
+ longitude?: number;
18892
19633
  }
18893
19634
 
18894
- export interface SIPTrunkResponse {
19635
+ export interface ScheduledMessageResponse {
18895
19636
  /**
18896
- * Creation timestamp
19637
+ * The CID of the channel the message will be sent to
19638
+ */
19639
+ cid: string;
19640
+ /**
19641
+ * Date/time of creation
18897
19642
  */
18898
19643
  created_at: Date;
18899
19644
  /**
18900
- * Unique identifier for the SIP trunk
19645
+ * Unique identifier of the scheduled message
18901
19646
  */
18902
19647
  id: string;
18903
19648
  /**
18904
- * Name of the SIP trunk
19649
+ * Date/time the message is scheduled to be sent
18905
19650
  */
18906
- name: string;
19651
+ scheduled_at: Date;
18907
19652
  /**
18908
- * 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
18909
19654
  */
18910
- password: string;
19655
+ status: string;
18911
19656
  /**
18912
- * Last update timestamp
19657
+ * Date/time of the last update
18913
19658
  */
18914
19659
  updated_at: Date;
18915
19660
  /**
18916
- * The URI for the SIP trunk
19661
+ * The message a scheduled message will send
18917
19662
  */
18918
- uri: string;
19663
+ message: ScheduledMessageContentResponse;
18919
19664
  /**
18920
- * Username for SIP trunk authentication
19665
+ * User response object
18921
19666
  */
18922
- username: string;
19667
+ user: UserResponse;
18923
19668
  /**
18924
- * 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
18925
19670
  */
18926
- allowed_ips: Array<string>;
19671
+ failure_reason?: string;
18927
19672
  /**
18928
- * Phone numbers associated with this SIP trunk
19673
+ * The channel of a scheduled message
18929
19674
  */
18930
- numbers: Array<string>;
19675
+ channel?: ScheduledMessageChannelResponse;
18931
19676
  }
18932
19677
 
18933
- export interface SRTIngress {
18934
- 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>;
18935
19713
  }
18936
19714
 
18937
19715
  export interface ScoreBands {
@@ -19217,6 +19995,10 @@ export interface SendMessageRequest {
19217
19995
  include_mentioned_members?: boolean;
19218
19996
  keep_channel_hidden?: boolean;
19219
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;
19220
20002
  skip_enrich_url?: boolean;
19221
20003
  skip_push?: boolean;
19222
20004
  pending_message_metadata?: Record<string, string>;
@@ -19243,6 +20025,10 @@ export interface SendMessageResponse {
19243
20025
  * Pending message metadata
19244
20026
  */
19245
20027
  pending_message_metadata?: Record<string, string>;
20028
+ /**
20029
+ * A message scheduled to be sent later
20030
+ */
20031
+ scheduled_message?: ScheduledMessageResponse;
19246
20032
  }
19247
20033
 
19248
20034
  export interface SendReactionRequest {
@@ -19272,6 +20058,17 @@ export interface SendReactionResponse {
19272
20058
  reaction: ReactionResponse;
19273
20059
  }
19274
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
+
19275
20072
  export interface SendUserCustomEventRequest {
19276
20073
  event: UserCustomEventRequest;
19277
20074
  }
@@ -19647,8 +20444,6 @@ export interface StartFrameRecordingResponse {
19647
20444
  duration: string;
19648
20445
  }
19649
20446
 
19650
- export interface StartHLSBroadcastingRequest {}
19651
-
19652
20447
  export interface StartHLSBroadcastingResponse {
19653
20448
  duration: string;
19654
20449
  /**
@@ -19657,8 +20452,6 @@ export interface StartHLSBroadcastingResponse {
19657
20452
  playlist_url: string;
19658
20453
  }
19659
20454
 
19660
- export interface StartPolicyTestRunRequest {}
19661
-
19662
20455
  export interface StartRTMPBroadcastsRequest {
19663
20456
  /**
19664
20457
  * List of broadcasts to start
@@ -19743,8 +20536,6 @@ export interface StartTranscriptionResponse {
19743
20536
  duration: string;
19744
20537
  }
19745
20538
 
19746
- export interface StopAllRTMPBroadcastsRequest {}
19747
-
19748
20539
  export interface StopAllRTMPBroadcastsResponse {
19749
20540
  /**
19750
20541
  * Duration of the request in milliseconds
@@ -19752,7 +20543,13 @@ export interface StopAllRTMPBroadcastsResponse {
19752
20543
  duration: string;
19753
20544
  }
19754
20545
 
19755
- export interface StopCampaignRequest {}
20546
+ export interface StopCampaignResponse {
20547
+ /**
20548
+ * Duration of the request in milliseconds
20549
+ */
20550
+ duration: string;
20551
+ campaign?: CampaignResponse;
20552
+ }
19756
20553
 
19757
20554
  export interface StopClosedCaptionsRequest {
19758
20555
  stop_transcription?: boolean;
@@ -19765,8 +20562,6 @@ export interface StopClosedCaptionsResponse {
19765
20562
  duration: string;
19766
20563
  }
19767
20564
 
19768
- export interface StopFrameRecordingRequest {}
19769
-
19770
20565
  export interface StopFrameRecordingResponse {
19771
20566
  /**
19772
20567
  * Duration of the request in milliseconds
@@ -19774,8 +20569,6 @@ export interface StopFrameRecordingResponse {
19774
20569
  duration: string;
19775
20570
  }
19776
20571
 
19777
- export interface StopHLSBroadcastingRequest {}
19778
-
19779
20572
  export interface StopHLSBroadcastingResponse {
19780
20573
  /**
19781
20574
  * Duration of the request in milliseconds
@@ -19871,7 +20664,7 @@ export interface StoriesFeedUpdatedEvent {
19871
20664
 
19872
20665
  export interface SubmitActionRequest {
19873
20666
  /**
19874
- * 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
19875
20668
  */
19876
20669
  action_type:
19877
20670
  | 'flag'
@@ -19880,6 +20673,9 @@ export interface SubmitActionRequest {
19880
20673
  | 'delete_activity'
19881
20674
  | 'delete_comment'
19882
20675
  | 'delete_reaction'
20676
+ | 'delete_poll'
20677
+ | 'delete_poll_option'
20678
+ | 'delete_poll_answer'
19883
20679
  | 'ban'
19884
20680
  | 'custom'
19885
20681
  | 'unban'
@@ -19930,6 +20726,18 @@ export interface SubmitActionRequest {
19930
20726
  * Configuration for message deletion action
19931
20727
  */
19932
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;
19933
20741
  /**
19934
20742
  * Configuration for reaction deletion action
19935
20743
  */
@@ -20407,8 +21215,6 @@ export interface ThumbnailsSettingsResponse {
20407
21215
  enabled: boolean;
20408
21216
  }
20409
21217
 
20410
- export interface Time {}
20411
-
20412
21218
  export interface TimeWindow {
20413
21219
  from: string;
20414
21220
  to: string;
@@ -20911,6 +21717,10 @@ export interface UnfollowBatchRequest {
20911
21717
  * List of follow relationships to remove, each with optional keep_history
20912
21718
  */
20913
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;
20914
21724
  /**
20915
21725
  * Whether to delete the corresponding notification activity (default: false)
20916
21726
  */
@@ -20927,6 +21737,10 @@ export interface UnfollowBatchResponse {
20927
21737
  * List of follow relationships that were removed
20928
21738
  */
20929
21739
  follows: Array<FollowResponse>;
21740
+ /**
21741
+ * ID of the background task when the request was sent with async: true
21742
+ */
21743
+ task_id?: string;
20930
21744
  }
20931
21745
 
20932
21746
  export interface UnfollowPair {
@@ -21312,7 +22126,10 @@ export interface UpdateAppRequest {
21312
22126
  reminders_interval?: number;
21313
22127
  reminders_max_members?: number;
21314
22128
  reminders_max_per_user?: number;
21315
- revoke_tokens_issued_before?: Date;
22129
+ /**
22130
+ * Revokes tokens issued before this date
22131
+ */
22132
+ revoke_tokens_issued_before?: Date | null;
21316
22133
  sns_key?: string;
21317
22134
  sns_secret?: string;
21318
22135
  sns_topic_arn?: string;
@@ -21341,7 +22158,7 @@ export interface UpdateAppRequest {
21341
22158
  datadog_info?: DataDogInfo;
21342
22159
  file_upload_config?: FileUploadConfig;
21343
22160
  firebase_config?: FirebaseConfig;
21344
- grants?: Record<string, Array<string>>;
22161
+ grants?: Record<string, Array<string>> | null;
21345
22162
  huawei_config?: HuaweiConfig;
21346
22163
  image_upload_config?: FileUploadConfig;
21347
22164
  moderation_dashboard_preferences?: ModerationDashboardPreferences;
@@ -21515,6 +22332,15 @@ export interface UpdateCampaignRequest {
21515
22332
  channel_template?: CampaignChannelTemplate;
21516
22333
  }
21517
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
+
21518
22344
  export interface UpdateChannelPartialRequest {
21519
22345
  user_id?: string;
21520
22346
  unset?: Array<string>;
@@ -21629,9 +22455,8 @@ export interface UpdateChannelResponse {
21629
22455
  }
21630
22456
 
21631
22457
  export interface UpdateChannelTypeRequest {
21632
- automod: 'disabled' | 'simple' | 'AI';
21633
- automod_behavior: 'flag' | 'block' | 'shadow_block';
21634
- max_message_length: number;
22458
+ automod?: 'disabled' | 'simple' | 'AI';
22459
+ automod_behavior?: 'flag' | 'block' | 'shadow_block';
21635
22460
  blocklist?: string;
21636
22461
  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
21637
22462
  connect_events?: boolean;
@@ -21639,10 +22464,11 @@ export interface UpdateChannelTypeRequest {
21639
22464
  custom_events?: boolean;
21640
22465
  delivery_events?: boolean;
21641
22466
  mark_messages_pending?: boolean;
22467
+ max_message_length?: number;
21642
22468
  message_retention?: string;
21643
22469
  mutes?: boolean;
21644
22470
  partition_size?: number;
21645
- partition_ttl?: string;
22471
+ partition_ttl?: string | null;
21646
22472
  polls?: boolean;
21647
22473
  /**
21648
22474
  * Sets the push notification level for a channel type
@@ -21673,7 +22499,7 @@ export interface UpdateChannelTypeRequest {
21673
22499
  */
21674
22500
  automod_thresholds?: Thresholds;
21675
22501
  chat_preferences?: ChatPreferences;
21676
- grants?: Record<string, Array<string>>;
22502
+ grants?: Record<string, Array<string>> | null;
21677
22503
  }
21678
22504
 
21679
22505
  export interface UpdateChannelTypeResponse {
@@ -22246,6 +23072,14 @@ export interface UpdatePollOptionRequest {
22246
23072
  * Option text
22247
23073
  */
22248
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;
22249
23083
  user_id?: string;
22250
23084
  /**
22251
23085
  * Custom data for this object
@@ -22258,6 +23092,14 @@ export interface UpdatePollOptionRequest {
22258
23092
  }
22259
23093
 
22260
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;
22261
23103
  user_id?: string;
22262
23104
  /**
22263
23105
  * Array of field names to unset
@@ -22290,6 +23132,14 @@ export interface UpdatePollRequest {
22290
23132
  * Allow user suggested options
22291
23133
  */
22292
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;
22293
23143
  /**
22294
23144
  * Poll description
22295
23145
  */
@@ -22453,6 +23303,28 @@ export interface UpdateSIPTrunkResponse {
22453
23303
  sip_trunk?: SIPTrunkResponse;
22454
23304
  }
22455
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
+
22456
23328
  export interface UpdateSegmentRequest {
22457
23329
  /**
22458
23330
  * The description of the segment (max 256 characters)
@@ -22709,6 +23581,10 @@ export interface UpsertActivitiesRequest {
22709
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.
22710
23582
  */
22711
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;
22712
23588
  }
22713
23589
 
22714
23590
  export interface UpsertActivitiesResponse {
@@ -22721,6 +23597,10 @@ export interface UpsertActivitiesResponse {
22721
23597
  * Total number of mention notification activities created for mentioned users across all activities
22722
23598
  */
22723
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>;
22724
23604
  }
22725
23605
 
22726
23606
  export interface UpsertCollectionsRequest {
@@ -23073,6 +23953,12 @@ export interface UserBannedEvent {
23073
23953
  created_by?: UserResponseCommonFields;
23074
23954
  }
23075
23955
 
23956
+ export interface UserChannelBanCountRuleParameters {
23957
+ banned_by?: string;
23958
+ threshold?: number;
23959
+ time_window?: string;
23960
+ }
23961
+
23076
23962
  export interface UserChannelCountRuleParameters {
23077
23963
  threshold?: number;
23078
23964
  time_window?: string;
@@ -23734,10 +24620,6 @@ export interface VideoContentParameters {
23734
24620
  harm_labels?: Array<string>;
23735
24621
  }
23736
24622
 
23737
- export interface VideoEndCallRequestPayload {}
23738
-
23739
- export interface VideoKickUserRequestPayload {}
23740
-
23741
24623
  export interface VideoReactionOverTimeResponse {
23742
24624
  by_minute?: Array<CountByMinuteResponse>;
23743
24625
  }
@@ -23970,7 +24852,6 @@ export type WHEvent =
23970
24852
  | ({
23971
24853
  type: 'moderation.image_analysis.complete';
23972
24854
  } & ModerationImageAnalysisCompleteEvent)
23973
- | ({ type: 'moderation.intent_detected' } & IntentDetectedEvent)
23974
24855
  | ({ type: 'moderation.mark_reviewed' } & ModerationMarkReviewedEvent)
23975
24856
  | ({
23976
24857
  type: 'moderation.text_analysis.complete';
@@ -23982,6 +24863,12 @@ export type WHEvent =
23982
24863
  | ({
23983
24864
  type: 'notification.thread_message_new';
23984
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)
23985
24872
  | ({ type: 'reaction.deleted' } & ReactionDeletedEvent)
23986
24873
  | ({ type: 'reaction.new' } & ReactionNewEvent)
23987
24874
  | ({ type: 'reaction.updated' } & ReactionUpdatedEvent)
@@ -23990,6 +24877,8 @@ export type WHEvent =
23990
24877
  | ({ type: 'reminder.updated' } & ReminderUpdatedEvent)
23991
24878
  | ({ type: 'review_queue_item.new' } & ReviewQueueItemNewEvent)
23992
24879
  | ({ type: 'review_queue_item.updated' } & ReviewQueueItemUpdatedEvent)
24880
+ | ({ type: 'scheduled_message.failed' } & ScheduledMessageFailedEvent)
24881
+ | ({ type: 'scheduled_message.sent' } & ScheduledMessageSentEvent)
23993
24882
  | ({ type: 'thread.updated' } & ThreadUpdatedEvent)
23994
24883
  | ({ type: 'user.banned' } & UserBannedEvent)
23995
24884
  | ({ type: 'user.deactivated' } & UserDeactivatedEvent)