@stream-io/node-sdk 0.8.13 → 0.8.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,10 @@ export interface APIError {
85
85
  * Additional error-specific information
86
86
  */
87
87
  details: Array<number>;
88
+ /**
89
+ * Milliseconds until the user's slow mode cool down period ends. Only set on code 60 (cool down) errors
90
+ */
91
+ cooldown_remaining_ms?: number;
88
92
  /**
89
93
  * 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
90
94
  */
@@ -987,6 +991,7 @@ export interface AddActivityRequest {
987
991
  * Whether to skip URL enrichment for the activity
988
992
  */
989
993
  skip_enrich_url?: boolean;
994
+ skip_existing?: boolean;
990
995
  /**
991
996
  * Whether to skip push notifications
992
997
  */
@@ -1048,6 +1053,10 @@ export interface AddActivityResponse {
1048
1053
  * Number of mention notification activities created for mentioned users
1049
1054
  */
1050
1055
  mention_notifications_created?: number;
1056
+ /**
1057
+ * Contains the activity ID when skip_existing is true and the activity already existed, so it was left unchanged.
1058
+ */
1059
+ skipped_existing?: Array<string>;
1051
1060
  }
1052
1061
  export interface AddBookmarkRequest {
1053
1062
  /**
@@ -1477,6 +1486,14 @@ export interface AnalyzeResponse {
1477
1486
  * `complete` (all fields screened), `partial` (mix of verdicts and per-field errors), or `pending` (async).
1478
1487
  */
1479
1488
  status: string;
1489
+ /**
1490
+ * 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`).
1491
+ */
1492
+ llm_model?: string;
1493
+ /**
1494
+ * reasoning_effort sent with the LLM request. Omitted when the request did not send one.
1495
+ */
1496
+ llm_reasoning_effort?: string;
1480
1497
  /**
1481
1498
  * Per-image moderation verdicts keyed by caller label.
1482
1499
  */
@@ -1512,6 +1529,16 @@ export interface AnalyzeTextField {
1512
1529
  */
1513
1530
  classifications?: Array<Classification>;
1514
1531
  }
1532
+ export interface AppDefaults {
1533
+ /**
1534
+ * Defaults applied by the get-or-create channel endpoint.
1535
+ */
1536
+ get_or_create_channel: GetOrCreateChannelDefaults;
1537
+ /**
1538
+ * Defaults applied by the query channels endpoint.
1539
+ */
1540
+ query_channels: QueryChannelsDefaults;
1541
+ }
1515
1542
  export interface AppResponseFields {
1516
1543
  allow_multi_user_devices: boolean;
1517
1544
  /**
@@ -1569,6 +1596,10 @@ export interface AppResponseFields {
1569
1596
  webhook_events: Array<string>;
1570
1597
  call_types: Record<string, CallType>;
1571
1598
  channel_configs: Record<string, ChannelConfig>;
1599
+ /**
1600
+ * Request limit defaults applied by the server when the corresponding field is omitted.
1601
+ */
1602
+ defaults: AppDefaults;
1572
1603
  file_upload_config: FileUploadConfig;
1573
1604
  grants: Record<string, Array<string>>;
1574
1605
  image_upload_config: FileUploadConfig;
@@ -1810,6 +1841,7 @@ export interface AsyncExportUsersEvent {
1810
1841
  export interface AsyncImportErrorEvent {
1811
1842
  created_at: Date;
1812
1843
  error: string;
1844
+ error_code: string;
1813
1845
  finished_at: Date;
1814
1846
  product: string;
1815
1847
  state: string;
@@ -3514,6 +3546,7 @@ export interface CallSettingsRequest {
3514
3546
  geofencing?: GeofenceSettingsRequest;
3515
3547
  individual_recording?: IndividualRecordingSettingsRequest;
3516
3548
  ingress?: IngressSettingsRequest;
3549
+ lifecycle?: LifecycleSettingsRequest;
3517
3550
  limits?: LimitsSettingsRequest;
3518
3551
  raw_recording?: RawRecordingSettingsRequest;
3519
3552
  recording?: RecordSettingsRequest;
@@ -3538,6 +3571,10 @@ export interface CallSettingsResponse {
3538
3571
  frame_recording: FrameRecordingSettingsResponse;
3539
3572
  geofencing: GeofenceSettingsResponse;
3540
3573
  individual_recording: IndividualRecordingSettingsResponse;
3574
+ /**
3575
+ * LifecycleSettings is the payload for call lifecycle settings
3576
+ */
3577
+ lifecycle: LifecycleSettingsResponse;
3541
3578
  limits: LimitsSettingsResponse;
3542
3579
  raw_recording: RawRecordingSettingsResponse;
3543
3580
  /**
@@ -3918,8 +3955,6 @@ export interface CampaignStatsResponse {
3918
3955
  stats_users_read: number;
3919
3956
  stats_users_sent: number;
3920
3957
  }
3921
- export interface CancelImportV2TaskRequest {
3922
- }
3923
3958
  export interface CancelImportV2TaskResponse {
3924
3959
  /**
3925
3960
  * Duration of the request in milliseconds
@@ -3927,6 +3962,14 @@ export interface CancelImportV2TaskResponse {
3927
3962
  duration: string;
3928
3963
  }
3929
3964
  export interface CastPollVoteRequest {
3965
+ /**
3966
+ * Key of the moderation configuration to use. Server-side only.
3967
+ */
3968
+ config_key?: string;
3969
+ /**
3970
+ * Team associated with the configuration. Server-side only.
3971
+ */
3972
+ config_team?: string;
3930
3973
  user_id?: string;
3931
3974
  /**
3932
3975
  * User request object
@@ -3948,6 +3991,30 @@ export interface ChangeFeedVisibilityResponse {
3948
3991
  duration: string;
3949
3992
  feed: FeedResponse;
3950
3993
  }
3994
+ export interface ChannelBanResponse {
3995
+ created_at: Date;
3996
+ scopes: Array<string>;
3997
+ channel_ban?: ChannelBanScopeResponse;
3998
+ future_channel_ban?: ChannelBanScopeResponse;
3999
+ /**
4000
+ * User response object
4001
+ */
4002
+ user?: UserResponse;
4003
+ }
4004
+ export interface ChannelBanScopeResponse {
4005
+ created_at: Date;
4006
+ shadow: boolean;
4007
+ expires?: Date;
4008
+ reason?: string;
4009
+ /**
4010
+ * User response object
4011
+ */
4012
+ banned_by?: UserResponse;
4013
+ }
4014
+ export interface ChannelBansScopeTotals {
4015
+ channel: number;
4016
+ future_channel: number;
4017
+ }
3951
4018
  export interface ChannelBatchCompletedEvent {
3952
4019
  batch_created_at: Date;
3953
4020
  created_at: Date;
@@ -4471,6 +4538,7 @@ export interface ChannelMemberResponse {
4471
4538
  * Date/time of the last update
4472
4539
  */
4473
4540
  updated_at: Date;
4541
+ user_id: string;
4474
4542
  custom: Record<string, any>;
4475
4543
  archived_at?: Date;
4476
4544
  /**
@@ -4508,7 +4576,6 @@ export interface ChannelMemberResponse {
4508
4576
  */
4509
4577
  role?: string;
4510
4578
  status?: string;
4511
- user_id?: string;
4512
4579
  deleted_messages?: Array<string>;
4513
4580
  /**
4514
4581
  * User response object
@@ -4603,6 +4670,7 @@ export declare const ChannelOwnCapability: {
4603
4670
  readonly QUERY_POLL_VOTES: "query-poll-votes";
4604
4671
  readonly QUOTE_MESSAGE: "quote-message";
4605
4672
  readonly READ_EVENTS: "read-events";
4673
+ readonly SCHEDULE_MESSAGE: "schedule-message";
4606
4674
  readonly SEARCH_MESSAGES: "search-messages";
4607
4675
  readonly SEND_CUSTOM_EVENTS: "send-custom-events";
4608
4676
  readonly SEND_LINKS: "send-links";
@@ -4666,6 +4734,10 @@ export interface ChannelResponse {
4666
4734
  * Custom data for this object
4667
4735
  */
4668
4736
  custom: Record<string, any>;
4737
+ /**
4738
+ * Number of members who are not deactivated or deleted
4739
+ */
4740
+ active_member_count?: number;
4669
4741
  /**
4670
4742
  * Whether auto translation is enabled or not
4671
4743
  */
@@ -4746,16 +4818,54 @@ export interface ChannelResponse {
4746
4818
  }
4747
4819
  export interface ChannelStateResponse {
4748
4820
  duration: string;
4821
+ /**
4822
+ * List of channel members
4823
+ */
4749
4824
  members: Array<ChannelMemberResponse>;
4825
+ /**
4826
+ * List of channel messages
4827
+ */
4750
4828
  messages: Array<MessageResponse>;
4829
+ /**
4830
+ * List of pinned messages in the channel
4831
+ */
4751
4832
  pinned_messages: Array<MessageResponse>;
4752
4833
  threads: Array<ThreadStateResponse>;
4834
+ /**
4835
+ * 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
4836
+ */
4837
+ cooldown_remaining_ms?: number;
4838
+ /**
4839
+ * Whether this channel is hidden or not
4840
+ */
4753
4841
  hidden?: boolean;
4842
+ /**
4843
+ * Messages before this date are hidden from the user
4844
+ */
4754
4845
  hide_messages_before?: Date;
4846
+ /**
4847
+ * Number of channel watchers
4848
+ */
4755
4849
  watcher_count?: number;
4850
+ /**
4851
+ * Active live locations in the channel
4852
+ */
4756
4853
  active_live_locations?: Array<SharedLocationResponseData>;
4854
+ /**
4855
+ * Pending messages that this user has sent
4856
+ */
4757
4857
  pending_messages?: Array<PendingMessageResponse>;
4858
+ /**
4859
+ * List of read states
4860
+ */
4758
4861
  read?: Array<ReadStateResponse>;
4862
+ /**
4863
+ * 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
4864
+ */
4865
+ scheduled_messages?: Array<ScheduledMessageResponse>;
4866
+ /**
4867
+ * List of user who is watching the channel
4868
+ */
4759
4869
  watchers?: Array<UserResponse>;
4760
4870
  /**
4761
4871
  * Represents channel in chat
@@ -4782,6 +4892,10 @@ export interface ChannelStateResponseFields {
4782
4892
  */
4783
4893
  pinned_messages: Array<MessageResponse>;
4784
4894
  threads: Array<ThreadStateResponse>;
4895
+ /**
4896
+ * 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
4897
+ */
4898
+ cooldown_remaining_ms?: number;
4785
4899
  /**
4786
4900
  * Whether this channel is hidden or not
4787
4901
  */
@@ -4806,6 +4920,10 @@ export interface ChannelStateResponseFields {
4806
4920
  * List of read states
4807
4921
  */
4808
4922
  read?: Array<ReadStateResponse>;
4923
+ /**
4924
+ * 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
4925
+ */
4926
+ scheduled_messages?: Array<ScheduledMessageResponse>;
4809
4927
  /**
4810
4928
  * List of user who is watching the channel
4811
4929
  */
@@ -5253,9 +5371,9 @@ export interface CheckPushRequest {
5253
5371
  */
5254
5372
  apn_template?: string;
5255
5373
  /**
5256
- * Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due
5374
+ * 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
5257
5375
  */
5258
- event_type?: 'message.new' | 'message.updated' | 'reaction.new' | 'reaction.updated' | 'notification.reminder_due';
5376
+ event_type?: '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';
5259
5377
  /**
5260
5378
  * Push message data template for Firebase
5261
5379
  */
@@ -5364,25 +5482,21 @@ export interface CheckResponse {
5364
5482
  */
5365
5483
  status: string;
5366
5484
  /**
5367
- * Intent topic label matched by this request's text (test mode only; omitted when no topic matched)
5368
- */
5369
- intent_matched_topic?: string;
5370
- /**
5371
- * 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
5485
+ * 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)
5372
5486
  */
5373
- intent_score?: number;
5487
+ llm_model?: string;
5374
5488
  /**
5375
- * The matched topic's configured score_threshold, for comparison against intent_score (test mode only). Same omitted-not-zero rule as intent_score
5489
+ * reasoning_effort sent with the LLM request that produced the verdict. Omitted when the request did not send one
5376
5490
  */
5377
- intent_score_threshold?: number;
5378
- /**
5379
- * 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
5380
- */
5381
- intent_would_fire?: boolean;
5491
+ llm_reasoning_effort?: string;
5382
5492
  /**
5383
5493
  * ID of the running moderation task
5384
5494
  */
5385
5495
  task_id?: string;
5496
+ /**
5497
+ * 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)
5498
+ */
5499
+ intent_scores?: Array<IntentScoreResponse>;
5386
5500
  /**
5387
5501
  * All moderation rules triggered by this check (content, user, and call rules), with their resolved actions
5388
5502
  */
@@ -5512,6 +5626,14 @@ export interface ClientEvent {
5512
5626
  * Reason the client initiated the join. Optional on CoordinatorJoin events; empty when not provided.
5513
5627
  */
5514
5628
  join_reason?: string;
5629
+ /**
5630
+ * 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.
5631
+ */
5632
+ leave_initiator?: string;
5633
+ /**
5634
+ * Internal reason or triggering event for the leave that aborted a join. Optional; sent on failure events. Maximum 200 characters.
5635
+ */
5636
+ leave_reason?: string;
5515
5637
  /**
5516
5638
  * Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event.
5517
5639
  */
@@ -5977,8 +6099,6 @@ export interface CommentUpdatedEvent {
5977
6099
  received_at?: Date;
5978
6100
  user?: UserResponseCommonFields;
5979
6101
  }
5980
- export interface CommitMessageRequest {
5981
- }
5982
6102
  export interface CompositeRecordingResponse {
5983
6103
  status: string;
5984
6104
  }
@@ -6323,7 +6443,7 @@ export interface CreateChannelTypeRequest {
6323
6443
  /**
6324
6444
  * Partition TTL
6325
6445
  */
6326
- partition_ttl?: string;
6446
+ partition_ttl?: string | null;
6327
6447
  /**
6328
6448
  * Polls
6329
6449
  */
@@ -6336,6 +6456,10 @@ export interface CreateChannelTypeRequest {
6336
6456
  * Push notifications
6337
6457
  */
6338
6458
  push_notifications?: boolean;
6459
+ /**
6460
+ * Enables message quotes
6461
+ */
6462
+ quotes?: boolean;
6339
6463
  /**
6340
6464
  * Reactions
6341
6465
  */
@@ -6344,6 +6468,10 @@ export interface CreateChannelTypeRequest {
6344
6468
  * Read events
6345
6469
  */
6346
6470
  read_events?: boolean;
6471
+ /**
6472
+ * Enables message reminders
6473
+ */
6474
+ reminders?: boolean;
6347
6475
  /**
6348
6476
  * Replies
6349
6477
  */
@@ -6382,11 +6510,15 @@ export interface CreateChannelTypeRequest {
6382
6510
  * List of permissions for the channel type
6383
6511
  */
6384
6512
  permissions?: Array<PolicyRequest>;
6513
+ /**
6514
+ * Sets thresholds for AI moderation
6515
+ */
6516
+ automod_thresholds?: Thresholds;
6385
6517
  chat_preferences?: ChatPreferences;
6386
6518
  /**
6387
6519
  * List of grants for the channel type
6388
6520
  */
6389
- grants?: Record<string, Array<string>>;
6521
+ grants?: Record<string, Array<string>> | null;
6390
6522
  }
6391
6523
  export interface CreateChannelTypeResponse {
6392
6524
  automod: 'disabled' | 'simple' | 'AI';
@@ -6773,6 +6905,14 @@ export interface CreatePollOptionRequest {
6773
6905
  * Option text
6774
6906
  */
6775
6907
  text: string;
6908
+ /**
6909
+ * Key of the moderation configuration to use. Server-side only.
6910
+ */
6911
+ config_key?: string;
6912
+ /**
6913
+ * Team associated with the configuration. Server-side only.
6914
+ */
6915
+ config_team?: string;
6776
6916
  user_id?: string;
6777
6917
  /**
6778
6918
  * Custom data for this object
@@ -6793,6 +6933,14 @@ export interface CreatePollRequest {
6793
6933
  */
6794
6934
  allow_answers?: boolean;
6795
6935
  allow_user_suggested_options?: boolean;
6936
+ /**
6937
+ * Key of the moderation configuration to use. Server-side only.
6938
+ */
6939
+ config_key?: string;
6940
+ /**
6941
+ * Team associated with the configuration. Server-side only.
6942
+ */
6943
+ config_team?: string;
6796
6944
  /**
6797
6945
  * A description of the poll
6798
6946
  */
@@ -7487,6 +7635,28 @@ export interface DeleteModerationRuleResponse {
7487
7635
  export interface DeleteModerationTemplateResponse {
7488
7636
  duration: string;
7489
7637
  }
7638
+ export interface DeletePollAnswerRequestPayload {
7639
+ /**
7640
+ * Reason for deletion
7641
+ */
7642
+ reason?: string;
7643
+ }
7644
+ export interface DeletePollOptionRequestPayload {
7645
+ /**
7646
+ * 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
7647
+ */
7648
+ option_id?: string;
7649
+ /**
7650
+ * Reason for deletion
7651
+ */
7652
+ reason?: string;
7653
+ }
7654
+ export interface DeletePollRequestPayload {
7655
+ /**
7656
+ * Reason for deletion
7657
+ */
7658
+ reason?: string;
7659
+ }
7490
7660
  export interface DeleteQueueRequest {
7491
7661
  user_id?: string;
7492
7662
  /**
@@ -7550,6 +7720,16 @@ export interface DeleteSIPInboundRoutingRuleResponse {
7550
7720
  export interface DeleteSIPTrunkResponse {
7551
7721
  duration: string;
7552
7722
  }
7723
+ export interface DeleteScheduledMessageResponse {
7724
+ /**
7725
+ * Duration of the request in milliseconds
7726
+ */
7727
+ duration: string;
7728
+ /**
7729
+ * A message scheduled to be sent later
7730
+ */
7731
+ scheduled_message: ScheduledMessageResponse;
7732
+ }
7553
7733
  export interface DeleteSegmentTargetsRequest {
7554
7734
  /**
7555
7735
  * Target IDs
@@ -7641,11 +7821,12 @@ export interface DeleteUsersRequest {
7641
7821
  /**
7642
7822
  * Conversation channels delete mode.
7643
7823
  * Conversation channel is any channel which only has two members one of which is the user being deleted.
7644
- * * null or empty string - doesn't delete any conversation channels
7824
+ * * null or empty string - doesn't delete any conversation channels, unless user is 'hard', in which case it defaults to 'hard'
7645
7825
  * * soft - marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
7646
7826
  * * hard - deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
7827
+ * * keep - doesn't delete any conversation channels. Use it with user 'hard', where null or empty string defaults to 'hard'
7647
7828
  */
7648
- conversations?: 'soft' | 'hard';
7829
+ conversations?: 'soft' | 'hard' | 'keep';
7649
7830
  /**
7650
7831
  * Delete user files.
7651
7832
  * * false or empty string - doesn't delete any files
@@ -7666,7 +7847,7 @@ export interface DeleteUsersRequest {
7666
7847
  * User delete mode.
7667
7848
  * * soft - marks user as deleted and retains all user data
7668
7849
  * * pruning - marks user as deleted and nullifies user information
7669
- * * hard - deletes user completely. Requires 'hard' option for messages and conversations as well
7850
+ * * hard - deletes user completely. Requires 'hard' option for messages, and 'hard' or 'keep' option for conversations
7670
7851
  */
7671
7852
  user?: 'soft' | 'pruning' | 'hard';
7672
7853
  }
@@ -7887,8 +8068,6 @@ export interface EncryptionSettingsResponse {
7887
8068
  */
7888
8069
  mode: 'available' | 'disabled' | 'auto-on';
7889
8070
  }
7890
- export interface EndCallRequest {
7891
- }
7892
8071
  export interface EndCallResponse {
7893
8072
  /**
7894
8073
  * Duration of the request in milliseconds
@@ -7899,6 +8078,7 @@ export interface EnrichedActivity {
7899
8078
  foreign_id?: string;
7900
8079
  id?: string;
7901
8080
  score?: number;
8081
+ time?: string;
7902
8082
  verb?: string;
7903
8083
  to?: Array<string>;
7904
8084
  actor?: Data;
@@ -7943,15 +8123,15 @@ export interface EnrichedReaction {
7943
8123
  activity_id: string;
7944
8124
  kind: string;
7945
8125
  user_id: string;
8126
+ created_at?: string;
7946
8127
  id?: string;
7947
8128
  parent?: string;
8129
+ updated_at?: string;
7948
8130
  target_feeds?: Array<string>;
7949
8131
  children_counts?: Record<string, number>;
7950
- created_at?: Time;
7951
8132
  data?: Record<string, any>;
7952
8133
  latest_children?: Record<string, Array<EnrichedReaction>>;
7953
8134
  own_children?: Record<string, Array<EnrichedReaction>>;
7954
- updated_at?: Time;
7955
8135
  user?: Data;
7956
8136
  }
7957
8137
  export interface EnrichmentOptions {
@@ -7963,6 +8143,10 @@ export interface EnrichmentOptions {
7963
8143
  * 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.
7964
8144
  */
7965
8145
  include_flat_activities?: boolean;
8146
+ /**
8147
+ * 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.
8148
+ */
8149
+ include_ranking_config?: boolean;
7966
8150
  /**
7967
8151
  * Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.
7968
8152
  */
@@ -8211,8 +8395,6 @@ export interface ExportChannelsResponse {
8211
8395
  */
8212
8396
  task_id: string;
8213
8397
  }
8214
- export interface ExportFeedUserDataRequest {
8215
- }
8216
8398
  export interface ExportFeedUserDataResponse {
8217
8399
  duration: string;
8218
8400
  /**
@@ -8891,6 +9073,7 @@ export interface FeedsNotificationComment {
8891
9073
  comment: string;
8892
9074
  id: string;
8893
9075
  user_id: string;
9076
+ parent_id?: string;
8894
9077
  attachments?: Array<Attachment>;
8895
9078
  }
8896
9079
  export interface FeedsNotificationContext {
@@ -9318,6 +9501,10 @@ export interface FollowBatchRequest {
9318
9501
  * List of follow relationships to create
9319
9502
  */
9320
9503
  follows: Array<FollowRequest>;
9504
+ /**
9505
+ * 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.
9506
+ */
9507
+ async?: boolean;
9321
9508
  /**
9322
9509
  * 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.
9323
9510
  */
@@ -9337,6 +9524,10 @@ export interface FollowBatchResponse {
9337
9524
  * List of current follow relationships
9338
9525
  */
9339
9526
  follows: Array<FollowResponse>;
9527
+ /**
9528
+ * ID of the background task when the request was sent with async: true
9529
+ */
9530
+ task_id?: string;
9340
9531
  }
9341
9532
  export interface FollowCreatedEvent {
9342
9533
  /**
@@ -10091,6 +10282,16 @@ export interface GetOrCreateCallResponse {
10091
10282
  */
10092
10283
  call: CallResponse;
10093
10284
  }
10285
+ export interface GetOrCreateChannelDefaults {
10286
+ /**
10287
+ * Resolved defaults for a nested pagination object.
10288
+ */
10289
+ members: PagerDefaults;
10290
+ /**
10291
+ * Resolved defaults for a nested pagination object.
10292
+ */
10293
+ messages: PagerDefaults;
10294
+ }
10094
10295
  export interface GetOrCreateFeedGroupRequest {
10095
10296
  /**
10096
10297
  * 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
@@ -10186,6 +10387,7 @@ export interface GetOrCreateFeedResponse {
10186
10387
  following_pagination?: PagerResponse;
10187
10388
  member_pagination?: PagerResponse;
10188
10389
  notification_status?: NotificationStatusResponse;
10390
+ ranking_config?: RankingConfig;
10189
10391
  }
10190
10392
  export interface GetOrCreateFeedViewRequest {
10191
10393
  /**
@@ -10429,14 +10631,27 @@ export interface GroupedChannelsBucket {
10429
10631
  */
10430
10632
  prev?: string;
10431
10633
  /**
10432
- * Unread channels currently classified into this bucket
10634
+ * Total unread channels matching this bucket and its filters, independent of page size
10433
10635
  */
10434
10636
  unread_channels?: number;
10435
10637
  }
10436
10638
  export interface GroupedChannelsGroupRequest {
10639
+ /**
10640
+ * Max channels for this group; omitted or zero uses the request limit
10641
+ */
10437
10642
  limit?: number;
10643
+ /**
10644
+ * Cursor for the next page; only allowed when requesting one group
10645
+ */
10438
10646
  next?: string;
10647
+ /**
10648
+ * Cursor for the previous page; only allowed when requesting one group
10649
+ */
10439
10650
  prev?: string;
10651
+ /**
10652
+ * 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.
10653
+ */
10654
+ filter_conditions?: Record<string, any>;
10440
10655
  }
10441
10656
  export interface GroupedQueryChannelsRequest {
10442
10657
  /**
@@ -10445,7 +10660,11 @@ export interface GroupedQueryChannelsRequest {
10445
10660
  limit?: number;
10446
10661
  user_id?: string;
10447
10662
  /**
10448
- * 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.
10663
+ * Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats
10664
+ */
10665
+ sort?: Array<SortParamRequest>;
10666
+ /**
10667
+ * 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.
10449
10668
  */
10450
10669
  groups?: Record<string, GroupedChannelsGroupRequest>;
10451
10670
  /**
@@ -10459,7 +10678,7 @@ export interface GroupedQueryChannelsResponse {
10459
10678
  */
10460
10679
  duration: string;
10461
10680
  /**
10462
- * Predefined channel groups keyed by group name
10681
+ * Groups keyed by the requested stored group name
10463
10682
  */
10464
10683
  groups: Record<string, GroupedChannelsBucket>;
10465
10684
  }
@@ -10866,23 +11085,23 @@ export interface InsertActionLogRequest {
10866
11085
  export interface InsertActionLogResponse {
10867
11086
  duration: string;
10868
11087
  }
10869
- export interface IntentBufferedItem {
11088
+ export interface IntentConditionInfo {
10870
11089
  /**
10871
- * The ID of the user who authored the buffered message or comment
11090
+ * Whether the score reached the threshold.
10872
11091
  */
10873
- author_user_id: string;
11092
+ passed: boolean;
10874
11093
  /**
10875
- * When the buffered message or comment was created
11094
+ * Final (damped) score of the topic in this analysis; 0 when the topic is not defined in the policy.
10876
11095
  */
10877
- created_at: Date;
11096
+ score: number;
10878
11097
  /**
10879
- * The ID of the buffered message or comment
11098
+ * Minimum score (1-100) the condition requires.
10880
11099
  */
10881
- id: string;
11100
+ threshold: number;
10882
11101
  /**
10883
- * The text of the buffered message or comment
11102
+ * Policy intent topic label the condition references.
10884
11103
  */
10885
- text: string;
11104
+ topic: string;
10886
11105
  }
10887
11106
  export interface IntentConfigRequest {
10888
11107
  /**
@@ -10896,99 +11115,55 @@ export interface IntentConfigResponse {
10896
11115
  */
10897
11116
  topics: Array<IntentTopicResponse>;
10898
11117
  }
10899
- export interface IntentDetectedEvent {
11118
+ export interface IntentEvaluationInfo {
10900
11119
  /**
10901
- * The channel CID (chat) or feed ID (feeds) the buffered conversation belongs to
11120
+ * The analyzed conversation: the channel CID for chat, the object ID for feeds.
10902
11121
  */
10903
11122
  conversation_id: string;
10904
- created_at: Date;
10905
11123
  /**
10906
- * The ID of the most recently buffered entity
11124
+ * Number of conversation messages sent to the model.
10907
11125
  */
10908
- entity_id: string;
11126
+ message_count: number;
10909
11127
  /**
10910
- * The type of the most recently buffered entity (chat message or feed comment)
11128
+ * One entry per `intent_rule` condition of the rule, flat conditions first, then group conditions.
10911
11129
  */
10912
- entity_type: string;
11130
+ conditions: Array<IntentConditionInfo>;
10913
11131
  /**
10914
- * The configured intent topic label that started the buffer
11132
+ * Score (0-100) the model gave every topic in the analysis call, keyed by topic label, before message-count damping.
10915
11133
  */
10916
- matched_topic: string;
11134
+ raw_scores: Record<string, number>;
10917
11135
  /**
10918
- * The Stage 2 conversation score (0-100) that cleared score_threshold
11136
+ * Final score (0-100) of every topic after message-count damping, keyed by topic label. Conditions compare against these.
10919
11137
  */
11138
+ scores: Record<string, number>;
11139
+ }
11140
+ export interface IntentRuleParameters {
11141
+ topic: string;
11142
+ threshold?: number;
11143
+ }
11144
+ export interface IntentScoreResponse {
10920
11145
  score: number;
10921
- /**
10922
- * The ID of the user whose conversation was scored
10923
- */
10924
- user_id: string;
10925
- /**
10926
- * The buffered items that were scored, in the order they were captured
10927
- */
10928
- items: Array<IntentBufferedItem>;
10929
- custom: Record<string, any>;
10930
- type: string;
10931
- received_at?: Date;
11146
+ topic: string;
10932
11147
  }
10933
11148
  export interface IntentTopicRequest {
10934
11149
  /**
10935
11150
  * Unique topic label (e.g. purchase_intent)
10936
11151
  */
10937
11152
  label: string;
10938
- /**
10939
- * How long the buffer collects items before scoring runs
10940
- */
10941
- analysis_cooldown_seconds?: number;
10942
11153
  /**
10943
11154
  * Optional description used in the classification prompt; the label alone is used when empty
10944
11155
  */
10945
11156
  description?: string;
10946
- /**
10947
- * Whether this topic is evaluated
10948
- */
10949
- enabled?: boolean;
10950
- /**
10951
- * Items buffered per conversation before scoring runs early
10952
- */
10953
- max_captured_items?: number;
10954
- /**
10955
- * Suppresses this topic for a user and conversation after it fires; 0 uses the default
10956
- */
10957
- refire_cooldown_seconds?: number;
10958
- /**
10959
- * Conversation score (0-100) required to fire moderation.intent_detected
10960
- */
10961
- score_threshold?: number;
10962
11157
  }
10963
11158
  export interface IntentTopicResponse {
10964
- /**
10965
- * How long the buffer collects items before scoring runs
10966
- */
10967
- analysis_cooldown_seconds: number;
10968
- /**
10969
- * Whether this topic is evaluated
10970
- */
10971
- enabled: boolean;
10972
11159
  /**
10973
11160
  * Unique topic label (e.g. purchase_intent)
10974
11161
  */
10975
11162
  label: string;
10976
- /**
10977
- * Items buffered per conversation before scoring runs early
10978
- */
10979
- max_captured_items: number;
10980
- /**
10981
- * Conversation score (0-100) required to fire moderation.intent_detected
10982
- */
10983
- score_threshold: number;
10984
11163
  /**
10985
11164
  * Optional description used in the classification prompt; the label alone is used when empty
10986
11165
  */
10987
11166
  description?: string;
10988
- /**
10989
- * Suppresses this topic for a user and conversation after it fires; 0 uses the default
10990
- */
10991
- refire_cooldown_seconds?: number;
10992
11167
  }
10993
11168
  export interface InterestTagResponse {
10994
11169
  /**
@@ -11074,7 +11249,9 @@ export interface KickedUserEvent {
11074
11249
  export interface LLMConfig {
11075
11250
  app_context?: string;
11076
11251
  async?: boolean;
11252
+ custom_keys_context_description?: string;
11077
11253
  enabled?: boolean;
11254
+ context_custom_keys?: Array<string>;
11078
11255
  rules?: Array<LLMRule>;
11079
11256
  severity_descriptions?: Record<string, string>;
11080
11257
  }
@@ -11249,6 +11426,18 @@ export interface LayoutSettingsResponse {
11249
11426
  detect_orientation?: boolean;
11250
11427
  options?: Record<string, any>;
11251
11428
  }
11429
+ export interface LifecycleSettingsRequest {
11430
+ /**
11431
+ * 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
11432
+ */
11433
+ mode?: 'reusable' | 'single_use';
11434
+ }
11435
+ export interface LifecycleSettingsResponse {
11436
+ /**
11437
+ * 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
11438
+ */
11439
+ mode: 'reusable' | 'single_use';
11440
+ }
11252
11441
  export interface LimitInfoResponse {
11253
11442
  /**
11254
11443
  * The maximum number of API calls allowed per time window
@@ -12227,7 +12416,7 @@ export interface MessageRequest {
12227
12416
  /**
12228
12417
  * Date when pinned message expires
12229
12418
  */
12230
- pin_expires?: Date;
12419
+ pin_expires?: Date | null;
12231
12420
  /**
12232
12421
  * Whether message is pinned or not
12233
12422
  */
@@ -12235,7 +12424,7 @@ export interface MessageRequest {
12235
12424
  /**
12236
12425
  * Date when message got pinned
12237
12426
  */
12238
- pinned_at?: Date;
12427
+ pinned_at?: Date | null;
12239
12428
  /**
12240
12429
  * Identifier of the poll to include in the message
12241
12430
  */
@@ -13183,6 +13372,7 @@ export interface ModerationRulesTriggeredEvent {
13183
13372
  * Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
13184
13373
  */
13185
13374
  matched_contents?: Array<MatchedContent>;
13375
+ intent?: IntentEvaluationInfo;
13186
13376
  }
13187
13377
  export interface ModerationTextAnalysisCompleteEvent {
13188
13378
  created_at: Date;
@@ -13307,9 +13497,25 @@ export interface NoiseCancellationSettings {
13307
13497
  mode: 'available' | 'disabled' | 'auto-on';
13308
13498
  }
13309
13499
  export interface NotificationComment {
13500
+ /**
13501
+ * The text of the comment
13502
+ */
13310
13503
  comment: string;
13504
+ /**
13505
+ * The ID of the comment
13506
+ */
13311
13507
  id: string;
13508
+ /**
13509
+ * The ID of the user who wrote the comment
13510
+ */
13312
13511
  user_id: string;
13512
+ /**
13513
+ * The ID of the parent comment when this comment is a reply; omitted for top-level comments
13514
+ */
13515
+ parent_id?: string;
13516
+ /**
13517
+ * Attachments on the comment
13518
+ */
13313
13519
  attachments?: Array<Attachment>;
13314
13520
  }
13315
13521
  export interface NotificationConfig {
@@ -13686,6 +13892,7 @@ export interface OwnUserResponse {
13686
13892
  unread_count: number;
13687
13893
  unread_threads: number;
13688
13894
  updated_at: Date;
13895
+ blocked_user_ids: Array<string>;
13689
13896
  channel_mutes: Array<ChannelMute>;
13690
13897
  devices: Array<DeviceResponse>;
13691
13898
  mutes: Array<UserMuteResponse>;
@@ -13698,7 +13905,6 @@ export interface OwnUserResponse {
13698
13905
  last_active?: Date;
13699
13906
  name?: string;
13700
13907
  revoke_tokens_issued_before?: Date;
13701
- blocked_user_ids?: Array<string>;
13702
13908
  latest_hidden_channels?: Array<string>;
13703
13909
  /**
13704
13910
  * The privacy settings of the user.
@@ -13711,6 +13917,12 @@ export interface OwnUserResponse {
13711
13917
  teams_role?: Record<string, string>;
13712
13918
  total_unread_count_by_team?: Record<string, number>;
13713
13919
  }
13920
+ export interface PagerDefaults {
13921
+ /**
13922
+ * Number of records returned when `limit` is omitted.
13923
+ */
13924
+ limit: number;
13925
+ }
13714
13926
  export interface PagerRequest {
13715
13927
  limit?: number;
13716
13928
  next?: string;
@@ -14150,27 +14362,71 @@ export interface PolicyTestTotals {
14150
14362
  scored: number;
14151
14363
  unscored: number;
14152
14364
  }
14153
- export interface PollOptionInput {
14154
- text?: string;
14155
- custom?: Record<string, any>;
14156
- }
14157
- export interface PollOptionRequest {
14158
- id: string;
14159
- text?: string;
14160
- custom?: Record<string, any>;
14161
- }
14162
- export interface PollOptionResponse {
14365
+ export interface PollClosedEvent {
14163
14366
  /**
14164
- * Duration of the request in milliseconds
14367
+ * Date/time of creation
14165
14368
  */
14166
- duration: string;
14167
- poll_option: PollOptionResponseData;
14168
- }
14169
- export interface PollOptionResponseData {
14170
- id: string;
14171
- text: string;
14369
+ created_at: Date;
14172
14370
  custom: Record<string, any>;
14173
- text_i18n?: Record<string, string>;
14371
+ poll: PollResponseData;
14372
+ /**
14373
+ * The type of event: "poll.closed" in this case
14374
+ */
14375
+ type: string;
14376
+ activity_id?: string;
14377
+ /**
14378
+ * The CID of the channel containing the poll
14379
+ */
14380
+ cid?: string;
14381
+ /**
14382
+ * The ID of the message containing the poll
14383
+ */
14384
+ message_id?: string;
14385
+ received_at?: Date;
14386
+ }
14387
+ export interface PollDeletedEvent {
14388
+ /**
14389
+ * Date/time of creation
14390
+ */
14391
+ created_at: Date;
14392
+ custom: Record<string, any>;
14393
+ poll: PollResponseData;
14394
+ /**
14395
+ * The type of event: "poll.deleted" in this case
14396
+ */
14397
+ type: string;
14398
+ activity_id?: string;
14399
+ /**
14400
+ * The CID of the channel containing the poll
14401
+ */
14402
+ cid?: string;
14403
+ /**
14404
+ * The ID of the message containing the poll
14405
+ */
14406
+ message_id?: string;
14407
+ received_at?: Date;
14408
+ }
14409
+ export interface PollOptionInput {
14410
+ text?: string;
14411
+ custom?: Record<string, any>;
14412
+ }
14413
+ export interface PollOptionRequest {
14414
+ id: string;
14415
+ text?: string;
14416
+ custom?: Record<string, any>;
14417
+ }
14418
+ export interface PollOptionResponse {
14419
+ /**
14420
+ * Duration of the request in milliseconds
14421
+ */
14422
+ duration: string;
14423
+ poll_option: PollOptionResponseData;
14424
+ }
14425
+ export interface PollOptionResponseData {
14426
+ id: string;
14427
+ text: string;
14428
+ custom: Record<string, any>;
14429
+ text_i18n?: Record<string, string>;
14174
14430
  }
14175
14431
  export interface PollResponse {
14176
14432
  /**
@@ -14210,6 +14466,97 @@ export interface PollResponseData {
14210
14466
  description_i18n?: Record<string, string>;
14211
14467
  name_i18n?: Record<string, string>;
14212
14468
  }
14469
+ export interface PollUpdatedEvent {
14470
+ /**
14471
+ * Date/time of creation
14472
+ */
14473
+ created_at: Date;
14474
+ custom: Record<string, any>;
14475
+ poll: PollResponseData;
14476
+ /**
14477
+ * The type of event: "poll.updated" in this case
14478
+ */
14479
+ type: string;
14480
+ activity_id?: string;
14481
+ /**
14482
+ * The CID of the channel containing the poll
14483
+ */
14484
+ cid?: string;
14485
+ /**
14486
+ * The ID of the message containing the poll
14487
+ */
14488
+ message_id?: string;
14489
+ received_at?: Date;
14490
+ }
14491
+ export interface PollVoteCastedEvent {
14492
+ /**
14493
+ * Date/time of creation
14494
+ */
14495
+ created_at: Date;
14496
+ custom: Record<string, any>;
14497
+ poll: PollResponseData;
14498
+ poll_vote: PollVoteResponseData;
14499
+ /**
14500
+ * The type of event: "poll.vote_casted" in this case
14501
+ */
14502
+ type: string;
14503
+ activity_id?: string;
14504
+ /**
14505
+ * The CID of the channel containing the poll
14506
+ */
14507
+ cid?: string;
14508
+ /**
14509
+ * The ID of the message containing the poll
14510
+ */
14511
+ message_id?: string;
14512
+ received_at?: Date;
14513
+ }
14514
+ export interface PollVoteChangedEvent {
14515
+ /**
14516
+ * Date/time of creation
14517
+ */
14518
+ created_at: Date;
14519
+ custom: Record<string, any>;
14520
+ poll: PollResponseData;
14521
+ poll_vote: PollVoteResponseData;
14522
+ /**
14523
+ * The type of event: "poll.vote_changed" in this case
14524
+ */
14525
+ type: string;
14526
+ activity_id?: string;
14527
+ /**
14528
+ * The CID of the channel containing the poll
14529
+ */
14530
+ cid?: string;
14531
+ /**
14532
+ * The ID of the message containing the poll
14533
+ */
14534
+ message_id?: string;
14535
+ received_at?: Date;
14536
+ }
14537
+ export interface PollVoteRemovedEvent {
14538
+ /**
14539
+ * Date/time of creation
14540
+ */
14541
+ created_at: Date;
14542
+ custom: Record<string, any>;
14543
+ poll: PollResponseData;
14544
+ poll_vote: PollVoteResponseData;
14545
+ /**
14546
+ * The type of event: "poll.vote_removed" in this case
14547
+ */
14548
+ type: string;
14549
+ activity_id?: string;
14550
+ /**
14551
+ * The CID of the channel containing the poll
14552
+ */
14553
+ cid?: string;
14554
+ /**
14555
+ * The ID of the message containing the poll
14556
+ */
14557
+ message_id?: string;
14558
+ received_at?: Date;
14559
+ }
14213
14560
  export interface PollVoteResponse {
14214
14561
  /**
14215
14562
  * Duration of the request in milliseconds
@@ -14395,12 +14742,20 @@ export interface PushPreferenceInput {
14395
14742
  * Remove the disabled until time. (IE stop snoozing notifications)
14396
14743
  */
14397
14744
  remove_disable?: boolean;
14745
+ /**
14746
+ * 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.
14747
+ */
14748
+ remove_schedule?: boolean;
14398
14749
  /**
14399
14750
  * The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth.
14400
14751
  */
14401
14752
  user_id?: string;
14402
14753
  chat_preferences?: ChatPreferencesInput;
14403
14754
  feeds_preferences?: FeedsPreferences;
14755
+ /**
14756
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
14757
+ */
14758
+ schedule?: PushScheduleInput;
14404
14759
  }
14405
14760
  export interface PushPreferencesResponse {
14406
14761
  call_level?: string;
@@ -14415,6 +14770,10 @@ export interface PushPreferencesResponse {
14415
14770
  feeds_level?: string;
14416
14771
  chat_preferences?: ChatPreferencesResponse;
14417
14772
  feeds_preferences?: FeedsPreferencesResponse;
14773
+ /**
14774
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
14775
+ */
14776
+ schedule?: PushScheduleResponse;
14418
14777
  }
14419
14778
  export interface PushProvider {
14420
14779
  created_at: Date;
@@ -14502,6 +14861,26 @@ export interface PushProviderResponse {
14502
14861
  xiaomi_app_secret?: string;
14503
14862
  xiaomi_package_name?: string;
14504
14863
  }
14864
+ export interface PushScheduleInput {
14865
+ /**
14866
+ * 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.
14867
+ */
14868
+ timezone?: string;
14869
+ /**
14870
+ * 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.
14871
+ */
14872
+ quiet_hours?: Array<QuietHoursRuleInput>;
14873
+ }
14874
+ export interface PushScheduleResponse {
14875
+ /**
14876
+ * IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
14877
+ */
14878
+ timezone: string;
14879
+ /**
14880
+ * The quiet windows. Push is suppressed while any rule is active.
14881
+ */
14882
+ quiet_hours: Array<QuietHoursRuleResponse>;
14883
+ }
14505
14884
  export interface PushTemplate {
14506
14885
  created_at: Date;
14507
14886
  enable_push: boolean;
@@ -15008,7 +15387,68 @@ export interface QueryCampaignsResponse {
15008
15387
  next?: string;
15009
15388
  prev?: string;
15010
15389
  }
15390
+ export interface QueryChannelBansRequest {
15391
+ /**
15392
+ * Whether to exclude expired bans or not
15393
+ */
15394
+ exclude_expired_bans?: boolean;
15395
+ /**
15396
+ * When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging
15397
+ */
15398
+ include_total?: boolean;
15399
+ limit?: number;
15400
+ next?: string;
15401
+ prev?: string;
15402
+ user_id?: string;
15403
+ /**
15404
+ * Filter conditions to apply to the query
15405
+ */
15406
+ filter_conditions?: Record<string, any>;
15407
+ /**
15408
+ * User request object
15409
+ */
15410
+ user?: UserRequest;
15411
+ }
15412
+ export interface QueryChannelBansResponse {
15413
+ /**
15414
+ * Duration of the request in milliseconds
15415
+ */
15416
+ duration: string;
15417
+ /**
15418
+ * Users banned from the channel, one entry per user, newest ban first
15419
+ */
15420
+ bans: Array<ChannelBanResponse>;
15421
+ next?: string;
15422
+ prev?: string;
15423
+ /**
15424
+ * 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
15425
+ */
15426
+ total?: number;
15427
+ total_by_scope?: ChannelBansScopeTotals;
15428
+ }
15429
+ export interface QueryChannelsDefaults {
15430
+ /**
15431
+ * Number of channels returned when `limit` is omitted.
15432
+ */
15433
+ limit: number;
15434
+ /**
15435
+ * 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.
15436
+ */
15437
+ max_limit: number;
15438
+ /**
15439
+ * Number of members returned per channel when `member_limit` is omitted.
15440
+ */
15441
+ member_limit: number;
15442
+ /**
15443
+ * Number of messages returned per channel when `message_limit` is omitted.
15444
+ */
15445
+ message_limit: number;
15446
+ }
15011
15447
  export interface QueryChannelsRequest {
15448
+ /**
15449
+ * Whether to include active_member_count for each channel
15450
+ */
15451
+ include_active_member_count?: boolean;
15012
15452
  /**
15013
15453
  * Number of channels to limit
15014
15454
  */
@@ -15293,11 +15733,18 @@ export interface QueryFeedsUsageStatsResponse {
15293
15733
  duration: string;
15294
15734
  activities: DailyMetricStatsResponse;
15295
15735
  api_requests: DailyMetricStatsResponse;
15736
+ collections: DailyMetricStatsResponse;
15737
+ comments: DailyMetricStatsResponse;
15296
15738
  follows: DailyMetricStatsResponse;
15297
15739
  openai_requests: DailyMetricStatsResponse;
15740
+ reactions: DailyMetricStatsResponse;
15298
15741
  emau?: EMAUStatsResponse;
15299
15742
  }
15300
15743
  export interface QueryFollowsRequest {
15744
+ /**
15745
+ * 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.
15746
+ */
15747
+ include_group_counts?: boolean;
15301
15748
  limit?: number;
15302
15749
  next?: string;
15303
15750
  prev?: string;
@@ -15324,6 +15771,10 @@ export interface QueryFollowsResponse {
15324
15771
  * Cursor for previous page
15325
15772
  */
15326
15773
  prev?: string;
15774
+ /**
15775
+ * Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality.
15776
+ */
15777
+ group_counts?: Record<string, number>;
15327
15778
  }
15328
15779
  export interface QueryFutureChannelBansPayload {
15329
15780
  created_at_after?: Date;
@@ -15870,6 +16321,43 @@ export interface QueryRevisionHistoryResponse {
15870
16321
  next?: string;
15871
16322
  prev?: string;
15872
16323
  }
16324
+ export interface QueryScheduledMessagesRequest {
16325
+ /**
16326
+ * Page size, 1 to 100. Defaults to 20
16327
+ */
16328
+ limit?: number;
16329
+ /**
16330
+ * Cursor from the previous page
16331
+ */
16332
+ next?: string;
16333
+ user_id?: string;
16334
+ /**
16335
+ * Only scheduled_at ascending is supported. Pending messages come before failed ones
16336
+ */
16337
+ sort?: Array<SortParamRequest>;
16338
+ /**
16339
+ * Filter for querying scheduled messages
16340
+ */
16341
+ filter?: ScheduledMessagesFilter;
16342
+ /**
16343
+ * User request object
16344
+ */
16345
+ user?: UserRequest;
16346
+ }
16347
+ export interface QueryScheduledMessagesResponse {
16348
+ /**
16349
+ * Duration of the request in milliseconds
16350
+ */
16351
+ duration: string;
16352
+ /**
16353
+ * Pending messages first, then failed ones, each by scheduled_at
16354
+ */
16355
+ scheduled_messages: Array<ScheduledMessageResponse>;
16356
+ /**
16357
+ * Cursor for the next page; empty on the last page
16358
+ */
16359
+ next?: string;
16360
+ }
15873
16361
  export interface QuerySegmentTargetsRequest {
15874
16362
  /**
15875
16363
  * Limit
@@ -16064,6 +16552,34 @@ export interface QueueResponse {
16064
16552
  duration: string;
16065
16553
  queue?: ModerationQueueResponse;
16066
16554
  }
16555
+ export interface QuietHoursRuleInput {
16556
+ /**
16557
+ * 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.
16558
+ */
16559
+ end: string;
16560
+ /**
16561
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59. Must differ from end.
16562
+ */
16563
+ start: string;
16564
+ /**
16565
+ * 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.
16566
+ */
16567
+ days?: Array<string>;
16568
+ }
16569
+ export interface QuietHoursRuleResponse {
16570
+ /**
16571
+ * 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.
16572
+ */
16573
+ end: string;
16574
+ /**
16575
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.
16576
+ */
16577
+ start: string;
16578
+ /**
16579
+ * 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.
16580
+ */
16581
+ days?: Array<string>;
16582
+ }
16067
16583
  export interface RTMPBroadcastRequest {
16068
16584
  /**
16069
16585
  * Name identifier for RTMP broadcast, must be unique in call
@@ -16850,8 +17366,6 @@ export interface RestoreCommentResponse {
16850
17366
  activity: ActivityResponse;
16851
17367
  comment: CommentResponse;
16852
17368
  }
16853
- export interface RestoreFeedGroupRequest {
16854
- }
16855
17369
  export interface RestoreFeedGroupResponse {
16856
17370
  duration: string;
16857
17371
  feed_group: FeedGroupResponse;
@@ -16994,6 +17508,7 @@ export interface ReviewQueueItemResponse {
16994
17508
  * Content payload for moderation
16995
17509
  */
16996
17510
  moderation_payload?: ModerationPayloadResponse;
17511
+ poll?: PollResponseData;
16997
17512
  reaction?: Reaction;
16998
17513
  }
16999
17514
  export interface ReviewQueueItemUpdatedEvent {
@@ -17229,6 +17744,10 @@ export interface RuleBuilderCondition {
17229
17744
  flood_similar_params?: FloodSimilarRuleParameters;
17230
17745
  image_content_params?: ImageContentParameters;
17231
17746
  image_rule_params?: ImageRuleParameters;
17747
+ /**
17748
+ * intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition
17749
+ */
17750
+ intent_rule_params?: IntentRuleParameters;
17232
17751
  ip_content_count_rule_params?: IPContentCountRuleParameters;
17233
17752
  ip_flag_count_rule_params?: IPFlagCountRuleParameters;
17234
17753
  keyframe_ocr_rule_params?: KeyframeOCRRuleParameters;
@@ -17236,6 +17755,7 @@ export interface RuleBuilderCondition {
17236
17755
  ocr_content_params?: OCRContentParameters;
17237
17756
  text_content_params?: TextContentParameters;
17238
17757
  text_rule_params?: TextRuleParameters;
17758
+ user_channel_ban_count_params?: UserChannelBanCountRuleParameters;
17239
17759
  user_channel_count_params?: UserChannelCountRuleParameters;
17240
17760
  user_created_within_params?: UserCreatedWithinParameters;
17241
17761
  user_custom_property_params?: UserCustomPropertyParameters;
@@ -17636,6 +18156,221 @@ export interface SIPTrunkResponse {
17636
18156
  export interface SRTIngress {
17637
18157
  address: string;
17638
18158
  }
18159
+ export interface ScheduledMessageChannelResponse {
18160
+ /**
18161
+ * Channel CID (<type>:<id>)
18162
+ */
18163
+ cid: string;
18164
+ /**
18165
+ * Channel ID
18166
+ */
18167
+ id: string;
18168
+ /**
18169
+ * Channel type
18170
+ */
18171
+ type: string;
18172
+ /**
18173
+ * Channel image, from its custom data
18174
+ */
18175
+ image?: string;
18176
+ /**
18177
+ * Channel name, from its custom data
18178
+ */
18179
+ name?: string;
18180
+ }
18181
+ export interface ScheduledMessageContentResponse {
18182
+ /**
18183
+ * Text of the message
18184
+ */
18185
+ text: string;
18186
+ custom: Record<string, any>;
18187
+ /**
18188
+ * Contains HTML markup of the message
18189
+ */
18190
+ html?: string;
18191
+ /**
18192
+ * Whether the message mentions the whole channel
18193
+ */
18194
+ mentioned_channel?: boolean;
18195
+ /**
18196
+ * Whether the message mentions the online channel members
18197
+ */
18198
+ mentioned_here?: boolean;
18199
+ /**
18200
+ * MML content of the message
18201
+ */
18202
+ mml?: string;
18203
+ /**
18204
+ * ID of parent message (thread)
18205
+ */
18206
+ parent_id?: string;
18207
+ /**
18208
+ * Date/time the pin expires
18209
+ */
18210
+ pin_expires?: Date;
18211
+ /**
18212
+ * Whether the message will be pinned when sent
18213
+ */
18214
+ pinned?: boolean;
18215
+ /**
18216
+ * Identifier of the poll to include in the message
18217
+ */
18218
+ poll_id?: string;
18219
+ quoted_message_id?: string;
18220
+ /**
18221
+ * Whether thread reply should be shown in the channel as well
18222
+ */
18223
+ show_in_channel?: boolean;
18224
+ /**
18225
+ * Whether message is silent or not
18226
+ */
18227
+ silent?: boolean;
18228
+ /**
18229
+ * Contains type of the message. One of: regular, system
18230
+ */
18231
+ type?: string;
18232
+ /**
18233
+ * Array of message attachments
18234
+ */
18235
+ attachments?: Array<Attachment>;
18236
+ /**
18237
+ * IDs of the user groups mentioned in the message
18238
+ */
18239
+ mentioned_group_ids?: Array<string>;
18240
+ /**
18241
+ * Roles mentioned in the message
18242
+ */
18243
+ mentioned_roles?: Array<string>;
18244
+ /**
18245
+ * IDs of the users mentioned in the message
18246
+ */
18247
+ mentioned_users?: Array<string>;
18248
+ /**
18249
+ * IDs of the users the message will be visible to
18250
+ */
18251
+ restricted_visibility?: Array<string>;
18252
+ /**
18253
+ * The location a scheduled message will share
18254
+ */
18255
+ shared_location?: ScheduledMessageLocation;
18256
+ }
18257
+ export interface ScheduledMessageFailedEvent {
18258
+ /**
18259
+ * Date/time of creation
18260
+ */
18261
+ created_at: Date;
18262
+ custom: Record<string, any>;
18263
+ user: UserResponseCommonFields;
18264
+ /**
18265
+ * The type of event: "scheduled_message.failed" in this case
18266
+ */
18267
+ type: string;
18268
+ /**
18269
+ * The CID of the channel the message is scheduled in
18270
+ */
18271
+ cid?: string;
18272
+ received_at?: Date;
18273
+ /**
18274
+ * A message scheduled to be sent later
18275
+ */
18276
+ scheduled_message?: ScheduledMessageResponse;
18277
+ }
18278
+ export interface ScheduledMessageLocation {
18279
+ /**
18280
+ * The ID of the device that created the location.
18281
+ */
18282
+ created_by_device_id: string;
18283
+ /**
18284
+ * The date when the location sharing ends.
18285
+ * If it's empty, it means the location sharing is static instead of live.
18286
+ */
18287
+ end_at?: Date;
18288
+ /**
18289
+ * The latitude of the location.
18290
+ */
18291
+ latitude?: number;
18292
+ /**
18293
+ * The longitude of the location.
18294
+ */
18295
+ longitude?: number;
18296
+ }
18297
+ export interface ScheduledMessageResponse {
18298
+ /**
18299
+ * The CID of the channel the message will be sent to
18300
+ */
18301
+ cid: string;
18302
+ /**
18303
+ * Date/time of creation
18304
+ */
18305
+ created_at: Date;
18306
+ /**
18307
+ * Unique identifier of the scheduled message
18308
+ */
18309
+ id: string;
18310
+ /**
18311
+ * Date/time the message is scheduled to be sent
18312
+ */
18313
+ scheduled_at: Date;
18314
+ /**
18315
+ * 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
18316
+ */
18317
+ status: string;
18318
+ /**
18319
+ * Date/time of the last update
18320
+ */
18321
+ updated_at: Date;
18322
+ /**
18323
+ * The message a scheduled message will send
18324
+ */
18325
+ message: ScheduledMessageContentResponse;
18326
+ /**
18327
+ * User response object
18328
+ */
18329
+ user: UserResponse;
18330
+ /**
18331
+ * 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
18332
+ */
18333
+ failure_reason?: string;
18334
+ /**
18335
+ * The channel of a scheduled message
18336
+ */
18337
+ channel?: ScheduledMessageChannelResponse;
18338
+ }
18339
+ export interface ScheduledMessageSentEvent {
18340
+ /**
18341
+ * Date/time of creation
18342
+ */
18343
+ created_at: Date;
18344
+ /**
18345
+ * The ID of the message that was sent
18346
+ */
18347
+ message_id: string;
18348
+ custom: Record<string, any>;
18349
+ user: UserResponseCommonFields;
18350
+ /**
18351
+ * The type of event: "scheduled_message.sent" in this case
18352
+ */
18353
+ type: string;
18354
+ /**
18355
+ * The CID of the channel the message was sent to
18356
+ */
18357
+ cid?: string;
18358
+ received_at?: Date;
18359
+ /**
18360
+ * A message scheduled to be sent later
18361
+ */
18362
+ scheduled_message?: ScheduledMessageResponse;
18363
+ }
18364
+ export interface ScheduledMessagesFilter {
18365
+ /**
18366
+ * Only scheduled messages of this channel
18367
+ */
18368
+ cid?: string;
18369
+ /**
18370
+ * Only these statuses, as reported in each scheduled message's status. One or more of: scheduled, sending, failed
18371
+ */
18372
+ status?: Array<string>;
18373
+ }
17639
18374
  export interface ScoreBands {
17640
18375
  good?: number;
17641
18376
  ok?: number;
@@ -17899,6 +18634,10 @@ export interface SendMessageRequest {
17899
18634
  include_mentioned_members?: boolean;
17900
18635
  keep_channel_hidden?: boolean;
17901
18636
  pending?: boolean;
18637
+ /**
18638
+ * 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
18639
+ */
18640
+ scheduled_at?: Date;
17902
18641
  skip_enrich_url?: boolean;
17903
18642
  skip_push?: boolean;
17904
18643
  pending_message_metadata?: Record<string, string>;
@@ -17924,6 +18663,10 @@ export interface SendMessageResponse {
17924
18663
  * Pending message metadata
17925
18664
  */
17926
18665
  pending_message_metadata?: Record<string, string>;
18666
+ /**
18667
+ * A message scheduled to be sent later
18668
+ */
18669
+ scheduled_message?: ScheduledMessageResponse;
17927
18670
  }
17928
18671
  export interface SendReactionRequest {
17929
18672
  /**
@@ -17950,6 +18693,16 @@ export interface SendReactionResponse {
17950
18693
  message: MessageResponse;
17951
18694
  reaction: ReactionResponse;
17952
18695
  }
18696
+ export interface SendScheduledMessageNowResponse {
18697
+ /**
18698
+ * Duration of the request in milliseconds
18699
+ */
18700
+ duration: string;
18701
+ /**
18702
+ * A message scheduled to be sent later
18703
+ */
18704
+ scheduled_message: ScheduledMessageResponse;
18705
+ }
17953
18706
  export interface SendUserCustomEventRequest {
17954
18707
  event: UserCustomEventRequest;
17955
18708
  }
@@ -18256,8 +19009,6 @@ export interface StartFrameRecordingResponse {
18256
19009
  */
18257
19010
  duration: string;
18258
19011
  }
18259
- export interface StartHLSBroadcastingRequest {
18260
- }
18261
19012
  export interface StartHLSBroadcastingResponse {
18262
19013
  duration: string;
18263
19014
  /**
@@ -18265,8 +19016,6 @@ export interface StartHLSBroadcastingResponse {
18265
19016
  */
18266
19017
  playlist_url: string;
18267
19018
  }
18268
- export interface StartPolicyTestRunRequest {
18269
- }
18270
19019
  export interface StartRTMPBroadcastsRequest {
18271
19020
  /**
18272
19021
  * List of broadcasts to start
@@ -18308,15 +19057,18 @@ export interface StartTranscriptionResponse {
18308
19057
  */
18309
19058
  duration: string;
18310
19059
  }
18311
- export interface StopAllRTMPBroadcastsRequest {
18312
- }
18313
19060
  export interface StopAllRTMPBroadcastsResponse {
18314
19061
  /**
18315
19062
  * Duration of the request in milliseconds
18316
19063
  */
18317
19064
  duration: string;
18318
19065
  }
18319
- export interface StopCampaignRequest {
19066
+ export interface StopCampaignResponse {
19067
+ /**
19068
+ * Duration of the request in milliseconds
19069
+ */
19070
+ duration: string;
19071
+ campaign?: CampaignResponse;
18320
19072
  }
18321
19073
  export interface StopClosedCaptionsRequest {
18322
19074
  stop_transcription?: boolean;
@@ -18327,16 +19079,12 @@ export interface StopClosedCaptionsResponse {
18327
19079
  */
18328
19080
  duration: string;
18329
19081
  }
18330
- export interface StopFrameRecordingRequest {
18331
- }
18332
19082
  export interface StopFrameRecordingResponse {
18333
19083
  /**
18334
19084
  * Duration of the request in milliseconds
18335
19085
  */
18336
19086
  duration: string;
18337
19087
  }
18338
- export interface StopHLSBroadcastingRequest {
18339
- }
18340
19088
  export interface StopHLSBroadcastingResponse {
18341
19089
  /**
18342
19090
  * Duration of the request in milliseconds
@@ -18423,9 +19171,9 @@ export interface StoriesFeedUpdatedEvent {
18423
19171
  }
18424
19172
  export interface SubmitActionRequest {
18425
19173
  /**
18426
- * 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
19174
+ * 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
18427
19175
  */
18428
- action_type: 'flag' | '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' | 'reject_appeal' | 'escalate' | 'de_escalate' | 'bypass';
19176
+ action_type: 'flag' | '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' | 'reject_appeal' | 'escalate' | 'de_escalate' | 'bypass';
18429
19177
  /**
18430
19178
  * UUID of the appeal to act on (required for reject_appeal, optional for other actions)
18431
19179
  */
@@ -18460,6 +19208,18 @@ export interface SubmitActionRequest {
18460
19208
  * Configuration for message deletion action
18461
19209
  */
18462
19210
  delete_message?: DeleteMessageRequestPayload;
19211
+ /**
19212
+ * Configuration for poll deletion action. Poll deletion is always permanent.
19213
+ */
19214
+ delete_poll?: DeletePollRequestPayload;
19215
+ /**
19216
+ * 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.
19217
+ */
19218
+ delete_poll_answer?: DeletePollAnswerRequestPayload;
19219
+ /**
19220
+ * Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.
19221
+ */
19222
+ delete_poll_option?: DeletePollOptionRequestPayload;
18463
19223
  /**
18464
19224
  * Configuration for reaction deletion action
18465
19225
  */
@@ -18913,8 +19673,6 @@ export interface ThumbnailsSettingsRequest {
18913
19673
  export interface ThumbnailsSettingsResponse {
18914
19674
  enabled: boolean;
18915
19675
  }
18916
- export interface Time {
18917
- }
18918
19676
  export interface TimeWindow {
18919
19677
  from: string;
18920
19678
  to: string;
@@ -19217,6 +19975,10 @@ export interface UnfollowBatchRequest {
19217
19975
  * List of follow relationships to remove, each with optional keep_history
19218
19976
  */
19219
19977
  follows: Array<UnfollowPair>;
19978
+ /**
19979
+ * 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.
19980
+ */
19981
+ async?: boolean;
19220
19982
  /**
19221
19983
  * Whether to delete the corresponding notification activity (default: false)
19222
19984
  */
@@ -19232,6 +19994,10 @@ export interface UnfollowBatchResponse {
19232
19994
  * List of follow relationships that were removed
19233
19995
  */
19234
19996
  follows: Array<FollowResponse>;
19997
+ /**
19998
+ * ID of the background task when the request was sent with async: true
19999
+ */
20000
+ task_id?: string;
19235
20001
  }
19236
20002
  export interface UnfollowPair {
19237
20003
  /**
@@ -19582,7 +20348,10 @@ export interface UpdateAppRequest {
19582
20348
  reminders_interval?: number;
19583
20349
  reminders_max_members?: number;
19584
20350
  reminders_max_per_user?: number;
19585
- revoke_tokens_issued_before?: Date;
20351
+ /**
20352
+ * Revokes tokens issued before this date
20353
+ */
20354
+ revoke_tokens_issued_before?: Date | null;
19586
20355
  sns_key?: string;
19587
20356
  sns_secret?: string;
19588
20357
  sns_topic_arn?: string;
@@ -19604,7 +20373,7 @@ export interface UpdateAppRequest {
19604
20373
  datadog_info?: DataDogInfo;
19605
20374
  file_upload_config?: FileUploadConfig;
19606
20375
  firebase_config?: FirebaseConfig;
19607
- grants?: Record<string, Array<string>>;
20376
+ grants?: Record<string, Array<string>> | null;
19608
20377
  huawei_config?: HuaweiConfig;
19609
20378
  image_upload_config?: FileUploadConfig;
19610
20379
  moderation_dashboard_preferences?: ModerationDashboardPreferences;
@@ -19764,6 +20533,14 @@ export interface UpdateCampaignRequest {
19764
20533
  user_ids?: Array<string>;
19765
20534
  channel_template?: CampaignChannelTemplate;
19766
20535
  }
20536
+ export interface UpdateCampaignResponse {
20537
+ /**
20538
+ * Duration of the request in milliseconds
20539
+ */
20540
+ duration: string;
20541
+ campaign?: CampaignResponse;
20542
+ users?: PagerResponse;
20543
+ }
19767
20544
  export interface UpdateChannelPartialRequest {
19768
20545
  user_id?: string;
19769
20546
  unset?: Array<string>;
@@ -19874,9 +20651,8 @@ export interface UpdateChannelResponse {
19874
20651
  message?: MessageResponse;
19875
20652
  }
19876
20653
  export interface UpdateChannelTypeRequest {
19877
- automod: 'disabled' | 'simple' | 'AI';
19878
- automod_behavior: 'flag' | 'block' | 'shadow_block';
19879
- max_message_length: number;
20654
+ automod?: 'disabled' | 'simple' | 'AI';
20655
+ automod_behavior?: 'flag' | 'block' | 'shadow_block';
19880
20656
  blocklist?: string;
19881
20657
  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
19882
20658
  connect_events?: boolean;
@@ -19884,10 +20660,11 @@ export interface UpdateChannelTypeRequest {
19884
20660
  custom_events?: boolean;
19885
20661
  delivery_events?: boolean;
19886
20662
  mark_messages_pending?: boolean;
20663
+ max_message_length?: number;
19887
20664
  message_retention?: string;
19888
20665
  mutes?: boolean;
19889
20666
  partition_size?: number;
19890
- partition_ttl?: string;
20667
+ partition_ttl?: string | null;
19891
20668
  polls?: boolean;
19892
20669
  /**
19893
20670
  * Sets the push notification level for a channel type
@@ -19918,7 +20695,7 @@ export interface UpdateChannelTypeRequest {
19918
20695
  */
19919
20696
  automod_thresholds?: Thresholds;
19920
20697
  chat_preferences?: ChatPreferences;
19921
- grants?: Record<string, Array<string>>;
20698
+ grants?: Record<string, Array<string>> | null;
19922
20699
  }
19923
20700
  export interface UpdateChannelTypeResponse {
19924
20701
  automod: 'disabled' | 'simple' | 'AI';
@@ -20454,6 +21231,14 @@ export interface UpdatePollOptionRequest {
20454
21231
  * Option text
20455
21232
  */
20456
21233
  text: string;
21234
+ /**
21235
+ * Key of the moderation configuration to use. Server-side only.
21236
+ */
21237
+ config_key?: string;
21238
+ /**
21239
+ * Team associated with the configuration. Server-side only.
21240
+ */
21241
+ config_team?: string;
20457
21242
  user_id?: string;
20458
21243
  /**
20459
21244
  * Custom data for this object
@@ -20465,6 +21250,14 @@ export interface UpdatePollOptionRequest {
20465
21250
  user?: UserRequest;
20466
21251
  }
20467
21252
  export interface UpdatePollPartialRequest {
21253
+ /**
21254
+ * Key of the moderation configuration to use. Server-side only.
21255
+ */
21256
+ config_key?: string;
21257
+ /**
21258
+ * Team associated with the configuration. Server-side only.
21259
+ */
21260
+ config_team?: string;
20468
21261
  user_id?: string;
20469
21262
  /**
20470
21263
  * Array of field names to unset
@@ -20496,6 +21289,14 @@ export interface UpdatePollRequest {
20496
21289
  * Allow user suggested options
20497
21290
  */
20498
21291
  allow_user_suggested_options?: boolean;
21292
+ /**
21293
+ * Key of the moderation configuration to use. Server-side only.
21294
+ */
21295
+ config_key?: string;
21296
+ /**
21297
+ * Team associated with the configuration. Server-side only.
21298
+ */
21299
+ config_team?: string;
20499
21300
  /**
20500
21301
  * Poll description
20501
21302
  */
@@ -20649,6 +21450,26 @@ export interface UpdateSIPTrunkResponse {
20649
21450
  */
20650
21451
  sip_trunk?: SIPTrunkResponse;
20651
21452
  }
21453
+ export interface UpdateScheduledMessageRequest {
21454
+ /**
21455
+ * New send time (UTC). Must be at least 1 minute and at most the app's maximum lead time from now
21456
+ */
21457
+ scheduled_at?: Date;
21458
+ /**
21459
+ * Message data for creating or updating a message
21460
+ */
21461
+ message?: MessageRequest;
21462
+ }
21463
+ export interface UpdateScheduledMessageResponse {
21464
+ /**
21465
+ * Duration of the request in milliseconds
21466
+ */
21467
+ duration: string;
21468
+ /**
21469
+ * A message scheduled to be sent later
21470
+ */
21471
+ scheduled_message: ScheduledMessageResponse;
21472
+ }
20652
21473
  export interface UpdateSegmentRequest {
20653
21474
  /**
20654
21475
  * The description of the segment (max 256 characters)
@@ -20885,6 +21706,10 @@ export interface UpsertActivitiesRequest {
20885
21706
  * 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.
20886
21707
  */
20887
21708
  force_moderation?: boolean;
21709
+ /**
21710
+ * 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.
21711
+ */
21712
+ skip_existing?: boolean;
20888
21713
  }
20889
21714
  export interface UpsertActivitiesResponse {
20890
21715
  duration: string;
@@ -20896,6 +21721,10 @@ export interface UpsertActivitiesResponse {
20896
21721
  * Total number of mention notification activities created for mentioned users across all activities
20897
21722
  */
20898
21723
  mention_notifications_created?: number;
21724
+ /**
21725
+ * IDs of activities left unchanged because they already existed. Only set when skip_existing is true.
21726
+ */
21727
+ skipped_existing?: Array<string>;
20899
21728
  }
20900
21729
  export interface UpsertCollectionsRequest {
20901
21730
  /**
@@ -21210,6 +22039,11 @@ export interface UserBannedEvent {
21210
22039
  channel_custom?: Record<string, any>;
21211
22040
  created_by?: UserResponseCommonFields;
21212
22041
  }
22042
+ export interface UserChannelBanCountRuleParameters {
22043
+ banned_by?: string;
22044
+ threshold?: number;
22045
+ time_window?: string;
22046
+ }
21213
22047
  export interface UserChannelCountRuleParameters {
21214
22048
  threshold?: number;
21215
22049
  time_window?: string;
@@ -21829,10 +22663,6 @@ export interface VideoContentParameters {
21829
22663
  label_operator?: string;
21830
22664
  harm_labels?: Array<string>;
21831
22665
  }
21832
- export interface VideoEndCallRequestPayload {
21833
- }
21834
- export interface VideoKickUserRequestPayload {
21835
- }
21836
22666
  export interface VideoReactionOverTimeResponse {
21837
22667
  by_minute?: Array<CountByMinuteResponse>;
21838
22668
  }
@@ -22182,8 +23012,6 @@ export type WHEvent = ({
22182
23012
  } & ModerationFlaggedEvent) | ({
22183
23013
  type: 'moderation.image_analysis.complete';
22184
23014
  } & ModerationImageAnalysisCompleteEvent) | ({
22185
- type: 'moderation.intent_detected';
22186
- } & IntentDetectedEvent) | ({
22187
23015
  type: 'moderation.mark_reviewed';
22188
23016
  } & ModerationMarkReviewedEvent) | ({
22189
23017
  type: 'moderation.text_analysis.complete';
@@ -22198,6 +23026,18 @@ export type WHEvent = ({
22198
23026
  } & ReminderNotificationEvent) | ({
22199
23027
  type: 'notification.thread_message_new';
22200
23028
  } & NotificationThreadMessageNewEvent) | ({
23029
+ type: 'poll.closed';
23030
+ } & PollClosedEvent) | ({
23031
+ type: 'poll.deleted';
23032
+ } & PollDeletedEvent) | ({
23033
+ type: 'poll.updated';
23034
+ } & PollUpdatedEvent) | ({
23035
+ type: 'poll.vote_casted';
23036
+ } & PollVoteCastedEvent) | ({
23037
+ type: 'poll.vote_changed';
23038
+ } & PollVoteChangedEvent) | ({
23039
+ type: 'poll.vote_removed';
23040
+ } & PollVoteRemovedEvent) | ({
22201
23041
  type: 'reaction.deleted';
22202
23042
  } & ReactionDeletedEvent) | ({
22203
23043
  type: 'reaction.new';
@@ -22214,6 +23054,10 @@ export type WHEvent = ({
22214
23054
  } & ReviewQueueItemNewEvent) | ({
22215
23055
  type: 'review_queue_item.updated';
22216
23056
  } & ReviewQueueItemUpdatedEvent) | ({
23057
+ type: 'scheduled_message.failed';
23058
+ } & ScheduledMessageFailedEvent) | ({
23059
+ type: 'scheduled_message.sent';
23060
+ } & ScheduledMessageSentEvent) | ({
22217
23061
  type: 'thread.updated';
22218
23062
  } & ThreadUpdatedEvent) | ({
22219
23063
  type: 'user.banned';