35 lines
687 B
TypeScript
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 };
|