Files
Arkie-Library-Frontend/src/types/post.ts
2026-05-25 05:25:57 +08:00

35 lines
687 B
TypeScript

export type AttachmentKind = "image" | "video" | "document";
export type Attachment = {
id: string;
kind: AttachmentKind;
url: string;
mime: string;
filename: string;
sizeBytes: number;
width?: number;
height?: number;
durationSec?: number;
posterUrl?: string;
thumbnailUrl?: string;
};
export type Post = {
id: string;
categoryId: number;
categorySlug: string;
language: string;
text?: string;
attachments: Attachment[];
isRecommended: boolean;
publishedAt: string;
updatedAt: string;
};
export type PostListResponse = {
items: Post[];
nextCursor?: string;
};
export type PostScope = { kind: "all" } | { kind: "category"; slug: string };