@stream-io/node-sdk 0.8.13 → 0.8.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  */
@@ -857,6 +861,10 @@ export interface ActivitySelectorConfig {
857
861
  * Maximum time in milliseconds this selector may take (25-5000). A selector that runs over its budget is dropped from that read instead of failing it, and stays out for the rest of that pagination session. The budget can only tighten the default, never extend it. Omit to use the default. Only supported on the popular, proximity, interest, query and follow_suggestion selectors
858
862
  */
859
863
  time_budget_ms?: number;
864
+ /**
865
+ * Radius in kilometers the proximity selector searches around the viewer's location (the request's viewer_location, else the user's custom.location) when its filter has no near or within_bounds. Greater than 0 and at most 250. Omit to use the default (10). Only supported on the proximity selector
866
+ */
867
+ viewer_location_radius_km?: number;
860
868
  /**
861
869
  * Sort parameters for activity selection
862
870
  */
@@ -893,6 +901,10 @@ export interface ActivitySelectorConfigResponse {
893
901
  * Maximum time in milliseconds this selector may take before it is dropped from the read
894
902
  */
895
903
  time_budget_ms?: number;
904
+ /**
905
+ * Radius in kilometers the proximity selector searches around the viewer's location
906
+ */
907
+ viewer_location_radius_km?: number;
896
908
  /**
897
909
  * Sort parameters for activity selection
898
910
  */
@@ -987,6 +999,7 @@ export interface AddActivityRequest {
987
999
  * Whether to skip URL enrichment for the activity
988
1000
  */
989
1001
  skip_enrich_url?: boolean;
1002
+ skip_existing?: boolean;
990
1003
  /**
991
1004
  * Whether to skip push notifications
992
1005
  */
@@ -1048,6 +1061,10 @@ export interface AddActivityResponse {
1048
1061
  * Number of mention notification activities created for mentioned users
1049
1062
  */
1050
1063
  mention_notifications_created?: number;
1064
+ /**
1065
+ * Contains the activity ID when skip_existing is true and the activity already existed, so it was left unchanged.
1066
+ */
1067
+ skipped_existing?: Array<string>;
1051
1068
  }
1052
1069
  export interface AddBookmarkRequest {
1053
1070
  /**
@@ -1477,6 +1494,14 @@ export interface AnalyzeResponse {
1477
1494
  * `complete` (all fields screened), `partial` (mix of verdicts and per-field errors), or `pending` (async).
1478
1495
  */
1479
1496
  status: string;
1497
+ /**
1498
+ * 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`).
1499
+ */
1500
+ llm_model?: string;
1501
+ /**
1502
+ * reasoning_effort sent with the LLM request. Omitted when the request did not send one.
1503
+ */
1504
+ llm_reasoning_effort?: string;
1480
1505
  /**
1481
1506
  * Per-image moderation verdicts keyed by caller label.
1482
1507
  */
@@ -1512,6 +1537,16 @@ export interface AnalyzeTextField {
1512
1537
  */
1513
1538
  classifications?: Array<Classification>;
1514
1539
  }
1540
+ export interface AppDefaults {
1541
+ /**
1542
+ * Defaults applied by the get-or-create channel endpoint.
1543
+ */
1544
+ get_or_create_channel: GetOrCreateChannelDefaults;
1545
+ /**
1546
+ * Defaults applied by the query channels endpoint.
1547
+ */
1548
+ query_channels: QueryChannelsDefaults;
1549
+ }
1515
1550
  export interface AppResponseFields {
1516
1551
  allow_multi_user_devices: boolean;
1517
1552
  /**
@@ -1569,6 +1604,10 @@ export interface AppResponseFields {
1569
1604
  webhook_events: Array<string>;
1570
1605
  call_types: Record<string, CallType>;
1571
1606
  channel_configs: Record<string, ChannelConfig>;
1607
+ /**
1608
+ * Request limit defaults applied by the server when the corresponding field is omitted.
1609
+ */
1610
+ defaults: AppDefaults;
1572
1611
  file_upload_config: FileUploadConfig;
1573
1612
  grants: Record<string, Array<string>>;
1574
1613
  image_upload_config: FileUploadConfig;
@@ -1810,6 +1849,7 @@ export interface AsyncExportUsersEvent {
1810
1849
  export interface AsyncImportErrorEvent {
1811
1850
  created_at: Date;
1812
1851
  error: string;
1852
+ error_code: string;
1813
1853
  finished_at: Date;
1814
1854
  product: string;
1815
1855
  state: string;
@@ -3514,6 +3554,7 @@ export interface CallSettingsRequest {
3514
3554
  geofencing?: GeofenceSettingsRequest;
3515
3555
  individual_recording?: IndividualRecordingSettingsRequest;
3516
3556
  ingress?: IngressSettingsRequest;
3557
+ lifecycle?: LifecycleSettingsRequest;
3517
3558
  limits?: LimitsSettingsRequest;
3518
3559
  raw_recording?: RawRecordingSettingsRequest;
3519
3560
  recording?: RecordSettingsRequest;
@@ -3538,6 +3579,10 @@ export interface CallSettingsResponse {
3538
3579
  frame_recording: FrameRecordingSettingsResponse;
3539
3580
  geofencing: GeofenceSettingsResponse;
3540
3581
  individual_recording: IndividualRecordingSettingsResponse;
3582
+ /**
3583
+ * LifecycleSettings is the payload for call lifecycle settings
3584
+ */
3585
+ lifecycle: LifecycleSettingsResponse;
3541
3586
  limits: LimitsSettingsResponse;
3542
3587
  raw_recording: RawRecordingSettingsResponse;
3543
3588
  /**
@@ -3918,8 +3963,6 @@ export interface CampaignStatsResponse {
3918
3963
  stats_users_read: number;
3919
3964
  stats_users_sent: number;
3920
3965
  }
3921
- export interface CancelImportV2TaskRequest {
3922
- }
3923
3966
  export interface CancelImportV2TaskResponse {
3924
3967
  /**
3925
3968
  * Duration of the request in milliseconds
@@ -3927,6 +3970,14 @@ export interface CancelImportV2TaskResponse {
3927
3970
  duration: string;
3928
3971
  }
3929
3972
  export interface CastPollVoteRequest {
3973
+ /**
3974
+ * Key of the moderation configuration to use. Server-side only.
3975
+ */
3976
+ config_key?: string;
3977
+ /**
3978
+ * Team associated with the configuration. Server-side only.
3979
+ */
3980
+ config_team?: string;
3930
3981
  user_id?: string;
3931
3982
  /**
3932
3983
  * User request object
@@ -3948,6 +3999,30 @@ export interface ChangeFeedVisibilityResponse {
3948
3999
  duration: string;
3949
4000
  feed: FeedResponse;
3950
4001
  }
4002
+ export interface ChannelBanResponse {
4003
+ created_at: Date;
4004
+ scopes: Array<string>;
4005
+ channel_ban?: ChannelBanScopeResponse;
4006
+ future_channel_ban?: ChannelBanScopeResponse;
4007
+ /**
4008
+ * User response object
4009
+ */
4010
+ user?: UserResponse;
4011
+ }
4012
+ export interface ChannelBanScopeResponse {
4013
+ created_at: Date;
4014
+ shadow: boolean;
4015
+ expires?: Date;
4016
+ reason?: string;
4017
+ /**
4018
+ * User response object
4019
+ */
4020
+ banned_by?: UserResponse;
4021
+ }
4022
+ export interface ChannelBansScopeTotals {
4023
+ channel: number;
4024
+ future_channel: number;
4025
+ }
3951
4026
  export interface ChannelBatchCompletedEvent {
3952
4027
  batch_created_at: Date;
3953
4028
  created_at: Date;
@@ -4471,6 +4546,7 @@ export interface ChannelMemberResponse {
4471
4546
  * Date/time of the last update
4472
4547
  */
4473
4548
  updated_at: Date;
4549
+ user_id: string;
4474
4550
  custom: Record<string, any>;
4475
4551
  archived_at?: Date;
4476
4552
  /**
@@ -4508,7 +4584,6 @@ export interface ChannelMemberResponse {
4508
4584
  */
4509
4585
  role?: string;
4510
4586
  status?: string;
4511
- user_id?: string;
4512
4587
  deleted_messages?: Array<string>;
4513
4588
  /**
4514
4589
  * User response object
@@ -4603,6 +4678,7 @@ export declare const ChannelOwnCapability: {
4603
4678
  readonly QUERY_POLL_VOTES: "query-poll-votes";
4604
4679
  readonly QUOTE_MESSAGE: "quote-message";
4605
4680
  readonly READ_EVENTS: "read-events";
4681
+ readonly SCHEDULE_MESSAGE: "schedule-message";
4606
4682
  readonly SEARCH_MESSAGES: "search-messages";
4607
4683
  readonly SEND_CUSTOM_EVENTS: "send-custom-events";
4608
4684
  readonly SEND_LINKS: "send-links";
@@ -4666,6 +4742,10 @@ export interface ChannelResponse {
4666
4742
  * Custom data for this object
4667
4743
  */
4668
4744
  custom: Record<string, any>;
4745
+ /**
4746
+ * Number of members who are not deactivated or deleted
4747
+ */
4748
+ active_member_count?: number;
4669
4749
  /**
4670
4750
  * Whether auto translation is enabled or not
4671
4751
  */
@@ -4746,16 +4826,54 @@ export interface ChannelResponse {
4746
4826
  }
4747
4827
  export interface ChannelStateResponse {
4748
4828
  duration: string;
4829
+ /**
4830
+ * List of channel members
4831
+ */
4749
4832
  members: Array<ChannelMemberResponse>;
4833
+ /**
4834
+ * List of channel messages
4835
+ */
4750
4836
  messages: Array<MessageResponse>;
4837
+ /**
4838
+ * List of pinned messages in the channel
4839
+ */
4751
4840
  pinned_messages: Array<MessageResponse>;
4752
4841
  threads: Array<ThreadStateResponse>;
4842
+ /**
4843
+ * 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
4844
+ */
4845
+ cooldown_remaining_ms?: number;
4846
+ /**
4847
+ * Whether this channel is hidden or not
4848
+ */
4753
4849
  hidden?: boolean;
4850
+ /**
4851
+ * Messages before this date are hidden from the user
4852
+ */
4754
4853
  hide_messages_before?: Date;
4854
+ /**
4855
+ * Number of channel watchers
4856
+ */
4755
4857
  watcher_count?: number;
4858
+ /**
4859
+ * Active live locations in the channel
4860
+ */
4756
4861
  active_live_locations?: Array<SharedLocationResponseData>;
4862
+ /**
4863
+ * Pending messages that this user has sent
4864
+ */
4757
4865
  pending_messages?: Array<PendingMessageResponse>;
4866
+ /**
4867
+ * List of read states
4868
+ */
4758
4869
  read?: Array<ReadStateResponse>;
4870
+ /**
4871
+ * 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
4872
+ */
4873
+ scheduled_messages?: Array<ScheduledMessageResponse>;
4874
+ /**
4875
+ * List of user who is watching the channel
4876
+ */
4759
4877
  watchers?: Array<UserResponse>;
4760
4878
  /**
4761
4879
  * Represents channel in chat
@@ -4782,6 +4900,10 @@ export interface ChannelStateResponseFields {
4782
4900
  */
4783
4901
  pinned_messages: Array<MessageResponse>;
4784
4902
  threads: Array<ThreadStateResponse>;
4903
+ /**
4904
+ * 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
4905
+ */
4906
+ cooldown_remaining_ms?: number;
4785
4907
  /**
4786
4908
  * Whether this channel is hidden or not
4787
4909
  */
@@ -4806,6 +4928,10 @@ export interface ChannelStateResponseFields {
4806
4928
  * List of read states
4807
4929
  */
4808
4930
  read?: Array<ReadStateResponse>;
4931
+ /**
4932
+ * 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
4933
+ */
4934
+ scheduled_messages?: Array<ScheduledMessageResponse>;
4809
4935
  /**
4810
4936
  * List of user who is watching the channel
4811
4937
  */
@@ -5253,9 +5379,9 @@ export interface CheckPushRequest {
5253
5379
  */
5254
5380
  apn_template?: string;
5255
5381
  /**
5256
- * Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due
5382
+ * 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
5383
  */
5258
- event_type?: 'message.new' | 'message.updated' | 'reaction.new' | 'reaction.updated' | 'notification.reminder_due';
5384
+ 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
5385
  /**
5260
5386
  * Push message data template for Firebase
5261
5387
  */
@@ -5364,25 +5490,21 @@ export interface CheckResponse {
5364
5490
  */
5365
5491
  status: string;
5366
5492
  /**
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
5493
+ * 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
5494
  */
5373
- intent_score?: number;
5495
+ llm_model?: string;
5374
5496
  /**
5375
- * The matched topic's configured score_threshold, for comparison against intent_score (test mode only). Same omitted-not-zero rule as intent_score
5497
+ * reasoning_effort sent with the LLM request that produced the verdict. Omitted when the request did not send one
5376
5498
  */
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;
5499
+ llm_reasoning_effort?: string;
5382
5500
  /**
5383
5501
  * ID of the running moderation task
5384
5502
  */
5385
5503
  task_id?: string;
5504
+ /**
5505
+ * 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)
5506
+ */
5507
+ intent_scores?: Array<IntentScoreResponse>;
5386
5508
  /**
5387
5509
  * All moderation rules triggered by this check (content, user, and call rules), with their resolved actions
5388
5510
  */
@@ -5512,6 +5634,14 @@ export interface ClientEvent {
5512
5634
  * Reason the client initiated the join. Optional on CoordinatorJoin events; empty when not provided.
5513
5635
  */
5514
5636
  join_reason?: string;
5637
+ /**
5638
+ * 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.
5639
+ */
5640
+ leave_initiator?: string;
5641
+ /**
5642
+ * Internal reason or triggering event for the leave that aborted a join. Optional; sent on failure events. Maximum 200 characters.
5643
+ */
5644
+ leave_reason?: string;
5515
5645
  /**
5516
5646
  * Microphone permission status: INITIATED, FAILED, GRANTED, or NOT_INITIATED. Required on every MediaDevicePermission event.
5517
5647
  */
@@ -5977,8 +6107,6 @@ export interface CommentUpdatedEvent {
5977
6107
  received_at?: Date;
5978
6108
  user?: UserResponseCommonFields;
5979
6109
  }
5980
- export interface CommitMessageRequest {
5981
- }
5982
6110
  export interface CompositeRecordingResponse {
5983
6111
  status: string;
5984
6112
  }
@@ -6323,7 +6451,7 @@ export interface CreateChannelTypeRequest {
6323
6451
  /**
6324
6452
  * Partition TTL
6325
6453
  */
6326
- partition_ttl?: string;
6454
+ partition_ttl?: string | null;
6327
6455
  /**
6328
6456
  * Polls
6329
6457
  */
@@ -6336,6 +6464,10 @@ export interface CreateChannelTypeRequest {
6336
6464
  * Push notifications
6337
6465
  */
6338
6466
  push_notifications?: boolean;
6467
+ /**
6468
+ * Enables message quotes
6469
+ */
6470
+ quotes?: boolean;
6339
6471
  /**
6340
6472
  * Reactions
6341
6473
  */
@@ -6344,6 +6476,10 @@ export interface CreateChannelTypeRequest {
6344
6476
  * Read events
6345
6477
  */
6346
6478
  read_events?: boolean;
6479
+ /**
6480
+ * Enables message reminders
6481
+ */
6482
+ reminders?: boolean;
6347
6483
  /**
6348
6484
  * Replies
6349
6485
  */
@@ -6382,11 +6518,15 @@ export interface CreateChannelTypeRequest {
6382
6518
  * List of permissions for the channel type
6383
6519
  */
6384
6520
  permissions?: Array<PolicyRequest>;
6521
+ /**
6522
+ * Sets thresholds for AI moderation
6523
+ */
6524
+ automod_thresholds?: Thresholds;
6385
6525
  chat_preferences?: ChatPreferences;
6386
6526
  /**
6387
6527
  * List of grants for the channel type
6388
6528
  */
6389
- grants?: Record<string, Array<string>>;
6529
+ grants?: Record<string, Array<string>> | null;
6390
6530
  }
6391
6531
  export interface CreateChannelTypeResponse {
6392
6532
  automod: 'disabled' | 'simple' | 'AI';
@@ -6773,6 +6913,14 @@ export interface CreatePollOptionRequest {
6773
6913
  * Option text
6774
6914
  */
6775
6915
  text: string;
6916
+ /**
6917
+ * Key of the moderation configuration to use. Server-side only.
6918
+ */
6919
+ config_key?: string;
6920
+ /**
6921
+ * Team associated with the configuration. Server-side only.
6922
+ */
6923
+ config_team?: string;
6776
6924
  user_id?: string;
6777
6925
  /**
6778
6926
  * Custom data for this object
@@ -6793,6 +6941,14 @@ export interface CreatePollRequest {
6793
6941
  */
6794
6942
  allow_answers?: boolean;
6795
6943
  allow_user_suggested_options?: boolean;
6944
+ /**
6945
+ * Key of the moderation configuration to use. Server-side only.
6946
+ */
6947
+ config_key?: string;
6948
+ /**
6949
+ * Team associated with the configuration. Server-side only.
6950
+ */
6951
+ config_team?: string;
6796
6952
  /**
6797
6953
  * A description of the poll
6798
6954
  */
@@ -7487,6 +7643,28 @@ export interface DeleteModerationRuleResponse {
7487
7643
  export interface DeleteModerationTemplateResponse {
7488
7644
  duration: string;
7489
7645
  }
7646
+ export interface DeletePollAnswerRequestPayload {
7647
+ /**
7648
+ * Reason for deletion
7649
+ */
7650
+ reason?: string;
7651
+ }
7652
+ export interface DeletePollOptionRequestPayload {
7653
+ /**
7654
+ * 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
7655
+ */
7656
+ option_id?: string;
7657
+ /**
7658
+ * Reason for deletion
7659
+ */
7660
+ reason?: string;
7661
+ }
7662
+ export interface DeletePollRequestPayload {
7663
+ /**
7664
+ * Reason for deletion
7665
+ */
7666
+ reason?: string;
7667
+ }
7490
7668
  export interface DeleteQueueRequest {
7491
7669
  user_id?: string;
7492
7670
  /**
@@ -7550,6 +7728,16 @@ export interface DeleteSIPInboundRoutingRuleResponse {
7550
7728
  export interface DeleteSIPTrunkResponse {
7551
7729
  duration: string;
7552
7730
  }
7731
+ export interface DeleteScheduledMessageResponse {
7732
+ /**
7733
+ * Duration of the request in milliseconds
7734
+ */
7735
+ duration: string;
7736
+ /**
7737
+ * A message scheduled to be sent later
7738
+ */
7739
+ scheduled_message: ScheduledMessageResponse;
7740
+ }
7553
7741
  export interface DeleteSegmentTargetsRequest {
7554
7742
  /**
7555
7743
  * Target IDs
@@ -7641,11 +7829,12 @@ export interface DeleteUsersRequest {
7641
7829
  /**
7642
7830
  * Conversation channels delete mode.
7643
7831
  * 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
7832
+ * * null or empty string - doesn't delete any conversation channels, unless user is 'hard', in which case it defaults to 'hard'
7645
7833
  * * soft - marks all conversation channels as deleted (same effect as Delete Channels with 'hard' option disabled)
7646
7834
  * * hard - deletes channel and all its data completely including messages (same effect as Delete Channels with 'hard' option enabled)
7835
+ * * keep - doesn't delete any conversation channels. Use it with user 'hard', where null or empty string defaults to 'hard'
7647
7836
  */
7648
- conversations?: 'soft' | 'hard';
7837
+ conversations?: 'soft' | 'hard' | 'keep';
7649
7838
  /**
7650
7839
  * Delete user files.
7651
7840
  * * false or empty string - doesn't delete any files
@@ -7666,7 +7855,7 @@ export interface DeleteUsersRequest {
7666
7855
  * User delete mode.
7667
7856
  * * soft - marks user as deleted and retains all user data
7668
7857
  * * pruning - marks user as deleted and nullifies user information
7669
- * * hard - deletes user completely. Requires 'hard' option for messages and conversations as well
7858
+ * * hard - deletes user completely. Requires 'hard' option for messages, and 'hard' or 'keep' option for conversations
7670
7859
  */
7671
7860
  user?: 'soft' | 'pruning' | 'hard';
7672
7861
  }
@@ -7887,8 +8076,6 @@ export interface EncryptionSettingsResponse {
7887
8076
  */
7888
8077
  mode: 'available' | 'disabled' | 'auto-on';
7889
8078
  }
7890
- export interface EndCallRequest {
7891
- }
7892
8079
  export interface EndCallResponse {
7893
8080
  /**
7894
8081
  * Duration of the request in milliseconds
@@ -7899,6 +8086,7 @@ export interface EnrichedActivity {
7899
8086
  foreign_id?: string;
7900
8087
  id?: string;
7901
8088
  score?: number;
8089
+ time?: string;
7902
8090
  verb?: string;
7903
8091
  to?: Array<string>;
7904
8092
  actor?: Data;
@@ -7943,15 +8131,15 @@ export interface EnrichedReaction {
7943
8131
  activity_id: string;
7944
8132
  kind: string;
7945
8133
  user_id: string;
8134
+ created_at?: string;
7946
8135
  id?: string;
7947
8136
  parent?: string;
8137
+ updated_at?: string;
7948
8138
  target_feeds?: Array<string>;
7949
8139
  children_counts?: Record<string, number>;
7950
- created_at?: Time;
7951
8140
  data?: Record<string, any>;
7952
8141
  latest_children?: Record<string, Array<EnrichedReaction>>;
7953
8142
  own_children?: Record<string, Array<EnrichedReaction>>;
7954
- updated_at?: Time;
7955
8143
  user?: Data;
7956
8144
  }
7957
8145
  export interface EnrichmentOptions {
@@ -7963,6 +8151,10 @@ export interface EnrichmentOptions {
7963
8151
  * 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
8152
  */
7965
8153
  include_flat_activities?: boolean;
8154
+ /**
8155
+ * 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.
8156
+ */
8157
+ include_ranking_config?: boolean;
7966
8158
  /**
7967
8159
  * Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time.
7968
8160
  */
@@ -8211,8 +8403,6 @@ export interface ExportChannelsResponse {
8211
8403
  */
8212
8404
  task_id: string;
8213
8405
  }
8214
- export interface ExportFeedUserDataRequest {
8215
- }
8216
8406
  export interface ExportFeedUserDataResponse {
8217
8407
  duration: string;
8218
8408
  /**
@@ -8891,6 +9081,7 @@ export interface FeedsNotificationComment {
8891
9081
  comment: string;
8892
9082
  id: string;
8893
9083
  user_id: string;
9084
+ parent_id?: string;
8894
9085
  attachments?: Array<Attachment>;
8895
9086
  }
8896
9087
  export interface FeedsNotificationContext {
@@ -9318,6 +9509,10 @@ export interface FollowBatchRequest {
9318
9509
  * List of follow relationships to create
9319
9510
  */
9320
9511
  follows: Array<FollowRequest>;
9512
+ /**
9513
+ * 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.
9514
+ */
9515
+ async?: boolean;
9321
9516
  /**
9322
9517
  * 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
9518
  */
@@ -9337,6 +9532,10 @@ export interface FollowBatchResponse {
9337
9532
  * List of current follow relationships
9338
9533
  */
9339
9534
  follows: Array<FollowResponse>;
9535
+ /**
9536
+ * ID of the background task when the request was sent with async: true
9537
+ */
9538
+ task_id?: string;
9340
9539
  }
9341
9540
  export interface FollowCreatedEvent {
9342
9541
  /**
@@ -10091,6 +10290,16 @@ export interface GetOrCreateCallResponse {
10091
10290
  */
10092
10291
  call: CallResponse;
10093
10292
  }
10293
+ export interface GetOrCreateChannelDefaults {
10294
+ /**
10295
+ * Resolved defaults for a nested pagination object.
10296
+ */
10297
+ members: PagerDefaults;
10298
+ /**
10299
+ * Resolved defaults for a nested pagination object.
10300
+ */
10301
+ messages: PagerDefaults;
10302
+ }
10094
10303
  export interface GetOrCreateFeedGroupRequest {
10095
10304
  /**
10096
10305
  * 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 +10395,7 @@ export interface GetOrCreateFeedResponse {
10186
10395
  following_pagination?: PagerResponse;
10187
10396
  member_pagination?: PagerResponse;
10188
10397
  notification_status?: NotificationStatusResponse;
10398
+ ranking_config?: RankingConfig;
10189
10399
  }
10190
10400
  export interface GetOrCreateFeedViewRequest {
10191
10401
  /**
@@ -10429,14 +10639,27 @@ export interface GroupedChannelsBucket {
10429
10639
  */
10430
10640
  prev?: string;
10431
10641
  /**
10432
- * Unread channels currently classified into this bucket
10642
+ * Total unread channels matching this bucket and its filters, independent of page size
10433
10643
  */
10434
10644
  unread_channels?: number;
10435
10645
  }
10436
10646
  export interface GroupedChannelsGroupRequest {
10647
+ /**
10648
+ * Max channels for this group; omitted or zero uses the request limit
10649
+ */
10437
10650
  limit?: number;
10651
+ /**
10652
+ * Cursor for the next page; only allowed when requesting one group
10653
+ */
10438
10654
  next?: string;
10655
+ /**
10656
+ * Cursor for the previous page; only allowed when requesting one group
10657
+ */
10439
10658
  prev?: string;
10659
+ /**
10660
+ * 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.
10661
+ */
10662
+ filter_conditions?: Record<string, any>;
10440
10663
  }
10441
10664
  export interface GroupedQueryChannelsRequest {
10442
10665
  /**
@@ -10445,7 +10668,11 @@ export interface GroupedQueryChannelsRequest {
10445
10668
  limit?: number;
10446
10669
  user_id?: string;
10447
10670
  /**
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.
10671
+ * Optional query_timestamp descending with NULLS LAST when enabled. Omitted sort preserves existing last_updated ordering and cursor formats
10672
+ */
10673
+ sort?: Array<SortParamRequest>;
10674
+ /**
10675
+ * 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
10676
  */
10450
10677
  groups?: Record<string, GroupedChannelsGroupRequest>;
10451
10678
  /**
@@ -10459,7 +10686,7 @@ export interface GroupedQueryChannelsResponse {
10459
10686
  */
10460
10687
  duration: string;
10461
10688
  /**
10462
- * Predefined channel groups keyed by group name
10689
+ * Groups keyed by the requested stored group name
10463
10690
  */
10464
10691
  groups: Record<string, GroupedChannelsBucket>;
10465
10692
  }
@@ -10866,23 +11093,23 @@ export interface InsertActionLogRequest {
10866
11093
  export interface InsertActionLogResponse {
10867
11094
  duration: string;
10868
11095
  }
10869
- export interface IntentBufferedItem {
11096
+ export interface IntentConditionInfo {
10870
11097
  /**
10871
- * The ID of the user who authored the buffered message or comment
11098
+ * Whether the score reached the threshold.
10872
11099
  */
10873
- author_user_id: string;
11100
+ passed: boolean;
10874
11101
  /**
10875
- * When the buffered message or comment was created
11102
+ * Final (damped) score of the topic in this analysis; 0 when the topic is not defined in the policy.
10876
11103
  */
10877
- created_at: Date;
11104
+ score: number;
10878
11105
  /**
10879
- * The ID of the buffered message or comment
11106
+ * Minimum score (1-100) the condition requires.
10880
11107
  */
10881
- id: string;
11108
+ threshold: number;
10882
11109
  /**
10883
- * The text of the buffered message or comment
11110
+ * Policy intent topic label the condition references.
10884
11111
  */
10885
- text: string;
11112
+ topic: string;
10886
11113
  }
10887
11114
  export interface IntentConfigRequest {
10888
11115
  /**
@@ -10896,99 +11123,55 @@ export interface IntentConfigResponse {
10896
11123
  */
10897
11124
  topics: Array<IntentTopicResponse>;
10898
11125
  }
10899
- export interface IntentDetectedEvent {
11126
+ export interface IntentEvaluationInfo {
10900
11127
  /**
10901
- * The channel CID (chat) or feed ID (feeds) the buffered conversation belongs to
11128
+ * The analyzed conversation: the channel CID for chat, the object ID for feeds.
10902
11129
  */
10903
11130
  conversation_id: string;
10904
- created_at: Date;
10905
11131
  /**
10906
- * The ID of the most recently buffered entity
11132
+ * Number of conversation messages sent to the model.
10907
11133
  */
10908
- entity_id: string;
11134
+ message_count: number;
10909
11135
  /**
10910
- * The type of the most recently buffered entity (chat message or feed comment)
11136
+ * One entry per `intent_rule` condition of the rule, flat conditions first, then group conditions.
10911
11137
  */
10912
- entity_type: string;
11138
+ conditions: Array<IntentConditionInfo>;
10913
11139
  /**
10914
- * The configured intent topic label that started the buffer
11140
+ * Score (0-100) the model gave every topic in the analysis call, keyed by topic label, before message-count damping.
10915
11141
  */
10916
- matched_topic: string;
11142
+ raw_scores: Record<string, number>;
10917
11143
  /**
10918
- * The Stage 2 conversation score (0-100) that cleared score_threshold
11144
+ * Final score (0-100) of every topic after message-count damping, keyed by topic label. Conditions compare against these.
10919
11145
  */
11146
+ scores: Record<string, number>;
11147
+ }
11148
+ export interface IntentRuleParameters {
11149
+ topic: string;
11150
+ threshold?: number;
11151
+ }
11152
+ export interface IntentScoreResponse {
10920
11153
  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;
11154
+ topic: string;
10932
11155
  }
10933
11156
  export interface IntentTopicRequest {
10934
11157
  /**
10935
11158
  * Unique topic label (e.g. purchase_intent)
10936
11159
  */
10937
11160
  label: string;
10938
- /**
10939
- * How long the buffer collects items before scoring runs
10940
- */
10941
- analysis_cooldown_seconds?: number;
10942
11161
  /**
10943
11162
  * Optional description used in the classification prompt; the label alone is used when empty
10944
11163
  */
10945
11164
  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
11165
  }
10963
11166
  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
11167
  /**
10973
11168
  * Unique topic label (e.g. purchase_intent)
10974
11169
  */
10975
11170
  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
11171
  /**
10985
11172
  * Optional description used in the classification prompt; the label alone is used when empty
10986
11173
  */
10987
11174
  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
11175
  }
10993
11176
  export interface InterestTagResponse {
10994
11177
  /**
@@ -11074,7 +11257,9 @@ export interface KickedUserEvent {
11074
11257
  export interface LLMConfig {
11075
11258
  app_context?: string;
11076
11259
  async?: boolean;
11260
+ custom_keys_context_description?: string;
11077
11261
  enabled?: boolean;
11262
+ context_custom_keys?: Array<string>;
11078
11263
  rules?: Array<LLMRule>;
11079
11264
  severity_descriptions?: Record<string, string>;
11080
11265
  }
@@ -11249,6 +11434,18 @@ export interface LayoutSettingsResponse {
11249
11434
  detect_orientation?: boolean;
11250
11435
  options?: Record<string, any>;
11251
11436
  }
11437
+ export interface LifecycleSettingsRequest {
11438
+ /**
11439
+ * 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
11440
+ */
11441
+ mode?: 'reusable' | 'single_use';
11442
+ }
11443
+ export interface LifecycleSettingsResponse {
11444
+ /**
11445
+ * 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
11446
+ */
11447
+ mode: 'reusable' | 'single_use';
11448
+ }
11252
11449
  export interface LimitInfoResponse {
11253
11450
  /**
11254
11451
  * The maximum number of API calls allowed per time window
@@ -12227,7 +12424,7 @@ export interface MessageRequest {
12227
12424
  /**
12228
12425
  * Date when pinned message expires
12229
12426
  */
12230
- pin_expires?: Date;
12427
+ pin_expires?: Date | null;
12231
12428
  /**
12232
12429
  * Whether message is pinned or not
12233
12430
  */
@@ -12235,7 +12432,7 @@ export interface MessageRequest {
12235
12432
  /**
12236
12433
  * Date when message got pinned
12237
12434
  */
12238
- pinned_at?: Date;
12435
+ pinned_at?: Date | null;
12239
12436
  /**
12240
12437
  * Identifier of the poll to include in the message
12241
12438
  */
@@ -13183,6 +13380,7 @@ export interface ModerationRulesTriggeredEvent {
13183
13380
  * Ordered list of contents whose verdicts contributed to an aggregation rule's threshold. Populated only for aggregation rules when callers supplied `content_ids`.
13184
13381
  */
13185
13382
  matched_contents?: Array<MatchedContent>;
13383
+ intent?: IntentEvaluationInfo;
13186
13384
  }
13187
13385
  export interface ModerationTextAnalysisCompleteEvent {
13188
13386
  created_at: Date;
@@ -13307,9 +13505,25 @@ export interface NoiseCancellationSettings {
13307
13505
  mode: 'available' | 'disabled' | 'auto-on';
13308
13506
  }
13309
13507
  export interface NotificationComment {
13508
+ /**
13509
+ * The text of the comment
13510
+ */
13310
13511
  comment: string;
13512
+ /**
13513
+ * The ID of the comment
13514
+ */
13311
13515
  id: string;
13516
+ /**
13517
+ * The ID of the user who wrote the comment
13518
+ */
13312
13519
  user_id: string;
13520
+ /**
13521
+ * The ID of the parent comment when this comment is a reply; omitted for top-level comments
13522
+ */
13523
+ parent_id?: string;
13524
+ /**
13525
+ * Attachments on the comment
13526
+ */
13313
13527
  attachments?: Array<Attachment>;
13314
13528
  }
13315
13529
  export interface NotificationConfig {
@@ -13686,6 +13900,7 @@ export interface OwnUserResponse {
13686
13900
  unread_count: number;
13687
13901
  unread_threads: number;
13688
13902
  updated_at: Date;
13903
+ blocked_user_ids: Array<string>;
13689
13904
  channel_mutes: Array<ChannelMute>;
13690
13905
  devices: Array<DeviceResponse>;
13691
13906
  mutes: Array<UserMuteResponse>;
@@ -13698,7 +13913,6 @@ export interface OwnUserResponse {
13698
13913
  last_active?: Date;
13699
13914
  name?: string;
13700
13915
  revoke_tokens_issued_before?: Date;
13701
- blocked_user_ids?: Array<string>;
13702
13916
  latest_hidden_channels?: Array<string>;
13703
13917
  /**
13704
13918
  * The privacy settings of the user.
@@ -13711,6 +13925,12 @@ export interface OwnUserResponse {
13711
13925
  teams_role?: Record<string, string>;
13712
13926
  total_unread_count_by_team?: Record<string, number>;
13713
13927
  }
13928
+ export interface PagerDefaults {
13929
+ /**
13930
+ * Number of records returned when `limit` is omitted.
13931
+ */
13932
+ limit: number;
13933
+ }
13714
13934
  export interface PagerRequest {
13715
13935
  limit?: number;
13716
13936
  next?: string;
@@ -14150,23 +14370,67 @@ export interface PolicyTestTotals {
14150
14370
  scored: number;
14151
14371
  unscored: number;
14152
14372
  }
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 {
14373
+ export interface PollClosedEvent {
14163
14374
  /**
14164
- * Duration of the request in milliseconds
14375
+ * Date/time of creation
14165
14376
  */
14166
- duration: string;
14167
- poll_option: PollOptionResponseData;
14168
- }
14169
- export interface PollOptionResponseData {
14377
+ created_at: Date;
14378
+ custom: Record<string, any>;
14379
+ poll: PollResponseData;
14380
+ /**
14381
+ * The type of event: "poll.closed" in this case
14382
+ */
14383
+ type: string;
14384
+ activity_id?: string;
14385
+ /**
14386
+ * The CID of the channel containing the poll
14387
+ */
14388
+ cid?: string;
14389
+ /**
14390
+ * The ID of the message containing the poll
14391
+ */
14392
+ message_id?: string;
14393
+ received_at?: Date;
14394
+ }
14395
+ export interface PollDeletedEvent {
14396
+ /**
14397
+ * Date/time of creation
14398
+ */
14399
+ created_at: Date;
14400
+ custom: Record<string, any>;
14401
+ poll: PollResponseData;
14402
+ /**
14403
+ * The type of event: "poll.deleted" in this case
14404
+ */
14405
+ type: string;
14406
+ activity_id?: string;
14407
+ /**
14408
+ * The CID of the channel containing the poll
14409
+ */
14410
+ cid?: string;
14411
+ /**
14412
+ * The ID of the message containing the poll
14413
+ */
14414
+ message_id?: string;
14415
+ received_at?: Date;
14416
+ }
14417
+ export interface PollOptionInput {
14418
+ text?: string;
14419
+ custom?: Record<string, any>;
14420
+ }
14421
+ export interface PollOptionRequest {
14422
+ id: string;
14423
+ text?: string;
14424
+ custom?: Record<string, any>;
14425
+ }
14426
+ export interface PollOptionResponse {
14427
+ /**
14428
+ * Duration of the request in milliseconds
14429
+ */
14430
+ duration: string;
14431
+ poll_option: PollOptionResponseData;
14432
+ }
14433
+ export interface PollOptionResponseData {
14170
14434
  id: string;
14171
14435
  text: string;
14172
14436
  custom: Record<string, any>;
@@ -14210,6 +14474,97 @@ export interface PollResponseData {
14210
14474
  description_i18n?: Record<string, string>;
14211
14475
  name_i18n?: Record<string, string>;
14212
14476
  }
14477
+ export interface PollUpdatedEvent {
14478
+ /**
14479
+ * Date/time of creation
14480
+ */
14481
+ created_at: Date;
14482
+ custom: Record<string, any>;
14483
+ poll: PollResponseData;
14484
+ /**
14485
+ * The type of event: "poll.updated" in this case
14486
+ */
14487
+ type: string;
14488
+ activity_id?: string;
14489
+ /**
14490
+ * The CID of the channel containing the poll
14491
+ */
14492
+ cid?: string;
14493
+ /**
14494
+ * The ID of the message containing the poll
14495
+ */
14496
+ message_id?: string;
14497
+ received_at?: Date;
14498
+ }
14499
+ export interface PollVoteCastedEvent {
14500
+ /**
14501
+ * Date/time of creation
14502
+ */
14503
+ created_at: Date;
14504
+ custom: Record<string, any>;
14505
+ poll: PollResponseData;
14506
+ poll_vote: PollVoteResponseData;
14507
+ /**
14508
+ * The type of event: "poll.vote_casted" in this case
14509
+ */
14510
+ type: string;
14511
+ activity_id?: string;
14512
+ /**
14513
+ * The CID of the channel containing the poll
14514
+ */
14515
+ cid?: string;
14516
+ /**
14517
+ * The ID of the message containing the poll
14518
+ */
14519
+ message_id?: string;
14520
+ received_at?: Date;
14521
+ }
14522
+ export interface PollVoteChangedEvent {
14523
+ /**
14524
+ * Date/time of creation
14525
+ */
14526
+ created_at: Date;
14527
+ custom: Record<string, any>;
14528
+ poll: PollResponseData;
14529
+ poll_vote: PollVoteResponseData;
14530
+ /**
14531
+ * The type of event: "poll.vote_changed" in this case
14532
+ */
14533
+ type: string;
14534
+ activity_id?: string;
14535
+ /**
14536
+ * The CID of the channel containing the poll
14537
+ */
14538
+ cid?: string;
14539
+ /**
14540
+ * The ID of the message containing the poll
14541
+ */
14542
+ message_id?: string;
14543
+ received_at?: Date;
14544
+ }
14545
+ export interface PollVoteRemovedEvent {
14546
+ /**
14547
+ * Date/time of creation
14548
+ */
14549
+ created_at: Date;
14550
+ custom: Record<string, any>;
14551
+ poll: PollResponseData;
14552
+ poll_vote: PollVoteResponseData;
14553
+ /**
14554
+ * The type of event: "poll.vote_removed" in this case
14555
+ */
14556
+ type: string;
14557
+ activity_id?: string;
14558
+ /**
14559
+ * The CID of the channel containing the poll
14560
+ */
14561
+ cid?: string;
14562
+ /**
14563
+ * The ID of the message containing the poll
14564
+ */
14565
+ message_id?: string;
14566
+ received_at?: Date;
14567
+ }
14213
14568
  export interface PollVoteResponse {
14214
14569
  /**
14215
14570
  * Duration of the request in milliseconds
@@ -14395,12 +14750,20 @@ export interface PushPreferenceInput {
14395
14750
  * Remove the disabled until time. (IE stop snoozing notifications)
14396
14751
  */
14397
14752
  remove_disable?: boolean;
14753
+ /**
14754
+ * 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.
14755
+ */
14756
+ remove_schedule?: boolean;
14398
14757
  /**
14399
14758
  * 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
14759
  */
14401
14760
  user_id?: string;
14402
14761
  chat_preferences?: ChatPreferencesInput;
14403
14762
  feeds_preferences?: FeedsPreferences;
14763
+ /**
14764
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
14765
+ */
14766
+ schedule?: PushScheduleInput;
14404
14767
  }
14405
14768
  export interface PushPreferencesResponse {
14406
14769
  call_level?: string;
@@ -14415,6 +14778,10 @@ export interface PushPreferencesResponse {
14415
14778
  feeds_level?: string;
14416
14779
  chat_preferences?: ChatPreferencesResponse;
14417
14780
  feeds_preferences?: FeedsPreferencesResponse;
14781
+ /**
14782
+ * A recurring quiet-hours schedule: while any quiet window is active, push notifications for the user are suppressed. Suppressed notifications are dropped, not delayed.
14783
+ */
14784
+ schedule?: PushScheduleResponse;
14418
14785
  }
14419
14786
  export interface PushProvider {
14420
14787
  created_at: Date;
@@ -14502,6 +14869,26 @@ export interface PushProviderResponse {
14502
14869
  xiaomi_app_secret?: string;
14503
14870
  xiaomi_package_name?: string;
14504
14871
  }
14872
+ export interface PushScheduleInput {
14873
+ /**
14874
+ * 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.
14875
+ */
14876
+ timezone?: string;
14877
+ /**
14878
+ * 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.
14879
+ */
14880
+ quiet_hours?: Array<QuietHoursRuleInput>;
14881
+ }
14882
+ export interface PushScheduleResponse {
14883
+ /**
14884
+ * IANA time zone name the quiet windows are evaluated in, for example Europe/Amsterdam.
14885
+ */
14886
+ timezone: string;
14887
+ /**
14888
+ * The quiet windows. Push is suppressed while any rule is active.
14889
+ */
14890
+ quiet_hours: Array<QuietHoursRuleResponse>;
14891
+ }
14505
14892
  export interface PushTemplate {
14506
14893
  created_at: Date;
14507
14894
  enable_push: boolean;
@@ -15008,7 +15395,68 @@ export interface QueryCampaignsResponse {
15008
15395
  next?: string;
15009
15396
  prev?: string;
15010
15397
  }
15398
+ export interface QueryChannelBansRequest {
15399
+ /**
15400
+ * Whether to exclude expired bans or not
15401
+ */
15402
+ exclude_expired_bans?: boolean;
15403
+ /**
15404
+ * When true, the response includes total and total_by_scope: the number of banned users overall and per scope, independent of paging
15405
+ */
15406
+ include_total?: boolean;
15407
+ limit?: number;
15408
+ next?: string;
15409
+ prev?: string;
15410
+ user_id?: string;
15411
+ /**
15412
+ * Filter conditions to apply to the query
15413
+ */
15414
+ filter_conditions?: Record<string, any>;
15415
+ /**
15416
+ * User request object
15417
+ */
15418
+ user?: UserRequest;
15419
+ }
15420
+ export interface QueryChannelBansResponse {
15421
+ /**
15422
+ * Duration of the request in milliseconds
15423
+ */
15424
+ duration: string;
15425
+ /**
15426
+ * Users banned from the channel, one entry per user, newest ban first
15427
+ */
15428
+ bans: Array<ChannelBanResponse>;
15429
+ next?: string;
15430
+ prev?: string;
15431
+ /**
15432
+ * 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
15433
+ */
15434
+ total?: number;
15435
+ total_by_scope?: ChannelBansScopeTotals;
15436
+ }
15437
+ export interface QueryChannelsDefaults {
15438
+ /**
15439
+ * Number of channels returned when `limit` is omitted.
15440
+ */
15441
+ limit: number;
15442
+ /**
15443
+ * 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.
15444
+ */
15445
+ max_limit: number;
15446
+ /**
15447
+ * Number of members returned per channel when `member_limit` is omitted.
15448
+ */
15449
+ member_limit: number;
15450
+ /**
15451
+ * Number of messages returned per channel when `message_limit` is omitted.
15452
+ */
15453
+ message_limit: number;
15454
+ }
15011
15455
  export interface QueryChannelsRequest {
15456
+ /**
15457
+ * Whether to include active_member_count for each channel
15458
+ */
15459
+ include_active_member_count?: boolean;
15012
15460
  /**
15013
15461
  * Number of channels to limit
15014
15462
  */
@@ -15293,11 +15741,18 @@ export interface QueryFeedsUsageStatsResponse {
15293
15741
  duration: string;
15294
15742
  activities: DailyMetricStatsResponse;
15295
15743
  api_requests: DailyMetricStatsResponse;
15744
+ collections: DailyMetricStatsResponse;
15745
+ comments: DailyMetricStatsResponse;
15296
15746
  follows: DailyMetricStatsResponse;
15297
15747
  openai_requests: DailyMetricStatsResponse;
15748
+ reactions: DailyMetricStatsResponse;
15298
15749
  emau?: EMAUStatsResponse;
15299
15750
  }
15300
15751
  export interface QueryFollowsRequest {
15752
+ /**
15753
+ * 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.
15754
+ */
15755
+ include_group_counts?: boolean;
15301
15756
  limit?: number;
15302
15757
  next?: string;
15303
15758
  prev?: string;
@@ -15324,6 +15779,10 @@ export interface QueryFollowsResponse {
15324
15779
  * Cursor for previous page
15325
15780
  */
15326
15781
  prev?: string;
15782
+ /**
15783
+ * Accepted following counts keyed by followed feed group. Present only when include_group_counts is set with a source_feed equality.
15784
+ */
15785
+ group_counts?: Record<string, number>;
15327
15786
  }
15328
15787
  export interface QueryFutureChannelBansPayload {
15329
15788
  created_at_after?: Date;
@@ -15870,6 +16329,43 @@ export interface QueryRevisionHistoryResponse {
15870
16329
  next?: string;
15871
16330
  prev?: string;
15872
16331
  }
16332
+ export interface QueryScheduledMessagesRequest {
16333
+ /**
16334
+ * Page size, 1 to 100. Defaults to 20
16335
+ */
16336
+ limit?: number;
16337
+ /**
16338
+ * Cursor from the previous page
16339
+ */
16340
+ next?: string;
16341
+ user_id?: string;
16342
+ /**
16343
+ * Only scheduled_at ascending is supported. Pending messages come before failed ones
16344
+ */
16345
+ sort?: Array<SortParamRequest>;
16346
+ /**
16347
+ * Filter for querying scheduled messages
16348
+ */
16349
+ filter?: ScheduledMessagesFilter;
16350
+ /**
16351
+ * User request object
16352
+ */
16353
+ user?: UserRequest;
16354
+ }
16355
+ export interface QueryScheduledMessagesResponse {
16356
+ /**
16357
+ * Duration of the request in milliseconds
16358
+ */
16359
+ duration: string;
16360
+ /**
16361
+ * Pending messages first, then failed ones, each by scheduled_at
16362
+ */
16363
+ scheduled_messages: Array<ScheduledMessageResponse>;
16364
+ /**
16365
+ * Cursor for the next page; empty on the last page
16366
+ */
16367
+ next?: string;
16368
+ }
15873
16369
  export interface QuerySegmentTargetsRequest {
15874
16370
  /**
15875
16371
  * Limit
@@ -16064,6 +16560,34 @@ export interface QueueResponse {
16064
16560
  duration: string;
16065
16561
  queue?: ModerationQueueResponse;
16066
16562
  }
16563
+ export interface QuietHoursRuleInput {
16564
+ /**
16565
+ * 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.
16566
+ */
16567
+ end: string;
16568
+ /**
16569
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59. Must differ from end.
16570
+ */
16571
+ start: string;
16572
+ /**
16573
+ * 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.
16574
+ */
16575
+ days?: Array<string>;
16576
+ }
16577
+ export interface QuietHoursRuleResponse {
16578
+ /**
16579
+ * 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.
16580
+ */
16581
+ end: string;
16582
+ /**
16583
+ * When the window opens, as HH:MM local wall-clock time between 00:00 and 23:59.
16584
+ */
16585
+ start: string;
16586
+ /**
16587
+ * 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.
16588
+ */
16589
+ days?: Array<string>;
16590
+ }
16067
16591
  export interface RTMPBroadcastRequest {
16068
16592
  /**
16069
16593
  * Name identifier for RTMP broadcast, must be unique in call
@@ -16850,8 +17374,6 @@ export interface RestoreCommentResponse {
16850
17374
  activity: ActivityResponse;
16851
17375
  comment: CommentResponse;
16852
17376
  }
16853
- export interface RestoreFeedGroupRequest {
16854
- }
16855
17377
  export interface RestoreFeedGroupResponse {
16856
17378
  duration: string;
16857
17379
  feed_group: FeedGroupResponse;
@@ -16994,6 +17516,7 @@ export interface ReviewQueueItemResponse {
16994
17516
  * Content payload for moderation
16995
17517
  */
16996
17518
  moderation_payload?: ModerationPayloadResponse;
17519
+ poll?: PollResponseData;
16997
17520
  reaction?: Reaction;
16998
17521
  }
16999
17522
  export interface ReviewQueueItemUpdatedEvent {
@@ -17229,6 +17752,10 @@ export interface RuleBuilderCondition {
17229
17752
  flood_similar_params?: FloodSimilarRuleParameters;
17230
17753
  image_content_params?: ImageContentParameters;
17231
17754
  image_rule_params?: ImageRuleParameters;
17755
+ /**
17756
+ * intent_rule params: policy intent topic label and the minimum final score (1-100) that fires the condition
17757
+ */
17758
+ intent_rule_params?: IntentRuleParameters;
17232
17759
  ip_content_count_rule_params?: IPContentCountRuleParameters;
17233
17760
  ip_flag_count_rule_params?: IPFlagCountRuleParameters;
17234
17761
  keyframe_ocr_rule_params?: KeyframeOCRRuleParameters;
@@ -17236,6 +17763,7 @@ export interface RuleBuilderCondition {
17236
17763
  ocr_content_params?: OCRContentParameters;
17237
17764
  text_content_params?: TextContentParameters;
17238
17765
  text_rule_params?: TextRuleParameters;
17766
+ user_channel_ban_count_params?: UserChannelBanCountRuleParameters;
17239
17767
  user_channel_count_params?: UserChannelCountRuleParameters;
17240
17768
  user_created_within_params?: UserCreatedWithinParameters;
17241
17769
  user_custom_property_params?: UserCustomPropertyParameters;
@@ -17636,6 +18164,221 @@ export interface SIPTrunkResponse {
17636
18164
  export interface SRTIngress {
17637
18165
  address: string;
17638
18166
  }
18167
+ export interface ScheduledMessageChannelResponse {
18168
+ /**
18169
+ * Channel CID (<type>:<id>)
18170
+ */
18171
+ cid: string;
18172
+ /**
18173
+ * Channel ID
18174
+ */
18175
+ id: string;
18176
+ /**
18177
+ * Channel type
18178
+ */
18179
+ type: string;
18180
+ /**
18181
+ * Channel image, from its custom data
18182
+ */
18183
+ image?: string;
18184
+ /**
18185
+ * Channel name, from its custom data
18186
+ */
18187
+ name?: string;
18188
+ }
18189
+ export interface ScheduledMessageContentResponse {
18190
+ /**
18191
+ * Text of the message
18192
+ */
18193
+ text: string;
18194
+ custom: Record<string, any>;
18195
+ /**
18196
+ * Contains HTML markup of the message
18197
+ */
18198
+ html?: string;
18199
+ /**
18200
+ * Whether the message mentions the whole channel
18201
+ */
18202
+ mentioned_channel?: boolean;
18203
+ /**
18204
+ * Whether the message mentions the online channel members
18205
+ */
18206
+ mentioned_here?: boolean;
18207
+ /**
18208
+ * MML content of the message
18209
+ */
18210
+ mml?: string;
18211
+ /**
18212
+ * ID of parent message (thread)
18213
+ */
18214
+ parent_id?: string;
18215
+ /**
18216
+ * Date/time the pin expires
18217
+ */
18218
+ pin_expires?: Date;
18219
+ /**
18220
+ * Whether the message will be pinned when sent
18221
+ */
18222
+ pinned?: boolean;
18223
+ /**
18224
+ * Identifier of the poll to include in the message
18225
+ */
18226
+ poll_id?: string;
18227
+ quoted_message_id?: string;
18228
+ /**
18229
+ * Whether thread reply should be shown in the channel as well
18230
+ */
18231
+ show_in_channel?: boolean;
18232
+ /**
18233
+ * Whether message is silent or not
18234
+ */
18235
+ silent?: boolean;
18236
+ /**
18237
+ * Contains type of the message. One of: regular, system
18238
+ */
18239
+ type?: string;
18240
+ /**
18241
+ * Array of message attachments
18242
+ */
18243
+ attachments?: Array<Attachment>;
18244
+ /**
18245
+ * IDs of the user groups mentioned in the message
18246
+ */
18247
+ mentioned_group_ids?: Array<string>;
18248
+ /**
18249
+ * Roles mentioned in the message
18250
+ */
18251
+ mentioned_roles?: Array<string>;
18252
+ /**
18253
+ * IDs of the users mentioned in the message
18254
+ */
18255
+ mentioned_users?: Array<string>;
18256
+ /**
18257
+ * IDs of the users the message will be visible to
18258
+ */
18259
+ restricted_visibility?: Array<string>;
18260
+ /**
18261
+ * The location a scheduled message will share
18262
+ */
18263
+ shared_location?: ScheduledMessageLocation;
18264
+ }
18265
+ export interface ScheduledMessageFailedEvent {
18266
+ /**
18267
+ * Date/time of creation
18268
+ */
18269
+ created_at: Date;
18270
+ custom: Record<string, any>;
18271
+ user: UserResponseCommonFields;
18272
+ /**
18273
+ * The type of event: "scheduled_message.failed" in this case
18274
+ */
18275
+ type: string;
18276
+ /**
18277
+ * The CID of the channel the message is scheduled in
18278
+ */
18279
+ cid?: string;
18280
+ received_at?: Date;
18281
+ /**
18282
+ * A message scheduled to be sent later
18283
+ */
18284
+ scheduled_message?: ScheduledMessageResponse;
18285
+ }
18286
+ export interface ScheduledMessageLocation {
18287
+ /**
18288
+ * The ID of the device that created the location.
18289
+ */
18290
+ created_by_device_id: string;
18291
+ /**
18292
+ * The date when the location sharing ends.
18293
+ * If it's empty, it means the location sharing is static instead of live.
18294
+ */
18295
+ end_at?: Date;
18296
+ /**
18297
+ * The latitude of the location.
18298
+ */
18299
+ latitude?: number;
18300
+ /**
18301
+ * The longitude of the location.
18302
+ */
18303
+ longitude?: number;
18304
+ }
18305
+ export interface ScheduledMessageResponse {
18306
+ /**
18307
+ * The CID of the channel the message will be sent to
18308
+ */
18309
+ cid: string;
18310
+ /**
18311
+ * Date/time of creation
18312
+ */
18313
+ created_at: Date;
18314
+ /**
18315
+ * Unique identifier of the scheduled message
18316
+ */
18317
+ id: string;
18318
+ /**
18319
+ * Date/time the message is scheduled to be sent
18320
+ */
18321
+ scheduled_at: Date;
18322
+ /**
18323
+ * 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
18324
+ */
18325
+ status: string;
18326
+ /**
18327
+ * Date/time of the last update
18328
+ */
18329
+ updated_at: Date;
18330
+ /**
18331
+ * The message a scheduled message will send
18332
+ */
18333
+ message: ScheduledMessageContentResponse;
18334
+ /**
18335
+ * User response object
18336
+ */
18337
+ user: UserResponse;
18338
+ /**
18339
+ * 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
18340
+ */
18341
+ failure_reason?: string;
18342
+ /**
18343
+ * The channel of a scheduled message
18344
+ */
18345
+ channel?: ScheduledMessageChannelResponse;
18346
+ }
18347
+ export interface ScheduledMessageSentEvent {
18348
+ /**
18349
+ * Date/time of creation
18350
+ */
18351
+ created_at: Date;
18352
+ /**
18353
+ * The ID of the message that was sent
18354
+ */
18355
+ message_id: string;
18356
+ custom: Record<string, any>;
18357
+ user: UserResponseCommonFields;
18358
+ /**
18359
+ * The type of event: "scheduled_message.sent" in this case
18360
+ */
18361
+ type: string;
18362
+ /**
18363
+ * The CID of the channel the message was sent to
18364
+ */
18365
+ cid?: string;
18366
+ received_at?: Date;
18367
+ /**
18368
+ * A message scheduled to be sent later
18369
+ */
18370
+ scheduled_message?: ScheduledMessageResponse;
18371
+ }
18372
+ export interface ScheduledMessagesFilter {
18373
+ /**
18374
+ * Only scheduled messages of this channel
18375
+ */
18376
+ cid?: string;
18377
+ /**
18378
+ * Only these statuses, as reported in each scheduled message's status. One or more of: scheduled, sending, failed
18379
+ */
18380
+ status?: Array<string>;
18381
+ }
17639
18382
  export interface ScoreBands {
17640
18383
  good?: number;
17641
18384
  ok?: number;
@@ -17899,6 +18642,10 @@ export interface SendMessageRequest {
17899
18642
  include_mentioned_members?: boolean;
17900
18643
  keep_channel_hidden?: boolean;
17901
18644
  pending?: boolean;
18645
+ /**
18646
+ * 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
18647
+ */
18648
+ scheduled_at?: Date;
17902
18649
  skip_enrich_url?: boolean;
17903
18650
  skip_push?: boolean;
17904
18651
  pending_message_metadata?: Record<string, string>;
@@ -17924,6 +18671,10 @@ export interface SendMessageResponse {
17924
18671
  * Pending message metadata
17925
18672
  */
17926
18673
  pending_message_metadata?: Record<string, string>;
18674
+ /**
18675
+ * A message scheduled to be sent later
18676
+ */
18677
+ scheduled_message?: ScheduledMessageResponse;
17927
18678
  }
17928
18679
  export interface SendReactionRequest {
17929
18680
  /**
@@ -17950,6 +18701,16 @@ export interface SendReactionResponse {
17950
18701
  message: MessageResponse;
17951
18702
  reaction: ReactionResponse;
17952
18703
  }
18704
+ export interface SendScheduledMessageNowResponse {
18705
+ /**
18706
+ * Duration of the request in milliseconds
18707
+ */
18708
+ duration: string;
18709
+ /**
18710
+ * A message scheduled to be sent later
18711
+ */
18712
+ scheduled_message: ScheduledMessageResponse;
18713
+ }
17953
18714
  export interface SendUserCustomEventRequest {
17954
18715
  event: UserCustomEventRequest;
17955
18716
  }
@@ -18256,8 +19017,6 @@ export interface StartFrameRecordingResponse {
18256
19017
  */
18257
19018
  duration: string;
18258
19019
  }
18259
- export interface StartHLSBroadcastingRequest {
18260
- }
18261
19020
  export interface StartHLSBroadcastingResponse {
18262
19021
  duration: string;
18263
19022
  /**
@@ -18265,8 +19024,6 @@ export interface StartHLSBroadcastingResponse {
18265
19024
  */
18266
19025
  playlist_url: string;
18267
19026
  }
18268
- export interface StartPolicyTestRunRequest {
18269
- }
18270
19027
  export interface StartRTMPBroadcastsRequest {
18271
19028
  /**
18272
19029
  * List of broadcasts to start
@@ -18308,15 +19065,18 @@ export interface StartTranscriptionResponse {
18308
19065
  */
18309
19066
  duration: string;
18310
19067
  }
18311
- export interface StopAllRTMPBroadcastsRequest {
18312
- }
18313
19068
  export interface StopAllRTMPBroadcastsResponse {
18314
19069
  /**
18315
19070
  * Duration of the request in milliseconds
18316
19071
  */
18317
19072
  duration: string;
18318
19073
  }
18319
- export interface StopCampaignRequest {
19074
+ export interface StopCampaignResponse {
19075
+ /**
19076
+ * Duration of the request in milliseconds
19077
+ */
19078
+ duration: string;
19079
+ campaign?: CampaignResponse;
18320
19080
  }
18321
19081
  export interface StopClosedCaptionsRequest {
18322
19082
  stop_transcription?: boolean;
@@ -18327,16 +19087,12 @@ export interface StopClosedCaptionsResponse {
18327
19087
  */
18328
19088
  duration: string;
18329
19089
  }
18330
- export interface StopFrameRecordingRequest {
18331
- }
18332
19090
  export interface StopFrameRecordingResponse {
18333
19091
  /**
18334
19092
  * Duration of the request in milliseconds
18335
19093
  */
18336
19094
  duration: string;
18337
19095
  }
18338
- export interface StopHLSBroadcastingRequest {
18339
- }
18340
19096
  export interface StopHLSBroadcastingResponse {
18341
19097
  /**
18342
19098
  * Duration of the request in milliseconds
@@ -18423,9 +19179,9 @@ export interface StoriesFeedUpdatedEvent {
18423
19179
  }
18424
19180
  export interface SubmitActionRequest {
18425
19181
  /**
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
19182
+ * 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
19183
  */
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';
19184
+ 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
19185
  /**
18430
19186
  * UUID of the appeal to act on (required for reject_appeal, optional for other actions)
18431
19187
  */
@@ -18460,6 +19216,18 @@ export interface SubmitActionRequest {
18460
19216
  * Configuration for message deletion action
18461
19217
  */
18462
19218
  delete_message?: DeleteMessageRequestPayload;
19219
+ /**
19220
+ * Configuration for poll deletion action. Poll deletion is always permanent.
19221
+ */
19222
+ delete_poll?: DeletePollRequestPayload;
19223
+ /**
19224
+ * 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.
19225
+ */
19226
+ delete_poll_answer?: DeletePollAnswerRequestPayload;
19227
+ /**
19228
+ * Configuration for deleting the single poll option a review item was raised for. Deletion is permanent; the rest of the poll is kept.
19229
+ */
19230
+ delete_poll_option?: DeletePollOptionRequestPayload;
18463
19231
  /**
18464
19232
  * Configuration for reaction deletion action
18465
19233
  */
@@ -18913,8 +19681,6 @@ export interface ThumbnailsSettingsRequest {
18913
19681
  export interface ThumbnailsSettingsResponse {
18914
19682
  enabled: boolean;
18915
19683
  }
18916
- export interface Time {
18917
- }
18918
19684
  export interface TimeWindow {
18919
19685
  from: string;
18920
19686
  to: string;
@@ -19217,6 +19983,10 @@ export interface UnfollowBatchRequest {
19217
19983
  * List of follow relationships to remove, each with optional keep_history
19218
19984
  */
19219
19985
  follows: Array<UnfollowPair>;
19986
+ /**
19987
+ * 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.
19988
+ */
19989
+ async?: boolean;
19220
19990
  /**
19221
19991
  * Whether to delete the corresponding notification activity (default: false)
19222
19992
  */
@@ -19232,6 +20002,10 @@ export interface UnfollowBatchResponse {
19232
20002
  * List of follow relationships that were removed
19233
20003
  */
19234
20004
  follows: Array<FollowResponse>;
20005
+ /**
20006
+ * ID of the background task when the request was sent with async: true
20007
+ */
20008
+ task_id?: string;
19235
20009
  }
19236
20010
  export interface UnfollowPair {
19237
20011
  /**
@@ -19582,7 +20356,10 @@ export interface UpdateAppRequest {
19582
20356
  reminders_interval?: number;
19583
20357
  reminders_max_members?: number;
19584
20358
  reminders_max_per_user?: number;
19585
- revoke_tokens_issued_before?: Date;
20359
+ /**
20360
+ * Revokes tokens issued before this date
20361
+ */
20362
+ revoke_tokens_issued_before?: Date | null;
19586
20363
  sns_key?: string;
19587
20364
  sns_secret?: string;
19588
20365
  sns_topic_arn?: string;
@@ -19604,7 +20381,7 @@ export interface UpdateAppRequest {
19604
20381
  datadog_info?: DataDogInfo;
19605
20382
  file_upload_config?: FileUploadConfig;
19606
20383
  firebase_config?: FirebaseConfig;
19607
- grants?: Record<string, Array<string>>;
20384
+ grants?: Record<string, Array<string>> | null;
19608
20385
  huawei_config?: HuaweiConfig;
19609
20386
  image_upload_config?: FileUploadConfig;
19610
20387
  moderation_dashboard_preferences?: ModerationDashboardPreferences;
@@ -19764,6 +20541,14 @@ export interface UpdateCampaignRequest {
19764
20541
  user_ids?: Array<string>;
19765
20542
  channel_template?: CampaignChannelTemplate;
19766
20543
  }
20544
+ export interface UpdateCampaignResponse {
20545
+ /**
20546
+ * Duration of the request in milliseconds
20547
+ */
20548
+ duration: string;
20549
+ campaign?: CampaignResponse;
20550
+ users?: PagerResponse;
20551
+ }
19767
20552
  export interface UpdateChannelPartialRequest {
19768
20553
  user_id?: string;
19769
20554
  unset?: Array<string>;
@@ -19874,9 +20659,8 @@ export interface UpdateChannelResponse {
19874
20659
  message?: MessageResponse;
19875
20660
  }
19876
20661
  export interface UpdateChannelTypeRequest {
19877
- automod: 'disabled' | 'simple' | 'AI';
19878
- automod_behavior: 'flag' | 'block' | 'shadow_block';
19879
- max_message_length: number;
20662
+ automod?: 'disabled' | 'simple' | 'AI';
20663
+ automod_behavior?: 'flag' | 'block' | 'shadow_block';
19880
20664
  blocklist?: string;
19881
20665
  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';
19882
20666
  connect_events?: boolean;
@@ -19884,10 +20668,11 @@ export interface UpdateChannelTypeRequest {
19884
20668
  custom_events?: boolean;
19885
20669
  delivery_events?: boolean;
19886
20670
  mark_messages_pending?: boolean;
20671
+ max_message_length?: number;
19887
20672
  message_retention?: string;
19888
20673
  mutes?: boolean;
19889
20674
  partition_size?: number;
19890
- partition_ttl?: string;
20675
+ partition_ttl?: string | null;
19891
20676
  polls?: boolean;
19892
20677
  /**
19893
20678
  * Sets the push notification level for a channel type
@@ -19918,7 +20703,7 @@ export interface UpdateChannelTypeRequest {
19918
20703
  */
19919
20704
  automod_thresholds?: Thresholds;
19920
20705
  chat_preferences?: ChatPreferences;
19921
- grants?: Record<string, Array<string>>;
20706
+ grants?: Record<string, Array<string>> | null;
19922
20707
  }
19923
20708
  export interface UpdateChannelTypeResponse {
19924
20709
  automod: 'disabled' | 'simple' | 'AI';
@@ -20454,6 +21239,14 @@ export interface UpdatePollOptionRequest {
20454
21239
  * Option text
20455
21240
  */
20456
21241
  text: string;
21242
+ /**
21243
+ * Key of the moderation configuration to use. Server-side only.
21244
+ */
21245
+ config_key?: string;
21246
+ /**
21247
+ * Team associated with the configuration. Server-side only.
21248
+ */
21249
+ config_team?: string;
20457
21250
  user_id?: string;
20458
21251
  /**
20459
21252
  * Custom data for this object
@@ -20465,6 +21258,14 @@ export interface UpdatePollOptionRequest {
20465
21258
  user?: UserRequest;
20466
21259
  }
20467
21260
  export interface UpdatePollPartialRequest {
21261
+ /**
21262
+ * Key of the moderation configuration to use. Server-side only.
21263
+ */
21264
+ config_key?: string;
21265
+ /**
21266
+ * Team associated with the configuration. Server-side only.
21267
+ */
21268
+ config_team?: string;
20468
21269
  user_id?: string;
20469
21270
  /**
20470
21271
  * Array of field names to unset
@@ -20496,6 +21297,14 @@ export interface UpdatePollRequest {
20496
21297
  * Allow user suggested options
20497
21298
  */
20498
21299
  allow_user_suggested_options?: boolean;
21300
+ /**
21301
+ * Key of the moderation configuration to use. Server-side only.
21302
+ */
21303
+ config_key?: string;
21304
+ /**
21305
+ * Team associated with the configuration. Server-side only.
21306
+ */
21307
+ config_team?: string;
20499
21308
  /**
20500
21309
  * Poll description
20501
21310
  */
@@ -20649,6 +21458,26 @@ export interface UpdateSIPTrunkResponse {
20649
21458
  */
20650
21459
  sip_trunk?: SIPTrunkResponse;
20651
21460
  }
21461
+ export interface UpdateScheduledMessageRequest {
21462
+ /**
21463
+ * New send time (UTC). Must be at least 1 minute and at most the app's maximum lead time from now
21464
+ */
21465
+ scheduled_at?: Date;
21466
+ /**
21467
+ * Message data for creating or updating a message
21468
+ */
21469
+ message?: MessageRequest;
21470
+ }
21471
+ export interface UpdateScheduledMessageResponse {
21472
+ /**
21473
+ * Duration of the request in milliseconds
21474
+ */
21475
+ duration: string;
21476
+ /**
21477
+ * A message scheduled to be sent later
21478
+ */
21479
+ scheduled_message: ScheduledMessageResponse;
21480
+ }
20652
21481
  export interface UpdateSegmentRequest {
20653
21482
  /**
20654
21483
  * The description of the segment (max 256 characters)
@@ -20885,6 +21714,10 @@ export interface UpsertActivitiesRequest {
20885
21714
  * 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
21715
  */
20887
21716
  force_moderation?: boolean;
21717
+ /**
21718
+ * 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.
21719
+ */
21720
+ skip_existing?: boolean;
20888
21721
  }
20889
21722
  export interface UpsertActivitiesResponse {
20890
21723
  duration: string;
@@ -20896,6 +21729,10 @@ export interface UpsertActivitiesResponse {
20896
21729
  * Total number of mention notification activities created for mentioned users across all activities
20897
21730
  */
20898
21731
  mention_notifications_created?: number;
21732
+ /**
21733
+ * IDs of activities left unchanged because they already existed. Only set when skip_existing is true.
21734
+ */
21735
+ skipped_existing?: Array<string>;
20899
21736
  }
20900
21737
  export interface UpsertCollectionsRequest {
20901
21738
  /**
@@ -21210,6 +22047,11 @@ export interface UserBannedEvent {
21210
22047
  channel_custom?: Record<string, any>;
21211
22048
  created_by?: UserResponseCommonFields;
21212
22049
  }
22050
+ export interface UserChannelBanCountRuleParameters {
22051
+ banned_by?: string;
22052
+ threshold?: number;
22053
+ time_window?: string;
22054
+ }
21213
22055
  export interface UserChannelCountRuleParameters {
21214
22056
  threshold?: number;
21215
22057
  time_window?: string;
@@ -21829,10 +22671,6 @@ export interface VideoContentParameters {
21829
22671
  label_operator?: string;
21830
22672
  harm_labels?: Array<string>;
21831
22673
  }
21832
- export interface VideoEndCallRequestPayload {
21833
- }
21834
- export interface VideoKickUserRequestPayload {
21835
- }
21836
22674
  export interface VideoReactionOverTimeResponse {
21837
22675
  by_minute?: Array<CountByMinuteResponse>;
21838
22676
  }
@@ -22182,8 +23020,6 @@ export type WHEvent = ({
22182
23020
  } & ModerationFlaggedEvent) | ({
22183
23021
  type: 'moderation.image_analysis.complete';
22184
23022
  } & ModerationImageAnalysisCompleteEvent) | ({
22185
- type: 'moderation.intent_detected';
22186
- } & IntentDetectedEvent) | ({
22187
23023
  type: 'moderation.mark_reviewed';
22188
23024
  } & ModerationMarkReviewedEvent) | ({
22189
23025
  type: 'moderation.text_analysis.complete';
@@ -22198,6 +23034,18 @@ export type WHEvent = ({
22198
23034
  } & ReminderNotificationEvent) | ({
22199
23035
  type: 'notification.thread_message_new';
22200
23036
  } & NotificationThreadMessageNewEvent) | ({
23037
+ type: 'poll.closed';
23038
+ } & PollClosedEvent) | ({
23039
+ type: 'poll.deleted';
23040
+ } & PollDeletedEvent) | ({
23041
+ type: 'poll.updated';
23042
+ } & PollUpdatedEvent) | ({
23043
+ type: 'poll.vote_casted';
23044
+ } & PollVoteCastedEvent) | ({
23045
+ type: 'poll.vote_changed';
23046
+ } & PollVoteChangedEvent) | ({
23047
+ type: 'poll.vote_removed';
23048
+ } & PollVoteRemovedEvent) | ({
22201
23049
  type: 'reaction.deleted';
22202
23050
  } & ReactionDeletedEvent) | ({
22203
23051
  type: 'reaction.new';
@@ -22214,6 +23062,10 @@ export type WHEvent = ({
22214
23062
  } & ReviewQueueItemNewEvent) | ({
22215
23063
  type: 'review_queue_item.updated';
22216
23064
  } & ReviewQueueItemUpdatedEvent) | ({
23065
+ type: 'scheduled_message.failed';
23066
+ } & ScheduledMessageFailedEvent) | ({
23067
+ type: 'scheduled_message.sent';
23068
+ } & ScheduledMessageSentEvent) | ({
22217
23069
  type: 'thread.updated';
22218
23070
  } & ThreadUpdatedEvent) | ({
22219
23071
  type: 'user.banned';