66 lines
978 B
TypeScript
Raw Normal View History

// DB Types
export type User = {
2024-10-21 13:57:45 -06:00
id: string
name: string
email: string
generations: number
sandbox: Sandbox[]
usersToSandboxes: UsersToSandboxes[]
}
export type Sandbox = {
2024-10-21 13:57:45 -06:00
id: string
name: string
type: string
visibility: "public" | "private"
createdAt: Date
userId: string
usersToSandboxes: UsersToSandboxes[]
}
2024-05-01 01:53:49 -04:00
export type UsersToSandboxes = {
2024-10-21 13:57:45 -06:00
userId: string
sandboxId: string
sharedOn: Date
}
2024-04-26 00:10:53 -04:00
export type R2Files = {
2024-10-21 13:57:45 -06:00
objects: R2FileData[]
truncated: boolean
delimitedPrefixes: any[]
}
2024-04-26 00:10:53 -04:00
export type R2FileData = {
2024-10-21 13:57:45 -06:00
storageClass: string
uploaded: string
checksums: any
httpEtag: string
etag: string
size: number
version: string
key: string
}
export type TFolder = {
2024-10-21 13:57:45 -06:00
id: string
type: "folder"
name: string
children: (TFile | TFolder)[]
}
export type TFile = {
2024-10-21 13:57:45 -06:00
id: string
type: "file"
name: string
}
export type TTab = TFile & {
2024-10-21 13:57:45 -06:00
saved: boolean
}
export type TFileData = {
2024-10-21 13:57:45 -06:00
id: string
data: string
}