/**
 * Invite types and client-safe schemas.
 *
 * Defines the runtime types for the invite system: invite creation,
 * matching, and claiming.
 *
 * @module
 */
import { z } from 'zod';
import { Uuid } from '@fuzdev/fuz_util/id.js';
import { Username, Email } from '../primitive_schemas.js';
/** Zod schema for client-safe invite data. */
export const InviteJson = z.strictObject({
    id: Uuid,
    email: Email.nullable(),
    username: Username.nullable(),
    claimed_by: Uuid.nullable(),
    claimed_at: z.string().nullable(),
    created_at: z.string(),
    created_by: Uuid.nullable(),
});
/** Zod schema for invite data with resolved creator/claimer usernames. */
export const InviteWithUsernamesJson = InviteJson.extend({
    created_by_username: z.string().nullable(),
    claimed_by_username: z.string().nullable(),
});
