CoastalCommitsPastes/client/lib/types.d.ts

37 lines
565 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[]
expiresAt: Date | string | null
}
type User = {
id: string
username: string
posts?: Post[]
role: "admin" | "user" | ""
createdAt: string
2022-03-21 21:51:19 -04:00
}