Files
buzz-sheet/lib/comments/types.ts
T
gunshiz 5812d99715
CI / Verify (push) Successful in 2m30s
CI / Build immutable images and deploy (push) Successful in 3m9s
feat : comment feature
2026-10-08 01:40:08 +07:00

34 lines
1019 B
TypeScript

export interface CommentViewer { id: string; admin: boolean; name?: string; image?: string | null }
export interface CommentImage { id: string; url: string }
export interface CommentItem {
id: string;
rootId: string | null;
replyToId: string | null;
replyToName: string | null;
authorName: string;
authorImage: string | null;
authorAdmin: boolean;
text: string;
images: CommentImage[];
version: number;
createdAt: string;
editedAt: string;
hidden: boolean;
ownHidden: boolean;
deleted: boolean;
hearted: boolean;
likes: number;
reaction: number;
replyCount: number;
hasReplies: boolean;
canEdit: boolean;
canInteract: boolean;
canModerate: boolean;
target: string;
targetName: string;
targetImage: string | null;
href: string;
}
export interface CommentPage { items: CommentItem[]; nextCursor: string | null; viewer: CommentViewer | null }
export interface CommentHistoryItem { id: string; version: number; text: string; createdAt: string; images: CommentImage[] }