/* * These types are the structures that we can expect * from the API. */ export type Topic = { id: string; title: string; ttl: number; updated_at: number; forum_id: string; forum?: Forum; posts?: Post[]; tags?: Tag[]; }; export type Post = { id: string; created_at: number; title: string; text: string; topic_id: string; topic?: Topic; author_id: string; author?: User; }; export type Tag = { tag: string; count: number; }; export type Forum = { id: string; glyph: string; label: string; position: number; topics: Topic[]; }; export type User = { id: string; handle: string; };