mirror of
https://github.com/get-drexa/drive.git
synced 2026-02-02 14:51:18 +00:00
15 lines
367 B
TypeScript
15 lines
367 B
TypeScript
|
|
import { type } from "arktype"
|
||
|
|
import { atom } from "jotai"
|
||
|
|
|
||
|
|
export const Account = type({
|
||
|
|
id: "string",
|
||
|
|
userId: "string",
|
||
|
|
createdAt: "string.date.iso.parse",
|
||
|
|
updatedAt: "string.date.iso.parse",
|
||
|
|
storageUsageBytes: "number",
|
||
|
|
storageQuotaBytes: "number",
|
||
|
|
})
|
||
|
|
export type Account = typeof Account.infer
|
||
|
|
|
||
|
|
export const currentAccountAtom = atom<Account | null>(null)
|