import type { AppBskyFeedDefs } from "@atcute/bluesky"; import type { ResourceUri } from "@atcute/lexicons"; import type { Bot } from "../../bot/Bot.js"; import { List } from "../List.js"; import type { Post } from "./Post.js"; /** * Data used to construct a Threadgate class. * @see Threadgate */ export interface ThreadgateData { cid: string; uri: string; createdAt: Date; post: Post; allowsFollowing?: boolean | undefined; allowsMentioned?: boolean | undefined; allowedLists?: Array | undefined; } /** * A threadgate limits who can reply to a post. */ export declare class Threadgate { /** The threadgate's CID. */ cid: string; /** The threadgate's AT URI. */ uri: ResourceUri; /** When the threadgate was created. */ createdAt: Date; /** The post this threadgate is attached to. */ post: Post; /** Whether users followed by the threadgate author are allowed to reply. */ allowsFollowing: boolean; /** Whether users mentioned in the post are allowed to reply. */ allowsMentioned: boolean; /** Lists whose members are allowed to reply. */ allowedLists: Array; /** * @param data Threadgate data. */ constructor({ cid, uri, createdAt, post, allowsFollowing, allowsMentioned, allowedLists, }: ThreadgateData); /** Whether the threadgate allows replies based on user lists. */ get allowsListMembers(): boolean; /** * Constructs an instance from a ThreadgateView. */ static fromView(view: AppBskyFeedDefs.ThreadgateView, post: Post, bot: Bot): Threadgate; }