/** * Teams System Object - Zod Validation Schemas * * Teams are system objects with dedicated services, not generic entities. * This file contains all Zod schemas for the teams system. * * @module core/lib/teams/schema */ import { z } from 'zod'; export declare const teamRoleSchema: z.ZodString; export declare const invitationStatusSchema: z.ZodEnum<{ expired: "expired"; pending: "pending"; accepted: "accepted"; declined: "declined"; }>; export declare const teamSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; slug: z.ZodString; description: z.ZodOptional>; ownerId: z.ZodString; avatarUrl: z.ZodOptional>; settings: z.ZodDefault>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; export declare const teamMemberSchema: z.ZodObject<{ id: z.ZodString; teamId: z.ZodString; userId: z.ZodString; role: z.ZodString; invitedBy: z.ZodOptional>; joinedAt: z.ZodString; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; export declare const teamInvitationSchema: z.ZodObject<{ id: z.ZodString; teamId: z.ZodString; email: z.ZodString; role: z.ZodString; status: z.ZodEnum<{ expired: "expired"; pending: "pending"; accepted: "accepted"; declined: "declined"; }>; token: z.ZodString; invitedBy: z.ZodString; expiresAt: z.ZodString; acceptedAt: z.ZodOptional>; declinedAt: z.ZodOptional>; createdAt: z.ZodString; updatedAt: z.ZodString; }, z.core.$strip>; export declare const createTeamSchema: z.ZodObject<{ name: z.ZodString; slug: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; /** * Schema for owner-only team updates (name/description) * Only team owners (ownerId === userId) can update these fields * Used when: Owner updates team name or description * * @security This schema is only used after owner verification * @note Fields are optional to allow partial updates (e.g., only description) */ export declare const ownerUpdateTeamSchema: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; }, z.core.$strip>; /** * Schema for admin team updates (non-owner-only fields) * Admins can update: slug, avatarUrl, settings * Does NOT include name/description (those are owner-only) * Used when: Admin (non-owner) updates team metadata * * @security This schema explicitly excludes owner-only fields (name, description) */ export declare const adminUpdateTeamSchema: z.ZodObject<{ slug: z.ZodOptional; avatarUrl: z.ZodOptional>; settings: z.ZodOptional>; }, z.core.$strip>; /** * Schema for general team updates (combined owner + admin permissions) * This is a merge of ownerUpdateTeamSchema and adminUpdateTeamSchema * Used for: API consumers that need a unified schema * * @note For internal use, prefer ownerUpdateTeamSchema or adminUpdateTeamSchema * based on the user's role and the fields being updated */ export declare const updateTeamSchema: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; slug: z.ZodOptional; avatarUrl: z.ZodOptional>; settings: z.ZodOptional>; }, z.core.$strip>; export declare const inviteMemberSchema: z.ZodObject<{ email: z.ZodString; role: z.ZodString; }, z.core.$strip>; export declare const updateMemberRoleSchema: z.ZodObject<{ role: z.ZodString; }, z.core.$strip>; export declare const paginationSchema: z.ZodObject<{ page: z.ZodDefault>; limit: z.ZodDefault>; }, z.core.$strip>; export declare const teamListQuerySchema: z.ZodObject<{ page: z.ZodDefault>; limit: z.ZodDefault>; search: z.ZodOptional; sort: z.ZodDefault>; order: z.ZodDefault>; scope: z.ZodDefault>; }, z.core.$strip>; export declare const memberListQuerySchema: z.ZodObject<{ page: z.ZodDefault>; limit: z.ZodDefault>; role: z.ZodOptional; search: z.ZodOptional; }, z.core.$strip>; export declare const invitationListQuerySchema: z.ZodObject<{ page: z.ZodDefault>; limit: z.ZodDefault>; status: z.ZodOptional>; }, z.core.$strip>; export type TeamSchema = z.infer; export type TeamMemberSchema = z.infer; export type TeamInvitationSchema = z.infer; export type CreateTeamSchema = z.infer; export type UpdateTeamSchema = z.infer; export type OwnerUpdateTeamSchema = z.infer; export type AdminUpdateTeamSchema = z.infer; export type InviteMemberSchema = z.infer; export type UpdateMemberRoleSchema = z.infer; export type TeamListQuerySchema = z.infer; export type MemberListQuerySchema = z.infer; export type InvitationListQuerySchema = z.infer; //# sourceMappingURL=schema.d.ts.map