@coursebuilder/core
Version:
Core package for Course Builder
140 lines (137 loc) • 4.55 kB
TypeScript
import { z } from 'zod';
declare const userSchema: z.ZodObject<{
id: z.ZodString;
name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
role: z.ZodDefault<z.ZodEnum<["user", "admin"]>>;
email: z.ZodString;
emailVerified: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
image: z.ZodNullable<z.ZodOptional<z.ZodString>>;
createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
memberships: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
id: z.ZodString;
organizationId: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
organizationId: string;
}, {
id: string;
organizationId: string;
}>, "many">>>>;
roles: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
description: z.ZodNullable<z.ZodString>;
active: z.ZodBoolean;
createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
}, "strip", z.ZodTypeAny, {
name: string;
id: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}, {
name: string;
id: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}>, "many">>>;
organizationRoles: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
organizationId: z.ZodString;
name: z.ZodString;
description: z.ZodNullable<z.ZodString>;
active: z.ZodBoolean;
createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
}, "strip", z.ZodTypeAny, {
name: string;
id: string;
organizationId: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}, {
name: string;
id: string;
organizationId: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}>, "many">>>;
}, "strip", z.ZodTypeAny, {
id: string;
role: "user" | "admin";
email: string;
memberships: {
id: string;
organizationId: string;
}[] | null;
roles: {
name: string;
id: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}[];
organizationRoles: {
name: string;
id: string;
organizationId: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}[];
name?: string | null | undefined;
createdAt?: Date | null | undefined;
image?: string | null | undefined;
emailVerified?: Date | null | undefined;
}, {
id: string;
email: string;
name?: string | null | undefined;
createdAt?: Date | null | undefined;
image?: string | null | undefined;
role?: "user" | "admin" | undefined;
emailVerified?: Date | null | undefined;
memberships?: {
id: string;
organizationId: string;
}[] | null | undefined;
roles?: {
name: string;
id: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}[] | undefined;
organizationRoles?: {
name: string;
id: string;
organizationId: string;
description: string | null;
active: boolean;
createdAt?: Date | null | undefined;
updatedAt?: Date | null | undefined;
deletedAt?: Date | null | undefined;
}[] | undefined;
}>;
type User = z.infer<typeof userSchema>;
export { type User, userSchema };