import type { Visibility } from "./Visibility"; import type { Attachment } from "./Attachment"; import type { EntityBase } from "./Entity"; import type { Comment } from "./Comment"; import type { Project } from "./Project"; import type { User } from "./User"; import type { Tag } from "./Tag"; export type BaseArticle = EntityBase & { attachments: ArticleAttachment[]; content: string | null; reporter: User | null; summary: string | null; visibility: Visibility | null; }; export type Article = BaseArticle<"Article"> & { childArticles: Article[]; comments: ArticleComment[]; created: number; externalArticle: ExternalArticle | null; hasChildren: boolean; hasStar: boolean; idReadable: string; ordinal: number; parentArticle: Article | null; pinnedComments: ArticleComment[]; project: Project; tags: Tag[]; updated: number; updatedBy: User | null; }; export type ArticleAttachment = Attachment<"ArticleAttachment"> & { article: BaseArticle | null; comment: ArticleComment | null; }; export type ArticleComment = Comment<"ArticleComment"> & { attachments: ArticleAttachment[]; article: Article | null; }; export type ExternalArticle = EntityBase<"ExternalArticle"> & { name: string; url: string | null; key: string | null; };