2022-03-21 03:28:06 -07:00
|
|
|
export type PostVisibility = "unlisted" | "private" | "public" | "protected"
|
|
|
|
|
|
|
|
export type Document = {
|
2022-03-23 15:42:22 -07:00
|
|
|
title: string
|
|
|
|
content: string
|
|
|
|
id: string
|
2022-03-21 03:28:06 -07:00
|
|
|
}
|
2022-03-21 18:51:19 -07:00
|
|
|
|
2022-03-22 21:18:26 -07:00
|
|
|
export type File = {
|
2022-03-23 15:42:22 -07:00
|
|
|
id: string
|
|
|
|
title: string
|
|
|
|
content: string
|
|
|
|
html: string
|
2022-03-24 19:32:24 -07:00
|
|
|
createdAt: string
|
2022-03-21 18:51:19 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type Files = File[]
|
|
|
|
|
|
|
|
export type Post = {
|
2022-03-23 15:42:22 -07:00
|
|
|
id: string
|
|
|
|
title: string
|
|
|
|
description: string
|
|
|
|
visibility: PostVisibility
|
2022-04-01 16:26:42 -07:00
|
|
|
files?: Files
|
2022-03-24 19:32:24 -07:00
|
|
|
createdAt: string
|
2022-03-26 00:05:05 -07:00
|
|
|
users?: User[]
|
2022-04-01 22:55:27 -07:00
|
|
|
parent?: Pick<Post, "id" | "title" | "visibility" | "createdAt">
|
2022-03-30 20:01:24 -07:00
|
|
|
expiresAt: Date | string | null
|
2022-03-26 00:05:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type User = {
|
|
|
|
id: string
|
|
|
|
username: string
|
2022-03-28 12:13:22 -07:00
|
|
|
posts?: Post[]
|
|
|
|
role: "admin" | "user" | ""
|
|
|
|
createdAt: string
|
2022-03-21 18:51:19 -07:00
|
|
|
}
|