All files / src/features/sharing schemas.ts

0% Statements 0/5
100% Branches 0/0
100% Functions 0/0
0% Lines 0/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15                             
// Input for sharing a flat, shared by the forms and the server functions.
// Errors are reason codes (src/lib/reasons.ts), never text.
import { z } from 'zod'
import { emailSchema } from '#/features/authentication/schemas'
 
const id = z.string().min(1).max(64)
 
export const propertyRefInput = z.object({ propertyId: id })
 
export const inviteInput = z.object({ propertyId: id, email: emailSchema })
 
export const invitationIdInput = z.object({ invitationId: id })
 
export const removeAccessInput = z.object({ propertyId: id, userId: id })