feat(shared): add @solelog/shared contracts package and wire packages/* workspace
This commit is contained in:
18
packages/shared/src/index.ts
Normal file
18
packages/shared/src/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const HealthResponse = z.object({
|
||||
status: z.literal('ok'),
|
||||
});
|
||||
export type HealthResponse = z.infer<typeof HealthResponse>;
|
||||
|
||||
export const PublicUser = z.object({
|
||||
id: z.string(),
|
||||
email: z.string().email(),
|
||||
name: z.string(),
|
||||
});
|
||||
export type PublicUser = z.infer<typeof PublicUser>;
|
||||
|
||||
export const MeResponse = z.object({
|
||||
user: PublicUser,
|
||||
});
|
||||
export type MeResponse = z.infer<typeof MeResponse>;
|
||||
Reference in New Issue
Block a user