{"version":3,"sources":["jsdelivr-header.js","/npm/@stream-io/feeds-client@0.3.16/src/gen/models/index.ts","/npm/@stream-io/feeds-client@0.3.16/src/common/search/SearchController.ts","/npm/@stream-io/feeds-client@0.3.16/src/common/search/BaseSearchSource.ts","/npm/@stream-io/feeds-client@0.3.16/src/common/search/ActivitySearchSource.ts","/npm/@stream-io/feeds-client@0.3.16/src/common/search/FeedSearchSource.ts","/npm/@stream-io/feeds-client@0.3.16/src/common/search/UserSearchSource.ts"],"names":[],"mappings":"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","file":"/npm/@stream-io/feeds-client@0.3.16/dist/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@stream-io/feeds-client@0.3.16/dist/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","export interface AIImageConfig {\n  enabled: boolean;\n\n  ocr_rules: OCRRule[];\n\n  rules: AWSRekognitionRule[];\n\n  async?: boolean;\n}\n\nexport interface AITextConfig {\n  enabled: boolean;\n\n  profile: string;\n\n  rules: BodyguardRule[];\n\n  severity_rules: BodyguardSeverityRule[];\n\n  async?: boolean;\n}\n\nexport interface AIVideoConfig {\n  enabled: boolean;\n\n  rules: AWSRekognitionRule[];\n\n  async?: boolean;\n}\n\nexport interface APIError {\n  code: number;\n\n  duration: string;\n\n  message: string;\n\n  more_info: string;\n\n  status_code: number;\n\n  details: number[];\n\n  unrecoverable?: boolean;\n\n  exception_fields?: Record<string, string>;\n}\n\nexport interface AWSRekognitionRule {\n  action:\n    | 'flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove';\n\n  label: string;\n\n  min_confidence: number;\n}\n\nexport interface AcceptFeedMemberInviteRequest {}\n\nexport interface AcceptFeedMemberInviteResponse {\n  duration: string;\n\n  member: FeedMemberResponse;\n}\n\nexport interface AcceptFollowRequest {\n  source: string;\n\n  target: string;\n\n  follower_role?: string;\n}\n\nexport interface AcceptFollowResponse {\n  duration: string;\n\n  follow: FollowResponse;\n}\n\nexport interface Action {\n  name: string;\n\n  text: string;\n\n  type: string;\n\n  style?: string;\n\n  value?: string;\n}\n\nexport interface ActionLogResponse {\n  created_at: Date;\n\n  id: string;\n\n  reason: string;\n\n  target_user_id: string;\n\n  type: string;\n\n  user_id: string;\n\n  ai_providers: string[];\n\n  custom: Record<string, any>;\n\n  review_queue_item?: ReviewQueueItemResponse;\n\n  target_user?: UserResponse;\n\n  user?: UserResponse;\n}\n\nexport interface ActionSequence {\n  action: string;\n\n  blur: boolean;\n\n  cooldown_period: number;\n\n  threshold: number;\n\n  time_window: number;\n\n  warning: boolean;\n\n  warning_text: string;\n}\n\nexport interface ActivityAddedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityFeedbackEvent {\n  created_at: Date;\n\n  activity_feedback: ActivityFeedbackEventPayload;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityFeedbackEventPayload {\n  action: 'hide' | 'show_more' | 'show_less';\n\n  activity_id: string;\n\n  created_at: Date;\n\n  updated_at: Date;\n\n  value: string;\n\n  user: UserResponse;\n}\n\nexport interface ActivityFeedbackRequest {\n  hide?: boolean;\n\n  show_less?: boolean;\n\n  show_more?: boolean;\n}\n\nexport interface ActivityFeedbackResponse {\n  activity_id: string;\n\n  duration: string;\n}\n\nexport interface ActivityLocation {\n  lat: number;\n\n  lng: number;\n}\n\nexport interface ActivityMarkEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  mark_all_read?: boolean;\n\n  mark_all_seen?: boolean;\n\n  received_at?: Date;\n\n  mark_read?: string[];\n\n  mark_seen?: string[];\n\n  mark_watched?: string[];\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityPinResponse {\n  created_at: Date;\n\n  feed: string;\n\n  updated_at: Date;\n\n  activity: ActivityResponse;\n\n  user: UserResponse;\n}\n\nexport interface ActivityPinnedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  pinned_activity: PinActivityResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityProcessorConfig {\n  type: string;\n\n  openai_key?: string;\n\n  config?: Record<string, any>;\n}\n\nexport interface ActivityReactionAddedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  reaction: FeedsReactionResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityReactionDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  reaction: FeedsReactionResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityReactionUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  reaction: FeedsReactionResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityRemovedFromFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityRequest {\n  type: string;\n\n  feeds: string[];\n\n  expires_at?: string;\n\n  id?: string;\n\n  parent_id?: string;\n\n  poll_id?: string;\n\n  restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';\n\n  skip_enrich_url?: boolean;\n\n  text?: string;\n\n  visibility?: 'public' | 'private' | 'tag';\n\n  visibility_tag?: string;\n\n  attachments?: Attachment[];\n\n  collection_refs?: string[];\n\n  filter_tags?: string[];\n\n  interest_tags?: string[];\n\n  mentioned_user_ids?: string[];\n\n  custom?: Record<string, any>;\n\n  location?: ActivityLocation;\n\n  search_data?: Record<string, any>;\n}\n\nexport interface ActivityResponse {\n  bookmark_count: number;\n\n  comment_count: number;\n\n  created_at: Date;\n\n  hidden: boolean;\n\n  id: string;\n\n  popularity: number;\n\n  preview: boolean;\n\n  reaction_count: number;\n\n  restrict_replies: string;\n\n  score: number;\n\n  share_count: number;\n\n  type: string;\n\n  updated_at: Date;\n\n  visibility: 'public' | 'private' | 'tag';\n\n  attachments: Attachment[];\n\n  comments: CommentResponse[];\n\n  feeds: string[];\n\n  filter_tags: string[];\n\n  interest_tags: string[];\n\n  latest_reactions: FeedsReactionResponse[];\n\n  mentioned_users: UserResponse[];\n\n  own_bookmarks: BookmarkResponse[];\n\n  own_reactions: FeedsReactionResponse[];\n\n  collections: Record<string, EnrichedCollectionResponse>;\n\n  custom: Record<string, any>;\n\n  reaction_groups: Record<string, ReactionGroupResponse>;\n\n  search_data: Record<string, any>;\n\n  user: UserResponse;\n\n  deleted_at?: Date;\n\n  edited_at?: Date;\n\n  expires_at?: Date;\n\n  is_watched?: boolean;\n\n  moderation_action?: string;\n\n  text?: string;\n\n  visibility_tag?: string;\n\n  current_feed?: FeedResponse;\n\n  location?: ActivityLocation;\n\n  moderation?: ModerationV2Response;\n\n  notification_context?: NotificationContext;\n\n  parent?: ActivityResponse;\n\n  poll?: PollResponseData;\n}\n\nexport interface ActivitySelectorConfig {\n  cutoff_time: Date;\n\n  cutoff_window?: string;\n\n  min_popularity?: number;\n\n  type?: string;\n\n  sort?: SortParam[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface ActivityUnpinnedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  pinned_activity: PinActivityResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ActivityUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface AddActivityRequest {\n  type: string;\n\n  feeds: string[];\n\n  expires_at?: string;\n\n  id?: string;\n\n  parent_id?: string;\n\n  poll_id?: string;\n\n  restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';\n\n  skip_enrich_url?: boolean;\n\n  text?: string;\n\n  visibility?: 'public' | 'private' | 'tag';\n\n  visibility_tag?: string;\n\n  attachments?: Attachment[];\n\n  collection_refs?: string[];\n\n  filter_tags?: string[];\n\n  interest_tags?: string[];\n\n  mentioned_user_ids?: string[];\n\n  custom?: Record<string, any>;\n\n  location?: ActivityLocation;\n\n  search_data?: Record<string, any>;\n}\n\nexport interface AddActivityResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n}\n\nexport interface AddBookmarkRequest {\n  folder_id?: string;\n\n  custom?: Record<string, any>;\n\n  new_folder?: AddFolderRequest;\n}\n\nexport interface AddBookmarkResponse {\n  duration: string;\n\n  bookmark: BookmarkResponse;\n}\n\nexport interface AddCommentReactionRequest {\n  type: string;\n\n  create_notification_activity?: boolean;\n\n  enforce_unique?: boolean;\n\n  skip_push?: boolean;\n\n  custom?: Record<string, any>;\n}\n\nexport interface AddCommentReactionResponse {\n  duration: string;\n\n  comment: CommentResponse;\n\n  reaction: FeedsReactionResponse;\n}\n\nexport interface AddCommentRequest {\n  object_id: string;\n\n  object_type: string;\n\n  comment?: string;\n\n  create_notification_activity?: boolean;\n\n  id?: string;\n\n  parent_id?: string;\n\n  skip_enrich_url?: boolean;\n\n  skip_push?: boolean;\n\n  attachments?: Attachment[];\n\n  mentioned_user_ids?: string[];\n\n  custom?: Record<string, any>;\n}\n\nexport interface AddCommentResponse {\n  duration: string;\n\n  comment: CommentResponse;\n}\n\nexport interface AddCommentsBatchRequest {\n  comments: AddCommentRequest[];\n}\n\nexport interface AddCommentsBatchResponse {\n  duration: string;\n\n  comments: CommentResponse[];\n}\n\nexport interface AddFolderRequest {\n  name: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface AddReactionRequest {\n  type: string;\n\n  create_notification_activity?: boolean;\n\n  enforce_unique?: boolean;\n\n  skip_push?: boolean;\n\n  custom?: Record<string, any>;\n}\n\nexport interface AddReactionResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n\n  reaction: FeedsReactionResponse;\n}\n\nexport interface AggregatedActivityResponse {\n  activity_count: number;\n\n  created_at: Date;\n\n  group: string;\n\n  score: number;\n\n  updated_at: Date;\n\n  user_count: number;\n\n  user_count_truncated: boolean;\n\n  activities: ActivityResponse[];\n\n  is_watched?: boolean;\n}\n\nexport interface AggregationConfig {\n  format?: string;\n\n  group_size?: number;\n}\n\nexport interface AppEventResponse {\n  auto_translation_enabled: boolean;\n\n  name: string;\n\n  async_url_enrich_enabled?: boolean;\n\n  file_upload_config?: FileUploadConfig;\n\n  image_upload_config?: FileUploadConfig;\n}\n\nexport interface AppResponseFields {\n  async_url_enrich_enabled: boolean;\n\n  auto_translation_enabled: boolean;\n\n  id: number;\n\n  name: string;\n\n  placement: string;\n\n  file_upload_config: FileUploadConfig;\n\n  image_upload_config: FileUploadConfig;\n}\n\nexport interface AppUpdatedEvent {\n  created_at: Date;\n\n  app: AppEventResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n}\n\nexport interface Attachment {\n  custom: Record<string, any>;\n\n  asset_url?: string;\n\n  author_icon?: string;\n\n  author_link?: string;\n\n  author_name?: string;\n\n  color?: string;\n\n  fallback?: string;\n\n  footer?: string;\n\n  footer_icon?: string;\n\n  image_url?: string;\n\n  og_scrape_url?: string;\n\n  original_height?: number;\n\n  original_width?: number;\n\n  pretext?: string;\n\n  text?: string;\n\n  thumb_url?: string;\n\n  title?: string;\n\n  title_link?: string;\n\n  type?: string;\n\n  actions?: Action[];\n\n  fields?: Field[];\n\n  giphy?: Images;\n}\n\nexport interface AudioSettingsResponse {\n  access_request_enabled: boolean;\n\n  default_device: 'speaker' | 'earpiece';\n\n  hifi_audio_enabled: boolean;\n\n  mic_default_on: boolean;\n\n  opus_dtx_enabled: boolean;\n\n  redundant_coding_enabled: boolean;\n\n  speaker_default_on: boolean;\n\n  noise_cancellation?: NoiseCancellationSettings;\n}\n\nexport interface AutomodPlatformCircumventionConfig {\n  enabled: boolean;\n\n  rules: AutomodRule[];\n\n  async?: boolean;\n}\n\nexport interface AutomodRule {\n  action:\n    | 'flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove';\n\n  label: string;\n\n  threshold: number;\n}\n\nexport interface AutomodSemanticFiltersConfig {\n  enabled: boolean;\n\n  rules: AutomodSemanticFiltersRule[];\n\n  async?: boolean;\n}\n\nexport interface AutomodSemanticFiltersRule {\n  action: 'flag' | 'shadow' | 'remove';\n\n  name: string;\n\n  threshold: number;\n}\n\nexport interface AutomodToxicityConfig {\n  enabled: boolean;\n\n  rules: AutomodRule[];\n\n  async?: boolean;\n}\n\nexport interface BackstageSettingsResponse {\n  enabled: boolean;\n\n  join_ahead_time_seconds?: number;\n}\n\nexport interface Ban {\n  created_at: Date;\n\n  shadow: boolean;\n\n  expires?: Date;\n\n  reason?: string;\n\n  channel?: Channel;\n\n  created_by?: User;\n\n  target?: User;\n}\n\nexport interface BanActionRequest {\n  channel_ban_only?: boolean;\n\n  delete_messages?: 'soft' | 'pruning' | 'hard';\n\n  ip_ban?: boolean;\n\n  reason?: string;\n\n  shadow?: boolean;\n\n  timeout?: number;\n}\n\nexport interface BanOptions {\n  delete_messages?: 'soft' | 'pruning' | 'hard';\n\n  duration?: number;\n\n  ip_ban?: boolean;\n\n  reason?: string;\n\n  shadow_ban?: boolean;\n}\n\nexport interface BanRequest {\n  target_user_id: string;\n\n  banned_by_id?: string;\n\n  channel_cid?: string;\n\n  delete_messages?: 'soft' | 'pruning' | 'hard';\n\n  ip_ban?: boolean;\n\n  reason?: string;\n\n  shadow?: boolean;\n\n  timeout?: number;\n\n  banned_by?: UserRequest;\n}\n\nexport interface BanResponse {\n  duration: string;\n}\n\nexport interface BlockActionRequest {\n  reason?: string;\n}\n\nexport interface BlockListConfig {\n  enabled: boolean;\n\n  rules: BlockListRule[];\n\n  async?: boolean;\n}\n\nexport interface BlockListOptions {\n  behavior: 'flag' | 'block' | 'shadow_block';\n\n  blocklist: string;\n}\n\nexport interface BlockListResponse {\n  is_leet_check_enabled: boolean;\n\n  is_plural_check_enabled: boolean;\n\n  name: string;\n\n  type: string;\n\n  words: string[];\n\n  created_at?: Date;\n\n  id?: string;\n\n  team?: string;\n\n  updated_at?: Date;\n}\n\nexport interface BlockListRule {\n  action:\n    | 'flag'\n    | 'mask_flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove';\n\n  name: string;\n\n  team: string;\n}\n\nexport interface BlockUsersRequest {\n  blocked_user_id: string;\n}\n\nexport interface BlockUsersResponse {\n  blocked_by_user_id: string;\n\n  blocked_user_id: string;\n\n  created_at: Date;\n\n  duration: string;\n}\n\nexport interface BlockedUserResponse {\n  blocked_user_id: string;\n\n  created_at: Date;\n\n  user_id: string;\n\n  blocked_user: UserResponse;\n\n  user: UserResponse;\n}\n\nexport interface BodyguardRule {\n  action:\n    | 'flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove';\n\n  label: string;\n\n  severity_rules: BodyguardSeverityRule[];\n}\n\nexport interface BodyguardSeverityRule {\n  action:\n    | 'flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove';\n\n  severity: 'low' | 'medium' | 'high' | 'critical';\n}\n\nexport interface BookmarkAddedEvent {\n  created_at: Date;\n\n  bookmark: BookmarkResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface BookmarkDeletedEvent {\n  created_at: Date;\n\n  bookmark: BookmarkResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface BookmarkFolderDeletedEvent {\n  created_at: Date;\n\n  bookmark_folder: BookmarkFolderResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface BookmarkFolderResponse {\n  created_at: Date;\n\n  id: string;\n\n  name: string;\n\n  updated_at: Date;\n\n  user: UserResponseCommonFields;\n\n  custom?: Record<string, any>;\n}\n\nexport interface BookmarkFolderUpdatedEvent {\n  created_at: Date;\n\n  bookmark_folder: BookmarkFolderResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface BookmarkResponse {\n  created_at: Date;\n\n  updated_at: Date;\n\n  activity: ActivityResponse;\n\n  user: UserResponseCommonFields;\n\n  custom?: Record<string, any>;\n\n  folder?: BookmarkFolderResponse;\n}\n\nexport interface BookmarkUpdatedEvent {\n  created_at: Date;\n\n  bookmark: BookmarkResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface BroadcastSettingsResponse {\n  enabled: boolean;\n\n  hls: HLSSettingsResponse;\n\n  rtmp: RTMPSettingsResponse;\n}\n\nexport interface CallIngressResponse {\n  rtmp: RTMPIngress;\n\n  srt: SRTIngress;\n\n  whip: WHIPIngress;\n}\n\nexport interface CallParticipantResponse {\n  joined_at: Date;\n\n  role: string;\n\n  user_session_id: string;\n\n  user: UserResponse;\n}\n\nexport interface CallResponse {\n  backstage: boolean;\n\n  captioning: boolean;\n\n  cid: string;\n\n  created_at: Date;\n\n  current_session_id: string;\n\n  id: string;\n\n  recording: boolean;\n\n  transcribing: boolean;\n\n  translating: boolean;\n\n  type: string;\n\n  updated_at: Date;\n\n  blocked_user_ids: string[];\n\n  created_by: UserResponse;\n\n  custom: Record<string, any>;\n\n  egress: EgressResponse;\n\n  ingress: CallIngressResponse;\n\n  settings: CallSettingsResponse;\n\n  channel_cid?: string;\n\n  ended_at?: Date;\n\n  join_ahead_time_seconds?: number;\n\n  starts_at?: Date;\n\n  team?: string;\n\n  session?: CallSessionResponse;\n\n  thumbnails?: ThumbnailResponse;\n}\n\nexport interface CallSessionResponse {\n  anonymous_participant_count: number;\n\n  id: string;\n\n  participants: CallParticipantResponse[];\n\n  accepted_by: Record<string, Date>;\n\n  missed_by: Record<string, Date>;\n\n  participants_count_by_role: Record<string, number>;\n\n  rejected_by: Record<string, Date>;\n\n  ended_at?: Date;\n\n  live_ended_at?: Date;\n\n  live_started_at?: Date;\n\n  started_at?: Date;\n\n  timer_ends_at?: Date;\n}\n\nexport interface CallSettingsResponse {\n  audio: AudioSettingsResponse;\n\n  backstage: BackstageSettingsResponse;\n\n  broadcasting: BroadcastSettingsResponse;\n\n  frame_recording: FrameRecordingSettingsResponse;\n\n  geofencing: GeofenceSettingsResponse;\n\n  limits: LimitsSettingsResponse;\n\n  recording: RecordSettingsResponse;\n\n  ring: RingSettingsResponse;\n\n  screensharing: ScreensharingSettingsResponse;\n\n  session: SessionSettingsResponse;\n\n  thumbnails: ThumbnailsSettingsResponse;\n\n  transcription: TranscriptionSettingsResponse;\n\n  video: VideoSettingsResponse;\n\n  ingress?: IngressSettingsResponse;\n}\n\nexport interface CastPollVoteRequest {\n  vote?: VoteData;\n}\n\nexport interface Channel {\n  auto_translation_language: string;\n\n  cid: string;\n\n  created_at: Date;\n\n  disabled: boolean;\n\n  frozen: boolean;\n\n  id: string;\n\n  type: string;\n\n  updated_at: Date;\n\n  custom: Record<string, any>;\n\n  auto_translation_enabled?: boolean;\n\n  cooldown?: number;\n\n  deleted_at?: Date;\n\n  last_campaigns?: string;\n\n  last_message_at?: Date;\n\n  member_count?: number;\n\n  message_count?: number;\n\n  message_count_updated_at?: Date;\n\n  team?: string;\n\n  active_live_locations?: SharedLocation[];\n\n  filter_tags?: string[];\n\n  invites?: ChannelMember[];\n\n  members?: ChannelMember[];\n\n  config?: ChannelConfig;\n\n  config_overrides?: ConfigOverrides;\n\n  created_by?: User;\n\n  members_lookup?: Record<string, ChannelMemberLookup>;\n\n  truncated_by?: User;\n}\n\nexport interface ChannelConfig {\n  automod: 'disabled' | 'simple' | 'AI';\n\n  automod_behavior: 'flag' | 'block' | 'shadow_block';\n\n  connect_events: boolean;\n\n  count_messages: boolean;\n\n  created_at: Date;\n\n  custom_events: boolean;\n\n  delivery_events: boolean;\n\n  mark_messages_pending: boolean;\n\n  max_message_length: number;\n\n  mutes: boolean;\n\n  name: string;\n\n  polls: boolean;\n\n  push_notifications: boolean;\n\n  quotes: boolean;\n\n  reactions: boolean;\n\n  read_events: boolean;\n\n  reminders: boolean;\n\n  replies: boolean;\n\n  search: boolean;\n\n  shared_locations: boolean;\n\n  skip_last_msg_update_for_system_msgs: boolean;\n\n  typing_events: boolean;\n\n  updated_at: Date;\n\n  uploads: boolean;\n\n  url_enrichment: boolean;\n\n  user_message_reminders: boolean;\n\n  commands: string[];\n\n  blocklist?: string;\n\n  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';\n\n  partition_size?: number;\n\n  partition_ttl?: number;\n\n  allowed_flag_reasons?: string[];\n\n  blocklists?: BlockListOptions[];\n\n  automod_thresholds?: Thresholds;\n}\n\nexport interface ChannelConfigWithInfo {\n  automod: 'disabled' | 'simple' | 'AI';\n\n  automod_behavior: 'flag' | 'block' | 'shadow_block';\n\n  connect_events: boolean;\n\n  count_messages: boolean;\n\n  created_at: Date;\n\n  custom_events: boolean;\n\n  delivery_events: boolean;\n\n  mark_messages_pending: boolean;\n\n  max_message_length: number;\n\n  mutes: boolean;\n\n  name: string;\n\n  polls: boolean;\n\n  push_notifications: boolean;\n\n  quotes: boolean;\n\n  reactions: boolean;\n\n  read_events: boolean;\n\n  reminders: boolean;\n\n  replies: boolean;\n\n  search: boolean;\n\n  shared_locations: boolean;\n\n  skip_last_msg_update_for_system_msgs: boolean;\n\n  typing_events: boolean;\n\n  updated_at: Date;\n\n  uploads: boolean;\n\n  url_enrichment: boolean;\n\n  user_message_reminders: boolean;\n\n  commands: Command[];\n\n  blocklist?: string;\n\n  blocklist_behavior?: 'flag' | 'block' | 'shadow_block';\n\n  partition_size?: number;\n\n  partition_ttl?: string;\n\n  allowed_flag_reasons?: string[];\n\n  blocklists?: BlockListOptions[];\n\n  automod_thresholds?: Thresholds;\n\n  grants?: Record<string, string[]>;\n}\n\nexport interface ChannelMember {\n  banned: boolean;\n\n  channel_role: string;\n\n  created_at: Date;\n\n  is_global_banned: boolean;\n\n  notifications_muted: boolean;\n\n  shadow_banned: boolean;\n\n  updated_at: Date;\n\n  custom: Record<string, any>;\n\n  archived_at?: Date;\n\n  ban_expires?: Date;\n\n  blocked?: boolean;\n\n  deleted_at?: Date;\n\n  hidden?: boolean;\n\n  invite_accepted_at?: Date;\n\n  invite_rejected_at?: Date;\n\n  invited?: boolean;\n\n  is_moderator?: boolean;\n\n  pinned_at?: Date;\n\n  status?: string;\n\n  user_id?: string;\n\n  deleted_messages?: string[];\n\n  channel?: DenormalizedChannelFields;\n\n  user?: User;\n}\n\nexport interface ChannelMemberLookup {\n  archived: boolean;\n\n  banned: boolean;\n\n  blocked: boolean;\n\n  hidden: boolean;\n\n  pinned: boolean;\n\n  archived_at?: Date;\n\n  ban_expires?: Date;\n\n  pinned_at?: Date;\n}\n\nexport interface ChannelMemberResponse {\n  banned: boolean;\n\n  channel_role: string;\n\n  created_at: Date;\n\n  notifications_muted: boolean;\n\n  shadow_banned: boolean;\n\n  updated_at: Date;\n\n  custom: Record<string, any>;\n\n  archived_at?: Date;\n\n  ban_expires?: Date;\n\n  deleted_at?: Date;\n\n  invite_accepted_at?: Date;\n\n  invite_rejected_at?: Date;\n\n  invited?: boolean;\n\n  is_moderator?: boolean;\n\n  pinned_at?: Date;\n\n  role?: 'member' | 'moderator' | 'admin' | 'owner';\n\n  status?: string;\n\n  user_id?: string;\n\n  deleted_messages?: string[];\n\n  user?: UserResponse;\n}\n\nexport interface ChannelMute {\n  created_at: Date;\n\n  updated_at: Date;\n\n  expires?: Date;\n\n  channel?: ChannelResponse;\n\n  user?: UserResponse;\n}\n\nexport const ChannelOwnCapability = {\n  BAN_CHANNEL_MEMBERS: 'ban-channel-members',\n  CAST_POLL_VOTE: 'cast-poll-vote',\n  CONNECT_EVENTS: 'connect-events',\n  CREATE_ATTACHMENT: 'create-attachment',\n  DELETE_ANY_MESSAGE: 'delete-any-message',\n  DELETE_CHANNEL: 'delete-channel',\n  DELETE_OWN_MESSAGE: 'delete-own-message',\n  DELIVERY_EVENTS: 'delivery-events',\n  FLAG_MESSAGE: 'flag-message',\n  FREEZE_CHANNEL: 'freeze-channel',\n  JOIN_CHANNEL: 'join-channel',\n  LEAVE_CHANNEL: 'leave-channel',\n  MUTE_CHANNEL: 'mute-channel',\n  PIN_MESSAGE: 'pin-message',\n  QUERY_POLL_VOTES: 'query-poll-votes',\n  QUOTE_MESSAGE: 'quote-message',\n  READ_EVENTS: 'read-events',\n  SEARCH_MESSAGES: 'search-messages',\n  SEND_CUSTOM_EVENTS: 'send-custom-events',\n  SEND_LINKS: 'send-links',\n  SEND_MESSAGE: 'send-message',\n  SEND_POLL: 'send-poll',\n  SEND_REACTION: 'send-reaction',\n  SEND_REPLY: 'send-reply',\n  SEND_RESTRICTED_VISIBILITY_MESSAGE: 'send-restricted-visibility-message',\n  SEND_TYPING_EVENTS: 'send-typing-events',\n  SET_CHANNEL_COOLDOWN: 'set-channel-cooldown',\n  SHARE_LOCATION: 'share-location',\n  SKIP_SLOW_MODE: 'skip-slow-mode',\n  SLOW_MODE: 'slow-mode',\n  TYPING_EVENTS: 'typing-events',\n  UPDATE_ANY_MESSAGE: 'update-any-message',\n  UPDATE_CHANNEL: 'update-channel',\n  UPDATE_CHANNEL_MEMBERS: 'update-channel-members',\n  UPDATE_OWN_MESSAGE: 'update-own-message',\n  UPDATE_THREAD: 'update-thread',\n  UPLOAD_FILE: 'upload-file',\n} as const;\n\nexport type ChannelOwnCapability =\n  (typeof ChannelOwnCapability)[keyof typeof ChannelOwnCapability];\n\nexport interface ChannelPushPreferences {\n  chat_level?: string;\n\n  disabled_until?: Date;\n}\n\nexport interface ChannelResponse {\n  cid: string;\n\n  created_at: Date;\n\n  disabled: boolean;\n\n  frozen: boolean;\n\n  id: string;\n\n  type: string;\n\n  updated_at: Date;\n\n  custom: Record<string, any>;\n\n  auto_translation_enabled?: boolean;\n\n  auto_translation_language?: string;\n\n  blocked?: boolean;\n\n  cooldown?: number;\n\n  deleted_at?: Date;\n\n  hidden?: boolean;\n\n  hide_messages_before?: Date;\n\n  last_message_at?: Date;\n\n  member_count?: number;\n\n  message_count?: number;\n\n  mute_expires_at?: Date;\n\n  muted?: boolean;\n\n  team?: string;\n\n  truncated_at?: Date;\n\n  filter_tags?: string[];\n\n  members?: ChannelMemberResponse[];\n\n  own_capabilities?: ChannelOwnCapability[];\n\n  config?: ChannelConfigWithInfo;\n\n  created_by?: UserResponse;\n\n  truncated_by?: UserResponse;\n}\n\nexport interface CollectionRequest {\n  name: string;\n\n  custom: Record<string, any>;\n\n  id?: string;\n}\n\nexport interface CollectionResponse {\n  id: string;\n\n  name: string;\n\n  created_at?: Date;\n\n  updated_at?: Date;\n\n  user_id?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface Command {\n  args: string;\n\n  description: string;\n\n  name: string;\n\n  set: string;\n\n  created_at?: Date;\n\n  updated_at?: Date;\n}\n\nexport interface CommentAddedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  comment: CommentResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface CommentDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  comment: CommentResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface CommentReactionAddedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  comment: CommentResponse;\n\n  custom: Record<string, any>;\n\n  reaction: FeedsReactionResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface CommentReactionDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  comment: CommentResponse;\n\n  custom: Record<string, any>;\n\n  reaction: FeedsReactionResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface CommentReactionUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  activity: ActivityResponse;\n\n  comment: CommentResponse;\n\n  custom: Record<string, any>;\n\n  reaction: FeedsReactionResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface CommentResponse {\n  confidence_score: number;\n\n  created_at: Date;\n\n  downvote_count: number;\n\n  id: string;\n\n  object_id: string;\n\n  object_type: string;\n\n  reaction_count: number;\n\n  reply_count: number;\n\n  score: number;\n\n  status: string;\n\n  updated_at: Date;\n\n  upvote_count: number;\n\n  mentioned_users: UserResponse[];\n\n  own_reactions: FeedsReactionResponse[];\n\n  user: UserResponse;\n\n  controversy_score?: number;\n\n  deleted_at?: Date;\n\n  parent_id?: string;\n\n  text?: string;\n\n  attachments?: Attachment[];\n\n  latest_reactions?: FeedsReactionResponse[];\n\n  custom?: Record<string, any>;\n\n  moderation?: ModerationV2Response;\n\n  reaction_groups?: Record<string, ReactionGroupResponse>;\n}\n\nexport interface CommentUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  comment: CommentResponse;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface ConfigOverrides {\n  commands: string[];\n\n  grants: Record<string, string[]>;\n\n  blocklist?: string;\n\n  blocklist_behavior?: 'flag' | 'block';\n\n  count_messages?: boolean;\n\n  max_message_length?: number;\n\n  quotes?: boolean;\n\n  reactions?: boolean;\n\n  replies?: boolean;\n\n  shared_locations?: boolean;\n\n  typing_events?: boolean;\n\n  uploads?: boolean;\n\n  url_enrichment?: boolean;\n\n  user_message_reminders?: boolean;\n}\n\nexport interface ConfigResponse {\n  async: boolean;\n\n  created_at: Date;\n\n  key: string;\n\n  team: string;\n\n  updated_at: Date;\n\n  supported_video_call_harm_types: string[];\n\n  ai_image_config?: AIImageConfig;\n\n  ai_text_config?: AITextConfig;\n\n  ai_video_config?: AIVideoConfig;\n\n  automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;\n\n  automod_semantic_filters_config?: AutomodSemanticFiltersConfig;\n\n  automod_toxicity_config?: AutomodToxicityConfig;\n\n  block_list_config?: BlockListConfig;\n\n  llm_config?: LLMConfig;\n\n  velocity_filter_config?: VelocityFilterConfig;\n\n  video_call_rule_config?: VideoCallRuleConfig;\n}\n\nexport interface ConnectUserDetailsRequest {\n  id: string;\n\n  image?: string;\n\n  invisible?: boolean;\n\n  language?: string;\n\n  name?: string;\n\n  custom?: Record<string, any>;\n\n  privacy_settings?: PrivacySettingsResponse;\n}\n\nexport interface ContentCountRuleParameters {\n  threshold?: number;\n\n  time_window?: string;\n}\n\nexport interface CreateBlockListRequest {\n  name: string;\n\n  words: string[];\n\n  is_leet_check_enabled?: boolean;\n\n  is_plural_check_enabled?: boolean;\n\n  team?: string;\n\n  type?:\n    | 'regex'\n    | 'domain'\n    | 'domain_allowlist'\n    | 'email'\n    | 'email_allowlist'\n    | 'word';\n}\n\nexport interface CreateBlockListResponse {\n  duration: string;\n\n  blocklist?: BlockListResponse;\n}\n\nexport interface CreateCollectionsRequest {\n  collections: CollectionRequest[];\n}\n\nexport interface CreateCollectionsResponse {\n  duration: string;\n\n  collections: CollectionResponse[];\n}\n\nexport interface CreateDeviceRequest {\n  id: string;\n\n  push_provider: 'firebase' | 'apn' | 'huawei' | 'xiaomi';\n\n  push_provider_name?: string;\n\n  voip_token?: boolean;\n}\n\nexport interface CreateFeedsBatchRequest {\n  feeds: FeedRequest[];\n}\n\nexport interface CreateFeedsBatchResponse {\n  duration: string;\n\n  feeds: FeedResponse[];\n}\n\nexport interface CreateGuestRequest {\n  user: UserRequest;\n}\n\nexport interface CreateGuestResponse {\n  access_token: string;\n\n  duration: string;\n\n  user: UserResponse;\n}\n\nexport interface CreatePollOptionRequest {\n  text: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface CreatePollRequest {\n  name: string;\n\n  allow_answers?: boolean;\n\n  allow_user_suggested_options?: boolean;\n\n  description?: string;\n\n  enforce_unique_vote?: boolean;\n\n  id?: string;\n\n  is_closed?: boolean;\n\n  max_votes_allowed?: number;\n\n  voting_visibility?: 'anonymous' | 'public';\n\n  options?: PollOptionInput[];\n\n  custom?: Record<string, any>;\n}\n\nexport interface CustomActionRequest {\n  id?: string;\n\n  options?: Record<string, any>;\n}\n\nexport interface Data {\n  id: string;\n}\n\nexport interface DecayFunctionConfig {\n  base?: string;\n\n  decay?: string;\n\n  direction?: string;\n\n  offset?: string;\n\n  origin?: string;\n\n  scale?: string;\n}\n\nexport interface DeleteActivitiesRequest {\n  ids: string[];\n\n  hard_delete?: boolean;\n}\n\nexport interface DeleteActivitiesResponse {\n  duration: string;\n\n  deleted_ids: string[];\n}\n\nexport interface DeleteActivityReactionResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n\n  reaction: FeedsReactionResponse;\n}\n\nexport interface DeleteActivityRequest {\n  hard_delete?: boolean;\n\n  reason?: string;\n}\n\nexport interface DeleteActivityResponse {\n  duration: string;\n}\n\nexport interface DeleteBookmarkFolderResponse {\n  duration: string;\n}\n\nexport interface DeleteBookmarkResponse {\n  duration: string;\n\n  bookmark: BookmarkResponse;\n}\n\nexport interface DeleteCollectionsResponse {\n  duration: string;\n}\n\nexport interface DeleteCommentReactionResponse {\n  duration: string;\n\n  comment: CommentResponse;\n\n  reaction: FeedsReactionResponse;\n}\n\nexport interface DeleteCommentRequest {\n  hard_delete?: boolean;\n\n  reason?: string;\n}\n\nexport interface DeleteCommentResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n\n  comment: CommentResponse;\n}\n\nexport interface DeleteFeedResponse {\n  duration: string;\n\n  task_id: string;\n}\n\nexport interface DeleteMessageRequest {\n  hard_delete?: boolean;\n\n  reason?: string;\n}\n\nexport interface DeleteModerationConfigResponse {\n  duration: string;\n}\n\nexport interface DeleteReactionRequest {\n  hard_delete?: boolean;\n\n  reason?: string;\n}\n\nexport interface DeleteUserRequest {\n  delete_conversation_channels?: boolean;\n\n  delete_feeds_content?: boolean;\n\n  hard_delete?: boolean;\n\n  mark_messages_deleted?: boolean;\n\n  reason?: string;\n}\n\nexport interface DeliveryReceipts {\n  enabled: boolean;\n}\n\nexport interface DeliveryReceiptsResponse {\n  enabled: boolean;\n}\n\nexport interface DenormalizedChannelFields {\n  created_at?: string;\n\n  created_by_id?: string;\n\n  disabled?: boolean;\n\n  frozen?: boolean;\n\n  id?: string;\n\n  last_message_at?: string;\n\n  member_count?: number;\n\n  team?: string;\n\n  type?: string;\n\n  updated_at?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface Device {\n  created_at: Date;\n\n  id: string;\n\n  push_provider: 'firebase' | 'apn' | 'huawei' | 'xiaomi';\n\n  user_id: string;\n\n  disabled?: boolean;\n\n  disabled_reason?: string;\n\n  push_provider_name?: string;\n\n  voip?: boolean;\n}\n\nexport interface DeviceResponse {\n  created_at: Date;\n\n  id: string;\n\n  push_provider: string;\n\n  user_id: string;\n\n  disabled?: boolean;\n\n  disabled_reason?: string;\n\n  push_provider_name?: string;\n\n  voip?: boolean;\n}\n\nexport interface DraftPayloadResponse {\n  id: string;\n\n  text: string;\n\n  custom: Record<string, any>;\n\n  html?: string;\n\n  mml?: string;\n\n  parent_id?: string;\n\n  poll_id?: string;\n\n  quoted_message_id?: string;\n\n  show_in_channel?: boolean;\n\n  silent?: boolean;\n\n  type?: string;\n\n  attachments?: Attachment[];\n\n  mentioned_users?: UserResponse[];\n}\n\nexport interface DraftResponse {\n  channel_cid: string;\n\n  created_at: Date;\n\n  message: DraftPayloadResponse;\n\n  parent_id?: string;\n\n  channel?: ChannelResponse;\n\n  parent_message?: MessageResponse;\n\n  quoted_message?: MessageResponse;\n}\n\nexport interface EgressHLSResponse {\n  playlist_url: string;\n\n  status: string;\n}\n\nexport interface EgressRTMPResponse {\n  name: string;\n\n  started_at: Date;\n\n  stream_key?: string;\n\n  stream_url?: string;\n}\n\nexport interface EgressResponse {\n  broadcasting: boolean;\n\n  rtmps: EgressRTMPResponse[];\n\n  frame_recording?: FrameRecordingResponse;\n\n  hls?: EgressHLSResponse;\n}\n\nexport interface EnrichedActivity {\n  foreign_id?: string;\n\n  id?: string;\n\n  score?: number;\n\n  verb?: string;\n\n  to?: string[];\n\n  actor?: Data;\n\n  latest_reactions?: Record<string, EnrichedReaction[]>;\n\n  object?: Data;\n\n  origin?: Data;\n\n  own_reactions?: Record<string, EnrichedReaction[]>;\n\n  reaction_counts?: Record<string, number>;\n\n  target?: Data;\n}\n\nexport interface EnrichedCollectionResponse {\n  id: string;\n\n  name: string;\n\n  status: 'ok' | 'notfound';\n\n  created_at?: Date;\n\n  updated_at?: Date;\n\n  user_id?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface EnrichedReaction {\n  activity_id: string;\n\n  kind: string;\n\n  user_id: string;\n\n  id?: string;\n\n  parent?: string;\n\n  target_feeds?: string[];\n\n  children_counts?: Record<string, number>;\n\n  created_at?: Time;\n\n  data?: Record<string, any>;\n\n  latest_children?: Record<string, EnrichedReaction[]>;\n\n  own_children?: Record<string, EnrichedReaction[]>;\n\n  updated_at?: Time;\n\n  user?: Data;\n}\n\nexport interface EnrichmentOptions {\n  skip_activity?: boolean;\n\n  skip_activity_collections?: boolean;\n\n  skip_activity_comments?: boolean;\n\n  skip_activity_current_feed?: boolean;\n\n  skip_activity_mentioned_users?: boolean;\n\n  skip_activity_own_bookmarks?: boolean;\n\n  skip_activity_parents?: boolean;\n\n  skip_activity_poll?: boolean;\n\n  skip_activity_reactions?: boolean;\n\n  skip_activity_refresh_image_urls?: boolean;\n\n  skip_all?: boolean;\n\n  skip_feed_member_user?: boolean;\n\n  skip_followers?: boolean;\n\n  skip_following?: boolean;\n\n  skip_own_capabilities?: boolean;\n\n  skip_own_follows?: boolean;\n\n  skip_pins?: boolean;\n}\n\nexport interface EntityCreatorResponse {\n  ban_count: number;\n\n  banned: boolean;\n\n  created_at: Date;\n\n  deleted_content_count: number;\n\n  flagged_count: number;\n\n  id: string;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  updated_at: Date;\n\n  blocked_user_ids: string[];\n\n  teams: string[];\n\n  custom: Record<string, any>;\n\n  avg_response_time?: number;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  image?: string;\n\n  last_active?: Date;\n\n  name?: string;\n\n  revoke_tokens_issued_before?: Date;\n\n  teams_role?: Record<string, string>;\n}\n\nexport interface FeedCreatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  members: FeedMemberResponse[];\n\n  custom: Record<string, any>;\n\n  feed: FeedResponse;\n\n  user: UserResponseCommonFields;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface FeedDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface FeedGroup {\n  aggregation_version: number;\n\n  app_pk: number;\n\n  created_at: Date;\n\n  default_visibility: string;\n\n  group_id: string;\n\n  updated_at: Date;\n\n  activity_processors: ActivityProcessorConfig[];\n\n  activity_selectors: ActivitySelectorConfig[];\n\n  custom: Record<string, any>;\n\n  deleted_at?: Date;\n\n  last_feed_get_at?: Date;\n\n  aggregation?: AggregationConfig;\n\n  notification?: NotificationConfig;\n\n  push_notification?: PushNotificationConfig;\n\n  ranking?: RankingConfig;\n\n  stories?: StoriesConfig;\n}\n\nexport interface FeedGroupChangedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  feed_group?: FeedGroup;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface FeedGroupDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  group_id: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface FeedInput {\n  description?: string;\n\n  name?: string;\n\n  visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';\n\n  filter_tags?: string[];\n\n  members?: FeedMemberRequest[];\n\n  custom?: Record<string, any>;\n}\n\nexport interface FeedMemberAddedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  member: FeedMemberResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface FeedMemberRemovedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  member_id: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface FeedMemberRequest {\n  user_id: string;\n\n  invite?: boolean;\n\n  membership_level?: string;\n\n  role?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface FeedMemberResponse {\n  created_at: Date;\n\n  role: string;\n\n  status: 'member' | 'pending' | 'rejected';\n\n  updated_at: Date;\n\n  user: UserResponse;\n\n  invite_accepted_at?: Date;\n\n  invite_rejected_at?: Date;\n\n  custom?: Record<string, any>;\n\n  membership_level?: MembershipLevelResponse;\n}\n\nexport interface FeedMemberUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  member: FeedMemberResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport const FeedOwnCapability = {\n  ADD_ACTIVITY: 'add-activity',\n  ADD_ACTIVITY_BOOKMARK: 'add-activity-bookmark',\n  ADD_ACTIVITY_REACTION: 'add-activity-reaction',\n  ADD_COMMENT: 'add-comment',\n  ADD_COMMENT_REACTION: 'add-comment-reaction',\n  CREATE_FEED: 'create-feed',\n  DELETE_ANY_ACTIVITY: 'delete-any-activity',\n  DELETE_ANY_COMMENT: 'delete-any-comment',\n  DELETE_FEED: 'delete-feed',\n  DELETE_OWN_ACTIVITY: 'delete-own-activity',\n  DELETE_OWN_ACTIVITY_BOOKMARK: 'delete-own-activity-bookmark',\n  DELETE_OWN_ACTIVITY_REACTION: 'delete-own-activity-reaction',\n  DELETE_OWN_COMMENT: 'delete-own-comment',\n  DELETE_OWN_COMMENT_REACTION: 'delete-own-comment-reaction',\n  FOLLOW: 'follow',\n  PIN_ACTIVITY: 'pin-activity',\n  QUERY_FEED_MEMBERS: 'query-feed-members',\n  QUERY_FOLLOWS: 'query-follows',\n  READ_ACTIVITIES: 'read-activities',\n  READ_FEED: 'read-feed',\n  UNFOLLOW: 'unfollow',\n  UPDATE_ANY_ACTIVITY: 'update-any-activity',\n  UPDATE_ANY_COMMENT: 'update-any-comment',\n  UPDATE_FEED: 'update-feed',\n  UPDATE_FEED_FOLLOWERS: 'update-feed-followers',\n  UPDATE_FEED_MEMBERS: 'update-feed-members',\n  UPDATE_OWN_ACTIVITY: 'update-own-activity',\n  UPDATE_OWN_ACTIVITY_BOOKMARK: 'update-own-activity-bookmark',\n  UPDATE_OWN_COMMENT: 'update-own-comment',\n} as const;\n\nexport type FeedOwnCapability =\n  (typeof FeedOwnCapability)[keyof typeof FeedOwnCapability];\n\nexport interface FeedRequest {\n  feed_group_id: string;\n\n  feed_id: string;\n\n  created_by_id?: string;\n\n  description?: string;\n\n  name?: string;\n\n  visibility?: 'public' | 'visible' | 'followers' | 'members' | 'private';\n\n  filter_tags?: string[];\n\n  members?: FeedMemberRequest[];\n\n  custom?: Record<string, any>;\n}\n\nexport interface FeedResponse {\n  activity_count: number;\n\n  created_at: Date;\n\n  description: string;\n\n  feed: string;\n\n  follower_count: number;\n\n  following_count: number;\n\n  group_id: string;\n\n  id: string;\n\n  member_count: number;\n\n  name: string;\n\n  pin_count: number;\n\n  updated_at: Date;\n\n  created_by: UserResponse;\n\n  deleted_at?: Date;\n\n  visibility?: string;\n\n  filter_tags?: string[];\n\n  own_capabilities?: FeedOwnCapability[];\n\n  own_follows?: FollowResponse[];\n\n  custom?: Record<string, any>;\n\n  own_membership?: FeedMemberResponse;\n}\n\nexport interface FeedSuggestionResponse {\n  activity_count: number;\n\n  created_at: Date;\n\n  description: string;\n\n  feed: string;\n\n  follower_count: number;\n\n  following_count: number;\n\n  group_id: string;\n\n  id: string;\n\n  member_count: number;\n\n  name: string;\n\n  pin_count: number;\n\n  updated_at: Date;\n\n  created_by: UserResponse;\n\n  deleted_at?: Date;\n\n  reason?: string;\n\n  recommendation_score?: number;\n\n  visibility?: string;\n\n  filter_tags?: string[];\n\n  own_capabilities?: FeedOwnCapability[];\n\n  own_follows?: FollowResponse[];\n\n  algorithm_scores?: Record<string, number>;\n\n  custom?: Record<string, any>;\n\n  own_membership?: FeedMemberResponse;\n}\n\nexport interface FeedUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  feed: FeedResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface FeedsPreferences {\n  comment?: 'all' | 'none';\n\n  comment_reaction?: 'all' | 'none';\n\n  comment_reply?: 'all' | 'none';\n\n  follow?: 'all' | 'none';\n\n  mention?: 'all' | 'none';\n\n  reaction?: 'all' | 'none';\n\n  custom_activity_types?: Record<string, string>;\n}\n\nexport interface FeedsPreferencesResponse {\n  comment?: string;\n\n  comment_reaction?: string;\n\n  follow?: string;\n\n  mention?: string;\n\n  reaction?: string;\n\n  custom_activity_types?: Record<string, string>;\n}\n\nexport interface FeedsReactionResponse {\n  activity_id: string;\n\n  created_at: Date;\n\n  type: string;\n\n  updated_at: Date;\n\n  user: UserResponse;\n\n  comment_id?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface Field {\n  short: boolean;\n\n  title: string;\n\n  value: string;\n}\n\nexport interface FileUploadConfig {\n  size_limit: number;\n\n  allowed_file_extensions: string[];\n\n  allowed_mime_types: string[];\n\n  blocked_file_extensions: string[];\n\n  blocked_mime_types: string[];\n}\n\nexport interface FileUploadRequest {\n  file?: string;\n\n  user?: OnlyUserID;\n}\n\nexport interface FileUploadResponse {\n  duration: string;\n\n  file?: string;\n\n  thumb_url?: string;\n}\n\nexport interface FilterConfigResponse {\n  llm_labels: string[];\n\n  ai_text_labels?: string[];\n}\n\nexport interface FlagCountRuleParameters {\n  threshold?: number;\n}\n\nexport interface FlagRequest {\n  entity_id: string;\n\n  entity_type: string;\n\n  entity_creator_id?: string;\n\n  reason?: string;\n\n  custom?: Record<string, any>;\n\n  moderation_payload?: ModerationPayload;\n}\n\nexport interface FlagResponse {\n  duration: string;\n\n  item_id: string;\n}\n\nexport interface FlagUserOptions {\n  reason?: string;\n}\n\nexport interface FollowBatchRequest {\n  follows: FollowRequest[];\n}\n\nexport interface FollowBatchResponse {\n  duration: string;\n\n  follows: FollowResponse[];\n}\n\nexport interface FollowCreatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  follow: FollowResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface FollowDeletedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  follow: FollowResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface FollowRequest {\n  source: string;\n\n  target: string;\n\n  create_notification_activity?: boolean;\n\n  push_preference?: 'all' | 'none';\n\n  skip_push?: boolean;\n\n  custom?: Record<string, any>;\n}\n\nexport interface FollowResponse {\n  created_at: Date;\n\n  follower_role: string;\n\n  push_preference: 'all' | 'none';\n\n  status: 'accepted' | 'pending' | 'rejected';\n\n  updated_at: Date;\n\n  source_feed: FeedResponse;\n\n  target_feed: FeedResponse;\n\n  request_accepted_at?: Date;\n\n  request_rejected_at?: Date;\n\n  custom?: Record<string, any>;\n}\n\nexport interface FollowUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  follow: FollowResponse;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface FrameRecordingResponse {\n  status: string;\n}\n\nexport interface FrameRecordingSettingsResponse {\n  capture_interval_in_seconds: number;\n\n  mode: 'available' | 'disabled' | 'auto-on';\n\n  quality?: string;\n}\n\nexport interface FullUserResponse {\n  banned: boolean;\n\n  created_at: Date;\n\n  id: string;\n\n  invisible: boolean;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  shadow_banned: boolean;\n\n  total_unread_count: number;\n\n  unread_channels: number;\n\n  unread_count: number;\n\n  unread_threads: number;\n\n  updated_at: Date;\n\n  blocked_user_ids: string[];\n\n  channel_mutes: ChannelMute[];\n\n  devices: DeviceResponse[];\n\n  mutes: UserMuteResponse[];\n\n  teams: string[];\n\n  custom: Record<string, any>;\n\n  avg_response_time?: number;\n\n  ban_expires?: Date;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  image?: string;\n\n  last_active?: Date;\n\n  name?: string;\n\n  revoke_tokens_issued_before?: Date;\n\n  latest_hidden_channels?: string[];\n\n  privacy_settings?: PrivacySettingsResponse;\n\n  teams_role?: Record<string, string>;\n}\n\nexport interface GeofenceSettingsResponse {\n  names: string[];\n}\n\nexport interface GetActivityResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n}\n\nexport interface GetApplicationResponse {\n  duration: string;\n\n  app: AppResponseFields;\n}\n\nexport interface GetBlockedUsersResponse {\n  duration: string;\n\n  blocks: BlockedUserResponse[];\n}\n\nexport interface GetCommentRepliesResponse {\n  duration: string;\n\n  comments: ThreadedCommentResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface GetCommentResponse {\n  duration: string;\n\n  comment: CommentResponse;\n}\n\nexport interface GetCommentsResponse {\n  duration: string;\n\n  comments: ThreadedCommentResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface GetConfigResponse {\n  duration: string;\n\n  config?: ConfigResponse;\n}\n\nexport interface GetFollowSuggestionsResponse {\n  duration: string;\n\n  suggestions: FeedSuggestionResponse[];\n\n  algorithm_used?: string;\n}\n\nexport interface GetOGResponse {\n  duration: string;\n\n  custom: Record<string, any>;\n\n  asset_url?: string;\n\n  author_icon?: string;\n\n  author_link?: string;\n\n  author_name?: string;\n\n  color?: string;\n\n  fallback?: string;\n\n  footer?: string;\n\n  footer_icon?: string;\n\n  image_url?: string;\n\n  og_scrape_url?: string;\n\n  original_height?: number;\n\n  original_width?: number;\n\n  pretext?: string;\n\n  text?: string;\n\n  thumb_url?: string;\n\n  title?: string;\n\n  title_link?: string;\n\n  type?: string;\n\n  actions?: Action[];\n\n  fields?: Field[];\n\n  giphy?: Images;\n}\n\nexport interface GetOrCreateFeedRequest {\n  id_around?: string;\n\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  view?: string;\n\n  watch?: boolean;\n\n  data?: FeedInput;\n\n  enrichment_options?: EnrichmentOptions;\n\n  external_ranking?: Record<string, any>;\n\n  filter?: Record<string, any>;\n\n  followers_pagination?: PagerRequest;\n\n  following_pagination?: PagerRequest;\n\n  interest_weights?: Record<string, number>;\n\n  member_pagination?: PagerRequest;\n}\n\nexport interface GetOrCreateFeedResponse {\n  created: boolean;\n\n  duration: string;\n\n  activities: ActivityResponse[];\n\n  aggregated_activities: AggregatedActivityResponse[];\n\n  followers: FollowResponse[];\n\n  following: FollowResponse[];\n\n  members: FeedMemberResponse[];\n\n  pinned_activities: ActivityPinResponse[];\n\n  feed: FeedResponse;\n\n  next?: string;\n\n  prev?: string;\n\n  followers_pagination?: PagerResponse;\n\n  following_pagination?: PagerResponse;\n\n  member_pagination?: PagerResponse;\n\n  notification_status?: NotificationStatusResponse;\n}\n\nexport interface GoogleVisionConfig {\n  enabled?: boolean;\n}\n\nexport interface HLSSettingsResponse {\n  auto_on: boolean;\n\n  enabled: boolean;\n\n  quality_tracks: string[];\n}\n\nexport interface HarmConfig {\n  cooldown_period: number;\n\n  severity: number;\n\n  threshold: number;\n\n  action_sequences: ActionSequence[];\n\n  harm_types: string[];\n}\n\nexport interface HealthCheckEvent {\n  connection_id: string;\n\n  created_at: Date;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  cid?: string;\n\n  received_at?: Date;\n\n  me?: OwnUserResponse;\n}\n\nexport interface ImageContentParameters {\n  harm_labels?: string[];\n}\n\nexport interface ImageData {\n  frames: string;\n\n  height: string;\n\n  size: string;\n\n  url: string;\n\n  width: string;\n}\n\nexport interface ImageRuleParameters {\n  threshold?: number;\n\n  time_window?: string;\n\n  harm_labels?: string[];\n}\n\nexport interface ImageSize {\n  crop?: 'top' | 'bottom' | 'left' | 'right' | 'center';\n\n  height?: number;\n\n  resize?: 'clip' | 'crop' | 'scale' | 'fill';\n\n  width?: number;\n}\n\nexport interface ImageUploadRequest {\n  file?: string;\n\n  upload_sizes?: ImageSize[];\n\n  user?: OnlyUserID;\n}\n\nexport interface ImageUploadResponse {\n  duration: string;\n\n  file?: string;\n\n  thumb_url?: string;\n\n  upload_sizes?: ImageSize[];\n}\n\nexport interface Images {\n  fixed_height: ImageData;\n\n  fixed_height_downsampled: ImageData;\n\n  fixed_height_still: ImageData;\n\n  fixed_width: ImageData;\n\n  fixed_width_downsampled: ImageData;\n\n  fixed_width_still: ImageData;\n\n  original: ImageData;\n}\n\nexport interface IngressAudioEncodingResponse {\n  bitrate: number;\n\n  channels: number;\n\n  enable_dtx: boolean;\n}\n\nexport interface IngressSettingsResponse {\n  enabled: boolean;\n\n  audio_encoding_options?: IngressAudioEncodingResponse;\n\n  video_encoding_options?: Record<string, IngressVideoEncodingResponse>;\n}\n\nexport interface IngressSourceResponse {\n  fps: number;\n\n  height: number;\n\n  width: number;\n}\n\nexport interface IngressVideoEncodingResponse {\n  layers: IngressVideoLayerResponse[];\n\n  source: IngressSourceResponse;\n}\n\nexport interface IngressVideoLayerResponse {\n  bitrate: number;\n\n  codec: string;\n\n  frame_rate_limit: number;\n\n  max_dimension: number;\n\n  min_dimension: number;\n}\n\nexport interface LLMConfig {\n  enabled: boolean;\n\n  rules: LLMRule[];\n\n  app_context?: string;\n\n  async?: boolean;\n\n  severity_descriptions?: Record<string, string>;\n}\n\nexport interface LLMRule {\n  action:\n    | 'flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove'\n    | 'keep';\n\n  description: string;\n\n  label: string;\n\n  severity_rules: BodyguardSeverityRule[];\n}\n\nexport interface LabelThresholds {\n  block?: number;\n\n  flag?: number;\n}\n\nexport interface LimitsSettingsResponse {\n  max_participants_exclude_roles: string[];\n\n  max_duration_seconds?: number;\n\n  max_participants?: number;\n\n  max_participants_exclude_owner?: boolean;\n}\n\nexport interface ListBlockListResponse {\n  duration: string;\n\n  blocklists: BlockListResponse[];\n}\n\nexport interface ListDevicesResponse {\n  duration: string;\n\n  devices: DeviceResponse[];\n}\n\nexport interface MarkActivityRequest {\n  mark_all_read?: boolean;\n\n  mark_all_seen?: boolean;\n\n  mark_read?: string[];\n\n  mark_seen?: string[];\n\n  mark_watched?: string[];\n}\n\nexport interface MarkReviewedRequest {\n  content_to_mark_as_reviewed_limit?: number;\n\n  disable_marking_content_as_reviewed?: boolean;\n}\n\nexport interface MembershipLevelResponse {\n  created_at: Date;\n\n  id: string;\n\n  name: string;\n\n  priority: number;\n\n  updated_at: Date;\n\n  tags: string[];\n\n  description?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface Message {\n  cid: string;\n\n  created_at: Date;\n\n  deleted_reply_count: number;\n\n  html: string;\n\n  id: string;\n\n  pinned: boolean;\n\n  reply_count: number;\n\n  shadowed: boolean;\n\n  silent: boolean;\n\n  text: string;\n\n  type: string;\n\n  updated_at: Date;\n\n  attachments: Attachment[];\n\n  latest_reactions: Reaction[];\n\n  mentioned_users: User[];\n\n  own_reactions: Reaction[];\n\n  restricted_visibility: string[];\n\n  custom: Record<string, any>;\n\n  reaction_counts: Record<string, number>;\n\n  reaction_groups: Record<string, ReactionGroupResponse>;\n\n  reaction_scores: Record<string, number>;\n\n  before_message_send_failed?: boolean;\n\n  command?: string;\n\n  deleted_at?: Date;\n\n  deleted_for_me?: boolean;\n\n  message_text_updated_at?: Date;\n\n  mml?: string;\n\n  parent_id?: string;\n\n  pin_expires?: Date;\n\n  pinned_at?: Date;\n\n  poll_id?: string;\n\n  quoted_message_id?: string;\n\n  show_in_channel?: boolean;\n\n  thread_participants?: User[];\n\n  i18n?: Record<string, string>;\n\n  image_labels?: Record<string, string[]>;\n\n  member?: ChannelMember;\n\n  moderation?: ModerationV2Response;\n\n  pinned_by?: User;\n\n  poll?: Poll;\n\n  quoted_message?: Message;\n\n  reminder?: MessageReminder;\n\n  shared_location?: SharedLocation;\n\n  user?: User;\n}\n\nexport interface MessageReminder {\n  channel_cid: string;\n\n  created_at: Date;\n\n  message_id: string;\n\n  task_id: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  remind_at?: Date;\n\n  channel?: Channel;\n\n  message?: Message;\n\n  user?: User;\n}\n\nexport interface MessageResponse {\n  cid: string;\n\n  created_at: Date;\n\n  deleted_reply_count: number;\n\n  html: string;\n\n  id: string;\n\n  pinned: boolean;\n\n  reply_count: number;\n\n  shadowed: boolean;\n\n  silent: boolean;\n\n  text: string;\n\n  type: 'regular' | 'ephemeral' | 'error' | 'reply' | 'system' | 'deleted';\n\n  updated_at: Date;\n\n  attachments: Attachment[];\n\n  latest_reactions: ReactionResponse[];\n\n  mentioned_users: UserResponse[];\n\n  own_reactions: ReactionResponse[];\n\n  restricted_visibility: string[];\n\n  custom: Record<string, any>;\n\n  reaction_counts: Record<string, number>;\n\n  reaction_scores: Record<string, number>;\n\n  user: UserResponse;\n\n  command?: string;\n\n  deleted_at?: Date;\n\n  deleted_for_me?: boolean;\n\n  message_text_updated_at?: Date;\n\n  mml?: string;\n\n  parent_id?: string;\n\n  pin_expires?: Date;\n\n  pinned_at?: Date;\n\n  poll_id?: string;\n\n  quoted_message_id?: string;\n\n  show_in_channel?: boolean;\n\n  thread_participants?: UserResponse[];\n\n  draft?: DraftResponse;\n\n  i18n?: Record<string, string>;\n\n  image_labels?: Record<string, string[]>;\n\n  member?: ChannelMemberResponse;\n\n  moderation?: ModerationV2Response;\n\n  pinned_by?: UserResponse;\n\n  poll?: PollResponseData;\n\n  quoted_message?: MessageResponse;\n\n  reaction_groups?: Record<string, ReactionGroupResponse>;\n\n  reminder?: ReminderResponseData;\n\n  shared_location?: SharedLocationResponseData;\n}\n\nexport interface ModerationActionConfig {\n  action: string;\n\n  description: string;\n\n  entity_type: string;\n\n  icon: string;\n\n  order: number;\n\n  custom: Record<string, any>;\n}\n\nexport interface ModerationCustomActionEvent {\n  action_id: string;\n\n  created_at: Date;\n\n  custom: Record<string, any>;\n\n  review_queue_item: ReviewQueueItemResponse;\n\n  type: string;\n\n  received_at?: Date;\n\n  action_options?: Record<string, any>;\n\n  message?: MessageResponse;\n}\n\nexport interface ModerationFlagResponse {\n  created_at: Date;\n\n  entity_id: string;\n\n  entity_type: string;\n\n  type: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  result: Array<Record<string, any>>;\n\n  entity_creator_id?: string;\n\n  reason?: string;\n\n  review_queue_item_id?: string;\n\n  labels?: string[];\n\n  custom?: Record<string, any>;\n\n  moderation_payload?: ModerationPayload;\n\n  review_queue_item?: ReviewQueueItemResponse;\n\n  user?: UserResponse;\n}\n\nexport interface ModerationFlaggedEvent {\n  created_at: Date;\n\n  type: string;\n\n  item?: string;\n\n  object_id?: string;\n\n  user?: User;\n}\n\nexport interface ModerationMarkReviewedEvent {\n  created_at: Date;\n\n  custom: Record<string, any>;\n\n  item: ReviewQueueItemResponse;\n\n  type: string;\n\n  received_at?: Date;\n\n  message?: MessageResponse;\n}\n\nexport interface ModerationPayload {\n  images?: string[];\n\n  texts?: string[];\n\n  videos?: string[];\n\n  custom?: Record<string, any>;\n}\n\nexport interface ModerationV2Response {\n  action: string;\n\n  original_text: string;\n\n  blocklist_matched?: string;\n\n  platform_circumvented?: boolean;\n\n  semantic_filter_matched?: string;\n\n  image_harms?: string[];\n\n  text_harms?: string[];\n}\n\nexport interface MuteRequest {\n  target_ids: string[];\n\n  timeout?: number;\n}\n\nexport interface MuteResponse {\n  duration: string;\n\n  mutes?: UserMute[];\n\n  non_existing_users?: string[];\n\n  own_user?: OwnUser;\n}\n\nexport interface NoiseCancellationSettings {\n  mode: 'available' | 'disabled' | 'auto-on';\n}\n\nexport interface NotificationComment {\n  comment: string;\n\n  id: string;\n\n  user_id: string;\n\n  attachments?: Attachment[];\n}\n\nexport interface NotificationConfig {\n  deduplication_window?: string;\n\n  track_read?: boolean;\n\n  track_seen?: boolean;\n}\n\nexport interface NotificationContext {\n  target?: NotificationTarget;\n\n  trigger?: NotificationTrigger;\n}\n\nexport interface NotificationFeedUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  aggregated_activities?: AggregatedActivityResponse[];\n\n  notification_status?: NotificationStatusResponse;\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface NotificationStatusResponse {\n  unread: number;\n\n  unseen: number;\n\n  last_read_at?: Date;\n\n  last_seen_at?: Date;\n\n  read_activities?: string[];\n\n  seen_activities?: string[];\n}\n\nexport interface NotificationTarget {\n  id: string;\n\n  name?: string;\n\n  text?: string;\n\n  type?: string;\n\n  user_id?: string;\n\n  attachments?: Attachment[];\n\n  comment?: NotificationComment;\n}\n\nexport interface NotificationTrigger {\n  text: string;\n\n  type: string;\n\n  comment?: NotificationComment;\n}\n\nexport interface OCRRule {\n  action:\n    | 'flag'\n    | 'shadow'\n    | 'remove'\n    | 'bounce'\n    | 'bounce_flag'\n    | 'bounce_remove';\n\n  label: string;\n}\n\nexport interface OnlyUserID {\n  id: string;\n}\n\nexport interface OwnCapabilitiesBatchRequest {\n  feeds: string[];\n}\n\nexport interface OwnCapabilitiesBatchResponse {\n  duration: string;\n\n  capabilities: Record<string, FeedOwnCapability[]>;\n}\n\nexport interface OwnUser {\n  banned: boolean;\n\n  created_at: Date;\n\n  id: string;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  total_unread_count: number;\n\n  unread_channels: number;\n\n  unread_count: number;\n\n  unread_threads: number;\n\n  updated_at: Date;\n\n  channel_mutes: ChannelMute[];\n\n  devices: Device[];\n\n  mutes: UserMute[];\n\n  custom: Record<string, any>;\n\n  total_unread_count_by_team: Record<string, number>;\n\n  avg_response_time?: number;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  invisible?: boolean;\n\n  last_active?: Date;\n\n  last_engaged_at?: Date;\n\n  blocked_user_ids?: string[];\n\n  latest_hidden_channels?: string[];\n\n  teams?: string[];\n\n  privacy_settings?: PrivacySettings;\n\n  push_preferences?: PushPreferences;\n\n  teams_role?: Record<string, string>;\n}\n\nexport interface OwnUserResponse {\n  banned: boolean;\n\n  created_at: Date;\n\n  id: string;\n\n  invisible: boolean;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  total_unread_count: number;\n\n  unread_channels: number;\n\n  unread_count: number;\n\n  unread_threads: number;\n\n  updated_at: Date;\n\n  channel_mutes: ChannelMute[];\n\n  devices: DeviceResponse[];\n\n  mutes: UserMuteResponse[];\n\n  teams: string[];\n\n  custom: Record<string, any>;\n\n  avg_response_time?: number;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  image?: string;\n\n  last_active?: Date;\n\n  name?: string;\n\n  revoke_tokens_issued_before?: Date;\n\n  blocked_user_ids?: string[];\n\n  latest_hidden_channels?: string[];\n\n  privacy_settings?: PrivacySettingsResponse;\n\n  push_preferences?: PushPreferencesResponse;\n\n  teams_role?: Record<string, string>;\n\n  total_unread_count_by_team?: Record<string, number>;\n}\n\nexport interface PagerRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface PagerResponse {\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface PinActivityRequest {}\n\nexport interface PinActivityResponse {\n  created_at: Date;\n\n  duration: string;\n\n  feed: string;\n\n  user_id: string;\n\n  activity: ActivityResponse;\n}\n\nexport interface Poll {\n  allow_answers: boolean;\n\n  allow_user_suggested_options: boolean;\n\n  answers_count: number;\n\n  created_at: Date;\n\n  created_by_id: string;\n\n  description: string;\n\n  enforce_unique_vote: boolean;\n\n  id: string;\n\n  name: string;\n\n  updated_at: Date;\n\n  vote_count: number;\n\n  latest_answers: PollVote[];\n\n  options: PollOption[];\n\n  own_votes: PollVote[];\n\n  custom: Record<string, any>;\n\n  latest_votes_by_option: Record<string, PollVote[]>;\n\n  vote_counts_by_option: Record<string, number>;\n\n  is_closed?: boolean;\n\n  max_votes_allowed?: number;\n\n  voting_visibility?: string;\n\n  created_by?: User;\n}\n\nexport interface PollClosedFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  poll: PollResponseData;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface PollDeletedFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  poll: PollResponseData;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface PollOption {\n  id: string;\n\n  text: string;\n\n  custom: Record<string, any>;\n}\n\nexport interface PollOptionInput {\n  text?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface PollOptionRequest {\n  id: string;\n\n  text?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface PollOptionResponse {\n  duration: string;\n\n  poll_option: PollOptionResponseData;\n}\n\nexport interface PollOptionResponseData {\n  id: string;\n\n  text: string;\n\n  custom: Record<string, any>;\n}\n\nexport interface PollResponse {\n  duration: string;\n\n  poll: PollResponseData;\n}\n\nexport interface PollResponseData {\n  allow_answers: boolean;\n\n  allow_user_suggested_options: boolean;\n\n  answers_count: number;\n\n  created_at: Date;\n\n  created_by_id: string;\n\n  description: string;\n\n  enforce_unique_vote: boolean;\n\n  id: string;\n\n  name: string;\n\n  updated_at: Date;\n\n  vote_count: number;\n\n  voting_visibility: string;\n\n  latest_answers: PollVoteResponseData[];\n\n  options: PollOptionResponseData[];\n\n  own_votes: PollVoteResponseData[];\n\n  custom: Record<string, any>;\n\n  latest_votes_by_option: Record<string, PollVoteResponseData[]>;\n\n  vote_counts_by_option: Record<string, number>;\n\n  is_closed?: boolean;\n\n  max_votes_allowed?: number;\n\n  created_by?: UserResponse;\n}\n\nexport interface PollUpdatedFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  poll: PollResponseData;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface PollVote {\n  created_at: Date;\n\n  id: string;\n\n  option_id: string;\n\n  poll_id: string;\n\n  updated_at: Date;\n\n  answer_text?: string;\n\n  is_answer?: boolean;\n\n  user_id?: string;\n\n  user?: User;\n}\n\nexport interface PollVoteCastedFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  poll: PollResponseData;\n\n  poll_vote: PollVoteResponseData;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface PollVoteChangedFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  poll: PollResponseData;\n\n  poll_vote: PollVoteResponseData;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface PollVoteRemovedFeedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  poll: PollResponseData;\n\n  poll_vote: PollVoteResponseData;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n}\n\nexport interface PollVoteResponse {\n  duration: string;\n\n  vote?: PollVoteResponseData;\n}\n\nexport interface PollVoteResponseData {\n  created_at: Date;\n\n  id: string;\n\n  option_id: string;\n\n  poll_id: string;\n\n  updated_at: Date;\n\n  answer_text?: string;\n\n  is_answer?: boolean;\n\n  user_id?: string;\n\n  user?: UserResponse;\n}\n\nexport interface PollVotesResponse {\n  duration: string;\n\n  votes: PollVoteResponseData[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface PrivacySettings {\n  delivery_receipts?: DeliveryReceipts;\n\n  read_receipts?: ReadReceipts;\n\n  typing_indicators?: TypingIndicators;\n}\n\nexport interface PrivacySettingsResponse {\n  delivery_receipts?: DeliveryReceiptsResponse;\n\n  read_receipts?: ReadReceiptsResponse;\n\n  typing_indicators?: TypingIndicatorsResponse;\n}\n\nexport interface PushNotificationConfig {\n  enable_push?: boolean;\n\n  push_types?: string[];\n}\n\nexport interface PushPreferenceInput {\n  call_level?: 'all' | 'none' | 'default';\n\n  channel_cid?: string;\n\n  chat_level?: 'all' | 'mentions' | 'none' | 'default';\n\n  disabled_until?: Date;\n\n  feeds_level?: 'all' | 'none' | 'default';\n\n  remove_disable?: boolean;\n\n  user_id?: string;\n\n  feeds_preferences?: FeedsPreferences;\n}\n\nexport interface PushPreferences {\n  call_level?: string;\n\n  chat_level?: string;\n\n  disabled_until?: Date;\n\n  feeds_level?: string;\n\n  feeds_preferences?: FeedsPreferences;\n}\n\nexport interface PushPreferencesResponse {\n  call_level?: string;\n\n  chat_level?: string;\n\n  disabled_until?: Date;\n\n  feeds_level?: string;\n\n  feeds_preferences?: FeedsPreferencesResponse;\n}\n\nexport interface QueryActivitiesRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryActivitiesResponse {\n  duration: string;\n\n  activities: ActivityResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryActivityReactionsRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryActivityReactionsResponse {\n  duration: string;\n\n  reactions: FeedsReactionResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryBookmarkFoldersRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryBookmarkFoldersResponse {\n  duration: string;\n\n  bookmark_folders: BookmarkFolderResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryBookmarksRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryBookmarksResponse {\n  duration: string;\n\n  bookmarks: BookmarkResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryCommentReactionsRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryCommentReactionsResponse {\n  duration: string;\n\n  reactions: FeedsReactionResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryCommentsRequest {\n  filter: Record<string, any>;\n\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: 'first' | 'last' | 'top' | 'best' | 'controversial';\n}\n\nexport interface QueryCommentsResponse {\n  duration: string;\n\n  comments: CommentResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryFeedMembersRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryFeedMembersResponse {\n  duration: string;\n\n  members: FeedMemberResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryFeedsRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  watch?: boolean;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryFeedsResponse {\n  duration: string;\n\n  feeds: FeedResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryFollowsRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryFollowsResponse {\n  duration: string;\n\n  follows: FollowResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryModerationConfigsRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryModerationConfigsResponse {\n  duration: string;\n\n  configs: ConfigResponse[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryPollVotesRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryPollsRequest {\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryPollsResponse {\n  duration: string;\n\n  polls: PollResponseData[];\n\n  next?: string;\n\n  prev?: string;\n}\n\nexport interface QueryReviewQueueRequest {\n  limit?: number;\n\n  lock_count?: number;\n\n  lock_duration?: number;\n\n  lock_items?: boolean;\n\n  next?: string;\n\n  prev?: string;\n\n  stats_only?: boolean;\n\n  sort?: SortParamRequest[];\n\n  filter?: Record<string, any>;\n}\n\nexport interface QueryReviewQueueResponse {\n  duration: string;\n\n  items: ReviewQueueItemResponse[];\n\n  action_config: Record<string, ModerationActionConfig[]>;\n\n  stats: Record<string, any>;\n\n  next?: string;\n\n  prev?: string;\n\n  filter_config?: FilterConfigResponse;\n}\n\nexport interface QueryUsersPayload {\n  filter_conditions: Record<string, any>;\n\n  include_deactivated_users?: boolean;\n\n  limit?: number;\n\n  offset?: number;\n\n  presence?: boolean;\n\n  sort?: SortParamRequest[];\n}\n\nexport interface QueryUsersResponse {\n  duration: string;\n\n  users: FullUserResponse[];\n}\n\nexport interface RTMPIngress {\n  address: string;\n}\n\nexport interface RTMPSettingsResponse {\n  enabled: boolean;\n\n  quality: string;\n}\n\nexport interface RankingConfig {\n  score?: string;\n\n  type?: string;\n\n  defaults?: Record<string, any>;\n\n  functions?: Record<string, DecayFunctionConfig>;\n}\n\nexport interface Reaction {\n  activity_id: string;\n\n  created_at: Date;\n\n  kind: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  deleted_at?: Date;\n\n  id?: string;\n\n  parent?: string;\n\n  score?: number;\n\n  target_feeds?: string[];\n\n  children_counts?: Record<string, any>;\n\n  data?: Record<string, any>;\n\n  latest_children?: Record<string, Reaction[]>;\n\n  moderation?: Record<string, any>;\n\n  own_children?: Record<string, Reaction[]>;\n\n  target_feeds_extra_data?: Record<string, any>;\n\n  user?: User;\n}\n\nexport interface ReactionGroupResponse {\n  count: number;\n\n  first_reaction_at: Date;\n\n  last_reaction_at: Date;\n\n  sum_scores: number;\n}\n\nexport interface ReactionResponse {\n  created_at: Date;\n\n  message_id: string;\n\n  score: number;\n\n  type: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  custom: Record<string, any>;\n\n  user: UserResponse;\n}\n\nexport interface ReadCollectionsResponse {\n  duration: string;\n\n  collections: CollectionResponse[];\n}\n\nexport interface ReadReceipts {\n  enabled: boolean;\n}\n\nexport interface ReadReceiptsResponse {\n  enabled: boolean;\n}\n\nexport interface RecordSettingsResponse {\n  audio_only: boolean;\n\n  mode: string;\n\n  quality: string;\n}\n\nexport interface RejectFeedMemberInviteRequest {}\n\nexport interface RejectFeedMemberInviteResponse {\n  duration: string;\n\n  member: FeedMemberResponse;\n}\n\nexport interface RejectFollowRequest {\n  source: string;\n\n  target: string;\n}\n\nexport interface RejectFollowResponse {\n  duration: string;\n\n  follow: FollowResponse;\n}\n\nexport interface ReminderResponseData {\n  channel_cid: string;\n\n  created_at: Date;\n\n  message_id: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  remind_at?: Date;\n\n  channel?: ChannelResponse;\n\n  message?: MessageResponse;\n\n  user?: UserResponse;\n}\n\nexport interface RepliesMeta {\n  depth_truncated: boolean;\n\n  has_more: boolean;\n\n  remaining: number;\n\n  next_cursor?: string;\n}\n\nexport interface Response {\n  duration: string;\n}\n\nexport interface RestoreActionRequest {}\n\nexport interface ReviewQueueItemResponse {\n  ai_text_severity: string;\n\n  created_at: Date;\n\n  entity_id: string;\n\n  entity_type: string;\n\n  flags_count: number;\n\n  id: string;\n\n  latest_moderator_action: string;\n\n  recommended_action: string;\n\n  reviewed_by: string;\n\n  severity: number;\n\n  status: string;\n\n  updated_at: Date;\n\n  actions: ActionLogResponse[];\n\n  bans: Ban[];\n\n  flags: ModerationFlagResponse[];\n\n  languages: string[];\n\n  completed_at?: Date;\n\n  config_key?: string;\n\n  entity_creator_id?: string;\n\n  reviewed_at?: Date;\n\n  teams?: string[];\n\n  activity?: EnrichedActivity;\n\n  assigned_to?: UserResponse;\n\n  call?: CallResponse;\n\n  entity_creator?: EntityCreatorResponse;\n\n  feeds_v2_activity?: EnrichedActivity;\n\n  feeds_v2_reaction?: Reaction;\n\n  feeds_v3_activity?: ActivityResponse;\n\n  feeds_v3_comment?: CommentResponse;\n\n  message?: MessageResponse;\n\n  moderation_payload?: ModerationPayload;\n\n  reaction?: Reaction;\n}\n\nexport interface RingSettingsResponse {\n  auto_cancel_timeout_ms: number;\n\n  incoming_call_timeout_ms: number;\n\n  missed_call_timeout_ms: number;\n}\n\nexport interface RuleBuilderAction {\n  type:\n    | 'ban_user'\n    | 'flag_user'\n    | 'flag_content'\n    | 'block_content'\n    | 'shadow_content'\n    | 'bounce_flag_content'\n    | 'bounce_content'\n    | 'bounce_remove_content';\n\n  ban_options?: BanOptions;\n\n  flag_user_options?: FlagUserOptions;\n}\n\nexport interface RuleBuilderCondition {\n  confidence?: number;\n\n  type?: string;\n\n  content_count_rule_params?: ContentCountRuleParameters;\n\n  content_flag_count_rule_params?: FlagCountRuleParameters;\n\n  image_content_params?: ImageContentParameters;\n\n  image_rule_params?: ImageRuleParameters;\n\n  text_content_params?: TextContentParameters;\n\n  text_rule_params?: TextRuleParameters;\n\n  user_created_within_params?: UserCreatedWithinParameters;\n\n  user_custom_property_params?: UserCustomPropertyParameters;\n\n  user_flag_count_rule_params?: FlagCountRuleParameters;\n\n  user_rule_params?: UserRuleParameters;\n\n  video_content_params?: VideoContentParameters;\n\n  video_rule_params?: VideoRuleParameters;\n}\n\nexport interface RuleBuilderConditionGroup {\n  logic?: string;\n\n  conditions?: RuleBuilderCondition[];\n}\n\nexport interface RuleBuilderConfig {\n  async?: boolean;\n\n  rules?: RuleBuilderRule[];\n}\n\nexport interface RuleBuilderRule {\n  rule_type: string;\n\n  action: RuleBuilderAction;\n\n  cooldown_period?: string;\n\n  id?: string;\n\n  logic?: string;\n\n  conditions?: RuleBuilderCondition[];\n\n  groups?: RuleBuilderConditionGroup[];\n}\n\nexport interface SRTIngress {\n  address: string;\n}\n\nexport interface ScreensharingSettingsResponse {\n  access_request_enabled: boolean;\n\n  enabled: boolean;\n\n  target_resolution?: TargetResolution;\n}\n\nexport interface SessionSettingsResponse {\n  inactivity_timeout_seconds: number;\n}\n\nexport interface ShadowBlockActionRequest {\n  reason?: string;\n}\n\nexport interface SharedLocation {\n  channel_cid: string;\n\n  created_at: Date;\n\n  created_by_device_id: string;\n\n  message_id: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  end_at?: Date;\n\n  latitude?: number;\n\n  longitude?: number;\n\n  channel?: Channel;\n\n  message?: Message;\n}\n\nexport interface SharedLocationResponse {\n  channel_cid: string;\n\n  created_at: Date;\n\n  created_by_device_id: string;\n\n  duration: string;\n\n  latitude: number;\n\n  longitude: number;\n\n  message_id: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  end_at?: Date;\n\n  channel?: ChannelResponse;\n\n  message?: MessageResponse;\n}\n\nexport interface SharedLocationResponseData {\n  channel_cid: string;\n\n  created_at: Date;\n\n  created_by_device_id: string;\n\n  latitude: number;\n\n  longitude: number;\n\n  message_id: string;\n\n  updated_at: Date;\n\n  user_id: string;\n\n  end_at?: Date;\n\n  channel?: ChannelResponse;\n\n  message?: MessageResponse;\n}\n\nexport interface SharedLocationsResponse {\n  duration: string;\n\n  active_live_locations: SharedLocationResponseData[];\n}\n\nexport interface SingleFollowResponse {\n  duration: string;\n\n  follow: FollowResponse;\n}\n\nexport interface SortParam {\n  direction: number;\n\n  field: string;\n}\n\nexport interface SortParamRequest {\n  direction?: number;\n\n  field?: string;\n}\n\nexport interface SpeechSegmentConfig {\n  max_speech_caption_ms?: number;\n\n  silence_duration_ms?: number;\n}\n\nexport interface StoriesConfig {\n  skip_watched?: boolean;\n\n  track_watched?: boolean;\n}\n\nexport interface StoriesFeedUpdatedEvent {\n  created_at: Date;\n\n  fid: string;\n\n  custom: Record<string, any>;\n\n  type: string;\n\n  feed_visibility?: string;\n\n  received_at?: Date;\n\n  activities?: ActivityResponse[];\n\n  aggregated_activities?: AggregatedActivityResponse[];\n\n  user?: UserResponseCommonFields;\n}\n\nexport interface SubmitActionRequest {\n  action_type:\n    | 'mark_reviewed'\n    | 'delete_message'\n    | 'delete_activity'\n    | 'delete_comment'\n    | 'delete_reaction'\n    | 'ban'\n    | 'custom'\n    | 'unban'\n    | 'restore'\n    | 'delete_user'\n    | 'unblock'\n    | 'block'\n    | 'shadow_block'\n    | 'unmask'\n    | 'kick_user'\n    | 'end_call';\n\n  item_id: string;\n\n  ban?: BanActionRequest;\n\n  block?: BlockActionRequest;\n\n  custom?: CustomActionRequest;\n\n  delete_activity?: DeleteActivityRequest;\n\n  delete_comment?: DeleteCommentRequest;\n\n  delete_message?: DeleteMessageRequest;\n\n  delete_reaction?: DeleteReactionRequest;\n\n  delete_user?: DeleteUserRequest;\n\n  mark_reviewed?: MarkReviewedRequest;\n\n  shadow_block?: ShadowBlockActionRequest;\n\n  unban?: UnbanActionRequest;\n}\n\nexport interface SubmitActionResponse {\n  duration: string;\n\n  item?: ReviewQueueItemResponse;\n}\n\nexport interface TargetResolution {\n  bitrate: number;\n\n  height: number;\n\n  width: number;\n}\n\nexport interface TextContentParameters {\n  contains_url?: boolean;\n\n  severity?: string;\n\n  blocklist_match?: string[];\n\n  harm_labels?: string[];\n\n  llm_harm_labels?: Record<string, string>;\n}\n\nexport interface TextRuleParameters {\n  contains_url?: boolean;\n\n  severity?: string;\n\n  threshold?: number;\n\n  time_window?: string;\n\n  blocklist_match?: string[];\n\n  harm_labels?: string[];\n\n  llm_harm_labels?: Record<string, string>;\n}\n\nexport interface ThreadedCommentResponse {\n  confidence_score: number;\n\n  created_at: Date;\n\n  downvote_count: number;\n\n  id: string;\n\n  object_id: string;\n\n  object_type: string;\n\n  reaction_count: number;\n\n  reply_count: number;\n\n  score: number;\n\n  status: string;\n\n  updated_at: Date;\n\n  upvote_count: number;\n\n  mentioned_users: UserResponse[];\n\n  own_reactions: FeedsReactionResponse[];\n\n  user: UserResponse;\n\n  controversy_score?: number;\n\n  deleted_at?: Date;\n\n  parent_id?: string;\n\n  text?: string;\n\n  attachments?: Attachment[];\n\n  latest_reactions?: FeedsReactionResponse[];\n\n  replies?: ThreadedCommentResponse[];\n\n  custom?: Record<string, any>;\n\n  meta?: RepliesMeta;\n\n  moderation?: ModerationV2Response;\n\n  reaction_groups?: Record<string, ReactionGroupResponse>;\n}\n\nexport interface Thresholds {\n  explicit?: LabelThresholds;\n\n  spam?: LabelThresholds;\n\n  toxic?: LabelThresholds;\n}\n\nexport interface ThumbnailResponse {\n  image_url: string;\n}\n\nexport interface ThumbnailsSettingsResponse {\n  enabled: boolean;\n}\n\nexport interface Time {}\n\nexport interface TranscriptionSettingsResponse {\n  closed_caption_mode: 'available' | 'disabled' | 'auto-on';\n\n  language:\n    | 'auto'\n    | 'en'\n    | 'fr'\n    | 'es'\n    | 'de'\n    | 'it'\n    | 'nl'\n    | 'pt'\n    | 'pl'\n    | 'ca'\n    | 'cs'\n    | 'da'\n    | 'el'\n    | 'fi'\n    | 'id'\n    | 'ja'\n    | 'ru'\n    | 'sv'\n    | 'ta'\n    | 'th'\n    | 'tr'\n    | 'hu'\n    | 'ro'\n    | 'zh'\n    | 'ar'\n    | 'tl'\n    | 'he'\n    | 'hi'\n    | 'hr'\n    | 'ko'\n    | 'ms'\n    | 'no'\n    | 'uk'\n    | 'bg'\n    | 'et'\n    | 'sl'\n    | 'sk';\n\n  mode: 'available' | 'disabled' | 'auto-on';\n\n  speech_segment_config?: SpeechSegmentConfig;\n\n  translation?: TranslationSettings;\n}\n\nexport interface TranslationSettings {\n  enabled: boolean;\n\n  languages: string[];\n}\n\nexport interface TypingIndicators {\n  enabled: boolean;\n}\n\nexport interface TypingIndicatorsResponse {\n  enabled: boolean;\n}\n\nexport interface UnbanActionRequest {}\n\nexport interface UnblockActionRequest {}\n\nexport interface UnblockUsersRequest {\n  blocked_user_id: string;\n}\n\nexport interface UnblockUsersResponse {\n  duration: string;\n}\n\nexport interface UnfollowResponse {\n  duration: string;\n\n  follow: FollowResponse;\n}\n\nexport interface UnpinActivityResponse {\n  duration: string;\n\n  feed: string;\n\n  user_id: string;\n\n  activity: ActivityResponse;\n}\n\nexport interface UpdateActivityPartialRequest {\n  unset?: string[];\n\n  set?: Record<string, any>;\n}\n\nexport interface UpdateActivityPartialResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n}\n\nexport interface UpdateActivityRequest {\n  expires_at?: Date;\n\n  poll_id?: string;\n\n  restrict_replies?: 'everyone' | 'people_i_follow' | 'nobody';\n\n  skip_enrich_url?: boolean;\n\n  text?: string;\n\n  visibility?: string;\n\n  attachments?: Attachment[];\n\n  collection_refs?: string[];\n\n  feeds?: string[];\n\n  filter_tags?: string[];\n\n  interest_tags?: string[];\n\n  custom?: Record<string, any>;\n\n  location?: ActivityLocation;\n}\n\nexport interface UpdateActivityResponse {\n  duration: string;\n\n  activity: ActivityResponse;\n}\n\nexport interface UpdateBlockListRequest {\n  is_leet_check_enabled?: boolean;\n\n  is_plural_check_enabled?: boolean;\n\n  team?: string;\n\n  words?: string[];\n}\n\nexport interface UpdateBlockListResponse {\n  duration: string;\n\n  blocklist?: BlockListResponse;\n}\n\nexport interface UpdateBookmarkFolderRequest {\n  name?: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface UpdateBookmarkFolderResponse {\n  duration: string;\n\n  bookmark_folder: BookmarkFolderResponse;\n}\n\nexport interface UpdateBookmarkRequest {\n  folder_id?: string;\n\n  new_folder_id?: string;\n\n  custom?: Record<string, any>;\n\n  new_folder?: AddFolderRequest;\n}\n\nexport interface UpdateBookmarkResponse {\n  duration: string;\n\n  bookmark: BookmarkResponse;\n}\n\nexport interface UpdateCollectionRequest {\n  id: string;\n\n  name: string;\n\n  custom: Record<string, any>;\n}\n\nexport interface UpdateCollectionsRequest {\n  collections: UpdateCollectionRequest[];\n}\n\nexport interface UpdateCollectionsResponse {\n  duration: string;\n\n  collections: CollectionResponse[];\n}\n\nexport interface UpdateCommentRequest {\n  comment?: string;\n\n  skip_enrich_url?: boolean;\n\n  skip_push?: boolean;\n\n  custom?: Record<string, any>;\n}\n\nexport interface UpdateCommentResponse {\n  duration: string;\n\n  comment: CommentResponse;\n}\n\nexport interface UpdateFeedMembersRequest {\n  operation: 'upsert' | 'remove' | 'set';\n\n  limit?: number;\n\n  next?: string;\n\n  prev?: string;\n\n  members?: FeedMemberRequest[];\n}\n\nexport interface UpdateFeedMembersResponse {\n  duration: string;\n\n  added: FeedMemberResponse[];\n\n  removed_ids: string[];\n\n  updated: FeedMemberResponse[];\n}\n\nexport interface UpdateFeedRequest {\n  custom?: Record<string, any>;\n}\n\nexport interface UpdateFeedResponse {\n  duration: string;\n\n  feed: FeedResponse;\n}\n\nexport interface UpdateFollowRequest {\n  source: string;\n\n  target: string;\n\n  create_notification_activity?: boolean;\n\n  follower_role?: string;\n\n  push_preference?: 'all' | 'none';\n\n  skip_push?: boolean;\n\n  custom?: Record<string, any>;\n}\n\nexport interface UpdateFollowResponse {\n  duration: string;\n\n  follow: FollowResponse;\n}\n\nexport interface UpdateLiveLocationRequest {\n  message_id: string;\n\n  end_at?: Date;\n\n  latitude?: number;\n\n  longitude?: number;\n}\n\nexport interface UpdatePollOptionRequest {\n  id: string;\n\n  text: string;\n\n  custom?: Record<string, any>;\n}\n\nexport interface UpdatePollPartialRequest {\n  unset?: string[];\n\n  set?: Record<string, any>;\n}\n\nexport interface UpdatePollRequest {\n  id: string;\n\n  name: string;\n\n  allow_answers?: boolean;\n\n  allow_user_suggested_options?: boolean;\n\n  description?: string;\n\n  enforce_unique_vote?: boolean;\n\n  is_closed?: boolean;\n\n  max_votes_allowed?: number;\n\n  voting_visibility?: 'anonymous' | 'public';\n\n  options?: PollOptionRequest[];\n\n  custom?: Record<string, any>;\n}\n\nexport interface UpdateUserPartialRequest {\n  id: string;\n\n  unset?: string[];\n\n  set?: Record<string, any>;\n}\n\nexport interface UpdateUsersPartialRequest {\n  users: UpdateUserPartialRequest[];\n}\n\nexport interface UpdateUsersRequest {\n  users: Record<string, UserRequest>;\n}\n\nexport interface UpdateUsersResponse {\n  duration: string;\n\n  membership_deletion_task_id: string;\n\n  users: Record<string, FullUserResponse>;\n}\n\nexport interface UpsertActivitiesRequest {\n  activities: ActivityRequest[];\n}\n\nexport interface UpsertActivitiesResponse {\n  duration: string;\n\n  activities: ActivityResponse[];\n}\n\nexport interface UpsertConfigRequest {\n  key: string;\n\n  async?: boolean;\n\n  team?: string;\n\n  ai_image_config?: AIImageConfig;\n\n  ai_text_config?: AITextConfig;\n\n  ai_video_config?: AIVideoConfig;\n\n  automod_platform_circumvention_config?: AutomodPlatformCircumventionConfig;\n\n  automod_semantic_filters_config?: AutomodSemanticFiltersConfig;\n\n  automod_toxicity_config?: AutomodToxicityConfig;\n\n  aws_rekognition_config?: AIImageConfig;\n\n  block_list_config?: BlockListConfig;\n\n  bodyguard_config?: AITextConfig;\n\n  google_vision_config?: GoogleVisionConfig;\n\n  llm_config?: LLMConfig;\n\n  rule_builder_config?: RuleBuilderConfig;\n\n  velocity_filter_config?: VelocityFilterConfig;\n\n  video_call_rule_config?: VideoCallRuleConfig;\n}\n\nexport interface UpsertConfigResponse {\n  duration: string;\n\n  config?: ConfigResponse;\n}\n\nexport interface UpsertPushPreferencesRequest {\n  preferences: PushPreferenceInput[];\n}\n\nexport interface UpsertPushPreferencesResponse {\n  duration: string;\n\n  user_channel_preferences: Record<\n    string,\n    Record<string, ChannelPushPreferences | null>\n  >;\n\n  user_preferences: Record<string, PushPreferences>;\n}\n\nexport interface User {\n  banned: boolean;\n\n  id: string;\n\n  online: boolean;\n\n  role: string;\n\n  custom: Record<string, any>;\n\n  teams_role: Record<string, string>;\n\n  avg_response_time?: number;\n\n  ban_expires?: Date;\n\n  created_at?: Date;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  invisible?: boolean;\n\n  language?: string;\n\n  last_active?: Date;\n\n  last_engaged_at?: Date;\n\n  revoke_tokens_issued_before?: Date;\n\n  updated_at?: Date;\n\n  teams?: string[];\n\n  privacy_settings?: PrivacySettings;\n}\n\nexport interface UserBannedEvent {\n  channel_id: string;\n\n  channel_type: string;\n\n  cid: string;\n\n  created_at: Date;\n\n  shadow: boolean;\n\n  created_by: User;\n\n  type: string;\n\n  expiration?: Date;\n\n  reason?: string;\n\n  team?: string;\n\n  user?: User;\n}\n\nexport interface UserCreatedWithinParameters {\n  max_age?: string;\n}\n\nexport interface UserCustomPropertyParameters {\n  operator?: string;\n\n  property_key?: string;\n}\n\nexport interface UserDeactivatedEvent {\n  created_at: Date;\n\n  created_by: User;\n\n  type: string;\n\n  user?: User;\n}\n\nexport interface UserMute {\n  created_at: Date;\n\n  updated_at: Date;\n\n  expires?: Date;\n\n  target?: User;\n\n  user?: User;\n}\n\nexport interface UserMuteResponse {\n  created_at: Date;\n\n  updated_at: Date;\n\n  expires?: Date;\n\n  target?: UserResponse;\n\n  user?: UserResponse;\n}\n\nexport interface UserMutedEvent {\n  created_at: Date;\n\n  type: string;\n\n  target_user?: string;\n\n  target_users?: string[];\n\n  user?: User;\n}\n\nexport interface UserReactivatedEvent {\n  created_at: Date;\n\n  type: string;\n\n  user?: User;\n}\n\nexport interface UserRequest {\n  id: string;\n\n  image?: string;\n\n  invisible?: boolean;\n\n  language?: string;\n\n  name?: string;\n\n  custom?: Record<string, any>;\n\n  privacy_settings?: PrivacySettingsResponse;\n}\n\nexport interface UserResponse {\n  banned: boolean;\n\n  created_at: Date;\n\n  id: string;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  updated_at: Date;\n\n  blocked_user_ids: string[];\n\n  teams: string[];\n\n  custom: Record<string, any>;\n\n  avg_response_time?: number;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  image?: string;\n\n  last_active?: Date;\n\n  name?: string;\n\n  revoke_tokens_issued_before?: Date;\n\n  teams_role?: Record<string, string>;\n}\n\nexport interface UserResponseCommonFields {\n  banned: boolean;\n\n  created_at: Date;\n\n  id: string;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  updated_at: Date;\n\n  blocked_user_ids: string[];\n\n  teams: string[];\n\n  custom: Record<string, any>;\n\n  avg_response_time?: number;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  image?: string;\n\n  last_active?: Date;\n\n  name?: string;\n\n  revoke_tokens_issued_before?: Date;\n\n  teams_role?: Record<string, string>;\n}\n\nexport interface UserResponsePrivacyFields {\n  banned: boolean;\n\n  created_at: Date;\n\n  id: string;\n\n  language: string;\n\n  online: boolean;\n\n  role: string;\n\n  updated_at: Date;\n\n  blocked_user_ids: string[];\n\n  teams: string[];\n\n  custom: Record<string, any>;\n\n  avg_response_time?: number;\n\n  deactivated_at?: Date;\n\n  deleted_at?: Date;\n\n  image?: string;\n\n  invisible?: boolean;\n\n  last_active?: Date;\n\n  name?: string;\n\n  revoke_tokens_issued_before?: Date;\n\n  privacy_settings?: PrivacySettingsResponse;\n\n  teams_role?: Record<string, string>;\n}\n\nexport interface UserRuleParameters {\n  max_age?: string;\n}\n\nexport interface UserUpdatedEvent {\n  created_at: Date;\n\n  custom: Record<string, any>;\n\n  user: UserResponsePrivacyFields;\n\n  type: string;\n\n  received_at?: Date;\n}\n\nexport interface VelocityFilterConfig {\n  advanced_filters: boolean;\n\n  cascading_actions: boolean;\n\n  cids_per_user: number;\n\n  enabled: boolean;\n\n  first_message_only: boolean;\n\n  rules: VelocityFilterConfigRule[];\n\n  async?: boolean;\n}\n\nexport interface VelocityFilterConfigRule {\n  action: 'flag' | 'shadow' | 'remove' | 'ban';\n\n  ban_duration: number;\n\n  cascading_action: 'flag' | 'shadow' | 'remove' | 'ban';\n\n  cascading_threshold: number;\n\n  check_message_context: boolean;\n\n  fast_spam_threshold: number;\n\n  fast_spam_ttl: number;\n\n  ip_ban: boolean;\n\n  probation_period: number;\n\n  shadow_ban: boolean;\n\n  slow_spam_threshold: number;\n\n  slow_spam_ttl: number;\n\n  url_only: boolean;\n\n  slow_spam_ban_duration?: number;\n}\n\nexport interface VideoCallRuleConfig {\n  flag_all_labels: boolean;\n\n  flagged_labels: string[];\n\n  rules: HarmConfig[];\n}\n\nexport interface VideoContentParameters {\n  harm_labels?: string[];\n}\n\nexport interface VideoEndCallRequest {}\n\nexport interface VideoKickUserRequest {}\n\nexport interface VideoRuleParameters {\n  threshold?: number;\n\n  time_window?: string;\n\n  harm_labels?: string[];\n}\n\nexport interface VideoSettingsResponse {\n  access_request_enabled: boolean;\n\n  camera_default_on: boolean;\n\n  camera_facing: 'front' | 'back' | 'external';\n\n  enabled: boolean;\n\n  target_resolution: TargetResolution;\n}\n\nexport interface VoteData {\n  answer_text?: string;\n\n  option_id?: string;\n}\n\nexport interface WHIPIngress {\n  address: string;\n}\n\nexport interface WSAuthMessage {\n  token: string;\n\n  user_details: ConnectUserDetailsRequest;\n\n  products?: string[];\n}\n\nexport type WSClientEvent =\n  | ({ type: 'app.updated' } & AppUpdatedEvent)\n  | ({ type: 'feeds.activity.added' } & ActivityAddedEvent)\n  | ({ type: 'feeds.activity.deleted' } & ActivityDeletedEvent)\n  | ({ type: 'feeds.activity.feedback' } & ActivityFeedbackEvent)\n  | ({ type: 'feeds.activity.marked' } & ActivityMarkEvent)\n  | ({ type: 'feeds.activity.pinned' } & ActivityPinnedEvent)\n  | ({ type: 'feeds.activity.reaction.added' } & ActivityReactionAddedEvent)\n  | ({ type: 'feeds.activity.reaction.deleted' } & ActivityReactionDeletedEvent)\n  | ({ type: 'feeds.activity.reaction.updated' } & ActivityReactionUpdatedEvent)\n  | ({\n      type: 'feeds.activity.removed_from_feed';\n    } & ActivityRemovedFromFeedEvent)\n  | ({ type: 'feeds.activity.unpinned' } & ActivityUnpinnedEvent)\n  | ({ type: 'feeds.activity.updated' } & ActivityUpdatedEvent)\n  | ({ type: 'feeds.bookmark.added' } & BookmarkAddedEvent)\n  | ({ type: 'feeds.bookmark.deleted' } & BookmarkDeletedEvent)\n  | ({ type: 'feeds.bookmark.updated' } & BookmarkUpdatedEvent)\n  | ({ type: 'feeds.bookmark_folder.deleted' } & BookmarkFolderDeletedEvent)\n  | ({ type: 'feeds.bookmark_folder.updated' } & BookmarkFolderUpdatedEvent)\n  | ({ type: 'feeds.comment.added' } & CommentAddedEvent)\n  | ({ type: 'feeds.comment.deleted' } & CommentDeletedEvent)\n  | ({ type: 'feeds.comment.reaction.added' } & CommentReactionAddedEvent)\n  | ({ type: 'feeds.comment.reaction.deleted' } & CommentReactionDeletedEvent)\n  | ({ type: 'feeds.comment.reaction.updated' } & CommentReactionUpdatedEvent)\n  | ({ type: 'feeds.comment.updated' } & CommentUpdatedEvent)\n  | ({ type: 'feeds.feed.created' } & FeedCreatedEvent)\n  | ({ type: 'feeds.feed.deleted' } & FeedDeletedEvent)\n  | ({ type: 'feeds.feed.updated' } & FeedUpdatedEvent)\n  | ({ type: 'feeds.feed_group.changed' } & FeedGroupChangedEvent)\n  | ({ type: 'feeds.feed_group.deleted' } & FeedGroupDeletedEvent)\n  | ({ type: 'feeds.feed_member.added' } & FeedMemberAddedEvent)\n  | ({ type: 'feeds.feed_member.removed' } & FeedMemberRemovedEvent)\n  | ({ type: 'feeds.feed_member.updated' } & FeedMemberUpdatedEvent)\n  | ({ type: 'feeds.follow.created' } & FollowCreatedEvent)\n  | ({ type: 'feeds.follow.deleted' } & FollowDeletedEvent)\n  | ({ type: 'feeds.follow.updated' } & FollowUpdatedEvent)\n  | ({ type: 'feeds.notification_feed.updated' } & NotificationFeedUpdatedEvent)\n  | ({ type: 'feeds.poll.closed' } & PollClosedFeedEvent)\n  | ({ type: 'feeds.poll.deleted' } & PollDeletedFeedEvent)\n  | ({ type: 'feeds.poll.updated' } & PollUpdatedFeedEvent)\n  | ({ type: 'feeds.poll.vote_casted' } & PollVoteCastedFeedEvent)\n  | ({ type: 'feeds.poll.vote_changed' } & PollVoteChangedFeedEvent)\n  | ({ type: 'feeds.poll.vote_removed' } & PollVoteRemovedFeedEvent)\n  | ({ type: 'feeds.stories_feed.updated' } & StoriesFeedUpdatedEvent)\n  | ({ type: 'health.check' } & HealthCheckEvent)\n  | ({ type: 'moderation.custom_action' } & ModerationCustomActionEvent)\n  | ({ type: 'moderation.mark_reviewed' } & ModerationMarkReviewedEvent)\n  | ({ type: 'user.updated' } & UserUpdatedEvent);\n\nexport type WSEvent =\n  | ({ type: 'app.updated' } & AppUpdatedEvent)\n  | ({ type: 'feeds.activity.added' } & ActivityAddedEvent)\n  | ({ type: 'feeds.activity.deleted' } & ActivityDeletedEvent)\n  | ({ type: 'feeds.activity.feedback' } & ActivityFeedbackEvent)\n  | ({ type: 'feeds.activity.marked' } & ActivityMarkEvent)\n  | ({ type: 'feeds.activity.pinned' } & ActivityPinnedEvent)\n  | ({ type: 'feeds.activity.reaction.added' } & ActivityReactionAddedEvent)\n  | ({ type: 'feeds.activity.reaction.deleted' } & ActivityReactionDeletedEvent)\n  | ({ type: 'feeds.activity.reaction.updated' } & ActivityReactionUpdatedEvent)\n  | ({\n      type: 'feeds.activity.removed_from_feed';\n    } & ActivityRemovedFromFeedEvent)\n  | ({ type: 'feeds.activity.unpinned' } & ActivityUnpinnedEvent)\n  | ({ type: 'feeds.activity.updated' } & ActivityUpdatedEvent)\n  | ({ type: 'feeds.bookmark.added' } & BookmarkAddedEvent)\n  | ({ type: 'feeds.bookmark.deleted' } & BookmarkDeletedEvent)\n  | ({ type: 'feeds.bookmark.updated' } & BookmarkUpdatedEvent)\n  | ({ type: 'feeds.bookmark_folder.deleted' } & BookmarkFolderDeletedEvent)\n  | ({ type: 'feeds.bookmark_folder.updated' } & BookmarkFolderUpdatedEvent)\n  | ({ type: 'feeds.comment.added' } & CommentAddedEvent)\n  | ({ type: 'feeds.comment.deleted' } & CommentDeletedEvent)\n  | ({ type: 'feeds.comment.reaction.added' } & CommentReactionAddedEvent)\n  | ({ type: 'feeds.comment.reaction.deleted' } & CommentReactionDeletedEvent)\n  | ({ type: 'feeds.comment.reaction.updated' } & CommentReactionUpdatedEvent)\n  | ({ type: 'feeds.comment.updated' } & CommentUpdatedEvent)\n  | ({ type: 'feeds.feed.created' } & FeedCreatedEvent)\n  | ({ type: 'feeds.feed.deleted' } & FeedDeletedEvent)\n  | ({ type: 'feeds.feed.updated' } & FeedUpdatedEvent)\n  | ({ type: 'feeds.feed_group.changed' } & FeedGroupChangedEvent)\n  | ({ type: 'feeds.feed_group.deleted' } & FeedGroupDeletedEvent)\n  | ({ type: 'feeds.feed_member.added' } & FeedMemberAddedEvent)\n  | ({ type: 'feeds.feed_member.removed' } & FeedMemberRemovedEvent)\n  | ({ type: 'feeds.feed_member.updated' } & FeedMemberUpdatedEvent)\n  | ({ type: 'feeds.follow.created' } & FollowCreatedEvent)\n  | ({ type: 'feeds.follow.deleted' } & FollowDeletedEvent)\n  | ({ type: 'feeds.follow.updated' } & FollowUpdatedEvent)\n  | ({ type: 'feeds.notification_feed.updated' } & NotificationFeedUpdatedEvent)\n  | ({ type: 'feeds.poll.closed' } & PollClosedFeedEvent)\n  | ({ type: 'feeds.poll.deleted' } & PollDeletedFeedEvent)\n  | ({ type: 'feeds.poll.updated' } & PollUpdatedFeedEvent)\n  | ({ type: 'feeds.poll.vote_casted' } & PollVoteCastedFeedEvent)\n  | ({ type: 'feeds.poll.vote_changed' } & PollVoteChangedFeedEvent)\n  | ({ type: 'feeds.poll.vote_removed' } & PollVoteRemovedFeedEvent)\n  | ({ type: 'feeds.stories_feed.updated' } & StoriesFeedUpdatedEvent)\n  | ({ type: 'health.check' } & HealthCheckEvent)\n  | ({ type: 'moderation.custom_action' } & ModerationCustomActionEvent)\n  | ({ type: 'moderation.flagged' } & ModerationFlaggedEvent)\n  | ({ type: 'moderation.mark_reviewed' } & ModerationMarkReviewedEvent)\n  | ({ type: 'user.banned' } & UserBannedEvent)\n  | ({ type: 'user.deactivated' } & UserDeactivatedEvent)\n  | ({ type: 'user.muted' } & UserMutedEvent)\n  | ({ type: 'user.reactivated' } & UserReactivatedEvent)\n  | ({ type: 'user.updated' } & UserUpdatedEvent);\n","import { StateStore } from '@stream-io/state-store';\nimport type { SearchSource } from './BaseSearchSource';\n\nexport type SearchControllerState = {\n  isActive: boolean;\n  searchQuery: string;\n  sources: SearchSource[];\n};\n\nexport type InternalSearchControllerState = {};\n\nexport type SearchControllerConfig = {\n  // The controller will make sure there is always exactly one active source. Enabled by default.\n  keepSingleActiveSource: boolean;\n};\n\nexport type SearchControllerOptions = {\n  config?: Partial<SearchControllerConfig>;\n  sources?: SearchSource[];\n};\n\nexport class SearchController {\n  /**\n   * Not intended for direct use by integrators, might be removed without notice resulting in\n   * broken integrations.\n   */\n  _internalState: StateStore<InternalSearchControllerState>;\n  state: StateStore<SearchControllerState>;\n  config: SearchControllerConfig;\n\n  constructor({ config, sources }: SearchControllerOptions = {}) {\n    this.state = new StateStore<SearchControllerState>({\n      isActive: false,\n      searchQuery: '',\n      sources: sources ?? [],\n    });\n    this._internalState = new StateStore<InternalSearchControllerState>({});\n    this.config = { keepSingleActiveSource: true, ...config };\n  }\n  get hasNext() {\n    return this.sources.some((source) => source.hasNext);\n  }\n\n  get sources() {\n    return this.state.getLatestValue().sources;\n  }\n\n  get activeSources() {\n    return this.state.getLatestValue().sources.filter((s) => s.isActive);\n  }\n\n  get isActive() {\n    return this.state.getLatestValue().isActive;\n  }\n\n  get searchQuery() {\n    return this.state.getLatestValue().searchQuery;\n  }\n\n  get searchSourceTypes(): Array<SearchSource['type']> {\n    return this.sources.map((s) => s.type);\n  }\n\n  addSource = (source: SearchSource) => {\n    this.state.partialNext({\n      sources: [...this.sources, source],\n    });\n  };\n\n  getSource = (sourceType: SearchSource['type']) =>\n    this.sources.find((s) => s.type === sourceType);\n\n  removeSource = (sourceType: SearchSource['type']) => {\n    const newSources = this.sources.filter((s) => s.type !== sourceType);\n    if (newSources.length === this.sources.length) return;\n    this.state.partialNext({ sources: newSources });\n  };\n\n  activateSource = (sourceType: SearchSource['type']) => {\n    const source = this.getSource(sourceType);\n    if (!source || source.isActive) return;\n    if (this.config.keepSingleActiveSource) {\n      this.sources.forEach((s) => {\n        if (s.type !== sourceType) {\n          s.deactivate();\n        }\n      });\n    }\n    source.activate();\n    this.state.partialNext({ sources: [...this.sources] });\n  };\n\n  deactivateSource = (sourceType: SearchSource['type']) => {\n    const source = this.getSource(sourceType);\n    if (!source?.isActive) return;\n    if (this.activeSources.length === 1) return;\n    source.deactivate();\n    this.state.partialNext({ sources: [...this.sources] });\n  };\n\n  activate = () => {\n    if (!this.activeSources.length) {\n      const sourcesToActivate = this.config.keepSingleActiveSource\n        ? this.sources.slice(0, 1)\n        : this.sources;\n      sourcesToActivate.forEach((s) => s.activate());\n    }\n    if (this.isActive) return;\n    this.state.partialNext({ isActive: true });\n  };\n\n  search = async (searchQuery?: string) => {\n    const searchedSources = this.activeSources;\n    this.state.partialNext({\n      searchQuery,\n    });\n    await Promise.all(\n      searchedSources.map((source) => source.search(searchQuery)),\n    );\n  };\n\n  cancelSearchQueries = () => {\n    this.activeSources.forEach((s) => s.cancelScheduledQuery());\n  };\n\n  clear = () => {\n    this.cancelSearchQueries();\n    this.sources.forEach((source) =>\n      source.state.next({ ...source.initialState, isActive: source.isActive }),\n    );\n    this.state.next((current) => ({\n      ...current,\n      isActive: true,\n      queriesInProgress: [],\n      searchQuery: '',\n    }));\n  };\n\n  exit = () => {\n    this.cancelSearchQueries();\n    this.sources.forEach((source) =>\n      source.state.next({ ...source.initialState, isActive: source.isActive }),\n    );\n    this.state.next((current) => ({\n      ...current,\n      isActive: false,\n      queriesInProgress: [],\n      searchQuery: '',\n    }));\n  };\n}\n","import { StateStore } from '@stream-io/state-store';\nimport { debounce, type DebouncedFunc } from '../utils';\nimport type {\n  QueryReturnValue,\n  SearchSourceOptions,\n  SearchSourceState,\n  SearchSourceType,\n} from './types';\n\nexport type DebounceOptions = {\n  debounceMs: number;\n};\ntype DebouncedExecQueryFunction = DebouncedFunc<\n  (searchString?: string) => Promise<void>\n>;\n\ninterface ISearchSource<T = any> {\n  activate(): void;\n\n  canExecuteQuery(newSearchString?: string): boolean;\n\n  deactivate(): void;\n\n  readonly hasNext: boolean;\n  readonly hasResults: boolean;\n  readonly initialState: SearchSourceState<T>;\n  readonly isActive: boolean;\n  readonly isLoading: boolean;\n  readonly items: T[] | undefined;\n  readonly lastQueryError: Error | undefined;\n  readonly next: string | undefined | null;\n  readonly offset: number | undefined;\n\n  resetState(): void;\n\n  readonly searchQuery: string;\n\n  readonly state: StateStore<SearchSourceState<T>>;\n  readonly type: SearchSourceType;\n}\n\nexport interface SearchSource<T = any> extends ISearchSource<T> {\n  cancelScheduledQuery(): void;\n  setDebounceOptions(options: DebounceOptions): void;\n  search(text?: string): Promise<void> | undefined;\n}\n\nexport interface SearchSourceSync<T = any> extends ISearchSource<T> {\n  cancelScheduledQuery(): void;\n  setDebounceOptions(options: DebounceOptions): void;\n  search(text?: string): void;\n}\n\nconst DEFAULT_SEARCH_SOURCE_OPTIONS: Required<SearchSourceOptions> = {\n  debounceMs: 300,\n  pageSize: 10,\n  allowEmptySearchString: false,\n  resetOnNewSearchQuery: true,\n} as const;\n\nabstract class BaseSearchSourceBase<T> implements ISearchSource<T> {\n  state: StateStore<SearchSourceState<T>>;\n  pageSize: number;\n  protected allowEmptySearchString: boolean;\n  protected resetOnNewSearchQuery: boolean;\n  abstract readonly type: SearchSourceType;\n\n  protected constructor(options?: SearchSourceOptions) {\n    const { pageSize, allowEmptySearchString, resetOnNewSearchQuery } = {\n      ...DEFAULT_SEARCH_SOURCE_OPTIONS,\n      ...options,\n    };\n    this.pageSize = pageSize;\n    this.allowEmptySearchString = allowEmptySearchString;\n    this.resetOnNewSearchQuery = resetOnNewSearchQuery;\n    this.state = new StateStore<SearchSourceState<T>>(this.initialState);\n  }\n\n  get lastQueryError() {\n    return this.state.getLatestValue().lastQueryError;\n  }\n\n  get hasNext() {\n    return this.state.getLatestValue().hasNext;\n  }\n\n  get hasResults() {\n    return Array.isArray(this.state.getLatestValue().items);\n  }\n\n  get isActive() {\n    return this.state.getLatestValue().isActive;\n  }\n\n  get isLoading() {\n    return this.state.getLatestValue().isLoading;\n  }\n\n  get initialState() {\n    return {\n      hasNext: true,\n      isActive: false,\n      isLoading: false,\n      items: undefined,\n      lastQueryError: undefined,\n      next: undefined,\n      offset: 0,\n      searchQuery: '',\n    };\n  }\n\n  get items() {\n    return this.state.getLatestValue().items;\n  }\n\n  get next() {\n    return this.state.getLatestValue().next;\n  }\n\n  get offset() {\n    return this.state.getLatestValue().offset;\n  }\n\n  get searchQuery() {\n    return this.state.getLatestValue().searchQuery;\n  }\n\n  activate = () => {\n    if (this.isActive) return;\n    this.state.partialNext({ isActive: true });\n  };\n\n  deactivate = () => {\n    if (!this.isActive) return;\n    this.state.partialNext({ isActive: false });\n  };\n\n  canExecuteQuery = (newSearchString?: string) => {\n    const hasNewSearchQuery = typeof newSearchString !== 'undefined';\n    const searchString = newSearchString ?? this.searchQuery;\n    return !!(\n      this.isActive &&\n      !this.isLoading &&\n      (this.hasNext || hasNewSearchQuery) &&\n      (this.allowEmptySearchString || searchString)\n    );\n  };\n\n  protected getStateBeforeFirstQuery(\n    newSearchString: string,\n  ): SearchSourceState<T> {\n    const initialState = this.initialState;\n    const oldItems = this.items;\n\n    const items = this.resetOnNewSearchQuery ? initialState.items : oldItems;\n    return {\n      ...this.initialState,\n      items,\n      isActive: this.isActive,\n      isLoading: this.resetOnNewSearchQuery ? true : !oldItems,\n      searchQuery: newSearchString,\n    };\n  }\n\n  protected getStateAfterQuery(\n    stateUpdate: Partial<SearchSourceState<T>>,\n    isFirstPage: boolean,\n  ): SearchSourceState<T> {\n    const current = this.state.getLatestValue();\n    return {\n      ...current,\n      lastQueryError: undefined, // reset lastQueryError that can be overridden by the stateUpdate\n      ...stateUpdate,\n      isLoading: false,\n      items: isFirstPage\n        ? stateUpdate.items\n        : [...(this.items ?? []), ...(stateUpdate.items || [])],\n    };\n  }\n\n  protected prepareStateForQuery(newSearchString?: string) {\n    const hasNewSearchQuery = typeof newSearchString !== 'undefined';\n    const searchString = newSearchString ?? this.searchQuery;\n\n    if (hasNewSearchQuery) {\n      this.state.next(this.getStateBeforeFirstQuery(newSearchString ?? ''));\n    } else {\n      this.state.partialNext({ isLoading: true });\n    }\n\n    return { searchString, hasNewSearchQuery };\n  }\n\n  protected updatePaginationStateFromQuery(result: QueryReturnValue<T>) {\n    const { items, next } = result;\n\n    const stateUpdate: Partial<SearchSourceState<T>> = {};\n    if (Object.prototype.hasOwnProperty.call(result, 'next')) {\n      stateUpdate.next = next;\n      stateUpdate.hasNext = !!next;\n    } else {\n      stateUpdate.offset = (this.offset ?? 0) + items.length;\n      stateUpdate.hasNext = items.length === this.pageSize;\n    }\n\n    return stateUpdate;\n  }\n\n  resetState() {\n    this.state.next(this.initialState);\n  }\n\n  resetStateAndActivate() {\n    this.resetState();\n    this.activate();\n  }\n}\n\nexport abstract class BaseSearchSource<T>\n  extends BaseSearchSourceBase<T>\n  implements SearchSource<T>\n{\n  protected searchDebounced!: DebouncedExecQueryFunction;\n\n  constructor(options?: SearchSourceOptions) {\n    const { debounceMs } = { ...DEFAULT_SEARCH_SOURCE_OPTIONS, ...options };\n    super(options);\n    this.setDebounceOptions({ debounceMs });\n  }\n\n  protected abstract query(searchQuery: string): Promise<QueryReturnValue<T>>;\n\n  protected abstract filterQueryResults(items: T[]): T[] | Promise<T[]>;\n\n  setDebounceOptions = ({ debounceMs }: DebounceOptions) => {\n    this.searchDebounced = debounce(this.executeQuery.bind(this), debounceMs);\n  };\n\n  async executeQuery(newSearchString?: string) {\n    if (!this.canExecuteQuery(newSearchString)) return;\n\n    const { hasNewSearchQuery, searchString } =\n      this.prepareStateForQuery(newSearchString);\n\n    let stateUpdate: Partial<SearchSourceState<T>> = {};\n    try {\n      const results = await this.query(searchString);\n      if (!results) return;\n\n      const { items } = results;\n      stateUpdate = this.updatePaginationStateFromQuery(results);\n      stateUpdate.items = await this.filterQueryResults(items);\n    } catch (e) {\n      stateUpdate.lastQueryError = e as Error;\n    } finally {\n      this.state.next(this.getStateAfterQuery(stateUpdate, hasNewSearchQuery));\n    }\n  }\n\n  search = (searchQuery?: string) => this.searchDebounced(searchQuery);\n\n  cancelScheduledQuery() {\n    this.searchDebounced.cancel();\n  }\n}\n\nexport abstract class BaseSearchSourceSync<T>\n  extends BaseSearchSourceBase<T>\n  implements SearchSourceSync<T>\n{\n  protected searchDebounced!: DebouncedExecQueryFunction;\n\n  constructor(options?: SearchSourceOptions) {\n    const { debounceMs } = { ...DEFAULT_SEARCH_SOURCE_OPTIONS, ...options };\n    super(options);\n    this.setDebounceOptions({ debounceMs });\n  }\n\n  protected abstract query(searchQuery: string): QueryReturnValue<T>;\n\n  protected abstract filterQueryResults(items: T[]): T[];\n\n  setDebounceOptions = ({ debounceMs }: DebounceOptions) => {\n    this.searchDebounced = debounce(this.executeQuery.bind(this), debounceMs);\n  };\n\n  executeQuery(newSearchString?: string) {\n    if (!this.canExecuteQuery(newSearchString)) return;\n\n    const { hasNewSearchQuery, searchString } =\n      this.prepareStateForQuery(newSearchString);\n\n    let stateUpdate: Partial<SearchSourceState<T>> = {};\n    try {\n      const results = this.query(searchString);\n      if (!results) return;\n\n      const { items } = results;\n      stateUpdate = this.updatePaginationStateFromQuery(results);\n      stateUpdate.items = this.filterQueryResults(items);\n    } catch (e) {\n      stateUpdate.lastQueryError = e as Error;\n    } finally {\n      this.state.next(this.getStateAfterQuery(stateUpdate, hasNewSearchQuery));\n    }\n  }\n\n  search = (searchQuery?: string) => this.searchDebounced(searchQuery);\n\n  cancelScheduledQuery() {\n    this.searchDebounced.cancel();\n  }\n}\n","import { BaseSearchSource } from './BaseSearchSource';\nimport type { SearchSourceOptions } from './types';\n\nimport type { FeedsClient } from '../../feeds-client';\nimport type { ActivityResponse } from '../../gen/models';\n\nexport class ActivitySearchSource extends BaseSearchSource<ActivityResponse> {\n  readonly type = 'activity' as const;\n  private readonly client: FeedsClient;\n\n  constructor(client: FeedsClient, options?: SearchSourceOptions) {\n    super(options);\n    this.client = client;\n  }\n\n  protected async query(searchQuery: string) {\n    const { connected_user: connectedUser } =\n      this.client.state.getLatestValue();\n    if (!connectedUser) return { items: [] };\n\n    const { activities: items, next } = await this.client.queryActivities({\n      sort: [{ direction: -1, field: 'created_at' }],\n      ...(!this.allowEmptySearchString || searchQuery.length > 0\n        ? { filter: { text: { $autocomplete: searchQuery } } }\n        : {}),\n      limit: 10,\n      next: this.next ?? undefined,\n    });\n\n    return { items, next };\n  }\n\n  protected filterQueryResults(items: ActivityResponse[]) {\n    return items;\n  }\n}\n","import { BaseSearchSource } from './BaseSearchSource';\nimport type { SearchSourceOptions } from './types';\n\nimport type { FeedsClient } from '../../feeds-client';\nimport type { Feed } from '../../feed';\n\nexport type FeedSearchSourceOptions = SearchSourceOptions & {\n  groupId?: string;\n};\n\nexport class FeedSearchSource extends BaseSearchSource<Feed> {\n  readonly type: string;\n  readonly feedGroupId?: string | undefined;\n  private readonly client: FeedsClient;\n\n  constructor(client: FeedsClient, options?: FeedSearchSourceOptions) {\n    super(options);\n    this.client = client;\n    this.feedGroupId = options?.groupId;\n    this.type = `${this.feedGroupId}-feed`;\n  }\n\n  protected async query(searchQuery: string) {\n    const { connected_user: connectedUser } =\n      this.client.state.getLatestValue();\n    if (!connectedUser) return { items: [] };\n\n    const { feeds: items, next } = await this.client.queryFeeds({\n      filter: {\n        ...(this.feedGroupId ? { group_id: this.feedGroupId } : {}),\n        ...(!this.allowEmptySearchString || searchQuery.length > 0\n          ? {\n              $or: [\n                { name: { $autocomplete: searchQuery } },\n                { description: { $autocomplete: searchQuery } },\n                { 'created_by.name': { $autocomplete: searchQuery } },\n              ],\n            }\n          : {}),\n      },\n      next: this.next ?? undefined,\n    });\n\n    return { items, next };\n  }\n\n  protected filterQueryResults(items: Feed[]) {\n    return items;\n  }\n}\n","import { BaseSearchSource } from './BaseSearchSource';\nimport type { SearchSourceOptions } from './types';\n\nimport type { FeedsClient } from '../../feeds-client';\nimport type { UserResponse } from '../../gen/models';\n\nexport class UserSearchSource extends BaseSearchSource<UserResponse> {\n  readonly type = 'user' as const;\n  private readonly client: FeedsClient;\n\n  constructor(client: FeedsClient, options?: SearchSourceOptions) {\n    super(options);\n    this.client = client;\n  }\n\n  protected async query(searchQuery: string) {\n    const { connected_user: connectedUser } =\n      this.client.state.getLatestValue();\n    if (!connectedUser) return { items: [] };\n\n    const { users: items } = await this.client.queryUsers({\n      payload: {\n        filter_conditions: {\n          ...(!this.allowEmptySearchString || searchQuery.length > 0\n            ? {\n                name: {\n                  $autocomplete: searchQuery,\n                },\n              }\n            : {}),\n        },\n      },\n    });\n\n    return { items, next: undefined };\n  }\n\n  protected filterQueryResults(items: UserResponse[]) {\n    return items;\n  }\n}\n"]}