Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/shared/src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,20 @@ export const participants = pgTable(
}
);

// --- WebSocket Schemas ---
export const userJoinedPayloadSchema = z.object({
userId: z.number(),
roomId: z.number(),
timestamp: z.date().default(() => new Date()),
});

// --- Location Schemas ---
export const locationCreationPayloadSchema = z.object({
label: z.string().min(1).max(100, "Label must be less than 100 characters"),
lat: z.number().min(-90).max(90, "Latitude must be between -90 and 90"),
lng: z.number().min(-180).max(180, "Longitude must be between -180 and 180"),
});

// Waitlist Schemas
export const insertWaitlistSchema = z.object({
email: z.string().email(),
Expand Down