CoastalCommitsPastes/client/lib/types.d.ts

41 lines
683 B
TypeScript
Raw Normal View History

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