import type { ResourceUri } from "@atcute/lexicons"; import type { ToolsOzoneModerationDefs } from "@atcute/ozone"; import type { Bot, BotPostOptions, StrongRef } from "../../bot/Bot.js"; import type { Post } from "./Post.js"; import type { PostPayload, ReplyRef } from "./PostPayload.js"; /** * Data used to construct a PostReference class. * @see PostReference */ export interface PostReferenceData { uri: string; cid: string; replyRef?: ReplyRef | undefined; } /** * A reference to a post. */ export declare class PostReference implements StrongRef { protected bot: Bot; /** The post's AT URI. */ uri: ResourceUri; /** The post's CID. */ cid: string; /** A reference to the post's parent and root post. */ replyRef?: ReplyRef; /** * @param data Data used to construct the reference. * @param bot The active Bot instance. */ constructor({ uri, cid, replyRef }: PostReferenceData, bot: Bot); /** * Fetch the full referenced post. */ fetch(): Promise; /** * Reply to the post. * @param payload The post payload. * @param options Optional configuration. * @returns A reference to the created post. */ reply(payload: PostPayload, options?: BotPostOptions): Promise; /** * Create a new post with this post quoted. * @param payload The post payload. * @param options Optional configuration. * @returns A reference to the created post. */ quote(payload: PostPayload, options?: BotPostOptions): Promise; /** * Like the post. */ like(): Promise; /** * Unlike the post. */ unlike(): Promise; /** * Repost the post. */ repost(): Promise; /** * If this post has been reposted, delete the repost. */ deleteRepost(): Promise; /** * Delete the post. */ delete(): Promise; /** * Apply labels to the post. * @param labels The labels to apply. * @param comment An optional comment. */ label(labels: Array, comment?: string): Promise; /** * Negate labels previously applied to the post. * @param labels The labels to negate. * @param comment An optional comment. */ negateLabels(labels: Array, comment?: string): Promise; }