blob: e1f6f17a7d6a0c5f33c19b68f0cac0e3d899cbcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*
* 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;
};
|