export interface AIAudioConfigRequest { profile?: string; rules?: BodyguardRule[]; } export interface AIAudioConfigResponse { enabled: boolean; profile: string; rules: BodyguardRule[]; } export interface AIImageConfig { enabled: boolean; ocr_rules: OCRRule[]; rules: AWSRekognitionRule[]; async?: boolean; } export interface AIImageLabelDefinition { description: string; group: string; key: string; label: string; } export interface AITextConfig { enabled: boolean; profile: string; rules: BodyguardRule[]; severity_rules: BodyguardSeverityRule[]; async?: boolean; } export interface AIVideoConfigRequest { async?: boolean; enabled?: boolean; rules?: AWSRekognitionRule[]; } export interface AIVideoConfigResponse { enabled: boolean; rules: AWSRekognitionRule[]; async?: boolean; } export interface APIError { /** * API error code */ code: number; /** * Request duration */ duration: string; /** * Message describing an error */ message: string; /** * URL with additional information */ more_info: string; /** * Response HTTP status code */ status_code: number; /** * Additional error-specific information */ details: number[]; /** * 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 */ unrecoverable?: boolean; /** * Additional error info */ exception_fields?: Record; } export interface AWSRekognitionRule { action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; label: string; min_confidence: number; subclassifications?: Record; } export interface AcceptFeedMemberInviteRequest { } export interface AcceptFeedMemberInviteResponse { duration: string; member: FeedMemberResponse; } export interface AcceptFollowRequest { /** * Fully qualified ID of the source feed */ source: string; /** * Fully qualified ID of the target feed */ target: string; /** * Optional role for the follower in the follow relationship. Server-side only. Either a built-in ('feed_follower' (the default) or 'feed_member_viewer') or any role your app has defined; grants are not inspected. */ follower_role?: string; } export interface AcceptFollowResponse { duration: string; follow: FollowResponse; } export interface Action { name: string; text: string; type: string; style?: string; value?: string; } export interface ActionLogResponse { /** * Timestamp when the action was taken */ created_at: Date; /** * Unique identifier of the action log */ id: string; /** * Reason for the moderation action */ reason: string; /** * Classification of who triggered the action (e.g. user, moderator, automod, api_integration) */ reporter_type: string; /** * ID of the user who was the target of the action */ target_user_id: string; /** * Type of moderation action */ type: string; /** * ID of the user who performed the action */ user_id: string; ai_providers: string[]; /** * Additional metadata about the action */ custom: Record; review_queue_item?: ReviewQueueItemResponse; /** * User response object */ target_user?: UserResponse; /** * User response object */ user?: UserResponse; } export interface ActionSequence { action: string; blur: boolean; cooldown_period: number; threshold: number; time_window: number; warning: boolean; warning_text: string; } export interface ActivityAddedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; /** * The type of event: "feeds.activity.added" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; /** * The type of event: "feeds.activity.deleted" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityFeedbackEvent { /** * Date/time of creation */ created_at: Date; activity_feedback: ActivityFeedbackEventPayload; custom: Record; /** * The type of event: "feeds.activity.feedback" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityFeedbackEventPayload { /** * The type of feedback action. One of: hide, show_more, show_less */ action: 'hide' | 'show_more' | 'show_less'; /** * The activity that received feedback */ activity_id: string; /** * When the feedback was created */ created_at: Date; /** * When the feedback was last updated */ updated_at: Date; /** * The feedback value (true/false) */ value: string; /** * User response object */ user: UserResponse; } export interface ActivityFeedbackRequest { /** * Whether to hide this activity */ hide?: boolean; /** * Whether to show less content like this */ show_less?: boolean; /** * Whether to show more content like this */ show_more?: boolean; } export interface ActivityFeedbackResponse { /** * The ID of the activity that received feedback */ activity_id: string; duration: string; } export interface ActivityFilterConfig { exclude_owner_activities: boolean; } export interface ActivityMarkEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; /** * The type of event: "feeds.activity.marked" in this case */ type: string; feed_visibility?: string; /** * Whether all activities were marked as read */ mark_all_read?: boolean; /** * Whether all activities were marked as seen */ mark_all_seen?: boolean; received_at?: Date; /** * The IDs of activities marked as read */ mark_read?: string[]; /** * The IDs of activities marked as seen */ mark_seen?: string[]; /** * The IDs of activities marked as watched */ mark_watched?: string[]; user?: UserResponseCommonFields; } export interface ActivityPinResponse { /** * When the pin was created */ created_at: Date; /** * ID of the feed where activity is pinned */ feed: string; /** * When the pin was last updated */ updated_at: Date; activity: ActivityResponse; /** * User response object */ user: UserResponse; } export interface ActivityPinnedEvent { /** * Date/time of creation */ created_at: Date; /** * The ID of the feed */ fid: string; custom: Record; pinned_activity: PinActivityResponse; /** * The type of event: "feeds.activity.pinned" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityProcessorConfig { type: string; min_text_length?: number; min_word_count?: number; config?: Record; } export interface ActivityReactionAddedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; reaction: FeedsReactionResponse; /** * The type of event: "feeds.activity.reaction.added" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityReactionDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; reaction: FeedsReactionResponse; /** * The type of the reaction that was removed */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityReactionUpdatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; reaction: FeedsReactionResponse; /** * The type of event: "feeds.activity.reaction.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityRemovedFromFeedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; /** * The type of event: "feeds.activity.removed_from_feed" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityRequest { /** * Type of activity */ type: string; /** * List of feeds to add the activity to with a default max limit of 25 feeds */ feeds: string[]; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create notification activities for mentioned users */ create_notification_activity?: boolean; /** * Expiration time for the activity */ expires_at?: string; /** * Optional ID for the activity */ id?: string; /** * ID of parent activity for replies/comments */ parent_id?: string; /** * ID of a poll to attach to activity */ poll_id?: string; /** * Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody */ restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody'; /** * Whether to skip URL enrichment for the activity */ skip_enrich_url?: boolean; /** * Whether to skip push notifications */ skip_push?: boolean; /** * Text content of the activity */ text?: string; /** * Visibility setting for the activity. One of: public, private, tag */ visibility?: 'public' | 'private' | 'tag'; /** * If visibility is 'tag', this is the tag name and is required */ visibility_tag?: string; /** * List of attachments for the activity */ attachments?: Attachment[]; /** * Collections that this activity references */ collection_refs?: string[]; /** * Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions. */ collections?: CollectionRequest[]; /** * Tags for filtering activities */ filter_tags?: string[]; /** * Tags for indicating user interests */ interest_tags?: string[]; /** * List of users mentioned in the activity */ mentioned_user_ids?: string[]; /** * Custom data for the activity */ custom?: Record; location?: Location; /** * Additional data for search indexing */ search_data?: Record; } export interface ActivityResponse { /** * Number of bookmarks on the activity */ bookmark_count: number; /** * Number of comments on the activity */ comment_count: number; /** * When the activity was created */ created_at: Date; /** * If this activity is hidden by this user (using activity feedback) */ hidden: boolean; /** * Unique identifier for the activity */ id: string; /** * Popularity score of the activity */ popularity: number; /** * If this activity is obfuscated for this user. For premium content where you want to show a preview */ preview: boolean; /** * Number of reactions to the activity */ reaction_count: number; /** * Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody */ restrict_replies: 'everyone' | 'people_i_follow' | 'nobody'; /** * Ranking score for this activity */ score: number; /** * Number of times the activity was shared */ share_count: number; /** * Type of activity */ type: string; /** * When the activity was last updated */ updated_at: Date; /** * Visibility setting for the activity. One of: public, private, tag */ visibility: 'public' | 'private' | 'tag'; /** * Media attachments for the activity */ attachments: Attachment[]; /** * Latest 5 comments of this activity (comment replies excluded) */ comments: CommentResponse[]; /** * List of feed IDs containing this activity */ feeds: string[]; /** * Tags for filtering */ filter_tags: string[]; /** * Tags for user interests */ interest_tags: string[]; /** * Recent reactions to the activity */ latest_reactions: FeedsReactionResponse[]; /** * Users mentioned in the activity */ mentioned_users: UserResponse[]; /** * Current user's bookmarks for this activity */ own_bookmarks: BookmarkResponse[]; /** * Current user's reactions to this activity */ own_reactions: FeedsReactionResponse[]; /** * Enriched collection data referenced by this activity */ collections: Record; /** * Custom data for the activity */ custom: Record; /** * Grouped reactions by type */ reaction_groups: Record; /** * Data for search indexing */ search_data: Record; /** * User response object */ user: UserResponse; /** * When the activity was deleted */ deleted_at?: Date; /** * When the activity was last edited */ edited_at?: Date; /** * When the activity will expire */ expires_at?: Date; /** * Total count of reactions from friends on this activity */ friend_reaction_count?: number; /** * Whether this activity has been read. Only set for feed groups with notification config (track_seen/track_read enabled). */ is_read?: boolean; /** * Whether this activity has been seen. Only set for feed groups with notification config (track_seen/track_read enabled). */ is_seen?: boolean; is_watched?: boolean; moderation_action?: string; /** * Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking. */ selector_source?: string; /** * Text content of the activity */ text?: string; /** * Number of top-level comments (comments directly on the activity, excluding replies). Only returned by GetActivity when include_top_level_comment_count=true; never set on feed reads or events. Same status/deletion rules as comment_count; not adjusted per viewer. */ top_level_comment_count?: number; /** * If visibility is 'tag', this is the tag name */ visibility_tag?: string; /** * Reactions from users the current user follows or has mutual follows with */ friend_reactions?: FeedsReactionResponse[]; /** * Recent shares of the activity, one entry per share (org-gated) */ latest_shares?: ShareResponse[]; current_feed?: FeedResponse; i18n?: Record; location?: Location; metrics?: Record; moderation?: ModerationV2Response; notification_context?: NotificationContext; parent?: ActivityResponse; poll?: PollResponseData; /** * Variable values used at ranking time. Only included when include_score_vars is enabled in enrichment options. */ score_vars?: Record; } export interface ActivityRestoredEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; /** * The type of the event */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivitySelectorConfig { cutoff_time: Date; cutoff_window?: string; min_popularity?: number; type?: string; sort?: SortParam[]; filter?: Record; params?: Record; } export interface ActivityUnpinnedEvent { /** * Date/time of creation */ created_at: Date; /** * The ID of the feed */ fid: string; custom: Record; pinned_activity: PinActivityResponse; /** * The type of event: "feeds.activity.unpinned" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ActivityUpdatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; custom: Record; /** * The type of the event */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface AddActivityRequest { /** * Type of activity */ type: string; /** * List of feeds to add the activity to with a default max limit of 25 feeds */ feeds: string[]; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create notification activities for mentioned users */ create_notification_activity?: boolean; enrich_own_fields?: boolean; /** * Expiration time for the activity */ expires_at?: string; /** * Optional ID for the activity */ id?: string; /** * ID of parent activity for replies/comments */ parent_id?: string; /** * ID of a poll to attach to activity */ poll_id?: string; /** * Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody */ restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody'; /** * Whether to skip URL enrichment for the activity */ skip_enrich_url?: boolean; /** * Whether to skip push notifications */ skip_push?: boolean; /** * Text content of the activity */ text?: string; /** * Visibility setting for the activity. One of: public, private, tag */ visibility?: 'public' | 'private' | 'tag'; /** * If visibility is 'tag', this is the tag name and is required */ visibility_tag?: string; /** * List of attachments for the activity */ attachments?: Attachment[]; /** * Collections that this activity references */ collection_refs?: string[]; /** * Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions. */ collections?: CollectionRequest[]; /** * Tags for filtering activities */ filter_tags?: string[]; /** * Tags for indicating user interests */ interest_tags?: string[]; /** * List of users mentioned in the activity */ mentioned_user_ids?: string[]; /** * Custom data for the activity */ custom?: Record; location?: Location; /** * Additional data for search indexing */ search_data?: Record; } export interface AddActivityResponse { duration: string; activity: ActivityResponse; /** * Number of mention notification activities created for mentioned users */ mention_notifications_created?: number; } export interface AddBookmarkRequest { /** * ID of the folder to add the bookmark to */ folder_id?: string; /** * Custom data for the bookmark */ custom?: Record; new_folder?: AddFolderRequest; } export interface AddBookmarkResponse { duration: string; bookmark: BookmarkResponse; } export interface AddCommentBookmarkRequest { /** * ID of the folder to add the bookmark to */ folder_id?: string; /** * Custom data for the bookmark */ custom?: Record; new_folder?: AddFolderRequest; } export interface AddCommentBookmarkResponse { duration: string; bookmark: BookmarkResponse; } export interface AddCommentReactionRequest { /** * The type of reaction, eg upvote, like, ... */ type: string; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create a notification activity for this reaction */ create_notification_activity?: boolean; /** * Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one) */ enforce_unique?: boolean; skip_push?: boolean; /** * Optional list of feeds to create a reference (share) activity of the commented-on activity in. The reference activity's type mirrors the reaction type. */ target_feeds?: string[]; /** * Optional custom data to add to the reaction */ custom?: Record; } export interface AddCommentReactionResponse { /** * The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type. */ counter_delta: number; /** * Duration of the request */ duration: string; /** * What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'. */ outcome: string; comment: CommentResponse; reaction: FeedsReactionResponse; /** * Whether notification creation was accepted for asynchronous processing */ notification_accepted?: boolean; /** * @deprecated * Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted */ notification_created?: boolean; /** * ID of the async notification-creation task; poll GET /tasks/{id} for its status */ notification_task_id?: string; /** * The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one. */ previous_reaction_type?: string; reference_activity?: ActivityResponse; } export interface AddCommentRequest { /** * Text content of the comment */ comment?: string; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create a notification activity for this comment */ create_notification_activity?: boolean; /** * Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated. */ id?: string; /** * ID of the object to comment on. Required for root comments */ object_id?: string; /** * Type of the object to comment on. Required for root comments */ object_type?: string; /** * ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment. */ parent_id?: string; /** * Whether to skip URL enrichment for this comment */ skip_enrich_url?: boolean; skip_push?: boolean; /** * Media attachments for the reply */ attachments?: Attachment[]; /** * List of users mentioned in the reply */ mentioned_user_ids?: string[]; /** * Custom data for the comment */ custom?: Record; } export interface AddCommentResponse { duration: string; comment: CommentResponse; /** * Number of mention notification activities created for mentioned users */ mention_notifications_created?: number; /** * Whether a notification activity was successfully created */ notification_created?: boolean; } export interface AddCommentsBatchRequest { /** * List of comments to add */ comments: AddCommentRequest[]; } export interface AddCommentsBatchResponse { duration: string; /** * List of comments added */ comments: CommentResponse[]; } export interface AddFolderRequest { /** * Name of the folder */ name: string; /** * Custom data for the folder */ custom?: Record; } export interface AddReactionRequest { /** * Type of reaction */ type: string; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create a notification activity for this reaction */ create_notification_activity?: boolean; /** * Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one) */ enforce_unique?: boolean; skip_push?: boolean; /** * Optional list of feeds to create a reference (share) activity of the original activity in. The reference activity's type mirrors the reaction type. */ target_feeds?: string[]; /** * Custom data for the reaction */ custom?: Record; } export interface AddReactionResponse { /** * The change this write made to the number of reactions the user holds on this target: 1 when outcome is 'created', 0 when it is 'replaced' or 'unchanged'. These endpoints never return -1; a successful delete-reaction call is what decrements the count. With enforce_unique this is the delta of the user's reaction on the target; without it, the delta of reactions of this type. */ counter_delta: number; duration: string; /** * What this write did to the user's reaction on this target. One of: created, replaced, unchanged. 'created' means a new reaction was written and nothing was replaced; 'replaced' means enforce_unique removed one or more of the user's other reaction types; 'unchanged' means the user already held this reaction type (its custom data may still have been updated). Without enforce_unique a user can hold several reaction types on one target, so 'created' then means 'this reaction type was newly added', not 'the user's first reaction on this target'. */ outcome: string; activity: ActivityResponse; reaction: FeedsReactionResponse; /** * Whether notification creation was accepted for asynchronous processing */ notification_accepted?: boolean; /** * @deprecated * Deprecated. Mirrors notification_accepted; use notification_accepted for async enqueue status Deprecated: use notification_accepted */ notification_created?: boolean; /** * ID of the async notification-creation task; poll GET /tasks/{id} for its status */ notification_task_id?: string; /** * The reaction type this write replaced, or null when nothing was replaced. Non-null exactly when outcome is 'replaced'. If enforce_unique removed several reactions — possible only for data created before enforce_unique was adopted — this is the most recently created one. */ previous_reaction_type?: string; reference_activity?: ActivityResponse; } export interface AddUserGroupMembersRequest { /** * List of user IDs to add as members */ member_ids: string[]; /** * Whether to add the members as group admins. Defaults to false */ as_admin?: boolean; team_id?: string; } export interface AddUserGroupMembersResponse { duration: string; user_group?: UserGroupResponse; } export interface AggregatedActivityResponse { /** * Number of activities in this aggregation */ activity_count: number; /** * When the aggregation was created */ created_at: Date; /** * Grouping identifier */ group: string; /** * Ranking score for this aggregation */ score: number; /** * When the aggregation was last updated */ updated_at: Date; /** * Number of unique users in this aggregation */ user_count: number; /** * Whether this activity group has been truncated due to exceeding the group size limit */ user_count_truncated: boolean; /** * List of activities in this aggregation */ activities: ActivityResponse[]; /** * Whether this aggregated group has been read. Only set for feed groups with notification config (track_seen/track_read enabled). */ is_read?: boolean; /** * Whether this aggregated group has been seen. Only set for feed groups with notification config (track_seen/track_read enabled). */ is_seen?: boolean; is_watched?: boolean; } export interface AggregationConfig { activities_sort?: string; format?: string; group_size?: number; score_strategy?: string; } export interface AppEventResponse { /** * boolean */ auto_translation_enabled: boolean; /** * string */ name: string; /** * boolean */ async_url_enrich_enabled?: boolean; file_upload_config?: FileUploadConfig; image_upload_config?: FileUploadConfig; } export interface AppResponseFields { async_url_enrich_enabled: boolean; auto_translation_enabled: boolean; id: number; name: string; placement: string; file_upload_config: FileUploadConfig; image_upload_config: FileUploadConfig; } export interface AppUpdatedEvent { /** * Date/time of creation */ created_at: Date; app: AppEventResponse; custom: Record; /** * The type of event: "app.updated" in this case */ type: string; received_at?: Date; } export interface AppealItemResponse { /** * Reason Text of the Appeal Item */ appeal_reason: string; /** * When the flag was created */ created_at: Date; /** * ID of the entity */ entity_id: string; /** * Type of entity */ entity_type: string; id: string; /** * Status of the Appeal Item */ status: string; /** * When the flag was last updated */ updated_at: Date; /** * Text severity level assigned by the AI provider */ ai_text_severity?: string; /** * Detected language of the appeal_reason text itself */ appeal_reason_language?: string; /** * CID of the channel the entity belongs to (content appeals), or of the channel ban being appealed (stream:user appeals). Empty for a global ban appeal. */ channel_cid?: string; /** * Moderation policy key that was applied */ config_key?: string; /** * Decision Reason of the Appeal Item */ decision_reason?: string; /** * Action recommended by the automated moderation system (e.g. flag, remove, shadow) */ recommended_action?: string; /** * ID of the review queue item linked to this appeal, if the appeal was submitted with one */ review_queue_item_id?: string; /** * Overall content severity score (1–100) */ severity?: number; /** * Full chronological history of all moderation actions on the review queue item */ actions?: ActionLogResponse[]; /** * Attachments(e.g. Images) of the Appeal Item */ attachments?: string[]; /** * Classification labels from automated and manual review */ flag_labels?: string[]; /** * Types of flags applied to the entity (e.g. user_report, bodyguard) */ flag_types?: string[]; /** * Per-provider flag records explaining why the action was taken */ flags?: ModerationFlagResponse[]; /** * Detected languages in the content */ languages?: string[]; entity_content?: ModerationPayload; moderation_action?: ActionLogResponse; original_moderation_action?: ActionLogResponse; /** * User response object */ user?: UserResponse; } export interface AppealRequest { /** * Explanation for why the content is being appealed */ appeal_reason: string; /** * Unique identifier of the entity being appealed */ entity_id: string; /** * Type of entity being appealed (e.g., message, user) */ entity_type: string; /** * CID of the channel ban being appealed. Only used when entity_type is stream:user; omit to appeal the global ban. */ channel_cid?: string; /** * ID of the review queue item (flagged message) that triggered the ban. Applicable only for user ban appeals. */ review_queue_item_id?: string; /** * Array of Attachment URLs(e.g., images) */ attachments?: string[]; } export interface AppealResponse { /** * Unique identifier of the created Appeal item */ appeal_id: string; duration: string; } export interface Attachment { custom: Record; asset_url?: string; author_icon?: string; author_link?: string; author_name?: string; color?: string; fallback?: string; footer?: string; footer_icon?: string; image_url?: string; og_scrape_url?: string; original_height?: number; original_width?: number; pretext?: string; text?: string; thumb_url?: string; title?: string; title_link?: string; /** * Attachment type (e.g. image, video, url) */ type?: string; actions?: Action[]; fields?: Field[]; giphy?: Images; } export interface AutomodPlatformCircumventionConfig { enabled: boolean; rules: AutomodRule[]; async?: boolean; } export interface AutomodRule { action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; label: string; threshold: number; } export interface AutomodSemanticFiltersConfig { enabled: boolean; rules: AutomodSemanticFiltersRule[]; async?: boolean; } export interface AutomodSemanticFiltersRule { action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; name: string; threshold: number; } export interface AutomodToxicityConfig { enabled: boolean; rules: AutomodRule[]; async?: boolean; } export interface BanActionRequestPayload { /** * Also ban user from all channels this moderator creates in the future */ ban_from_future_channels?: boolean; /** * Ban only from specific channel */ channel_ban_only?: boolean; channel_cid?: string; /** * Message deletion mode: soft, pruning, or hard */ delete_messages?: 'soft' | 'pruning' | 'hard'; /** * Whether to ban by IP address */ ip_ban?: boolean; /** * Reason for the ban */ reason?: string; /** * Whether this is a shadow ban */ shadow?: boolean; /** * Optional: ban user directly without review item */ target_user_id?: string; /** * Duration of ban in minutes */ timeout?: number; } export interface BanInfoResponse { /** * When the ban was created */ created_at: Date; /** * The channel this ban applies to. Empty if this is an app-wide (global) ban rather than a per-channel ban. */ channel_cid?: string; /** * When the ban expires */ expires?: Date; /** * Reason for the ban */ reason?: string; /** * Whether this is a shadow ban */ shadow?: boolean; channel?: ChannelMetadata; /** * User response object */ created_by?: UserResponse; /** * User response object */ user?: UserResponse; } export interface BanOptions { delete_messages?: 'soft' | 'pruning' | 'hard'; duration?: number; ip_ban?: boolean; reason?: string; shadow_ban?: boolean; } export interface BanRequest { /** * ID of the user to ban */ target_user_id: string; /** * Channel where the ban applies */ channel_cid?: string; delete_messages?: 'soft' | 'pruning' | 'hard'; /** * Whether to ban the user's IP address */ ip_ban?: boolean; /** * Optional explanation for the ban */ reason?: string; /** * Whether this is a shadow ban */ shadow?: boolean; /** * Duration of the ban in minutes */ timeout?: number; } export interface BatchQueryActivityReactionsRequest { /** * Activity IDs to fetch the user's reactions for (max 100) */ activity_ids: string[]; limit?: number; next?: string; prev?: string; sort?: SortParamRequest[]; /** * Optional filter on reaction_type or created_at */ filter?: Record; } export interface BatchQueryActivityReactionsResponse { /** * Duration of the request in milliseconds */ duration: string; reactions: FeedsReactionResponse[]; next?: string; prev?: string; } export interface BatchQueryCommentReactionsRequest { /** * Comment IDs to fetch the user's reactions for (max 100) */ comment_ids: string[]; limit?: number; next?: string; prev?: string; sort?: SortParamRequest[]; /** * Optional filter on reaction_type or created_at */ filter?: Record; } export interface BatchQueryCommentReactionsResponse { /** * Duration of the request in milliseconds */ duration: string; reactions: FeedsReactionResponse[]; next?: string; prev?: string; } export interface BlockActionRequestPayload { /** * Reason for blocking */ reason?: string; } export interface BlockListConfig { enabled: boolean; rules: BlockListRule[]; async?: boolean; match_substring?: boolean; } export interface BlockListOptions { /** * Blocklist behavior. One of: flag, block, shadow_block */ behavior: 'flag' | 'block' | 'shadow_block'; /** * Blocklist name */ blocklist: string; } export interface BlockListResponse { is_confusable_folding_enabled: boolean; is_leet_check_enabled: boolean; is_plural_check_enabled: boolean; is_substring_matching_enabled: boolean; /** * Block list name */ name: string; /** * Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word */ type: string; /** * List of words to block */ words: string[]; /** * Date/time of creation */ created_at?: Date; id?: string; owner_user_id?: string; team?: string; /** * Date/time of the last update */ updated_at?: Date; } export interface BlockListRule { action: 'flag' | 'mask' | 'mask_flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; name: string; team: string; } export interface BlockUsersRequest { /** * User id to block */ blocked_user_id: string; } export interface BlockUsersResponse { /** * User id who blocked another user */ blocked_by_user_id: string; /** * User id who got blocked */ blocked_user_id: string; /** * Timestamp when the user was blocked */ created_at: Date; /** * Duration of the request in milliseconds */ duration: string; } export interface BlockedUserResponse { /** * ID of the user who got blocked */ blocked_user_id: string; created_at: Date; /** * ID of the user who blocked another user */ user_id: string; /** * User response object */ blocked_user: UserResponse; /** * User response object */ user: UserResponse; } export interface BodyguardProfileSummary { name: string; display_name?: string; text_type?: string; } export interface BodyguardRule { action: 'keep' | 'flag' | 'mask' | 'mask_flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; label: string; severity_rules: BodyguardSeverityRule[]; } export interface BodyguardSeverityRule { action: 'keep' | 'flag' | 'mask' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; severity: 'low' | 'medium' | 'high' | 'critical'; } export interface BookmarkAddedEvent { /** * Date/time of creation */ created_at: Date; bookmark: BookmarkResponse; custom: Record; /** * The type of event: "feeds.bookmark.added" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface BookmarkDeletedEvent { /** * Date/time of creation */ created_at: Date; bookmark: BookmarkResponse; custom: Record; /** * The type of event: "feeds.bookmark.deleted" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface BookmarkFolderDeletedEvent { /** * Date/time of creation */ created_at: Date; bookmark_folder: BookmarkFolderResponse; custom: Record; /** * The type of event: "feeds.bookmark_folder.deleted" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface BookmarkFolderResponse { /** * When the folder was created */ created_at: Date; /** * Unique identifier for the folder */ id: string; /** * Name of the folder */ name: string; /** * When the folder was last updated */ updated_at: Date; /** * User response object */ user: UserResponse; /** * Custom data for the folder */ custom?: Record; } export interface BookmarkFolderUpdatedEvent { /** * Date/time of creation */ created_at: Date; bookmark_folder: BookmarkFolderResponse; custom: Record; /** * The type of event: "feeds.bookmark_folder.updated" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface BookmarkResponse { /** * When the bookmark was created */ created_at: Date; /** * ID of the bookmarked object */ object_id: string; /** * Type of the bookmarked object (activity or comment) */ object_type: string; /** * When the bookmark was last updated */ updated_at: Date; activity: ActivityResponse; /** * User response object */ user: UserResponse; activity_id?: string; comment?: CommentResponse; /** * Custom data for the bookmark */ custom?: Record; folder?: BookmarkFolderResponse; } export interface BookmarkUpdatedEvent { /** * Date/time of creation */ created_at: Date; bookmark: BookmarkResponse; custom: Record; /** * The type of event: "feeds.bookmark.updated" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface BulkActionAppealsRequest { /** * Action to apply: unban, restore, unblock, mark_reviewed, or reject_appeal */ action_type: 'unban' | 'restore' | 'unblock' | 'mark_reviewed' | 'reject_appeal'; /** * List of appeal UUIDs to process */ appeal_ids: string[]; /** * Configuration for mark reviewed action */ mark_reviewed?: MarkReviewedRequestPayload; /** * Configuration for rejecting an appeal */ reject_appeal?: RejectAppealRequestPayload; /** * Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once). */ restore?: RestoreActionRequestPayload; /** * Configuration for unban moderation action */ unban?: UnbanActionRequestPayload; /** * @deprecated * Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action. */ unblock?: UnblockActionRequestPayload; } export interface BulkActionAppealsResponse { duration: string; /** * Appeals that could not be processed, with per-item error messages */ errors: BulkAppealError[]; /** * Successfully processed appeals */ results: BulkAppealResult[]; } export interface BulkAppealError { appeal_id: string; error: string; } export interface BulkAppealResult { appeal_id: string; appeal_item?: AppealItemResponse; } export interface BulkDeleteActionConfigRequest { /** * UUIDs of the action configs to delete */ ids: string[]; } export interface BulkDeleteActionConfigResponse { /** * Number of action configs deleted */ deleted: number; duration: string; } export interface BulkUpsertActionConfigRequest { /** * List of action configs to create or update */ action_configs: UpsertActionConfigItem[]; } export interface BulkUpsertActionConfigResponse { duration: string; /** * The created or updated action configs in the same order as the request */ action_configs: ModerationActionConfigResponse[]; } export interface BypassActionRequest { enabled?: boolean; } export interface CallActionOptions { duration?: number; flag_reason?: string; kick_reason?: string; mute_audio?: boolean; mute_video?: boolean; reason?: string; warning_text?: string; } export interface CallCustomPropertyParameters { operator?: string; property_key?: string; } export interface CallRuleActionSequence { violation_number?: number; actions?: string[]; call_options?: CallActionOptions; } export interface CallTypeRuleParameters { call_type?: string; } export interface CallViolationCountParameters { threshold?: number; time_window?: string; } export interface CastPollVoteRequest { vote?: VoteData; } export interface ChangeFeedVisibilityRequest { /** * Feed visibility level: public, visible, followers, members, or private */ visibility: 'public' | 'visible' | 'followers' | 'members' | 'private'; /** * What to do with existing pending follows when loosening visibility from 'followers': auto_approve (default) or reject */ pending_follows_action?: 'auto_approve' | 'reject'; } export interface ChangeFeedVisibilityResponse { duration: string; feed: FeedResponse; } export interface ChannelConfigWithInfo { automod: 'disabled' | 'simple' | 'AI'; automod_behavior: 'flag' | 'block' | 'shadow_block'; connect_events: boolean; count_messages: boolean; created_at: Date; custom_events: boolean; delivery_events: boolean; mark_messages_pending: boolean; max_message_length: number; message_retention: string; mutes: boolean; name: string; polls: boolean; push_notifications: boolean; quotes: boolean; reactions: boolean; read_events: boolean; reminders: boolean; replies: boolean; search: boolean; shared_locations: boolean; skip_last_msg_update_for_system_msgs: boolean; typing_events: boolean; updated_at: Date; uploads: boolean; url_enrichment: boolean; user_message_reminders: boolean; commands: Command[]; blocklist?: string; blocklist_behavior?: 'flag' | 'block' | 'shadow_block'; partition_size?: number; partition_ttl?: string; /** * Sets the push notification level for a channel type */ push_level?: 'all' | 'all_mentions' | 'mentions' | 'direct_mentions' | 'none'; allowed_flag_reasons?: string[]; blocklists?: BlockListOptions[]; /** * Sets thresholds for AI moderation */ automod_thresholds?: Thresholds; chat_preferences?: ChatPreferences; grants?: Record; } export interface ChannelMemberPartialResponse { /** * Role of the member in the channel */ channel_role: string; /** * Whether the user muted notifications for this channel */ notifications_muted: boolean; /** * Channel-member custom fields projected via `member_custom_include` */ custom?: Record; } export interface ChannelMemberResponse { /** * Whether member is banned this channel or not */ banned: boolean; /** * Role of the member in the channel */ channel_role: string; /** * Date/time of creation */ created_at: Date; notifications_muted: boolean; /** * Whether member is shadow banned in this channel or not */ shadow_banned: boolean; /** * Date/time of the last update */ updated_at: Date; custom: Record; archived_at?: Date; /** * Expiration date of the ban */ ban_expires?: Date; /** * Whether the member's ban also applies to channels the channel's creator will create in the future (an active future channel ban by the creator targets this member) */ ban_from_future_channels?: boolean; deleted_at?: Date; /** * Expiration date of the future channel ban; absent when the future channel ban is permanent */ future_channel_ban_expires?: Date; /** * Date when invite was accepted */ invite_accepted_at?: Date; /** * Date when invite was rejected */ invite_rejected_at?: Date; /** * Whether member was invited or not */ invited?: boolean; /** * Whether member is channel moderator or not */ is_moderator?: boolean; pinned_at?: Date; /** * Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner */ role?: string; status?: string; user_id?: string; deleted_messages?: string[]; /** * User response object */ user?: UserResponse; } export interface ChannelMessageCountRuleParameters { operator?: string; threshold?: number; } export interface ChannelMetadata { cid: string; id: string; type: string; custom: Record; last_message_at?: Date; member_count?: number; message_count?: number; push_level?: string; team?: string; } export interface ChannelMute { /** * Date/time of creation */ created_at: Date; /** * Date/time of the last update */ updated_at: Date; /** * Date/time of mute expiration */ expires?: Date; /** * Represents channel in chat */ channel?: ChannelResponse; /** * User response object */ user?: UserResponse; } export declare const ChannelOwnCapability: { readonly BAN_CHANNEL_MEMBERS: "ban-channel-members"; readonly CAST_POLL_VOTE: "cast-poll-vote"; readonly CONNECT_EVENTS: "connect-events"; readonly CREATE_ATTACHMENT: "create-attachment"; readonly CREATE_MENTION: "create-mention"; readonly DELETE_ANY_MESSAGE: "delete-any-message"; readonly DELETE_CHANNEL: "delete-channel"; readonly DELETE_OWN_MESSAGE: "delete-own-message"; readonly DELIVERY_EVENTS: "delivery-events"; readonly FLAG_MESSAGE: "flag-message"; readonly FREEZE_CHANNEL: "freeze-channel"; readonly JOIN_CHANNEL: "join-channel"; readonly LEAVE_CHANNEL: "leave-channel"; readonly MUTE_CHANNEL: "mute-channel"; readonly NOTIFY_CHANNEL: "notify-channel"; readonly NOTIFY_GROUP: "notify-group"; readonly NOTIFY_HERE: "notify-here"; readonly NOTIFY_ROLE: "notify-role"; readonly PIN_MESSAGE: "pin-message"; readonly QUERY_POLL_VOTES: "query-poll-votes"; readonly QUOTE_MESSAGE: "quote-message"; readonly READ_EVENTS: "read-events"; readonly SEARCH_MESSAGES: "search-messages"; readonly SEND_CUSTOM_EVENTS: "send-custom-events"; readonly SEND_LINKS: "send-links"; readonly SEND_MESSAGE: "send-message"; readonly SEND_POLL: "send-poll"; readonly SEND_REACTION: "send-reaction"; readonly SEND_REPLY: "send-reply"; readonly SEND_RESTRICTED_VISIBILITY_MESSAGE: "send-restricted-visibility-message"; readonly SEND_TYPING_EVENTS: "send-typing-events"; readonly SET_CHANNEL_COOLDOWN: "set-channel-cooldown"; readonly SHARE_LOCATION: "share-location"; readonly SKIP_SLOW_MODE: "skip-slow-mode"; readonly SLOW_MODE: "slow-mode"; readonly TYPING_EVENTS: "typing-events"; readonly UPDATE_ANY_MESSAGE: "update-any-message"; readonly UPDATE_CHANNEL: "update-channel"; readonly UPDATE_CHANNEL_MEMBERS: "update-channel-members"; readonly UPDATE_OWN_MESSAGE: "update-own-message"; readonly UPDATE_THREAD: "update-thread"; readonly UPLOAD_FILE: "upload-file"; }; export type ChannelOwnCapability = (typeof ChannelOwnCapability)[keyof typeof ChannelOwnCapability]; export interface ChannelPushPreferencesResponse { chat_level?: string; disabled_until?: Date; chat_preferences?: ChatPreferencesResponse; } export interface ChannelResponse { /** * Channel CID (:) */ cid: string; /** * Date/time of creation */ created_at: Date; disabled: boolean; /** * Whether channel is frozen or not */ frozen: boolean; /** * Channel unique ID */ id: string; /** * Type of the channel */ type: string; /** * Date/time of the last update */ updated_at: Date; /** * Custom data for this object */ custom: Record; /** * Whether auto translation is enabled or not */ auto_translation_enabled?: boolean; /** * Language (or comma-separated list of languages) to translate to when auto translation is active */ auto_translation_language?: string; /** * Whether this channel is blocked by current user or not */ blocked?: boolean; /** * Cooldown period after sending each message */ cooldown?: number; /** * Date/time of deletion */ deleted_at?: Date; /** * Whether this channel is hidden by current user or not */ hidden?: boolean; /** * Date since when the message history is accessible */ hide_messages_before?: Date; /** * Date of the last message sent */ last_message_at?: Date; /** * Number of members in the channel */ member_count?: number; /** * Number of messages in the channel */ message_count?: number; /** * Date of mute expiration */ mute_expires_at?: Date; /** * Whether this channel is muted or not */ muted?: boolean; /** * Team the channel belongs to (multi-tenant only) */ team?: string; /** * Date of the latest truncation of the channel */ truncated_at?: Date; /** * List of filter tags associated with the channel */ filter_tags?: string[]; /** * List of channel members (max 100) */ members?: ChannelMemberResponse[]; /** * List of channel capabilities of authenticated user */ own_capabilities?: ChannelOwnCapability[]; config?: ChannelConfigWithInfo; /** * User response object */ created_by?: UserResponse; /** * User response object */ truncated_by?: UserResponse; } export interface ChatDraftPayloadResponse { id: string; text: string; custom: Record; html?: string; mml?: string; parent_id?: string; poll_id?: string; quoted_message_id?: string; show_in_channel?: boolean; silent?: boolean; type?: string; attachments?: Attachment[]; mentioned_users?: UserResponse[]; } export interface ChatDraftResponse { channel_cid: string; created_at: Date; message: ChatDraftPayloadResponse; parent_id?: string; parent_message?: ChatMessageResponse; quoted_message?: ChatMessageResponse; } export interface ChatMessageResponse { cid: string; created_at: Date; deleted_reply_count: number; html: string; id: string; mentioned_channel: boolean; mentioned_here: boolean; pinned: boolean; reply_count: number; shadowed: boolean; silent: boolean; text: string; type: string; updated_at: Date; attachments: Attachment[]; latest_reactions: ChatReactionResponse[]; mentioned_users: UserResponse[]; own_reactions: ChatReactionResponse[]; restricted_visibility: string[]; custom: Record; reaction_counts: Record; reaction_scores: Record; /** * User response object */ user: UserResponse; command?: string; deleted_at?: Date; deleted_for_me?: boolean; message_text_updated_at?: Date; mml?: string; parent_id?: string; pin_expires?: Date; pinned_at?: Date; poll_id?: string; quoted_message_id?: string; show_in_channel?: boolean; mentioned_group_ids?: string[]; mentioned_groups?: UserGroupResponse[]; mentioned_roles?: string[]; thread_participants?: UserResponse[]; draft?: ChatDraftResponse; i18n?: Record; image_labels?: Record; member?: ChannelMemberPartialResponse; moderation?: ChatModerationV2Response; /** * User response object */ pinned_by?: UserResponse; poll?: PollResponseData; quoted_message?: ChatMessageResponse; reaction_groups?: Record; reminder?: ChatReminderResponseData; shared_location?: ChatSharedLocationResponseData; } export interface ChatModerationV2Response { action: string; original_text: string; blocklist_matched?: string; platform_circumvented?: boolean; semantic_filter_matched?: string; blocklists_matched?: string[]; image_harms?: string[]; text_harms?: string[]; } export interface ChatPreferences { channel_mentions?: string; default_preference?: string; direct_mentions?: string; distinct_channel_messages?: string; group_mentions?: string; here_mentions?: string; role_mentions?: string; thread_replies?: string; } export interface ChatPreferencesInput { channel_mentions?: 'all' | 'none'; default_preference?: 'all' | 'none'; direct_mentions?: 'all' | 'none'; group_mentions?: 'all' | 'none'; here_mentions?: 'all' | 'none'; role_mentions?: 'all' | 'none'; thread_replies?: 'all' | 'none'; } export interface ChatPreferencesResponse { channel_mentions?: string; default_preference?: string; direct_mentions?: string; group_mentions?: string; here_mentions?: string; role_mentions?: string; thread_replies?: string; } export interface ChatReactionGroupResponse { count: number; first_reaction_at: Date; last_reaction_at: Date; sum_scores: number; latest_reactions_by: ChatReactionGroupUserResponse[]; } export interface ChatReactionGroupUserResponse { created_at: Date; user_id: string; /** * User response object */ user?: UserResponse; } export interface ChatReactionResponse { created_at: Date; message_id: string; score: number; type: string; updated_at: Date; user_id: string; custom: Record; /** * User response object */ user: UserResponse; } export interface ChatReminderResponseData { channel_cid: string; created_at: Date; message_id: string; updated_at: Date; user_id: string; remind_at?: Date; message?: ChatMessageResponse; /** * User response object */ user?: UserResponse; } export interface ChatSharedLocationResponseData { channel_cid: string; created_at: Date; created_by_device_id: string; latitude: number; longitude: number; message_id: string; updated_at: Date; user_id: string; end_at?: Date; message?: ChatMessageResponse; } export interface ClosedCaptionRuleParameters { severity?: string; threshold?: number; time_window?: string; harm_labels?: string[]; llm_harm_labels?: Record; } export interface CollectionRequest { /** * Name/type of the collection */ name: string; /** * Custom data for the collection (required, must contain at least one key) */ custom: Record; /** * Unique identifier for the collection within its name (optional, will be auto-generated if not provided) */ id?: string; } export interface CollectionResponse { /** * Unique identifier for the collection within its name */ id: string; /** * Name/type of the collection */ name: string; /** * When the collection was created */ created_at?: Date; /** * When the collection was last updated */ updated_at?: Date; /** * ID of the user who owns this collection */ user_id?: string; /** * Custom data for the collection */ custom?: Record; } export interface Command { /** * Arguments help text, shown in commands auto-completion */ args: string; /** * Description, shown in commands auto-completion */ description: string; /** * Unique command name */ name: string; /** * Set name used for grouping commands */ set: string; /** * Date/time of creation */ created_at?: Date; /** * Date/time of the last update */ updated_at?: Date; } export interface CommentAddedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; comment: CommentResponse; custom: Record; /** * The type of event: "feeds.comment.added" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface CommentDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; comment: CommentResponse; custom: Record; /** * The type of event: "feeds.comment.deleted" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface CommentReactionAddedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; comment: CommentResponse; custom: Record; reaction: FeedsReactionResponse; /** * The type of event: "feeds.comment.reaction.added" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface CommentReactionDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; comment: CommentResponse; custom: Record; reaction: FeedsReactionResponse; /** * The type of reaction that was removed */ type: string; feed_visibility?: string; received_at?: Date; } export interface CommentReactionUpdatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; activity: ActivityResponse; comment: CommentResponse; custom: Record; reaction: FeedsReactionResponse; /** * The type of event: "feeds.comment.reaction.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface CommentResponse { bookmark_count: number; /** * Confidence score of the comment */ confidence_score: number; /** * When the comment was created */ created_at: Date; /** * Number of downvotes for this comment */ downvote_count: number; /** * Unique identifier for the comment */ id: string; /** * ID of the object this comment is associated with */ object_id: string; /** * Type of the object this comment is associated with */ object_type: string; /** * Number of reactions to this comment */ reaction_count: number; /** * Number of replies to this comment */ reply_count: number; /** * Score of the comment based on reactions */ score: number; /** * Status of the comment. One of: active, deleted, removed, hidden */ status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; /** * When the comment was last updated */ updated_at: Date; /** * Number of upvotes for this comment */ upvote_count: number; /** * Users mentioned in the comment */ mentioned_users: UserResponse[]; /** * Current user's reactions to this activity */ own_reactions: FeedsReactionResponse[]; /** * User response object */ user: UserResponse; /** * Controversy score of the comment */ controversy_score?: number; /** * When the comment was deleted */ deleted_at?: Date; /** * When the comment was last edited */ edited_at?: Date; /** * ID of parent comment for nested replies */ parent_id?: string; /** * Text content of the comment */ text?: string; /** * Attachments associated with the comment */ attachments?: Attachment[]; /** * Recent reactions to the comment */ latest_reactions?: FeedsReactionResponse[]; /** * Custom data for the comment */ custom?: Record; i18n?: Record; moderation?: ModerationV2Response; /** * Grouped reactions by type */ reaction_groups?: Record; } export interface CommentRestoredEvent { /** * Date/time of creation */ created_at: Date; fid: string; comment: CommentResponse; custom: Record; /** * The type of event: "feeds.comment.restored" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface CommentUpdatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; comment: CommentResponse; custom: Record; /** * The type of event: "feeds.comment.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ConfigResponse { /** * Whether moderation should be performed asynchronously */ async: boolean; /** * When the configuration was created */ created_at: Date; /** * Unique identifier for the moderation configuration */ key: string; /** * Team associated with the configuration */ team: string; /** * When the configuration was last updated */ updated_at: Date; supported_video_call_harm_types: string[]; /** * Configurable image moderation label definitions for dashboard rendering */ ai_image_label_definitions?: AIImageLabelDefinition[]; /** * Names of Bodyguard credential profiles registered on this app. The dashboard uses this list to render the profile picker on the AI Text section. */ available_bodyguard_profiles?: BodyguardProfileSummary[]; ai_audio_config?: AIAudioConfigResponse; ai_image_config?: AIImageConfig; /** * Available L2 subclassifications per L1 image moderation label, based on the active provider */ ai_image_subclassifications?: Record; ai_text_config?: AITextConfig; ai_video_config?: AIVideoConfigResponse; automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig; automod_semantic_filters_config?: AutomodSemanticFiltersConfig; automod_toxicity_config?: AutomodToxicityConfig; block_list_config?: BlockListConfig; flood_config?: FloodConfig; intent_config?: IntentConfigResponse; llm_config?: LLMConfig; velocity_filter_config?: VelocityFilterConfig; video_call_rule_config?: VideoCallRuleConfig; } export interface ConnectUserDetailsRequest { id: string; image?: string; invisible?: boolean; language?: string; name?: string; custom?: Record; privacy_settings?: PrivacySettingsResponse; } export interface ContentCountRuleParameters { threshold?: number; time_window?: string; } export interface ContentCustomPropertyCountParameters { operator?: string; property_key?: string; threshold?: number; time_window?: string; } export interface ContentCustomPropertyParameters { operator?: string; property_key?: string; } export interface CreateBlockListRequest { /** * Block list name */ name: string; /** * List of words to block */ words: string[]; is_confusable_folding_enabled?: boolean; is_leet_check_enabled?: boolean; is_plural_check_enabled?: boolean; is_substring_matching_enabled?: boolean; team?: string; /** * Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word */ type?: 'regex' | 'domain' | 'domain_allowlist' | 'email' | 'email_allowlist' | 'word'; } export interface CreateBlockListResponse { /** * Duration of the request in milliseconds */ duration: string; /** * Block list contains restricted words */ blocklist?: BlockListResponse; } export interface CreateCollectionsRequest { /** * List of collections to create */ collections: CollectionRequest[]; } export interface CreateCollectionsResponse { duration: string; /** * List of created collections */ collections: CollectionResponse[]; } export interface CreateDeviceRequest { /** * Device ID */ id: string; /** * Push provider */ push_provider: 'firebase' | 'apn' | 'huawei' | 'xiaomi'; /** * Stable physical device identifier used to deduplicate pushes across push providers (e.g. APNs VoIP and Firebase on the same iOS device). Distinct from 'id', which is the push token. */ hardware_id?: string; /** * Push provider name */ push_provider_name?: string; /** * When true the token is for Apple VoIP push notifications */ voip_token?: boolean; } export interface CreateFeedsBatchRequest { /** * List of feeds to create */ feeds: FeedRequest[]; /** * If true, enriches the created feeds with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; } export interface CreateFeedsBatchResponse { duration: string; /** * List of created feeds */ feeds: FeedResponse[]; } export interface CreateGuestRequest { /** * User request object */ user: UserRequest; } export interface CreateGuestResponse { /** * the access token to authenticate the user */ access_token: string; /** * Duration of the request in milliseconds */ duration: string; /** * User response object */ user: UserResponse; } export interface CreatePollOptionRequest { /** * Option text */ text: string; /** * Custom data for this object */ custom?: Record; } export interface CreatePollRequest { /** * The name of the poll */ name: string; /** * Indicates whether users can suggest user defined answers */ allow_answers?: boolean; allow_user_suggested_options?: boolean; /** * A description of the poll */ description?: string; /** * Indicates whether users can cast multiple votes */ enforce_unique_vote?: boolean; id?: string; /** * Indicates whether the poll is open for voting */ is_closed?: boolean; /** * Indicates the maximum amount of votes a user can cast */ max_votes_allowed?: number; team?: string; voting_visibility?: 'anonymous' | 'public'; options?: PollOptionInput[]; /** * Custom data for this object */ custom?: Record; } export interface CreateQueueRequest { name: string; type: 'personal_view' | 'operational_queue'; description?: string; sort?: Array>; filters?: Record; } export interface CreateUserGroupRequest { /** * The user friendly name of the user group */ name: string; /** * An optional description for the group */ description?: string; /** * Optional user group ID. If not provided, a UUID v7 will be generated */ id?: string; /** * Optional team ID to scope the group to a team */ team_id?: string; /** * Optional initial list of user IDs to add as members */ member_ids?: string[]; } export interface CreateUserGroupResponse { duration: string; user_group?: UserGroupResponse; } export interface CustomActionRequestPayload { /** * Custom action identifier */ id?: string; /** * Custom action options */ options?: Record; } export interface Data { id: string; } export interface DecayFunctionConfig { base?: string; decay?: string; direction?: string; offset?: string; origin?: string; scale?: string; } export interface DeleteActionConfigResponse { /** * Number of action configs deleted (0 or 1) */ deleted: number; duration: string; } export interface DeleteActivitiesRequest { /** * List of activity IDs to delete */ ids: string[]; /** * Whether to also delete any notification activities created from mentions in these activities */ delete_notification_activity?: boolean; /** * Whether to permanently delete the activities */ hard_delete?: boolean; } export interface DeleteActivitiesResponse { duration: string; /** * List of activity IDs that were successfully deleted */ deleted_ids: string[]; } export interface DeleteActivityReactionResponse { duration: string; activity: ActivityResponse; reaction: FeedsReactionResponse; } export interface DeleteActivityRequestPayload { /** * ID of the activity to delete (alternative to item_id) */ entity_id?: string; /** * Type of the entity (required for delete_activity to distinguish v2 vs v3) */ entity_type?: string; /** * Whether to permanently delete the activity */ hard_delete?: boolean; /** * Reason for deletion */ reason?: string; } export interface DeleteActivityResponse { duration: string; } export interface DeleteBookmarkFolderResponse { duration: string; } export interface DeleteBookmarkResponse { duration: string; bookmark: BookmarkResponse; } export interface DeleteCollectionsResponse { duration: string; } export interface DeleteCommentBookmarkResponse { duration: string; bookmark: BookmarkResponse; } export interface DeleteCommentReactionResponse { duration: string; comment: CommentResponse; reaction: FeedsReactionResponse; } export interface DeleteCommentRequestPayload { /** * ID of the comment to delete (alternative to item_id) */ entity_id?: string; /** * Type of the entity */ entity_type?: string; /** * Whether to permanently delete the comment */ hard_delete?: boolean; /** * Reason for deletion */ reason?: string; } export interface DeleteCommentResponse { duration: string; activity: ActivityResponse; comment: CommentResponse; } export interface DeleteFeedResponse { duration: string; /** * The ID of the async task that will handle feed cleanup and hard deletion */ task_id: string; } export interface DeleteMessageRequestPayload { /** * ID of the message to delete (alternative to item_id) */ entity_id?: string; /** * Type of the entity */ entity_type?: string; /** * Whether to permanently delete the message */ hard_delete?: boolean; /** * Reason for deletion */ reason?: string; } export interface DeleteModerationConfigResponse { duration: string; } export interface DeleteQueueRequest { } export interface DeleteReactionRequestPayload { /** * ID of the reaction to delete (alternative to item_id) */ entity_id?: string; /** * Type of the entity */ entity_type?: string; /** * Whether to permanently delete the reaction */ hard_delete?: boolean; /** * Reason for deletion */ reason?: string; } export interface DeleteScheduledActivityResponse { duration: string; } export interface DeleteUserInterestsResponse { duration: string; /** * Interest tags still set on the user */ interests: InterestTagResponse[]; } export interface DeleteUserMessagesRequestPayload { /** * Message deletion mode: soft, pruning, or hard */ delete_messages: 'soft' | 'pruning' | 'hard'; /** * Optional: scope deletion to a single channel (alternative to app-wide deletion) */ channel_cid?: string; /** * Whether to also delete the user's reactions on other users' messages */ delete_reactions?: boolean; /** * ID of the user whose messages should be deleted (alternative to item_id) */ entity_id?: string; /** * Type of the entity */ entity_type?: string; /** * Reason for the deletion */ reason?: string; } export interface DeleteUserRequestPayload { /** * Also delete all user conversations */ delete_conversation_channels?: boolean; /** * Delete flagged feeds content */ delete_feeds_content?: boolean; /** * ID of the user to delete (alternative to item_id) */ entity_id?: string; /** * Type of the entity */ entity_type?: string; /** * Whether to permanently delete the user */ hard_delete?: boolean; /** * Also delete all user messages */ mark_messages_deleted?: boolean; /** * Reason for deletion */ reason?: string; } export interface DeliveryReceiptsResponse { enabled: boolean; } export interface DeviceResponse { /** * Date/time of creation */ created_at: Date; /** * Device ID */ id: string; /** * Push provider */ push_provider: string; /** * User ID */ user_id: string; /** * Whether device is disabled or not */ disabled?: boolean; /** * Reason explaining why device had been disabled */ disabled_reason?: string; /** * Stable physical device identifier used to deduplicate pushes across push providers */ hardware_id?: string; /** * Push provider name */ push_provider_name?: string; /** * When true the token is for Apple VoIP push notifications */ voip?: boolean; } export interface DraftPayloadResponse { /** * Message ID is unique string identifier of the message */ id: string; /** * Text of the message */ text: string; custom: Record; /** * Contains HTML markup of the message */ html?: string; /** * MML content of the message */ mml?: string; /** * ID of parent message (thread) */ parent_id?: string; /** * Identifier of the poll to include in the message */ poll_id?: string; quoted_message_id?: string; /** * Whether thread reply should be shown in the channel as well */ show_in_channel?: boolean; /** * Whether message is silent or not */ silent?: boolean; /** * Contains type of the message. One of: regular, system */ type?: string; /** * Array of message attachments */ attachments?: Attachment[]; /** * List of mentioned users */ mentioned_users?: UserResponse[]; } export interface DraftResponse { channel_cid: string; created_at: Date; /** * Contains the draft message content */ message: DraftPayloadResponse; parent_id?: string; /** * Represents channel in chat */ channel?: ChannelResponse; /** * Represents any chat message */ parent_message?: MessageResponse; /** * Represents any chat message */ quoted_message?: MessageResponse; } export interface EnrichedActivity { foreign_id?: string; id?: string; score?: number; verb?: string; to?: string[]; actor?: Data; latest_reactions?: Record; object?: Data; origin?: Data; own_reactions?: Record; reaction_counts?: Record; target?: Data; } export interface EnrichedCollectionResponse { /** * Unique identifier for the collection within its name */ id: string; /** * Name/type of the collection */ name: string; /** * Enrichment status of the collection. One of: ok, notfound */ status: 'ok' | 'notfound'; /** * When the collection was created */ created_at?: Date; /** * When the collection was last updated */ updated_at?: Date; /** * ID of the user who owns this collection */ user_id?: string; /** * Custom data for the collection */ custom?: Record; } export interface EnrichedReaction { activity_id: string; kind: string; user_id: string; id?: string; parent?: string; target_feeds?: string[]; children_counts?: Record; created_at?: Time; data?: Record; latest_children?: Record; own_children?: Record; updated_at?: Time; user?: Data; } export interface EnrichmentOptions { /** * Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds). */ enrich_own_followings?: boolean; /** * 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. */ include_flat_activities?: boolean; /** * Default: false. When true, includes score_vars in activity responses containing variable values used at ranking time. */ include_score_vars?: boolean; /** * Default: false. When true, skips all activity enrichments. */ skip_activity?: boolean; /** * Default: false. When true, skips enriching collections on activities. */ skip_activity_collections?: boolean; /** * Default: false. When true, skips enriching comments on activities. */ skip_activity_comments?: boolean; /** * Default: false. When true, skips enriching current_feed on activities. Note: CurrentFeed is still computed for permission checks, but enrichment is skipped. */ skip_activity_current_feed?: boolean; /** * Default: false. When true, skips enriching mentioned users on activities. */ skip_activity_mentioned_users?: boolean; /** * Default: false. When true, skips enriching own bookmarks on activities. */ skip_activity_own_bookmarks?: boolean; /** * Default: false. When true, skips enriching parent activities. */ skip_activity_parents?: boolean; /** * Default: false. When true, skips enriching poll data on activities. */ skip_activity_poll?: boolean; /** * Default: false. When true, skips fetching and enriching latest and own reactions on activities. Note: If reactions are already denormalized in the database, they will still be included. */ skip_activity_reactions?: boolean; /** * Default: false. When true, skips refreshing image URLs on activities. */ skip_activity_refresh_image_urls?: boolean; /** * Default: false. When true, skips all enrichments. */ skip_all?: boolean; /** * Default: false. When true, skips enriching user data on feed members. */ skip_feed_member_user?: boolean; /** * Default: false. When true, skips fetching and enriching followers. Note: If followers_pagination is explicitly provided, followers will be fetched regardless of this setting. */ skip_followers?: boolean; /** * Default: false. When true, skips fetching and enriching following. Note: If following_pagination is explicitly provided, following will be fetched regardless of this setting. */ skip_following?: boolean; /** * Default: false. When true, skips computing and including capabilities for feeds. */ skip_own_capabilities?: boolean; /** * Default: false. When true, skips fetching and enriching own_follows (follows where user's feeds follow target feeds). */ skip_own_follows?: boolean; /** * Default: false. When true, skips enriching pinned activities. */ skip_pins?: boolean; } export interface EntityCreatorResponse { /** * Number of minor actions performed on the user */ ban_count: number; banned: boolean; created_at: Date; /** * Number of major actions performed on the user */ deleted_content_count: number; /** * Number of flag actions performed on the user */ flagged_count: number; id: string; language: string; online: boolean; role: string; updated_at: Date; blocked_user_ids: string[]; teams: string[]; custom: Record; avg_response_time?: number; deactivated_at?: Date; deleted_at?: Date; image?: string; last_active?: Date; name?: string; revoke_tokens_issued_before?: Date; teams_role?: Record; } export interface EscalatePayload { /** * Additional context for the reviewer */ notes?: string; /** * Priority of the escalation (low, medium, high) */ priority?: string; /** * Reason for the escalation (from configured escalation_reasons) */ reason?: string; } export interface EscalationMetadata { notes?: string; priority?: string; reason?: string; } export interface FeedCreatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; members: FeedMemberResponse[]; custom: Record; feed: FeedResponse; user: UserResponseCommonFields; /** * The type of event: "feeds.feed.created" in this case */ type: string; feed_visibility?: string; received_at?: Date; } export interface FeedDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; /** * The type of event: "feeds.feed.deleted" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface FeedGroup { aggregation_version: number; app_pk: number; created_at: Date; default_follower_role: string; default_visibility: string; group_id: string; updated_at: Date; activity_processors: ActivityProcessorConfig[]; activity_selectors: ActivitySelectorConfig[]; custom: Record; deleted_at?: Date; last_feed_get_at?: Date; activity_filter?: ActivityFilterConfig; aggregation?: AggregationConfig; notification?: NotificationConfig; push_notification?: PushNotificationConfig; ranking?: RankingConfig; stories?: StoriesConfig; } export interface FeedGroupChangedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; /** * The type of event: "feeds.feed_group.changed" in this case */ type: string; feed_visibility?: string; received_at?: Date; feed_group?: FeedGroup; user?: UserResponseCommonFields; } export interface FeedGroupDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; /** * The ID of the feed group that was deleted */ group_id: string; custom: Record; /** * The type of event: "feeds.feed_group.deleted" in this case */ type: string; feed_visibility?: string; received_at?: Date; } export interface FeedGroupRestoredEvent { /** * Date/time of creation */ created_at: Date; fid: string; /** * The ID of the feed group that was restored */ group_id: string; custom: Record; /** * The type of event: "feeds.feed_group.restored" in this case */ type: string; feed_visibility?: string; received_at?: Date; } export interface FeedInput { description?: string; name?: string; visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; filter_tags?: string[]; members?: FeedMemberRequest[]; custom?: Record; location?: Location; } export interface FeedMemberAddedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; member: FeedMemberResponse; /** * The type of event: "feeds.feed_member.added" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface FeedMemberRemovedEvent { /** * Date/time of creation */ created_at: Date; fid: string; member_id: string; custom: Record; /** * The type of event: "feeds.feed_member.removed" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface FeedMemberRequest { /** * ID of the user to add as a member */ user_id: string; /** * Whether this is an invite to become a member */ invite?: boolean; /** * ID of the membership level to assign to the member */ membership_level?: string; /** * Role of the member in the feed */ role?: string; /** * Custom data for the member */ custom?: Record; } export interface FeedMemberResponse { /** * When the membership was created */ created_at: Date; /** * Role of the member in the feed */ role: string; /** * Status of the membership. One of: member, pending, rejected */ status: 'member' | 'pending' | 'rejected'; /** * When the membership was last updated */ updated_at: Date; /** * User response object */ user: UserResponse; /** * When the invite was accepted */ invite_accepted_at?: Date; /** * When the invite was rejected */ invite_rejected_at?: Date; /** * Custom data for the membership */ custom?: Record; membership_level?: MembershipLevelResponse; } export interface FeedMemberUpdatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; member: FeedMemberResponse; /** * The type of event: "feeds.feed_member.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export declare const FeedOwnCapability: { readonly ADD_ACTIVITY: "add-activity"; readonly ADD_ACTIVITY_BOOKMARK: "add-activity-bookmark"; readonly ADD_ACTIVITY_REACTION: "add-activity-reaction"; readonly ADD_COMMENT: "add-comment"; readonly ADD_COMMENT_REACTION: "add-comment-reaction"; readonly CREATE_FEED: "create-feed"; readonly DELETE_ANY_ACTIVITY: "delete-any-activity"; readonly DELETE_ANY_COMMENT: "delete-any-comment"; readonly DELETE_FEED: "delete-feed"; readonly DELETE_OWN_ACTIVITY: "delete-own-activity"; readonly DELETE_OWN_ACTIVITY_BOOKMARK: "delete-own-activity-bookmark"; readonly DELETE_OWN_ACTIVITY_REACTION: "delete-own-activity-reaction"; readonly DELETE_OWN_COMMENT: "delete-own-comment"; readonly DELETE_OWN_COMMENT_REACTION: "delete-own-comment-reaction"; readonly FOLLOW: "follow"; readonly PIN_ACTIVITY: "pin-activity"; readonly QUERY_FEED_MEMBERS: "query-feed-members"; readonly QUERY_FOLLOWS: "query-follows"; readonly READ_ACTIVITIES: "read-activities"; readonly READ_FEED: "read-feed"; readonly UNFOLLOW: "unfollow"; readonly UPDATE_ANY_ACTIVITY: "update-any-activity"; readonly UPDATE_ANY_COMMENT: "update-any-comment"; readonly UPDATE_FEED: "update-feed"; readonly UPDATE_FEED_FOLLOWERS: "update-feed-followers"; readonly UPDATE_FEED_MEMBERS: "update-feed-members"; readonly UPDATE_OWN_ACTIVITY: "update-own-activity"; readonly UPDATE_OWN_ACTIVITY_BOOKMARK: "update-own-activity-bookmark"; readonly UPDATE_OWN_COMMENT: "update-own-comment"; }; export type FeedOwnCapability = (typeof FeedOwnCapability)[keyof typeof FeedOwnCapability]; export interface FeedOwnData { /** * Capabilities the current user has for this feed */ own_capabilities?: FeedOwnCapability[]; /** * Follow relationships where the feed owner's feeds are following the current user's feeds (up to 5 total) */ own_followings?: FollowResponse[]; /** * Follow relationships where the current user's feeds are following this feed */ own_follows?: FollowResponse[]; own_membership?: FeedMemberResponse; } export interface FeedRequest { /** * ID of the feed group */ feed_group_id: string; /** * ID of the feed */ feed_id: string; /** * ID of the feed creator */ created_by_id?: string; /** * Description of the feed */ description?: string; /** * Name of the feed */ name?: string; /** * Visibility setting for the feed. One of: public, visible, followers, members, private */ visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; /** * Tags used for filtering feeds */ filter_tags?: string[]; /** * Initial members for the feed */ members?: FeedMemberRequest[]; /** * Custom data for the feed */ custom?: Record; location?: Location; } export interface FeedResponse { activity_count: number; /** * When the feed was created */ created_at: Date; /** * Description of the feed */ description: string; /** * Fully qualified feed ID (group_id:id) */ feed: string; /** * Number of followers of this feed */ follower_count: number; /** * Number of feeds this feed follows */ following_count: number; /** * Group this feed belongs to */ group_id: string; /** * Unique identifier for the feed */ id: string; /** * Number of members in this feed */ member_count: number; /** * Name of the feed */ name: string; /** * Number of pinned activities in this feed */ pin_count: number; /** * When the feed was last updated */ updated_at: Date; /** * User response object */ created_by: UserResponse; /** * When the feed was deleted */ deleted_at?: Date; /** * Visibility setting for the feed */ visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; /** * Tags used for filtering feeds */ filter_tags?: string[]; /** * Capabilities the current user has for this feed */ own_capabilities?: FeedOwnCapability[]; /** * Follow relationships where the feed owner’s feeds are following the current user's feeds */ own_followings?: FollowResponse[]; /** * Follow relationships where the current user's feeds are following this feed */ own_follows?: FollowResponse[]; /** * Custom data for the feed */ custom?: Record; location?: Location; own_membership?: FeedMemberResponse; } export interface FeedSuggestionResponse { activity_count: number; /** * When the feed was created */ created_at: Date; /** * Description of the feed */ description: string; /** * Fully qualified feed ID (group_id:id) */ feed: string; /** * Number of followers of this feed */ follower_count: number; /** * Number of feeds this feed follows */ following_count: number; /** * Group this feed belongs to */ group_id: string; /** * Unique identifier for the feed */ id: string; /** * Number of members in this feed */ member_count: number; /** * Name of the feed */ name: string; /** * Number of pinned activities in this feed */ pin_count: number; /** * When the feed was last updated */ updated_at: Date; /** * User response object */ created_by: UserResponse; /** * When the feed was deleted */ deleted_at?: Date; reason?: string; recommendation_score?: number; /** * Visibility setting for the feed */ visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private'; /** * Tags used for filtering feeds */ filter_tags?: string[]; /** * Capabilities the current user has for this feed */ own_capabilities?: FeedOwnCapability[]; /** * Follow relationships where the feed owner’s feeds are following the current user's feeds */ own_followings?: FollowResponse[]; /** * Follow relationships where the current user's feeds are following this feed */ own_follows?: FollowResponse[]; algorithm_scores?: Record; /** * Custom data for the feed */ custom?: Record; location?: Location; own_membership?: FeedMemberResponse; } export interface FeedUpdatedEvent { created_at: Date; fid: string; custom: Record; feed: FeedResponse; /** * The type of event: "feeds.feed.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; user?: UserResponseCommonFields; } export interface FeedsActivityLocation { lat: number; lng: number; } export interface FeedsBookmarkResponse { created_at: Date; object_id: string; object_type: string; updated_at: Date; /** * User response object */ user: UserResponse; activity_id?: string; custom?: Record; } export interface FeedsEnrichedCollectionResponse { created_at: Date; id: string; name: string; status: string; updated_at: Date; user_id: string; custom: Record; } export interface FeedsFeedResponse { activity_count: number; created_at: Date; description: string; feed: string; follower_count: number; following_count: number; group_id: string; id: string; member_count: number; name: string; pin_count: number; updated_at: Date; /** * User response object */ created_by: UserResponse; deleted_at?: Date; visibility?: string; filter_tags?: string[]; custom?: Record; location?: FeedsActivityLocation; } export interface FeedsNotificationComment { comment: string; id: string; user_id: string; attachments?: Attachment[]; } export interface FeedsNotificationContext { target?: FeedsNotificationTarget; trigger?: FeedsNotificationTrigger; } export interface FeedsNotificationParentActivity { id: string; text?: string; type?: string; user_id?: string; attachments?: Attachment[]; } export interface FeedsNotificationTarget { id: string; name?: string; text?: string; type?: string; user_id?: string; attachments?: Attachment[]; comment?: FeedsNotificationComment; custom?: Record; parent_activity?: FeedsNotificationParentActivity; } export interface FeedsNotificationTrigger { text: string; type: string; comment?: FeedsNotificationComment; custom?: Record; } export interface FeedsPreferences { /** * Push notification preference for comments on user's activities. One of: all, none */ comment?: 'all' | 'none'; /** * Push notification preference for mentions in comments. One of: all, none */ comment_mention?: 'all' | 'none'; /** * Push notification preference for reactions on comments. One of: all, none */ comment_reaction?: 'all' | 'none'; /** * Push notification preference for replies to comments. One of: all, none */ comment_reply?: 'all' | 'none'; /** * Push notification preference for new followers. One of: all, none */ follow?: 'all' | 'none'; /** * Push notification preference for mentions in activities. One of: all, none */ mention?: 'all' | 'none'; /** * Push notification preference for reactions on user's activities or comments. One of: all, none */ reaction?: 'all' | 'none'; /** * Push notification preferences for custom activity types. Map of activity type to preference (all or none) */ custom_activity_types?: Record; } export interface FeedsPreferencesResponse { comment?: string; comment_mention?: string; comment_reaction?: string; comment_reply?: string; follow?: string; mention?: string; reaction?: string; custom_activity_types?: Record; } export interface FeedsReactionGroupResponse { count: number; first_reaction_at: Date; last_reaction_at: Date; } export interface FeedsReactionResponse { activity_id: string; created_at: Date; type: string; updated_at: Date; /** * User response object */ user: UserResponse; comment_id?: string; custom?: Record; } export interface FeedsShareResponse { activity_id: string; created_at: Date; /** * User response object */ user: UserResponse; } export interface FeedsV3ActivityResponse { bookmark_count: number; comment_count: number; created_at: Date; hidden: boolean; id: string; popularity: number; preview: boolean; reaction_count: number; restrict_replies: string; score: number; share_count: number; type: string; updated_at: Date; visibility: string; attachments: Attachment[]; comments: FeedsV3CommentResponse[]; feeds: string[]; filter_tags: string[]; interest_tags: string[]; latest_reactions: FeedsReactionResponse[]; mentioned_users: UserResponse[]; own_bookmarks: FeedsBookmarkResponse[]; own_reactions: FeedsReactionResponse[]; collections: Record; custom: Record; reaction_groups: Record; search_data: Record; /** * User response object */ user: UserResponse; deleted_at?: Date; edited_at?: Date; expires_at?: Date; friend_reaction_count?: number; is_read?: boolean; is_seen?: boolean; is_watched?: boolean; moderation_action?: string; selector_source?: string; text?: string; visibility_tag?: string; friend_reactions?: FeedsReactionResponse[]; latest_shares?: FeedsShareResponse[]; current_feed?: FeedsFeedResponse; i18n?: Record; location?: FeedsActivityLocation; metrics?: Record; moderation?: ModerationV2Response; notification_context?: FeedsNotificationContext; parent?: FeedsV3ActivityResponse; poll?: PollResponseData; score_vars?: Record; } export interface FeedsV3CommentResponse { bookmark_count: number; confidence_score: number; created_at: Date; downvote_count: number; id: string; object_id: string; object_type: string; reaction_count: number; reply_count: number; score: number; status: string; updated_at: Date; upvote_count: number; mentioned_users: UserResponse[]; own_reactions: FeedsReactionResponse[]; /** * User response object */ user: UserResponse; controversy_score?: number; deleted_at?: Date; edited_at?: Date; parent_id?: string; text?: string; attachments?: Attachment[]; latest_reactions?: FeedsReactionResponse[]; custom?: Record; i18n?: Record; moderation?: ModerationV2Response; reaction_groups?: Record; } export interface Field { short: boolean; title: string; value: string; } export interface FileUploadConfig { size_limit: number; allowed_file_extensions: string[]; allowed_mime_types: string[]; blocked_file_extensions: string[]; blocked_mime_types: string[]; } export interface FileUploadRequest { /** * file field */ file?: string; user?: OnlyUserID; } export interface FileUploadResponse { /** * Duration of the request in milliseconds */ duration: string; /** * URL to the uploaded asset. Should be used to put to `asset_url` attachment field */ file?: string; /** * URL of the file thumbnail for supported file formats. Should be put to `thumb_url` attachment field */ thumb_url?: string; } export interface FilterConfigResponse { /** * LLM moderation labels available as filter values */ llm_labels: string[]; /** * AI image moderation labels available as filter values. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard L1 label set. */ ai_image_labels?: string[]; /** * AI text moderation labels available as filter values */ ai_text_labels?: string[]; /** * Moderation config keys present in the queue, available as filter values */ config_keys?: string[]; /** * The moderation_payload.custom keys the app has configured as review-queue filter chips (via moderation_dashboard_preferences.filterable_custom_keys). Discovery hint for the dashboard only — the filter accepts any custom key regardless of this list. */ filterable_custom_keys?: string[]; /** * Names of the app's moderation rules, available as filter values on the `label` field when filtering rule-flagged content. Includes disabled rules, since items flagged before a rule was turned off still carry its name; excludes deleted ones. Scoped to the caller's teams on a multi-tenant app. Capped at 30 names, ordered by name, so an app above that cap is listed partially. */ rule_names?: string[]; /** * AI image moderation labels available as filter values, as a map of L1 label to its L2 sub-labels. Reflects the app's effective image taxonomy: custom Bodyguard taxonomy when enabled, otherwise the standard catalogue of the org's enabled image providers. */ ai_image_taxonomy?: Record; } export interface FlagCountRuleParameters { threshold?: number; } export interface FlagItemResponse { duration: string; /** * Unique identifier of the created moderation item */ item_id: string; } export interface FlagRequest { /** * Unique identifier of the entity being flagged */ entity_id: string; /** * Type of entity being flagged (e.g., message, user) */ entity_type: string; /** * ID of the user who created the flagged entity */ entity_creator_id?: string; /** * Optional explanation for why the content is being flagged */ reason?: string; /** * Additional metadata about the flag */ custom?: Record; moderation_payload?: ModerationPayload; } export interface FlagUserOptions { reason?: string; } export interface FloodConfig { allowlist?: string[]; identical?: FloodIdenticalConfig; similar?: FloodSimilarConfig; } export interface FloodIdenticalConfig { action: string; enabled: boolean; threshold: number; time_window: string; } export interface FloodIdenticalRuleParameters { min_text_length?: number; threshold?: number; time_window?: string; track_across_users?: boolean; allowlist?: string[]; } export interface FloodSimilarConfig { action: string; enabled: boolean; similarity_distance: number; threshold: number; time_window: string; } export interface FloodSimilarRuleParameters { min_text_length?: number; similarity_distance?: number; threshold?: number; time_window?: string; allowlist?: string[]; } export interface FollowBatchRequest { /** * List of follow relationships to create */ follows: FollowRequest[]; /** * If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; } export interface FollowBatchResponse { duration: string; /** * List of newly created follow relationships */ created: FollowResponse[]; /** * List of current follow relationships */ follows: FollowResponse[]; } export interface FollowCreatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; follow: FollowResponse; /** * The type of event: "feeds.follow.created" in this case */ type: string; feed_visibility?: string; received_at?: Date; } export interface FollowDeletedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; follow: FollowResponse; /** * The type of event: "feeds.follow.deleted" in this case */ type: string; feed_visibility?: string; received_at?: Date; } export interface FollowRequest { /** * Fully qualified ID of the source feed */ source: string; /** * Fully qualified ID of the target feed */ target: string; /** * Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000. */ activity_copy_limit?: number; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create a notification activity for this follow */ create_notification_activity?: boolean; /** * If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; /** * Push preference for the follow relationship */ push_preference?: 'all' | 'none'; /** * Whether to skip push for this follow */ skip_push?: boolean; /** * Custom data for the follow relationship */ custom?: Record; } export interface FollowResponse { /** * When the follow relationship was created */ created_at: Date; /** * Role of the follower (source user) in the follow relationship, as stored. A reserved name, or a role your app no longer defines, is reported as stored but evaluated as 'feed_follower'. */ follower_role: string; /** * Push preference for notifications. One of: all, none */ push_preference: 'all' | 'none'; /** * Status of the follow relationship. One of: accepted, pending, rejected */ status: 'accepted' | 'pending' | 'rejected'; /** * When the follow relationship was last updated */ updated_at: Date; source_feed: FeedResponse; target_feed: FeedResponse; /** * When the follow request was accepted */ request_accepted_at?: Date; /** * When the follow request was rejected */ request_rejected_at?: Date; /** * Custom data for the follow relationship */ custom?: Record; } export interface FollowUpdatedEvent { /** * Date/time of creation */ created_at: Date; fid: string; custom: Record; follow: FollowResponse; /** * The type of event: "feeds.follow.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; } export interface FriendReactionsOptions { /** * Default: false. When true, fetches friend reactions for activities. */ enabled?: boolean; /** * Default: 3, Max: 10. The maximum number of friend reactions to return per activity. */ limit?: number; /** * Default: 'following'. The type of friend relationship to use. 'following' = users you follow, 'mutual' = users with mutual follows. One of: following, mutual */ type?: 'following' | 'mutual'; } export interface FullUserResponse { banned: boolean; created_at: Date; id: string; invisible: boolean; language: string; online: boolean; role: string; shadow_banned: boolean; total_unread_count: number; unread_channels: number; /** * @deprecated * Deprecated: Use total_unread_count instead. */ unread_count: number; unread_threads: number; updated_at: Date; blocked_user_ids: string[]; channel_mutes: ChannelMute[]; devices: DeviceResponse[]; mutes: UserMuteResponse[]; teams: string[]; custom: Record; avg_response_time?: number; ban_expires?: Date; deactivated_at?: Date; deleted_at?: Date; image?: string; last_active?: Date; name?: string; revoke_tokens_issued_before?: Date; latest_hidden_channels?: string[]; privacy_settings?: PrivacySettingsResponse; teams_role?: Record; } export interface GetActionConfigResponse { duration: string; /** * Moderation action configs grouped by entity type, sorted by order ascending */ action_config: Record; } export interface GetActivityResponse { duration: string; activity: ActivityResponse; } export interface GetAppealResponse { duration: string; item?: AppealItemResponse; } export interface GetApplicationResponse { /** * Duration of the request in milliseconds */ duration: string; app: AppResponseFields; } export interface GetBlockedUsersResponse { /** * Duration of the request in milliseconds */ duration: string; /** * Array of blocked user object */ blocks: BlockedUserResponse[]; } export interface GetCommentRepliesResponse { duration: string; /** * Sort order used for the replies (first, last, top, best, controversial) */ sort: string; /** * Threaded listing of replies to the comment */ comments: ThreadedCommentResponse[]; next?: string; prev?: string; } export interface GetCommentResponse { duration: string; comment: CommentResponse; } export interface GetCommentsResponse { /** * Total number of comments on the object, including replies at every depth */ comment_count: number; duration: string; /** * Sort order used for the comments (first, last, top, best, controversial) */ sort: string; /** * Threaded listing for the activity */ comments: ThreadedCommentResponse[]; next?: string; prev?: string; /** * Number of comments directly on the object, excluding replies. Independent of depth, replies_limit and id_around, and not adjusted per viewer. Only present when include_top_level_comment_count is set */ top_level_comment_count?: number; } export interface GetConfigResponse { duration: string; config?: ConfigResponse; } export interface GetFeedCountsResponse { /** * Number of activities in the feed */ activity_count: number; /** * Total number of comments on those activities, including nested replies */ comment_count: number; duration: string; /** * Sum of activity_count and comment_count */ total_count: number; } export interface GetFollowSuggestionsResponse { duration: string; /** * List of suggested feeds to follow */ suggestions: FeedSuggestionResponse[]; algorithm_used?: string; } export interface GetNotificationStatusResponse { duration: string; /** * Number of unread activities or groups */ unread: number; /** * Number of unseen activities or groups */ unseen: number; /** * When the feed was last marked read */ last_read_at?: Date; /** * When the feed was last marked seen */ last_seen_at?: Date; } export interface GetOGResponse { duration: string; custom: Record; /** * URL of detected video or audio */ asset_url?: string; author_icon?: string; /** * og:site */ author_link?: string; /** * og:site_name */ author_name?: string; color?: string; fallback?: string; footer?: string; footer_icon?: string; /** * URL of detected image */ image_url?: string; /** * extracted url from the text */ og_scrape_url?: string; original_height?: number; original_width?: number; pretext?: string; /** * og:description */ text?: string; /** * URL of detected thumb image */ thumb_url?: string; /** * og:title */ title?: string; /** * og:url */ title_link?: string; /** * Attachment type, could be empty, image, audio or video */ type?: string; actions?: Action[]; fields?: Field[]; giphy?: Images; } export interface GetOrCreateFeedRequest { id_around?: string; limit?: number; next?: string; overwrite_interest_weights?: boolean; prev?: string; view?: string; watch?: boolean; data?: FeedInput; /** * Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment. */ enrichment_options?: EnrichmentOptions; external_ranking?: Record; filter?: Record; followers_pagination?: PagerRequest; following_pagination?: PagerRequest; /** * Options to control fetching reactions from friends (users you follow or have mutual follows with). */ friend_reactions_options?: FriendReactionsOptions; interest_weights?: Record; member_pagination?: PagerRequest; } export interface GetOrCreateFeedResponse { created: boolean; /** * Duration of the request in milliseconds */ duration: string; activities: ActivityResponse[]; aggregated_activities: AggregatedActivityResponse[]; followers: FollowResponse[]; following: FollowResponse[]; members: FeedMemberResponse[]; pinned_activities: ActivityPinResponse[]; feed: FeedResponse; next?: string; prev?: string; followers_pagination?: PagerResponse; following_pagination?: PagerResponse; member_pagination?: PagerResponse; notification_status?: NotificationStatusResponse; } export interface GetOrCreateFollowResponse { /** * True if the follow was newly created by this request; false if it already existed */ created: boolean; duration: string; follow: FollowResponse; /** * Whether a notification activity was successfully created (only set when the follow was newly created) */ notification_created?: boolean; } export interface GetOrCreateUnfollowRequest { /** * Fully qualified ID of the source feed */ source: string; /** * Fully qualified ID of the target feed */ target: string; /** * Whether to delete the corresponding notification activity (default: false) */ delete_notification_activity?: boolean; /** * If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; /** * When true, activities from the unfollowed feed will remain in the source feed's timeline (default: false) */ keep_history?: boolean; } export interface GetOrCreateUnfollowResponse { /** * True if a follow was found and removed by this request; false if no follow existed */ deleted: boolean; duration: string; follow?: FollowResponse; } export interface GetScheduledActivityResponse { duration: string; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; } export interface GetUserGroupResponse { duration: string; user_group?: UserGroupResponse; } export interface GetUserInterestsResponse { duration: string; /** * Interest tags sorted by descending weight, then manually set tags before computed ones, then descending count, then alphabetically by tag */ interests: InterestTagResponse[]; } export interface GoogleVisionConfig { enabled?: boolean; } export interface HarmConfig { cooldown_period: number; severity: number; threshold: number; action_sequences: ActionSequence[]; harm_types: string[]; } export interface HealthCheckEvent { connection_id: string; created_at: Date; custom: Record; type: string; cid?: string; received_at?: Date; me?: OwnUserResponse; } export interface IPContentCountRuleParameters { threshold?: number; time_window?: string; } export interface IPFlagCountRuleParameters { severity?: string; threshold?: number; time_window?: string; harm_labels?: string[]; } export interface ImageContentParameters { label_operator?: string; min_confidence?: number; harm_labels?: string[]; } export interface ImageData { frames: string; height: string; size: string; url: string; width: string; } export interface ImageRuleParameters { min_confidence?: number; threshold?: number; time_window?: string; harm_labels?: string[]; } export interface ImageSize { /** * Crop mode. One of: top, bottom, left, right, center */ crop?: string; /** * Target image height */ height?: number; /** * Resize method. One of: clip, crop, scale, fill */ resize?: string; /** * Target image width */ width?: number; } export interface ImageUploadRequest { file?: string; /** * field with JSON-encoded array of image size configurations */ upload_sizes?: ImageSize[]; user?: OnlyUserID; } export interface ImageUploadResponse { /** * Duration of the request in milliseconds */ duration: string; file?: string; thumb_url?: string; /** * Array of image size configurations */ upload_sizes?: ImageSize[]; } export interface Images { fixed_height: ImageData; fixed_height_downsampled: ImageData; fixed_height_still: ImageData; fixed_width: ImageData; fixed_width_downsampled: ImageData; fixed_width_still: ImageData; original: ImageData; } export interface ImportBlockListRequest { items: string[]; chunk_size?: number; } export interface ImportBlockListResponse { /** * Duration of the request in milliseconds */ duration: string; task_id: string; } export interface IntentConfigRequest { /** * Topics to classify conversation text against (max 20, labels must be unique) */ topics?: IntentTopicRequest[]; } export interface IntentConfigResponse { /** * Topics conversation text is classified against */ topics: IntentTopicResponse[]; } export interface IntentTopicRequest { /** * Unique topic label (e.g. purchase_intent) */ label: string; /** * How long the buffer collects items before scoring runs */ analysis_cooldown_seconds?: number; /** * Optional description used in the classification prompt; the label alone is used when empty */ description?: string; /** * Whether this topic is evaluated */ enabled?: boolean; /** * Items buffered per conversation before scoring runs early */ max_captured_items?: number; /** * Suppresses this topic for a user and conversation after it fires; 0 uses the default */ refire_cooldown_seconds?: number; /** * Conversation score (0-100) required to fire moderation.intent_detected */ score_threshold?: number; } export interface IntentTopicResponse { /** * How long the buffer collects items before scoring runs */ analysis_cooldown_seconds: number; /** * Whether this topic is evaluated */ enabled: boolean; /** * Unique topic label (e.g. purchase_intent) */ label: string; /** * Items buffered per conversation before scoring runs early */ max_captured_items: number; /** * Conversation score (0-100) required to fire moderation.intent_detected */ score_threshold: number; /** * Optional description used in the classification prompt; the label alone is used when empty */ description?: string; /** * Suppresses this topic for a user and conversation after it fires; 0 uses the default */ refire_cooldown_seconds?: number; } export interface InterestTagResponse { /** * Lifetime number of distinct reacted-to activities tagged with this value, without decay; 0 for manually set tags */ count: number; /** * How the tag was set: computed (from the user's reactions) or manual (through the API) */ source: string; /** * The interest tag value */ tag: string; /** * Ranking weight between -1.0 and 1.0. Computed tags carry a recency-decayed weight in (0, 1.0]: the user's strongest tag is 1.0 and every other a proportional share */ weight: number; } export interface KeyframeOCRRuleParameters { threshold?: number; time_window?: string; harm_labels?: string[]; } export interface KeyframeRuleParameters { min_confidence?: number; threshold?: number; time_window?: string; harm_labels?: string[]; } export interface LLMConfig { enabled: boolean; rules: LLMRule[]; app_context?: string; async?: boolean; severity_descriptions?: Record; } export interface LLMRule { action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove' | 'keep'; description: string; label: string; severity_rules: BodyguardSeverityRule[]; } export interface LabelThresholds { /** * Threshold for automatic message block */ block?: number; /** * Threshold for automatic message flag */ flag?: number; } export interface ListBlockListResponse { /** * Duration of the request in milliseconds */ duration: string; blocklists: BlockListResponse[]; next_cursor?: string; } export interface ListDevicesResponse { duration: string; /** * List of devices */ devices: DeviceResponse[]; } export interface ListQueuesResponse { /** * Duration of the request in milliseconds */ duration: string; queues: ModerationQueueResponse[]; } export interface ListUserGroupsResponse { duration: string; /** * List of user groups */ user_groups: UserGroupResponse[]; } export interface Location { /** * Latitude coordinate */ lat: number; /** * Longitude coordinate */ lng: number; } export interface MarkActivityRequest { /** * Whether to mark all activities as read */ mark_all_read?: boolean; /** * Whether to mark all activities as seen */ mark_all_seen?: boolean; /** * List of activity IDs to mark as read */ mark_read?: string[]; /** * List of activity IDs to mark as seen */ mark_seen?: string[]; /** * List of activity IDs to mark as watched (for stories) */ mark_watched?: string[]; } export interface MarkReviewedRequestPayload { /** * Maximum content items to mark as reviewed */ content_to_mark_as_reviewed_limit?: number; /** * Reason for the appeal decision */ decision_reason?: string; /** * Skip marking content as reviewed */ disable_marking_content_as_reviewed?: boolean; } export interface MembershipLevelResponse { /** * When the membership level was created */ created_at: Date; /** * Unique identifier for the membership level */ id: string; /** * Display name for the membership level */ name: string; /** * Priority level */ priority: number; /** * When the membership level was last updated */ updated_at: Date; /** * Activity tags this membership level gives access to */ tags: string[]; /** * Description of the membership level */ description?: string; /** * Custom data for the membership level */ custom?: Record; } export interface MessageResponse { /** * Channel unique identifier in : format */ cid: string; /** * Date/time of creation */ created_at: Date; deleted_reply_count: number; /** * Contains HTML markup of the message. Can only be set when using server-side API */ html: string; /** * Message ID is unique string identifier of the message */ id: string; /** * Whether the message mentioned the channel tag */ mentioned_channel: boolean; /** * Whether the message mentioned online users with @here tag */ mentioned_here: boolean; /** * Whether message is pinned or not */ pinned: boolean; /** * Number of replies to this message */ reply_count: number; /** * Whether the message was shadowed or not */ shadowed: boolean; /** * Whether message is silent or not */ silent: boolean; /** * Text of the message. Should be empty if `mml` is provided */ text: string; /** * Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted */ type: string; /** * Date/time of the last update */ updated_at: Date; /** * Array of message attachments */ attachments: Attachment[]; /** * List of 10 latest reactions to this message */ latest_reactions: ReactionResponse[]; /** * List of mentioned users */ mentioned_users: UserResponse[]; /** * List of 10 latest reactions of authenticated user to this message */ own_reactions: ReactionResponse[]; /** * A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list */ restricted_visibility: string[]; custom: Record; /** * An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int) */ reaction_counts: Record; /** * An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int) */ reaction_scores: Record; /** * User response object */ user: UserResponse; /** * Contains provided slash command */ command?: string; /** * Date/time of deletion */ deleted_at?: Date; deleted_for_me?: boolean; message_text_updated_at?: Date; /** * Should be empty if `text` is provided. Can only be set when using server-side API */ mml?: string; /** * ID of parent message (thread) */ parent_id?: string; /** * Date when pinned message expires */ pin_expires?: Date; /** * Date when message got pinned */ pinned_at?: Date; /** * Identifier of the poll to include in the message */ poll_id?: string; quoted_message_id?: string; /** * Whether thread reply should be shown in the channel as well */ show_in_channel?: boolean; /** * List of user group IDs mentioned in the message. Group members who are also channel members will receive push notifications based on their push preferences. Max 10 groups */ mentioned_group_ids?: string[]; /** * List of mentioned user group objects. */ mentioned_groups?: UserGroupResponse[]; /** * List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles */ mentioned_roles?: string[]; /** * List of users who participate in thread */ thread_participants?: UserResponse[]; draft?: DraftResponse; /** * Object with translations. Key `language` contains the original language key. Other keys contain translations */ i18n?: Record; /** * Contains image moderation information */ image_labels?: Record; member?: ChannelMemberPartialResponse; /** * Channel member data for the users mentioned in the message, keyed by user id. Only present when the app has member custom on mentioned users enabled, and only for the first two mentioned users of each message */ mentioned_channel_members?: Record; moderation?: ModerationV2Response; /** * User response object */ pinned_by?: UserResponse; poll?: PollResponseData; /** * Represents any chat message */ quoted_message?: MessageResponse; reaction_groups?: Record; reminder?: ReminderResponseData; shared_location?: SharedLocationResponseData; } export interface ModerationActionConfigResponse { /** * The action to take */ action: string; /** * Description of what this action does */ description: string; /** * Type of entity this action applies to */ entity_type: string; /** * Icon for the dashboard */ icon: string; /** * Display order (lower numbers shown first) */ order: number; id?: string; /** * Queue type this action config belongs to */ queue_type?: string; /** * Custom data for the action */ custom?: Record; } export interface ModerationBanResponse { duration: string; } export interface ModerationCallResponse { backstage: boolean; captioning: boolean; cid: string; created_at: Date; current_session_id: string; id: string; recording: boolean; transcribing: boolean; translating: boolean; type: string; updated_at: Date; blocked_user_ids: string[]; custom: Record; channel_cid?: string; ended_at?: Date; join_ahead_time_seconds?: number; routing_number?: string; starts_at?: Date; team?: string; /** * User response object */ created_by?: UserResponse; } export interface ModerationCustomActionEvent { /** * The ID of the custom action that was executed */ action_id: string; created_at: Date; custom: Record; review_queue_item: ReviewQueueItemResponse; type: string; received_at?: Date; /** * Additional options passed to the custom action */ action_options?: Record; /** * Represents any chat message */ message?: MessageResponse; } export interface ModerationFlagResponse { created_at: Date; entity_id: string; entity_type: string; type: string; updated_at: Date; user_id: string; result: Array>; content_published_at?: Date; entity_creator_id?: string; reason?: string; review_queue_item_id?: string; labels?: string[]; custom?: Record; /** * Content payload for moderation */ moderation_payload?: ModerationPayloadResponse; review_queue_item?: ReviewQueueItemResponse; /** * User response object */ user?: UserResponse; } export interface ModerationFlaggedEvent { /** * The type of content that was flagged */ content_type: string; created_at: Date; /** * The ID of the flagged content */ object_id: string; custom: Record; type: string; received_at?: Date; } export interface ModerationMarkReviewedEvent { created_at: Date; custom: Record; item: ReviewQueueItemResponse; type: string; received_at?: Date; /** * Represents any chat message */ message?: MessageResponse; } export interface ModerationPayload { country_code?: string; audios?: string[]; image_ordered_keys?: string[]; images?: string[]; other_media?: string[]; text_ordered_keys?: string[]; texts?: string[]; videos?: string[]; custom?: Record; image_ids?: Record; text_ids?: Record; } export interface ModerationPayloadResponse { /** * Audio URLs to moderate */ audios?: string[]; /** * Caller-supplied keys for images, index-aligned with images[] */ image_ordered_keys?: string[]; /** * Image URLs to moderate */ images?: string[]; /** * Media URLs from attachments outside the typed image/video/audio lists (custom attachment types such as GIF pickers) */ other_media?: string[]; /** * Caller-supplied keys for texts (e.g. "title", "description"), index-aligned with texts[] */ text_ordered_keys?: string[]; /** * Text content to moderate */ texts?: string[]; /** * Video URLs to moderate */ videos?: string[]; /** * Custom data for moderation */ custom?: Record; /** * Caller-supplied content IDs per image key (from content_ids on /analyze) */ image_ids?: Record; /** * Caller-supplied content IDs per text key (from content_ids on /analyze) */ text_ids?: Record; } export interface ModerationQueueResponse { created_at: Date; created_by: string; description: string; id: string; item_count: number; name: string; type: string; updated_at: Date; sort: Array>; filters: Record; } export interface ModerationV2Response { action: string; original_text: string; blocklist_matched?: string; platform_circumvented?: boolean; semantic_filter_matched?: string; blocklists_matched?: string[]; image_harms?: string[]; text_harms?: string[]; } export interface MuteRequest { /** * User IDs to mute (if multiple users) */ target_ids: string[]; /** * Duration of mute in minutes */ timeout?: number; } export interface MuteResponse { duration: string; /** * Object with mutes (if multiple users were muted) */ mutes?: UserMuteResponse[]; /** * A list of users that can't be found. Common cause for this is deleted users */ non_existing_users?: string[]; own_user?: OwnUserResponse; } export interface NotificationComment { comment: string; id: string; user_id: string; attachments?: Attachment[]; } export interface NotificationConfig { deduplication_window?: string; track_read?: boolean; track_seen?: boolean; } export interface NotificationContext { target?: NotificationTarget; trigger?: NotificationTrigger; } export interface NotificationFeedUpdatedEvent { /** * Date/time of creation */ created_at: Date; /** * The ID of the feed */ fid: string; custom: Record; /** * The type of event: "feeds.notification_feed.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; /** * Aggregated activities for notification feeds */ aggregated_activities?: AggregatedActivityResponse[]; notification_status?: NotificationStatusResponse; user?: UserResponseCommonFields; } export interface NotificationParentActivity { id: string; text?: string; type?: string; user_id?: string; attachments?: Attachment[]; } export interface NotificationStatusResponse { /** * Number of unread notifications */ unread: number; /** * Number of unseen notifications */ unseen: number; /** * When notifications were last read */ last_read_at?: Date; /** * When notifications were last seen */ last_seen_at?: Date; /** * Deprecated: use is_read on each activity/group instead. IDs of activities that have been read. Capped at ~101 entries for aggregated feeds. */ read_activities?: string[]; /** * Deprecated: use is_seen on each activity/group instead. IDs of activities that have been seen. Capped at ~101 entries for aggregated feeds. */ seen_activities?: string[]; } export interface NotificationTarget { /** * The ID of the target (activity ID or user ID) */ id: string; /** * The name of the target user (for user targets like follows) */ name?: string; /** * The text content of the target activity (for activity targets) */ text?: string; /** * The type of the target activity (for activity targets) */ type?: string; /** * The ID of the user who created the target activity (for activity targets) */ user_id?: string; /** * Attachments on the target activity (for activity targets) */ attachments?: Attachment[]; comment?: NotificationComment; /** * Custom data from the target activity */ custom?: Record; parent_activity?: NotificationParentActivity; } export interface NotificationTrigger { /** * Human-readable text describing the notification */ text: string; /** * The type of notification (mention, reaction, comment, follow, etc.) */ type: string; comment?: NotificationComment; /** * Custom data from the trigger object (comment, reaction, etc.) */ custom?: Record; } export interface OCRContentParameters { label_operator?: string; severity?: string; harm_labels?: string[]; } export interface OCRRule { action: 'flag' | 'shadow' | 'remove' | 'bounce' | 'bounce_flag' | 'bounce_remove'; label: string; } export interface OnlyUserID { id: string; } export interface OwnBatchRequest { /** * List of feed IDs to get own fields for */ feeds: string[]; /** * Optional list of specific fields to return. If not specified, all fields (own_follows, own_followings, own_capabilities, own_membership) are returned */ fields?: string[]; } export interface OwnBatchResponse { duration: string; /** * Map of feed ID to own fields data */ data: Record; } export interface OwnUserResponse { banned: boolean; created_at: Date; id: string; invisible: boolean; language: string; online: boolean; role: string; total_unread_count: number; unread_channels: number; /** * @deprecated * Deprecated: Use total_unread_count instead. */ unread_count: number; unread_threads: number; updated_at: Date; channel_mutes: ChannelMute[]; devices: DeviceResponse[]; mutes: UserMuteResponse[]; teams: string[]; custom: Record; avg_response_time?: number; deactivated_at?: Date; deleted_at?: Date; image?: string; last_active?: Date; name?: string; revoke_tokens_issued_before?: Date; blocked_user_ids?: string[]; latest_hidden_channels?: string[]; privacy_settings?: PrivacySettingsResponse; push_preferences?: PushPreferencesResponse; teams_role?: Record; total_unread_count_by_team?: Record; } export interface PagerRequest { limit?: number; next?: string; prev?: string; } export interface PagerResponse { next?: string; prev?: string; } export interface PinActivityRequest { /** * If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; } export interface PinActivityResponse { /** * When the activity was pinned */ created_at: Date; duration: string; /** * Fully qualified ID of the feed the activity was pinned to */ feed: string; /** * ID of the user who pinned the activity */ user_id: string; activity: ActivityResponse; } export interface PollClosedFeedEvent { created_at: Date; fid: string; custom: Record; poll: PollResponseData; type: string; feed_visibility?: string; received_at?: Date; } export interface PollDeletedFeedEvent { created_at: Date; fid: string; custom: Record; poll: PollResponseData; type: string; feed_visibility?: string; received_at?: Date; } export interface PollOptionInput { text?: string; custom?: Record; } export interface PollOptionRequest { id: string; text?: string; custom?: Record; } export interface PollOptionResponse { /** * Duration of the request in milliseconds */ duration: string; poll_option: PollOptionResponseData; } export interface PollOptionResponseData { id: string; text: string; custom: Record; text_i18n?: Record; } export interface PollResponse { /** * Duration of the request in milliseconds */ duration: string; poll: PollResponseData; } export interface PollResponseData { allow_answers: boolean; allow_user_suggested_options: boolean; answers_count: number; created_at: Date; created_by_id: string; description: string; enforce_unique_vote: boolean; id: string; name: string; updated_at: Date; vote_count: number; /** * Voting visibility of the poll */ voting_visibility: 'anonymous' | 'public'; latest_answers: PollVoteResponseData[]; options: PollOptionResponseData[]; own_votes: PollVoteResponseData[]; custom: Record; latest_votes_by_option: Record; vote_counts_by_option: Record; is_closed?: boolean; max_votes_allowed?: number; /** * User response object */ created_by?: UserResponse; description_i18n?: Record; name_i18n?: Record; } export interface PollUpdatedFeedEvent { created_at: Date; fid: string; custom: Record; poll: PollResponseData; type: string; feed_visibility?: string; received_at?: Date; } export interface PollVoteCastedFeedEvent { created_at: Date; fid: string; custom: Record; poll: PollResponseData; poll_vote: PollVoteResponseData; type: string; feed_visibility?: string; received_at?: Date; } export interface PollVoteChangedFeedEvent { created_at: Date; fid: string; custom: Record; poll: PollResponseData; poll_vote: PollVoteResponseData; type: string; feed_visibility?: string; received_at?: Date; } export interface PollVoteRemovedFeedEvent { created_at: Date; fid: string; custom: Record; poll: PollResponseData; poll_vote: PollVoteResponseData; type: string; feed_visibility?: string; received_at?: Date; } export interface PollVoteResponse { /** * Duration of the request in milliseconds */ duration: string; poll?: PollResponseData; vote?: PollVoteResponseData; } export interface PollVoteResponseData { created_at: Date; id: string; option_id: string; poll_id: string; updated_at: Date; answer_text?: string; is_answer?: boolean; user_id?: string; answer_text_i18n?: Record; /** * User response object */ user?: UserResponse; } export interface PollVotesResponse { /** * Duration of the request in milliseconds */ duration: string; /** * Poll votes */ votes: PollVoteResponseData[]; next?: string; prev?: string; } export interface PrivacySettingsResponse { delivery_receipts?: DeliveryReceiptsResponse; read_receipts?: ReadReceiptsResponse; typing_indicators?: TypingIndicatorsResponse; } export interface PublishScheduledActivityNowResponse { duration: string; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; } export interface PushNotificationConfig { enable_push?: boolean; push_types?: string[]; } export interface PushPreferenceInput { /** * Set the level of call push notifications for the user. One of: all, none, default */ call_level?: 'all' | 'none' | 'default'; /** * Set the push preferences for a specific channel. If empty it sets the default for the user */ channel_cid?: string; /** * Set the level of chat push notifications for the user. Note: "mentions" is deprecated in favor of "direct_mentions". One of: all, mentions, direct_mentions, all_mentions, none, default */ chat_level?: 'all' | 'mentions' | 'direct_mentions' | 'all_mentions' | 'none' | 'default'; /** * Disable push notifications till a certain time */ disabled_until?: Date; /** * Set the level of feeds push notifications for the user. One of: all, none, default */ feeds_level?: 'all' | 'none' | 'default'; /** * Remove the disabled until time. (IE stop snoozing notifications) */ remove_disable?: boolean; /** * The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth. */ user_id?: string; chat_preferences?: ChatPreferencesInput; feeds_preferences?: FeedsPreferences; } export interface PushPreferencesResponse { call_level?: string; chat_level?: string; disabled_until?: Date; feeds_level?: string; chat_preferences?: ChatPreferencesResponse; feeds_preferences?: FeedsPreferencesResponse; } export interface QueryActivitiesRequest { enrich_own_fields?: boolean; limit?: number; next?: string; prev?: string; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' operators. */ filter?: Record; } export interface QueryActivitiesResponse { duration: string; /** * List of activities matching the query */ activities: ActivityResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryActivityReactionsRequest { limit?: number; next?: string; prev?: string; sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryActivityReactionsResponse { /** * Duration of the request in milliseconds */ duration: string; reactions: FeedsReactionResponse[]; next?: string; prev?: string; } export interface QueryActivitySharesResponse { /** * Duration of the request in milliseconds */ duration: string; shares: ShareResponse[]; next?: string; prev?: string; } export interface QueryAppealsRequest { limit?: number; next?: string; prev?: string; /** * Sorting parameters for appeals */ sort?: SortParamRequest[]; /** * Filter conditions for appeals */ filter?: Record; } export interface QueryAppealsResponse { duration: string; /** * List of Appeal Items */ items: AppealItemResponse[]; next?: string; prev?: string; } export interface QueryBookmarkFoldersRequest { limit?: number; next?: string; prev?: string; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryBookmarkFoldersResponse { duration: string; /** * List of bookmark folders matching the query */ bookmark_folders: BookmarkFolderResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryBookmarksRequest { enrich_own_fields?: boolean; limit?: number; next?: string; prev?: string; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryBookmarksResponse { duration: string; /** * List of bookmarks matching the query */ bookmarks: BookmarkResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryCollectionsRequest { limit?: number; next?: string; prev?: string; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryCollectionsResponse { duration: string; /** * List of collections matching the query */ collections: CollectionResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryCommentReactionsRequest { limit?: number; next?: string; prev?: string; sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryCommentReactionsResponse { /** * Duration of the request in milliseconds */ duration: string; reactions: FeedsReactionResponse[]; next?: string; prev?: string; } export interface QueryCommentsRequest { /** * Filter to apply to the query */ filter: Record; /** * Returns the comment with the specified ID along with surrounding comments for context */ id_around?: string; /** * Maximum number of comments to return */ limit?: number; next?: string; prev?: string; /** * Array of sort parameters */ sort?: 'first' | 'last' | 'top' | 'best' | 'controversial'; } export interface QueryCommentsResponse { duration: string; /** * List of comments matching the query */ comments: CommentResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryFeedMembersRequest { limit?: number; next?: string; prev?: string; /** * Sort parameters for the query */ sort?: SortParamRequest[]; /** * Filter parameters for the query */ filter?: Record; } export interface QueryFeedMembersResponse { duration: string; /** * List of feed members */ members: FeedMemberResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryFeedsRequest { enrich_own_fields?: boolean; limit?: number; next?: string; prev?: string; /** * Whether to subscribe to realtime updates */ watch?: boolean; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryFeedsResponse { duration: string; /** * List of feeds matching the query */ feeds: FeedResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryFollowsRequest { limit?: number; next?: string; prev?: string; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryFollowsResponse { duration: string; /** * List of follow relationships matching the query */ follows: FollowResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryModerationConfigsRequest { limit?: number; next?: string; prev?: string; /** * Sorting parameters for the results */ sort?: SortParamRequest[]; /** * Filter conditions for moderation configs */ filter?: Record; } export interface QueryModerationConfigsResponse { duration: string; /** * List of moderation configurations */ configs: ConfigResponse[]; next?: string; prev?: string; } export interface QueryPinnedActivitiesRequest { enrich_own_fields?: boolean; limit?: number; next?: string; prev?: string; /** * Sorting parameters for the query */ sort?: SortParamRequest[]; /** * Filters to apply to the query */ filter?: Record; } export interface QueryPinnedActivitiesResponse { duration: string; /** * List of pinned activities matching the query */ pinned_activities: ActivityPinResponse[]; /** * Cursor for next page */ next?: string; /** * Cursor for previous page */ prev?: string; } export interface QueryPollVotesRequest { limit?: number; next?: string; prev?: string; /** * Array of sort parameters */ sort?: SortParamRequest[]; /** * Filter to apply to the query */ filter?: Record; } export interface QueryPollsRequest { limit?: number; next?: string; prev?: string; /** * Array of sort parameters */ sort?: SortParamRequest[]; /** * Filter to apply to the query */ filter?: Record; } export interface QueryPollsResponse { /** * Duration of the request in milliseconds */ duration: string; /** * Polls data returned by the query */ polls: PollResponseData[]; next?: string; prev?: string; } export interface QueryReviewQueueRequest { exclude_default_action_config?: boolean; limit?: number; /** * Number of items to lock (1-25) */ lock_count?: number; /** * Duration for which items should be locked */ lock_duration?: number; /** * Whether to lock items for review (true), unlock items (false), or just fetch (nil) */ lock_items?: boolean; next?: string; prev?: string; /** * Whether to return only statistics */ stats_only?: boolean; /** * Sorting parameters for the results */ sort?: SortParamRequest[]; /** * Filter conditions for review queue items. Accepts built-in fields (e.g. status, channel_cid, severity, recommended_action) and customer-supplied moderation_payload.custom keys: any key that is not a built-in field is matched against the item's custom moderation data (e.g. {"location_id": "loc-42"}). Use filter_config.filterable_custom_keys to discover which custom keys the app exposes as chips. content_text searches the moderated text: "$q" is a keyword search (terms ANDed, no adjacency) over the indexed tsvector, while "$eq" (or "$in" for several wordings) matches the text exactly. The exact form is unindexed, so scope it with date_range rather than running it across the whole queue. */ filter?: Record; } export interface QueryReviewQueueResponse { duration: string; /** * List of review queue items */ items: ReviewQueueItemResponse[]; /** * Configuration for moderation actions */ action_config: Record; /** * Statistics about the review queue */ stats: Record; next?: string; prev?: string; default_action_config?: Record; filter_config?: FilterConfigResponse; } export interface QueryScheduledActivitiesFilter { /** * Only activities scheduled for this feed */ fid?: string; /** * Only activities of this user. Server-side only; client-side requests always see their own. */ user_id?: string; /** * Only activities with one of these statuses: scheduled, publishing, failed */ status?: ScheduledActivityQueryStatus[]; } export interface QueryScheduledActivitiesRequest { /** * Maximum number of scheduled activities to return. Default 25, maximum 100. */ limit?: number; /** * Cursor from a previous response to fetch the next page */ next?: string; filter?: QueryScheduledActivitiesFilter; } export interface QueryScheduledActivitiesResponse { duration: string; /** * The scheduled activities, ordered by scheduled_at */ scheduled_activities: ScheduledActivityResponse[]; /** * Cursor for the next page, absent on the last page */ next?: string; } export interface QueryUsersPayload { /** * Filter conditions to apply to the query */ filter_conditions: Record; id_gt?: string; id_gte?: string; id_lt?: string; id_lte?: string; include_deactivated_users?: boolean; limit?: number; offset?: number; presence?: boolean; /** * Array of sort parameters */ sort?: SortParamRequest[]; } export interface QueryUsersResponse { /** * Duration of the request in milliseconds */ duration: string; /** * Array of users as result of filters applied. */ users: FullUserResponse[]; } export interface QueueResponse { /** * Duration of the request in milliseconds */ duration: string; queue?: ModerationQueueResponse; } export interface RankingConfig { score?: string; type?: string; defaults?: Record; functions?: Record; } export interface Reaction { activity_id: string; created_at: Date; kind: string; updated_at: Date; user_id: string; deleted_at?: Date; id?: string; parent?: string; score?: number; target_feeds?: string[]; children_counts?: Record; data?: Record; latest_children?: Record; moderation?: Record; own_children?: Record; target_feeds_extra_data?: Record; user?: User; } export interface ReactionGroupResponse { /** * Count is the number of reactions of this type. */ count: number; /** * FirstReactionAt is the time of the first reaction of this type. This is the same also if all reaction of this type are deleted, because if someone will react again with the same type, will be preserved the sorting. */ first_reaction_at: Date; /** * LastReactionAt is the time of the last reaction of this type. */ last_reaction_at: Date; /** * SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`. */ sum_scores: number; /** * The most recent users who reacted with this type, ordered by most recent first. */ latest_reactions_by: ReactionGroupUserResponse[]; } export interface ReactionGroupUserResponse { /** * The time when the user reacted. */ created_at: Date; /** * The ID of the user who reacted. */ user_id: string; /** * User response object */ user?: UserResponse; } export interface ReactionResponse { /** * Date/time of creation */ created_at: Date; /** * Message ID */ message_id: string; /** * Score of the reaction */ score: number; /** * Type of reaction */ type: string; /** * Date/time of the last update */ updated_at: Date; /** * User ID */ user_id: string; /** * Custom data for this object */ custom: Record; /** * User response object */ user: UserResponse; } export interface ReadCollectionsResponse { duration: string; /** * List of collections matching the references */ collections: CollectionResponse[]; } export interface ReadReceiptsResponse { enabled: boolean; } export interface RejectAppealRequestPayload { /** * Reason for rejecting the appeal */ decision_reason: string; } export interface RejectFeedMemberInviteRequest { } export interface RejectFeedMemberInviteResponse { duration: string; member: FeedMemberResponse; } export interface RejectFollowRequest { /** * Fully qualified ID of the source feed */ source: string; /** * Fully qualified ID of the target feed */ target: string; } export interface RejectFollowResponse { duration: string; follow: FollowResponse; } export interface ReminderResponseData { channel_cid: string; created_at: Date; message_id: string; updated_at: Date; user_id: string; expires_at?: Date; remind_at?: Date; /** * Represents channel in chat */ channel?: ChannelResponse; /** * Represents any chat message */ message?: MessageResponse; /** * User response object */ user?: UserResponse; } export interface RemoveUserGroupMembersRequest { /** * List of user IDs to remove */ member_ids: string[]; team_id?: string; } export interface RemoveUserGroupMembersResponse { duration: string; user_group?: UserGroupResponse; } export interface RepliesMeta { /** * True if the subtree was cut because the requested depth was reached. */ depth_truncated: boolean; /** * True if more siblings exist in the database. */ has_more: boolean; /** * Number of unread siblings that match current filters. */ remaining: number; /** * Opaque cursor to request the next page of siblings. */ next_cursor?: string; } export interface Response { /** * Duration of the request in milliseconds */ duration: string; } export interface RestoreActionRequestPayload { /** * Reason for the appeal decision */ decision_reason?: string; } export interface RestoreActivityRequest { } export interface RestoreActivityResponse { duration: string; activity: ActivityResponse; } export interface RestoreCommentRequest { } export interface RestoreCommentResponse { duration: string; activity: ActivityResponse; comment: CommentResponse; } export interface ReviewQueueItemResponse { /** * AI-determined text severity */ ai_text_severity: string; /** * When the item was created */ created_at: Date; /** * ID of the entity being reviewed */ entity_id: string; /** * Type of entity being reviewed */ entity_type: string; /** * Whether the item has been escalated */ escalated: boolean; flags_count: number; /** * Unique identifier of the review queue item */ id: string; latest_moderator_action: string; /** * Suggested moderation action */ recommended_action: string; /** * ID of the moderator who reviewed the item */ reviewed_by: string; /** * Severity level of the content */ severity: number; /** * Current status of the review */ status: string; /** * When the item was last updated */ updated_at: Date; /** * Moderation actions taken */ actions: ActionLogResponse[]; /** * Associated ban records */ bans: BanInfoResponse[]; /** * Associated flag records */ flags: ModerationFlagResponse[]; /** * Detected languages in the content */ languages: string[]; /** * When the review was completed */ completed_at?: Date; /** * Highest per-label confidence (0-1) any provider reported across the item's flags; absent when no flag carried one */ confidence_score?: number; config_key?: string; /** * ID of who created the entity */ entity_creator_id?: string; /** * When the item was escalated */ escalated_at?: Date; /** * ID of the moderator who escalated the item */ escalated_by?: string; /** * When the item was reviewed */ reviewed_at?: Date; /** * Teams associated with this item */ teams?: string[]; activity?: EnrichedActivity; appeal?: AppealItemResponse; /** * User response object */ assigned_to?: UserResponse; call?: ModerationCallResponse; entity_creator?: EntityCreatorResponse; escalation_metadata?: EscalationMetadata; feeds_v2_activity?: EnrichedActivity; feeds_v2_reaction?: Reaction; feeds_v3_activity?: FeedsV3ActivityResponse; feeds_v3_comment?: FeedsV3CommentResponse; message?: ChatMessageResponse; /** * Content payload for moderation */ moderation_payload?: ModerationPayloadResponse; reaction?: Reaction; } export interface Role { /** * Date/time of creation */ created_at: Date; /** * Whether this is a custom role or built-in */ custom: boolean; /** * Unique role name */ name: string; /** * Date/time of the last update */ updated_at: Date; /** * List of scopes where this role is currently present. `.app` means that role is present in app-level grants */ scopes: string[]; } export interface RuleBuilderAction { reason?: string; skip_inbox?: boolean; type?: 'ban_user' | 'flag_user' | 'flag_content' | 'block_content' | 'shadow_content' | 'bounce_flag_content' | 'bounce_content' | 'bounce_remove_content' | 'mute_video' | 'mute_audio' | 'blur' | 'call_blur' | 'end_call' | 'kick_user' | 'warning' | 'call_warning' | 'webhook_only'; ban_options?: BanOptions; call_options?: CallActionOptions; flag_user_options?: FlagUserOptions; } export interface RuleBuilderCondition { confidence?: number; type?: string; call_custom_property_params?: CallCustomPropertyParameters; call_type_rule_params?: CallTypeRuleParameters; call_violation_count_params?: CallViolationCountParameters; channel_message_count_rule_params?: ChannelMessageCountRuleParameters; closed_caption_rule_params?: ClosedCaptionRuleParameters; content_count_rule_params?: ContentCountRuleParameters; content_custom_property_count_params?: ContentCustomPropertyCountParameters; content_custom_property_params?: ContentCustomPropertyParameters; content_flag_count_rule_params?: FlagCountRuleParameters; flood_identical_params?: FloodIdenticalRuleParameters; flood_similar_params?: FloodSimilarRuleParameters; image_content_params?: ImageContentParameters; image_rule_params?: ImageRuleParameters; ip_content_count_rule_params?: IPContentCountRuleParameters; ip_flag_count_rule_params?: IPFlagCountRuleParameters; keyframe_ocr_rule_params?: KeyframeOCRRuleParameters; keyframe_rule_params?: KeyframeRuleParameters; ocr_content_params?: OCRContentParameters; text_content_params?: TextContentParameters; text_rule_params?: TextRuleParameters; user_channel_count_params?: UserChannelCountRuleParameters; user_created_within_params?: UserCreatedWithinParameters; user_custom_property_params?: UserCustomPropertyParameters; user_flag_count_rule_params?: FlagCountRuleParameters; user_identical_content_count_params?: UserIdenticalContentCountParameters; user_identical_image_count_params?: UserIdenticalImageCountParameters; user_reaction_count_params?: UserReactionCountRuleParameters; user_role_params?: UserRoleParameters; user_rule_params?: UserRuleParameters; video_content_params?: VideoContentParameters; video_rule_params?: VideoRuleParameters; } export interface RuleBuilderConditionGroup { logic?: string; conditions?: RuleBuilderCondition[]; } export interface RuleBuilderConfig { async?: boolean; rules?: RuleBuilderRule[]; } export interface RuleBuilderRule { rule_type: string; cooldown_period?: string; id?: string; logic?: string; action_sequences?: CallRuleActionSequence[]; conditions?: RuleBuilderCondition[]; groups?: RuleBuilderConditionGroup[]; action?: RuleBuilderAction; } export interface ScheduleActivityRequest { /** * Type of activity */ type: string; /** * List of feeds to add the activity to with a default max limit of 25 feeds */ feeds: string[]; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create notification activities for mentioned users */ create_notification_activity?: boolean; /** * Expiration time for the activity */ expires_at?: string; /** * Optional ID for the activity */ id?: string; /** * ID of parent activity for replies/comments */ parent_id?: string; /** * ID of a poll to attach to activity */ poll_id?: string; /** * Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody */ restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody'; /** * When to publish the activity, an RFC 3339 time. A time less than a minute ahead or in the past is moved to one minute from now, and the time is rounded up to a whole minute. */ scheduled_at?: Date; /** * Whether to skip URL enrichment for the activity */ skip_enrich_url?: boolean; /** * Whether to skip push notifications */ skip_push?: boolean; /** * Text content of the activity */ text?: string; /** * Visibility setting for the activity. One of: public, private, tag */ visibility?: 'public' | 'private' | 'tag'; /** * If visibility is 'tag', this is the tag name and is required */ visibility_tag?: string; /** * List of attachments for the activity */ attachments?: Attachment[]; /** * Collections that this activity references */ collection_refs?: string[]; /** * Collections to create or update as part of this request, so an activity and the collections it references can be written in one call. Their refs (name:id) are added to collection_refs automatically; you do not need to restate them, and they count toward the same per-activity collection-reference limit, which is the effective cap here. A collection that already exists has its custom data updated. Use collection_refs instead when the collection already exists and you are only referencing it, which requires no collection permissions. */ collections?: CollectionRequest[]; /** * Tags for filtering activities */ filter_tags?: string[]; /** * Tags for indicating user interests */ interest_tags?: string[]; /** * List of users mentioned in the activity */ mentioned_user_ids?: string[]; /** * Custom data for the activity */ custom?: Record; location?: Location; /** * Additional data for search indexing */ search_data?: Record; } export interface ScheduleActivityResponse { duration: string; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; } export interface ScheduledActivityCreatedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; /** * The type of event: "feeds.scheduled_activity.created" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ScheduledActivityDeletedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; /** * The type of event: "feeds.scheduled_activity.deleted" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface ScheduledActivityFailedEvent { /** * Date/time of creation */ created_at: Date; /** * Why the activity failed to publish */ failure_reason: ScheduledActivityFailureReason; custom: Record; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; /** * The type of event: "feeds.scheduled_activity.failed" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export type ScheduledActivityFailureReason = 'banned' | 'no_permission' | 'feed_deleted' | 'user_deleted' | 'moderation_blocked' | 'id_conflict' | 'expired' | 'invalid_activity' | 'internal_error'; export interface ScheduledActivityPreview { /** * Type of activity */ type: string; /** * Feeds the activity will be added to */ feeds: string[]; /** * When the published activity expires */ expires_at?: Date; /** * ID the activity gets when published */ id?: string; /** * ID of the parent activity */ parent_id?: string; /** * ID of the poll attached to the activity */ poll_id?: string; /** * Who may reply to the activity */ restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody'; /** * Text content of the activity */ text?: string; /** * Visibility of the activity */ visibility?: 'public' | 'private' | 'tag'; /** * Visibility tag of the activity */ visibility_tag?: string; /** * Attachments of the activity */ attachments?: Attachment[]; /** * Collections referenced by the activity */ collection_refs?: string[]; /** * Filter tags of the activity */ filter_tags?: string[]; /** * Interest tags of the activity */ interest_tags?: string[]; /** * Users mentioned in the activity */ mentioned_user_ids?: string[]; /** * Custom data of the activity */ custom?: Record; location?: Location; /** * Search data of the activity */ search_data?: Record; } export interface ScheduledActivityPublishedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; /** * The type of event: "feeds.scheduled_activity.published" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export type ScheduledActivityQueryStatus = 'scheduled' | 'publishing' | 'failed'; export interface ScheduledActivityResponse { /** * When the activity was scheduled */ created_at: Date; /** * ID of the scheduled activity, also the ID the activity gets when published */ id: string; /** * When the activity will be published */ scheduled_at: Date; /** * One of: scheduled, publishing, failed, canceled */ status: ScheduledActivityStatus; /** * When the scheduled activity was last changed */ updated_at: Date; /** * ID of the user the activity is published as */ user_id: string; /** * Feeds the activity will be added to */ feeds: string[]; /** * The activity a scheduled activity will publish */ activity: ScheduledActivityPreview; /** * Why the publish failed; set only when status is failed */ failure_reason?: ScheduledActivityFailureReason; } export type ScheduledActivityStatus = 'scheduled' | 'publishing' | 'failed' | 'canceled'; export interface ScheduledActivityUpdatedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; /** * The type of event: "feeds.scheduled_activity.updated" in this case */ type: string; received_at?: Date; user?: UserResponseCommonFields; } export interface SearchRolesResponse { duration: string; /** * Matching roles, sorted ascending by name */ roles: Role[]; } export interface SearchUserGroupsResponse { duration: string; /** * List of matching user groups */ user_groups: UserGroupResponse[]; } export interface ShadowBlockActionRequestPayload { /** * Reason for shadow blocking */ reason?: string; } export interface ShareResponse { /** * ID of the sharing (child) activity */ activity_id: string; /** * When the share occurred */ created_at: Date; /** * User response object */ user: UserResponse; } export interface SharedLocationResponse { /** * Channel CID */ channel_cid: string; /** * Date/time of creation */ created_at: Date; /** * Device ID that created the live location */ created_by_device_id: string; duration: string; /** * Latitude coordinate */ latitude: number; /** * Longitude coordinate */ longitude: number; /** * Message ID */ message_id: string; /** * Date/time of the last update */ updated_at: Date; /** * User ID */ user_id: string; /** * Time when the live location expires */ end_at?: Date; /** * Represents channel in chat */ channel?: ChannelResponse; /** * Represents any chat message */ message?: MessageResponse; } export interface SharedLocationResponseData { channel_cid: string; created_at: Date; created_by_device_id: string; latitude: number; longitude: number; message_id: string; updated_at: Date; user_id: string; end_at?: Date; /** * Represents channel in chat */ channel?: ChannelResponse; /** * Represents any chat message */ message?: MessageResponse; } export interface SharedLocationsResponse { duration: string; active_live_locations: SharedLocationResponseData[]; } export interface SingleFollowResponse { duration: string; follow: FollowResponse; /** * Whether a notification activity was successfully created */ notification_created?: boolean; } export interface SortParam { direction: number; field: string; type: string; } export interface SortParamRequest { /** * Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One of: -1, 1 */ direction?: number; /** * Name of field to sort by */ field?: string; /** * Type of field to sort by. Empty string or omitted means string type (default). One of: number, boolean */ type?: string; } export interface StoriesConfig { skip_watched?: boolean; track_watched?: boolean; } export interface StoriesFeedUpdatedEvent { /** * Date/time of creation */ created_at: Date; /** * The ID of the feed */ fid: string; custom: Record; /** * The type of event: "feeds.stories_feed.updated" in this case */ type: string; feed_visibility?: string; received_at?: Date; /** * Individual activities for stories feeds */ activities?: ActivityResponse[]; /** * Aggregated activities for stories feeds */ aggregated_activities?: AggregatedActivityResponse[]; user?: UserResponseCommonFields; } export interface SubmitActionRequest { /** * 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 */ 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'; /** * UUID of the appeal to act on (required for reject_appeal, optional for other actions) */ appeal_id?: string; /** * UUID of the review queue item to act on */ item_id?: string; /** * Configuration for ban moderation action */ ban?: BanActionRequestPayload; /** * Configuration for block action */ block?: BlockActionRequestPayload; bypass?: BypassActionRequest; /** * Configuration for custom moderation action */ custom?: CustomActionRequestPayload; /** * Configuration for activity deletion action */ delete_activity?: DeleteActivityRequestPayload; /** * Configuration for comment deletion action */ delete_comment?: DeleteCommentRequestPayload; /** * Configuration for message deletion action */ delete_message?: DeleteMessageRequestPayload; /** * Configuration for reaction deletion action */ delete_reaction?: DeleteReactionRequestPayload; /** * Configuration for user deletion action */ delete_user?: DeleteUserRequestPayload; /** * Configuration for deleting all of a user's chat messages without banning them or deleting their account */ delete_user_messages?: DeleteUserMessagesRequestPayload; /** * Configuration for escalation action */ escalate?: EscalatePayload; flag?: FlagRequest; /** * Configuration for mark reviewed action */ mark_reviewed?: MarkReviewedRequestPayload; /** * Configuration for rejecting an appeal */ reject_appeal?: RejectAppealRequestPayload; /** * Configuration for restore action. State-aware: reverses whichever of a delete, a block, or a shadow block currently applies to the content (including both a delete and a block/shadow block at once). */ restore?: RestoreActionRequestPayload; /** * Configuration for shadow block action */ shadow_block?: ShadowBlockActionRequestPayload; /** * Configuration for unban moderation action */ unban?: UnbanActionRequestPayload; /** * @deprecated * Deprecated: Use restore instead, which now also reverses a block or shadow block. Configuration for unblock action. */ unblock?: UnblockActionRequestPayload; } export interface SubmitActionResponse { duration: string; /** * Present when the appeal was accepted but the entity could not be restored automatically. The moderator should restore it manually. */ auto_restore_warning?: string; appeal_item?: AppealItemResponse; item?: ReviewQueueItemResponse; } export interface TextContentParameters { contains_url?: boolean; label_operator?: string; severity?: string; text_length?: number; text_length_operator?: string; blocklist_match?: string[]; harm_labels?: string[]; llm_harm_labels?: Record; } export interface TextRuleParameters { contains_url?: boolean; semantic_filter_min_threshold?: number; severity?: string; threshold?: number; time_window?: string; blocklist_match?: string[]; harm_labels?: string[]; semantic_filter_names?: string[]; llm_harm_labels?: Record; } export interface ThreadedCommentResponse { bookmark_count: number; confidence_score: number; created_at: Date; downvote_count: number; id: string; object_id: string; object_type: string; reaction_count: number; reply_count: number; score: number; /** * Status of the comment. One of: active, deleted, removed, hidden */ status: 'active' | 'deleted' | 'removed' | 'hidden' | 'shadow_blocked'; updated_at: Date; upvote_count: number; mentioned_users: UserResponse[]; own_reactions: FeedsReactionResponse[]; /** * User response object */ user: UserResponse; controversy_score?: number; deleted_at?: Date; edited_at?: Date; parent_id?: string; text?: string; attachments?: Attachment[]; latest_reactions?: FeedsReactionResponse[]; /** * Slice of nested comments (may be empty). */ replies?: ThreadedCommentResponse[]; custom?: Record; i18n?: Record; /** * Cursor & depth information for a comment's direct replies. Mirrors Reddit's 'load more replies' semantics. */ meta?: RepliesMeta; moderation?: ModerationV2Response; reaction_groups?: Record; } export interface Thresholds { explicit?: LabelThresholds; spam?: LabelThresholds; toxic?: LabelThresholds; } export interface Time { } export interface TrackActivityMetricsEvent { /** * The ID of the activity to track the metric for */ activity_id: string; /** * The metric name (e.g. views, clicks, impressions). Alphanumeric and underscores only. */ metric: string; /** * The amount to increment (positive) or decrement (negative). Defaults to 1. The absolute value counts against rate limits. */ delta?: number; } export interface TrackActivityMetricsEventResult { /** * The activity ID from the request */ activity_id: string; /** * Whether the metric was counted (false if rate-limited) */ allowed: boolean; /** * The metric name from the request */ metric: string; /** * Error message if processing failed */ error?: string; } export interface TrackActivityMetricsRequest { /** * List of metric events to track (max 100 per request) */ events: TrackActivityMetricsEvent[]; } export interface TrackActivityMetricsResponse { duration: string; /** * Results for each event in the request, in the same order */ results: TrackActivityMetricsEventResult[]; } export interface TranslateActivityRequest { /** * ISO 639-1 language code to translate to */ language: string; } export interface TranslateActivityResponse { /** * Duration of the request in milliseconds */ duration: string; activity: ActivityResponse; } export interface TranslateCommentRequest { /** * ISO 639-1 language code to translate to */ language: string; } export interface TranslateCommentResponse { /** * Duration of the request in milliseconds */ duration: string; comment: CommentResponse; } export interface TypingIndicatorsResponse { enabled: boolean; } export interface UnbanActionRequestPayload { /** * Channel CID for channel-specific unban */ channel_cid?: string; /** * Reason for the appeal decision */ decision_reason?: string; /** * Also remove the future channels ban for this user */ remove_future_channels_ban?: boolean; /** * Optional: unban user directly without review item */ target_user_id?: string; } export interface UnbanRequest { } export interface UnbanResponse { duration: string; } export interface UnblockActionRequestPayload { /** * Reason for the appeal decision */ decision_reason?: string; } export interface UnblockUsersRequest { blocked_user_id: string; } export interface UnblockUsersResponse { /** * Duration of the request in milliseconds */ duration: string; } export interface UnfollowBatchRequest { /** * List of follow relationships to remove, each with optional keep_history */ follows: UnfollowPair[]; /** * Whether to delete the corresponding notification activity (default: false) */ delete_notification_activity?: boolean; /** * If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; } export interface UnfollowBatchResponse { duration: string; /** * List of follow relationships that were removed */ follows: FollowResponse[]; } export interface UnfollowPair { /** * Fully qualified ID of the source feed */ source: string; /** * Fully qualified ID of the target feed */ target: string; /** * When true, activities from the unfollowed feed will remain in the source feed's timeline (default: false) */ keep_history?: boolean; } export interface UnfollowResponse { duration: string; follow: FollowResponse; } export interface UnmuteRequest { /** * User IDs to unmute */ target_ids: string[]; } export interface UnmuteResponse { duration: string; /** * A list of users that can't be found. Common cause for this is deleted users */ non_existing_users?: string[]; } export interface UnpinActivityResponse { duration: string; /** * Fully qualified ID of the feed the activity was unpinned from */ feed: string; /** * ID of the user who unpinned the activity */ user_id: string; activity: ActivityResponse; } export interface UpdateActivityPartialRequest { /** * @deprecated * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; /** * If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned */ handle_mention_notifications?: boolean; /** * If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false. */ run_activity_processors?: boolean; /** * List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids', 'search_data'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') */ unset?: string[]; /** * Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids', 'search_data'. For custom fields, use dot-notation (e.g., 'custom.field_name') */ set?: Record; } export interface UpdateActivityPartialResponse { duration: string; activity: ActivityResponse; } export interface UpdateActivityRequest { /** * @deprecated * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; /** * Time when the activity will expire */ expires_at?: Date; /** * If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned */ handle_mention_notifications?: boolean; /** * Poll ID */ poll_id?: string; /** * Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody */ restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody'; /** * If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false. */ run_activity_processors?: boolean; /** * Whether to skip URL enrichment for the activity */ skip_enrich_url?: boolean; /** * The text content of the activity */ text?: string; /** * Visibility setting for the activity */ visibility?: 'public' | 'private' | 'tag'; /** * If visibility is 'tag', this is the tag name and is required */ visibility_tag?: string; /** * List of attachments for the activity */ attachments?: Attachment[]; /** * Collections that this activity references */ collection_refs?: string[]; /** * List of feeds the activity is present in */ feeds?: string[]; /** * Tags used for filtering the activity */ filter_tags?: string[]; /** * Tags indicating interest categories */ interest_tags?: string[]; /** * List of user IDs mentioned in the activity */ mentioned_user_ids?: string[]; /** * Custom data for the activity */ custom?: Record; location?: Location; /** * Additional data for search indexing */ search_data?: Record; } export interface UpdateActivityResponse { duration: string; activity: ActivityResponse; } export interface UpdateBlockListRequest { is_confusable_folding_enabled?: boolean; is_leet_check_enabled?: boolean; is_plural_check_enabled?: boolean; is_substring_matching_enabled?: boolean; team?: string; /** * List of words to block */ words?: string[]; } export interface UpdateBlockListResponse { /** * Duration of the request in milliseconds */ duration: string; /** * Block list contains restricted words */ blocklist?: BlockListResponse; } export interface UpdateBookmarkFolderRequest { /** * Name of the folder */ name?: string; /** * Custom data for the folder */ custom?: Record; } export interface UpdateBookmarkFolderResponse { duration: string; bookmark_folder: BookmarkFolderResponse; } export interface UpdateBookmarkRequest { /** * ID of the folder containing the bookmark */ folder_id?: string; /** * Move the bookmark to this folder (empty string removes the folder) */ new_folder_id?: string; /** * Custom data for the bookmark */ custom?: Record; new_folder?: AddFolderRequest; } export interface UpdateBookmarkResponse { duration: string; bookmark: BookmarkResponse; } export interface UpdateCollectionRequest { /** * Unique identifier for the collection within its name */ id: string; /** * Name/type of the collection */ name: string; /** * Custom data for the collection (required, must contain at least one key) */ custom: Record; } export interface UpdateCollectionsRequest { /** * List of collections to update (only custom data is updatable) */ collections: UpdateCollectionRequest[]; } export interface UpdateCollectionsResponse { duration: string; /** * List of updated collections */ collections: CollectionResponse[]; } export interface UpdateCommentBookmarkRequest { /** * ID of the folder containing the bookmark */ folder_id?: string; /** * Move the bookmark to this folder (empty string removes the folder) */ new_folder_id?: string; /** * Custom data for the bookmark */ custom?: Record; new_folder?: AddFolderRequest; } export interface UpdateCommentBookmarkResponse { duration: string; bookmark: BookmarkResponse; } export interface UpdateCommentPartialRequest { /** * @deprecated * Whether to copy custom data to notification activities Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to handle mention notification changes */ handle_mention_notifications?: boolean; /** * Whether to skip URL enrichment */ skip_enrich_url?: boolean; /** * Whether to skip push notifications */ skip_push?: boolean; /** * List of field names to remove. Supported fields: 'custom', 'attachments', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') */ unset?: string[]; /** * Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'mentioned_user_ids', 'status'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') */ set?: Record; } export interface UpdateCommentPartialResponse { duration: string; comment: CommentResponse; } export interface UpdateCommentRequest { /** * Updated text content of the comment */ comment?: string; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned */ handle_mention_notifications?: boolean; /** * Whether to skip URL enrichment for this comment */ skip_enrich_url?: boolean; skip_push?: boolean; /** * Updated media attachments for the comment. Providing this field will replace all existing attachments. */ attachments?: Attachment[]; /** * List of user IDs mentioned in the comment */ mentioned_user_ids?: string[]; /** * Updated custom data for the comment */ custom?: Record; } export interface UpdateCommentResponse { duration: string; comment: CommentResponse; } export interface UpdateFeedMembersRequest { /** * Type of update operation to perform. One of: upsert, remove, set */ operation: 'upsert' | 'remove' | 'set'; limit?: number; next?: string; prev?: string; /** * List of members to upsert, remove, or set */ members?: FeedMemberRequest[]; } export interface UpdateFeedMembersResponse { /** * Duration of the request in milliseconds */ duration: string; added: FeedMemberResponse[]; removed_ids: string[]; updated: FeedMemberResponse[]; } export interface UpdateFeedRequest { /** * If true, removes the geographic location from the feed */ clear_location?: boolean; /** * Description of the feed */ description?: string; /** * If true, enriches the feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; /** * Name of the feed */ name?: string; /** * Tags used for filtering feeds */ filter_tags?: string[]; /** * Custom data for the feed */ custom?: Record; location?: Location; } export interface UpdateFeedResponse { duration: string; feed: FeedResponse; } export interface UpdateFollowRequest { /** * Fully qualified ID of the source feed */ source: string; /** * Fully qualified ID of the target feed */ target: string; /** * Maximum number of historical activities to copy from the target feed when the follow is first materialized. Not set = unlimited (default). 0 = copy nothing. Range: 0-1000. */ activity_copy_limit?: number; /** * @deprecated * Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead */ copy_custom_to_notification?: boolean; /** * Whether to create a notification activity for this follow */ create_notification_activity?: boolean; /** * If true, enriches the follow's source_feed and target_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; /** * Optional role for the follower in the follow relationship. Server-side only. Either a built-in ('feed_follower' (the default) or 'feed_member_viewer') or any role your app has defined; grants are not inspected. */ follower_role?: string; /** * Push preference for the follow relationship */ push_preference?: 'all' | 'none'; /** * Whether to skip push for this follow */ skip_push?: boolean; /** * Custom data for the follow relationship */ custom?: Record; } export interface UpdateFollowResponse { duration: string; follow: FollowResponse; } export interface UpdateLiveLocationRequest { /** * Live location ID */ message_id: string; /** * Time when the live location expires */ end_at?: Date; /** * Latitude coordinate */ latitude?: number; /** * Longitude coordinate */ longitude?: number; } export interface UpdatePollOptionRequest { /** * Option ID */ id: string; /** * Option text */ text: string; /** * Custom data for this object */ custom?: Record; } export interface UpdatePollPartialRequest { /** * Array of field names to unset */ unset?: string[]; /** * Sets new field values */ set?: Record; } export interface UpdatePollRequest { /** * Poll ID */ id: string; /** * Poll name */ name: string; /** * Allow answers */ allow_answers?: boolean; /** * Allow user suggested options */ allow_user_suggested_options?: boolean; /** * Poll description */ description?: string; /** * Enforce unique vote */ enforce_unique_vote?: boolean; /** * Is closed */ is_closed?: boolean; /** * Max votes allowed */ max_votes_allowed?: number; /** * Voting visibility */ voting_visibility?: 'anonymous' | 'public'; /** * Poll options */ options?: PollOptionRequest[]; /** * Custom data for this object */ custom?: Record; } export interface UpdateQueueRequest { description?: string; name?: string; sort?: Array>; filters?: Record; } export interface UpdateScheduledActivityRequest { /** * When to publish the activity, an RFC 3339 time. A time less than a minute ahead or in the past is moved to one minute from now, and the time is rounded up to a whole minute. */ scheduled_at?: Date; activity?: ActivityRequest; } export interface UpdateScheduledActivityResponse { duration: string; /** * An activity scheduled to be published at a future time */ scheduled_activity: ScheduledActivityResponse; } export interface UpdateUserGroupRequest { /** * The new description for the group */ description?: string; /** * The new name of the user group */ name?: string; team_id?: string; } export interface UpdateUserGroupResponse { duration: string; user_group?: UserGroupResponse; } export interface UpdateUserPartialRequest { /** * User ID to update */ id: string; unset?: string[]; set?: Record; } export interface UpdateUsersPartialRequest { users: UpdateUserPartialRequest[]; } export interface UpdateUsersRequest { /** * Object containing users */ users: Record; } export interface UpdateUsersResponse { /** * Duration of the request in milliseconds */ duration: string; /** * @deprecated * Deprecated: Always empty. Removing a user from a team no longer deletes their memberships in that team's channels, so there is no task to poll. */ membership_deletion_task_id: string; /** * Object containing users */ users: Record; } export interface UpsertActionConfigItem { action: string; entity_type: string; order: number; description?: string; icon?: string; id?: string; queue_type?: string; custom?: Record; } export interface UpsertActionConfigRequest { /** * The action to perform (e.g. ban, delete_message, custom) */ action: string; /** * Type of entity this action applies to (e.g. stream:chat:v1:message) */ entity_type: string; /** * Display order in the dashboard (0–100, lower numbers shown first) */ order: number; /** * Human-readable label for the dashboard button */ description?: string; /** * Icon identifier for the dashboard button */ icon?: string; /** * UUID of an existing action config to update; omit to create a new record */ id?: string; /** * Queue this config belongs to; null means the default queue */ queue_type?: string; /** * Action-specific parameters passed to the action handler */ custom?: Record; } export interface UpsertActionConfigResponse { duration: string; /** * Configuration for a moderation action */ action_config?: ModerationActionConfigResponse; } export interface UpsertActivitiesRequest { /** * List of activities to create or update */ activities: ActivityRequest[]; /** * If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance. */ enrich_own_fields?: boolean; } export interface UpsertActivitiesResponse { duration: string; /** * List of created or updated activities */ activities: ActivityResponse[]; /** * Total number of mention notification activities created for mentioned users across all activities */ mention_notifications_created?: number; } export interface UpsertConfigRequest { /** * Unique identifier for the moderation configuration */ key: string; /** * Whether moderation should be performed asynchronously */ async?: boolean; /** * Team associated with the configuration */ team?: string; ai_audio_config?: AIAudioConfigRequest; ai_image_config?: AIImageConfig; ai_text_config?: AITextConfig; ai_video_config?: AIVideoConfigRequest; automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig; automod_semantic_filters_config?: AutomodSemanticFiltersConfig; automod_toxicity_config?: AutomodToxicityConfig; aws_rekognition_config?: AIImageConfig; block_list_config?: BlockListConfig; bodyguard_config?: AITextConfig; flood_config?: FloodConfig; google_vision_config?: GoogleVisionConfig; intent_config?: IntentConfigRequest; llm_config?: LLMConfig; rule_builder_config?: RuleBuilderConfig; velocity_filter_config?: VelocityFilterConfig; video_call_rule_config?: VideoCallRuleConfig; } export interface UpsertConfigResponse { duration: string; config?: ConfigResponse; } export interface UpsertPushPreferencesRequest { /** * A list of push preferences for channels, calls, or the user. */ preferences: PushPreferenceInput[]; } export interface UpsertPushPreferencesResponse { /** * Duration of the request in milliseconds */ duration: string; /** * The channel specific push notification preferences, only returned for channels you've edited. */ user_channel_preferences: Record>; /** * The user preferences, always returned regardless if you edited it */ user_preferences: Record; } export interface UpsertUserInterestsRequest { /** * Interest tags to add or update (1-50) */ interests: UserInterestRequest[]; } export interface UpsertUserInterestsResponse { duration: string; /** * All interest tags of the user after the write */ interests: InterestTagResponse[]; } export interface User { id: string; data?: Record; } export interface UserBannedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.banned" in this case */ type: string; /** * The ID of the channel where the target user was banned */ channel_id?: string; channel_member_count?: number; channel_message_count?: number; /** * The type of the channel where the target user was banned */ channel_type?: string; /** * The CID of the channel where the target user was banned */ cid?: string; /** * The expiration date of the ban */ expiration?: Date; /** * The reason for the ban */ reason?: string; received_at?: Date; /** * ID of the review queue item (flagged message) that triggered the ban, if the ban was applied from the moderation review queue */ review_queue_item_id?: string; /** * Whether the user was shadow banned */ shadow?: boolean; /** * The team of the channel where the target user was banned */ team?: string; total_bans?: number; channel_custom?: Record; created_by?: UserResponseCommonFields; } export interface UserChannelCountRuleParameters { threshold?: number; time_window?: string; } export interface UserCreatedWithinParameters { max_age?: string; } export interface UserCustomPropertyParameters { operator?: string; property_key?: string; } export interface UserDeactivatedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.deactivated" in this case */ type: string; received_at?: Date; created_by?: UserResponseCommonFields; } export interface UserGroupMember { app_pk: number; created_at: Date; group_id: string; is_admin: boolean; user_id: string; } export interface UserGroupResponse { created_at: Date; id: string; name: string; updated_at: Date; created_by?: string; description?: string; team_id?: string; members?: UserGroupMember[]; } export interface UserIdenticalContentCountParameters { threshold?: number; time_window?: string; } export interface UserIdenticalImageCountParameters { match?: string; similarity_distance?: number; threshold?: number; time_window?: string; } export interface UserInterestRequest { /** * The interest tag; trimmed and lower-cased like activity interest_tags */ tag: string; /** * Ranking weight between -1.0 (dislike) and 1.0 (like). Defaults to 1.0 */ weight?: number; } export interface UserMuteResponse { created_at: Date; updated_at: Date; expires?: Date; /** * User response object */ target?: UserResponse; /** * User response object */ user?: UserResponse; } export interface UserReactionCountRuleParameters { count?: string; threshold?: number; time_window?: string; } export interface UserReactivatedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.reactivated" in this case */ type: string; received_at?: Date; created_by?: UserResponseCommonFields; } export interface UserRequest { /** * User ID */ id: string; /** * User's profile image URL */ image?: string; invisible?: boolean; language?: string; /** * Optional name of user */ name?: string; /** * Custom user data */ custom?: Record; privacy_settings?: PrivacySettingsResponse; } export interface UserResponse { /** * Whether a user is banned or not */ banned: boolean; /** * Date/time of creation */ created_at: Date; /** * Unique user identifier */ id: string; /** * Preferred language of a user */ language: string; /** * Whether a user online or not */ online: boolean; /** * Determines the set of user permissions */ role: string; /** * Date/time of the last update */ updated_at: Date; blocked_user_ids: string[]; /** * List of teams user is a part of */ teams: string[]; /** * Custom data for this object */ custom: Record; avg_response_time?: number; /** * Date of deactivation */ deactivated_at?: Date; /** * Date/time of deletion */ deleted_at?: Date; image?: string; /** * Date of last activity */ last_active?: Date; /** * Optional name of user */ name?: string; /** * Revocation date for tokens */ revoke_tokens_issued_before?: Date; teams_role?: Record; } export interface UserResponseCommonFields { banned: boolean; created_at: Date; id: string; language: string; online: boolean; role: string; updated_at: Date; blocked_user_ids: string[]; teams: string[]; custom: Record; avg_response_time?: number; deactivated_at?: Date; deleted_at?: Date; image?: string; last_active?: Date; name?: string; revoke_tokens_issued_before?: Date; teams_role?: Record; } export interface UserResponsePrivacyFields { banned: boolean; created_at: Date; id: string; language: string; online: boolean; role: string; updated_at: Date; blocked_user_ids: string[]; teams: string[]; custom: Record; avg_response_time?: number; deactivated_at?: Date; deleted_at?: Date; image?: string; invisible?: boolean; last_active?: Date; name?: string; revoke_tokens_issued_before?: Date; privacy_settings?: PrivacySettingsResponse; teams_role?: Record; } export interface UserRoleParameters { operator?: string; role?: string; } export interface UserRuleParameters { max_age?: string; } export interface UserUnbannedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; user: UserResponseCommonFields; /** * The type of event: "user.unbanned" in this case */ type: string; /** * The ID of the channel where the target user was unbanned */ channel_id?: string; channel_member_count?: number; channel_message_count?: number; /** * The type of the channel where the target user was unbanned */ channel_type?: string; /** * The CID of the channel where the target user was unbanned */ cid?: string; received_at?: Date; /** * Whether the target user was shadow unbanned */ shadow?: boolean; /** * The team of the channel where the target user was unbanned */ team?: string; channel_custom?: Record; created_by?: UserResponseCommonFields; } export interface UserUpdatedEvent { /** * Date/time of creation */ created_at: Date; custom: Record; user: UserResponsePrivacyFields; /** * The type of event: "user.updated" in this case */ type: string; received_at?: Date; } export interface VelocityFilterConfig { advanced_filters: boolean; cascading_actions: boolean; cids_per_user: number; enabled: boolean; first_message_only: boolean; rules: VelocityFilterConfigRule[]; async?: boolean; } export interface VelocityFilterConfigRule { action: 'flag' | 'shadow' | 'remove' | 'ban'; ban_duration: number; cascading_action: 'flag' | 'shadow' | 'remove' | 'ban'; cascading_threshold: number; check_message_context: boolean; fast_spam_threshold: number; fast_spam_ttl: number; ip_ban: boolean; probation_period: number; shadow_ban: boolean; slow_spam_threshold: number; slow_spam_ttl: number; url_only: boolean; slow_spam_ban_duration?: number; } export interface VideoCallRuleConfig { flag_all_labels: boolean; flagged_labels: string[]; rules: HarmConfig[]; } export interface VideoContentParameters { label_operator?: string; harm_labels?: string[]; } export interface VideoEndCallRequestPayload { } export interface VideoKickUserRequestPayload { } export interface VideoRuleParameters { threshold?: number; time_window?: string; harm_labels?: string[]; } export interface VoteData { answer_text?: string; option_id?: string; } export interface WSAuthMessage { /** * JWT token for authentication */ token: string; user_details: ConnectUserDetailsRequest; /** * Channel-member custom keys to project onto message.member for messages this connection receives (opt-in; capped, off by default). */ member_custom_include?: string[]; /** * List of products to subscribe to. One of: chat, video, feeds */ products?: string[]; } export type WSClientEvent = ({ type: 'app.updated'; } & AppUpdatedEvent) | ({ type: 'feeds.activity.added'; } & ActivityAddedEvent) | ({ type: 'feeds.activity.deleted'; } & ActivityDeletedEvent) | ({ type: 'feeds.activity.feedback'; } & ActivityFeedbackEvent) | ({ type: 'feeds.activity.marked'; } & ActivityMarkEvent) | ({ type: 'feeds.activity.pinned'; } & ActivityPinnedEvent) | ({ type: 'feeds.activity.reaction.added'; } & ActivityReactionAddedEvent) | ({ type: 'feeds.activity.reaction.deleted'; } & ActivityReactionDeletedEvent) | ({ type: 'feeds.activity.reaction.updated'; } & ActivityReactionUpdatedEvent) | ({ type: 'feeds.activity.removed_from_feed'; } & ActivityRemovedFromFeedEvent) | ({ type: 'feeds.activity.restored'; } & ActivityRestoredEvent) | ({ type: 'feeds.activity.unpinned'; } & ActivityUnpinnedEvent) | ({ type: 'feeds.activity.updated'; } & ActivityUpdatedEvent) | ({ type: 'feeds.bookmark.added'; } & BookmarkAddedEvent) | ({ type: 'feeds.bookmark.deleted'; } & BookmarkDeletedEvent) | ({ type: 'feeds.bookmark.updated'; } & BookmarkUpdatedEvent) | ({ type: 'feeds.bookmark_folder.deleted'; } & BookmarkFolderDeletedEvent) | ({ type: 'feeds.bookmark_folder.updated'; } & BookmarkFolderUpdatedEvent) | ({ type: 'feeds.comment.added'; } & CommentAddedEvent) | ({ type: 'feeds.comment.deleted'; } & CommentDeletedEvent) | ({ type: 'feeds.comment.reaction.added'; } & CommentReactionAddedEvent) | ({ type: 'feeds.comment.reaction.deleted'; } & CommentReactionDeletedEvent) | ({ type: 'feeds.comment.reaction.updated'; } & CommentReactionUpdatedEvent) | ({ type: 'feeds.comment.restored'; } & CommentRestoredEvent) | ({ type: 'feeds.comment.updated'; } & CommentUpdatedEvent) | ({ type: 'feeds.feed.created'; } & FeedCreatedEvent) | ({ type: 'feeds.feed.deleted'; } & FeedDeletedEvent) | ({ type: 'feeds.feed.updated'; } & FeedUpdatedEvent) | ({ type: 'feeds.feed_group.changed'; } & FeedGroupChangedEvent) | ({ type: 'feeds.feed_group.deleted'; } & FeedGroupDeletedEvent) | ({ type: 'feeds.feed_group.restored'; } & FeedGroupRestoredEvent) | ({ type: 'feeds.feed_member.added'; } & FeedMemberAddedEvent) | ({ type: 'feeds.feed_member.removed'; } & FeedMemberRemovedEvent) | ({ type: 'feeds.feed_member.updated'; } & FeedMemberUpdatedEvent) | ({ type: 'feeds.follow.created'; } & FollowCreatedEvent) | ({ type: 'feeds.follow.deleted'; } & FollowDeletedEvent) | ({ type: 'feeds.follow.updated'; } & FollowUpdatedEvent) | ({ type: 'feeds.notification_feed.updated'; } & NotificationFeedUpdatedEvent) | ({ type: 'feeds.poll.closed'; } & PollClosedFeedEvent) | ({ type: 'feeds.poll.deleted'; } & PollDeletedFeedEvent) | ({ type: 'feeds.poll.updated'; } & PollUpdatedFeedEvent) | ({ type: 'feeds.poll.vote_casted'; } & PollVoteCastedFeedEvent) | ({ type: 'feeds.poll.vote_changed'; } & PollVoteChangedFeedEvent) | ({ type: 'feeds.poll.vote_removed'; } & PollVoteRemovedFeedEvent) | ({ type: 'feeds.scheduled_activity.created'; } & ScheduledActivityCreatedEvent) | ({ type: 'feeds.scheduled_activity.deleted'; } & ScheduledActivityDeletedEvent) | ({ type: 'feeds.scheduled_activity.failed'; } & ScheduledActivityFailedEvent) | ({ type: 'feeds.scheduled_activity.published'; } & ScheduledActivityPublishedEvent) | ({ type: 'feeds.scheduled_activity.updated'; } & ScheduledActivityUpdatedEvent) | ({ type: 'feeds.stories_feed.updated'; } & StoriesFeedUpdatedEvent) | ({ type: 'health.check'; } & HealthCheckEvent) | ({ type: 'moderation.custom_action'; } & ModerationCustomActionEvent) | ({ type: 'moderation.flagged'; } & ModerationFlaggedEvent) | ({ type: 'moderation.mark_reviewed'; } & ModerationMarkReviewedEvent) | ({ type: 'user.banned'; } & UserBannedEvent) | ({ type: 'user.deactivated'; } & UserDeactivatedEvent) | ({ type: 'user.reactivated'; } & UserReactivatedEvent) | ({ type: 'user.unbanned'; } & UserUnbannedEvent) | ({ type: 'user.updated'; } & UserUpdatedEvent); export type WSEvent = ({ type: 'app.updated'; } & AppUpdatedEvent) | ({ type: 'feeds.activity.added'; } & ActivityAddedEvent) | ({ type: 'feeds.activity.deleted'; } & ActivityDeletedEvent) | ({ type: 'feeds.activity.feedback'; } & ActivityFeedbackEvent) | ({ type: 'feeds.activity.marked'; } & ActivityMarkEvent) | ({ type: 'feeds.activity.pinned'; } & ActivityPinnedEvent) | ({ type: 'feeds.activity.reaction.added'; } & ActivityReactionAddedEvent) | ({ type: 'feeds.activity.reaction.deleted'; } & ActivityReactionDeletedEvent) | ({ type: 'feeds.activity.reaction.updated'; } & ActivityReactionUpdatedEvent) | ({ type: 'feeds.activity.removed_from_feed'; } & ActivityRemovedFromFeedEvent) | ({ type: 'feeds.activity.restored'; } & ActivityRestoredEvent) | ({ type: 'feeds.activity.unpinned'; } & ActivityUnpinnedEvent) | ({ type: 'feeds.activity.updated'; } & ActivityUpdatedEvent) | ({ type: 'feeds.bookmark.added'; } & BookmarkAddedEvent) | ({ type: 'feeds.bookmark.deleted'; } & BookmarkDeletedEvent) | ({ type: 'feeds.bookmark.updated'; } & BookmarkUpdatedEvent) | ({ type: 'feeds.bookmark_folder.deleted'; } & BookmarkFolderDeletedEvent) | ({ type: 'feeds.bookmark_folder.updated'; } & BookmarkFolderUpdatedEvent) | ({ type: 'feeds.comment.added'; } & CommentAddedEvent) | ({ type: 'feeds.comment.deleted'; } & CommentDeletedEvent) | ({ type: 'feeds.comment.reaction.added'; } & CommentReactionAddedEvent) | ({ type: 'feeds.comment.reaction.deleted'; } & CommentReactionDeletedEvent) | ({ type: 'feeds.comment.reaction.updated'; } & CommentReactionUpdatedEvent) | ({ type: 'feeds.comment.restored'; } & CommentRestoredEvent) | ({ type: 'feeds.comment.updated'; } & CommentUpdatedEvent) | ({ type: 'feeds.feed.created'; } & FeedCreatedEvent) | ({ type: 'feeds.feed.deleted'; } & FeedDeletedEvent) | ({ type: 'feeds.feed.updated'; } & FeedUpdatedEvent) | ({ type: 'feeds.feed_group.changed'; } & FeedGroupChangedEvent) | ({ type: 'feeds.feed_group.deleted'; } & FeedGroupDeletedEvent) | ({ type: 'feeds.feed_group.restored'; } & FeedGroupRestoredEvent) | ({ type: 'feeds.feed_member.added'; } & FeedMemberAddedEvent) | ({ type: 'feeds.feed_member.removed'; } & FeedMemberRemovedEvent) | ({ type: 'feeds.feed_member.updated'; } & FeedMemberUpdatedEvent) | ({ type: 'feeds.follow.created'; } & FollowCreatedEvent) | ({ type: 'feeds.follow.deleted'; } & FollowDeletedEvent) | ({ type: 'feeds.follow.updated'; } & FollowUpdatedEvent) | ({ type: 'feeds.notification_feed.updated'; } & NotificationFeedUpdatedEvent) | ({ type: 'feeds.poll.closed'; } & PollClosedFeedEvent) | ({ type: 'feeds.poll.deleted'; } & PollDeletedFeedEvent) | ({ type: 'feeds.poll.updated'; } & PollUpdatedFeedEvent) | ({ type: 'feeds.poll.vote_casted'; } & PollVoteCastedFeedEvent) | ({ type: 'feeds.poll.vote_changed'; } & PollVoteChangedFeedEvent) | ({ type: 'feeds.poll.vote_removed'; } & PollVoteRemovedFeedEvent) | ({ type: 'feeds.scheduled_activity.created'; } & ScheduledActivityCreatedEvent) | ({ type: 'feeds.scheduled_activity.deleted'; } & ScheduledActivityDeletedEvent) | ({ type: 'feeds.scheduled_activity.failed'; } & ScheduledActivityFailedEvent) | ({ type: 'feeds.scheduled_activity.published'; } & ScheduledActivityPublishedEvent) | ({ type: 'feeds.scheduled_activity.updated'; } & ScheduledActivityUpdatedEvent) | ({ type: 'feeds.stories_feed.updated'; } & StoriesFeedUpdatedEvent) | ({ type: 'health.check'; } & HealthCheckEvent) | ({ type: 'moderation.custom_action'; } & ModerationCustomActionEvent) | ({ type: 'moderation.flagged'; } & ModerationFlaggedEvent) | ({ type: 'moderation.mark_reviewed'; } & ModerationMarkReviewedEvent) | ({ type: 'user.banned'; } & UserBannedEvent) | ({ type: 'user.deactivated'; } & UserDeactivatedEvent) | ({ type: 'user.reactivated'; } & UserReactivatedEvent) | ({ type: 'user.unbanned'; } & UserUnbannedEvent) | ({ type: 'user.updated'; } & UserUpdatedEvent); //# sourceMappingURL=index.d.ts.map