File
Blob: src/contracts/auth.ts
| 1 | import { eg, type TypeFromCodec } from "@cloudflare/util-en-garde"; |
| 2 | |
| 3 | import { UserSummary } from "@/contracts/common"; |
| 4 | |
| 5 | export const GetMeResponse = eg.exactStrict( |
| 6 | eg.object({ |
| 7 | user: UserSummary, |
| 8 | }), |
| 9 | ); |
| 10 | export type GetMeResponse = TypeFromCodec<typeof GetMeResponse>; |
| 11 | |
| 12 | export const PublicAppConfigResponse = eg.exactStrict(eg.object({})); |
| 13 | export type PublicAppConfigResponse = TypeFromCodec<typeof PublicAppConfigResponse>; |