]> git.r.bdr.sh - rbdr/forum/blame - src/lib/data/types.d.ts
Start migration to supabase
[rbdr/forum] / src / lib / data / types.d.ts
CommitLineData
d197e31b
RBR
1/*
2 * These types are the structures that we can expect
3 * from the API.
4 */
5
6export type Topic = {
7 id: string;
8 title: string;
9 ttl: number;
10 updated_at: number;
11 tags: Tag[];
12 posts: Post[];
13 forum: Forum;
14};
15
16export type Post = {
17 id: string;
18 created_at: number;
19 title: string;
20 text: string;
21 topic: Topic;
22 author: Author;
23};
24
25export type Tag = {
26 id: string;
27 weight: number;
28 topics: Topic[];
29};
30
31export type Forum = {
32 id: string;
33 glyph: string;
34 label: string;
35 position: number;
36 topics: Topic[];
37};
38
39export type Author = {
40 id: string;
41 handle: string;
42};