UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

46 lines (45 loc) 1.36 kB
import { Entity } from "./Entity"; import { Mention } from "./Mention"; import { User } from "./User"; import { ReactionCounts, ReactionType } from "./Reaction"; export interface GifData { id: string; url: string; gifUrl: string; gifPreviewUrl: string; altText: string | undefined; aspectRatio: number; } export interface Comment { id: string; projectId: string; foreignId: string | null; entityId: string; entity?: Entity; userId: string; user?: User; parentId: string | null; parentComment?: Comment; content: string | null; gif: GifData | null; mentions: Mention[]; upvotes: string[]; downvotes: string[]; reactionCounts: ReactionCounts; userReaction?: ReactionType | null; repliesCount: number; metadata: Record<string, any>; createdAt: Date; updatedAt: Date; deletedAt: Date | null; parentDeletedAt: Date | null; userDeletedAt: Date | null; moderationStatus: "approved" | "removed" | null; moderatedAt: Date | null; moderatedById: string | null; moderatedByType: "client" | "user" | null; moderationReason: string | null; } export type CommentInclude = "user" | "entity" | "space" | "parent"; export type CommentIncludeArray = CommentInclude[]; export type CommentIncludeParam = CommentInclude | CommentIncludeArray;