UNPKG

@replyke/core

Version:

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

58 lines (57 loc) 1.67 kB
import { Mention } from "./Mention"; import { User } from "./User"; import { Space } from "./Space"; import { ReactionCounts, ReactionType } from "./Reaction"; import { File } from "./File"; export interface TopComment { id: string; user: User; upvotesCount: number; content: string; createdAt: string; } export type EntityFile = File; export interface Entity { id: string; foreignId: string | null; shortId: string; projectId: string; sourceId: string | null; spaceId: string | null; space?: Space | null; userId: string | null; user?: User | null; title: string | null; content: string | null; mentions: Mention[]; attachments: Record<string, any>[]; files?: EntityFile[]; keywords: string[]; upvotes: string[]; downvotes: string[]; reactionCounts: ReactionCounts; userReaction?: ReactionType | null; repliesCount: number; views: number; score: number; scoreUpdatedAt: Date; location: { type: "Point"; coordinates: [number, number]; } | null; metadata: Record<string, any>; topComment: TopComment | null; isSaved?: boolean; createdAt: Date; updatedAt: Date; deletedAt: Date | null; isDraft: boolean | null; moderationStatus: "approved" | "removed" | null; moderatedAt: Date | null; moderatedById: string | null; moderatedByType: "client" | "user" | null; moderationReason: string | null; } export type EntityInclude = "space" | "user" | "topComment" | "saved" | "files"; export type EntityIncludeArray = EntityInclude[]; export type EntityIncludeParam = string | EntityIncludeArray;