]> git.r.bdr.sh - rbdr/forum/blobdiff - src/lib/data/types.d.ts
Don't remember what this WIP was about
[rbdr/forum] / src / lib / data / types.d.ts
index 2498bf793d90021d5d8dbd7f4150a92a4c4646a1..e1f6f17a7d6a0c5f33c19b68f0cac0e3d899cbcd 100644 (file)
@@ -8,9 +8,10 @@ export type Topic = {
        title: string;
        ttl: number;
        updated_at: number;
-       tags: Tag[];
-       posts: Post[];
-       forum: Forum;
+       forum_id: string;
+       forum?: Forum;
+       posts?: Post[];
+       tags?: Tag[];
 };
 
 export type Post = {
@@ -18,14 +19,15 @@ export type Post = {
        created_at: number;
        title: string;
        text: string;
-       topic: Topic;
-       author: Author;
+       topic_id: string;
+       topic?: Topic;
+       author_id: string;
+       author?: User;
 };
 
 export type Tag = {
-       id: string;
-       weight: number;
-       topics: Topic[];
+       tag: string;
+       count: number;
 };
 
 export type Forum = {
@@ -36,7 +38,7 @@ export type Forum = {
        topics: Topic[];
 };
 
-export type Author = {
+export type User = {
        id: string;
        handle: string;
 };