feat: add telegram-style resource stream
This commit is contained in:
34
src/types/post.ts
Normal file
34
src/types/post.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
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 };
|
||||
Reference in New Issue
Block a user