import { isoly } from "isoly"; import { Realm } from "../Realm"; import { zod } from "../zod"; import { Access as UserAccess } from "./Access"; import { Identity as UserIdentity } from "./Identity"; import { JWT as UserJWT } from "./JWT"; import { mfa as userMfa } from "./mfa"; import { Password as UserPassword } from "./Password"; export interface User { email: string; access: User.Access; changed: isoly.DateTime; created: isoly.DateTime; password: { changed: isoly.DateTime; }; } export declare namespace User { export import Access = UserAccess; export import Identity = UserIdentity; export import JWT = UserJWT; export import mfa = userMfa; export import Password = UserPassword; function fromInvite(invite: Invite): User; function toJWTPayloadCreatable(user: User, realm: Realm): User.JWT.Payload.Creatable; type Creatable = zod.infer; namespace Creatable { const type: import("isly/dist/cjs/object").IslyObject<{ invite: string; password: { new: string; repeat: string; current?: string | undefined; }; }, object>; const typeZod: zod.ZodObject<{ invite: zod.ZodString; password: zod.ZodObject<{ current: zod.ZodOptional; new: zod.ZodString; repeat: zod.ZodString; }, zod.z.core.$strip>; }, zod.z.core.$strip>; } interface Invite { id: string; email: string; access: Access; } namespace Invite { type Creatable = zod.infer; namespace Creatable { const typeZod: zod.ZodObject<{ email: zod.ZodString; access: zod.ZodObject<{ uk: zod.ZodOptional & zod.z.core.$partial, zod.ZodEnum<{ developer: "developer"; read: "read"; write: "write"; admin: "admin"; }>>>; eea: zod.ZodOptional & zod.z.core.$partial, zod.ZodEnum<{ developer: "developer"; read: "read"; write: "write"; admin: "admin"; }>>>; test: zod.ZodOptional & zod.z.core.$partial, zod.ZodEnum<{ developer: "developer"; read: "read"; write: "write"; admin: "admin"; }>>>; "*": zod.ZodOptional>; }, zod.z.core.$strip>>; }, zod.z.core.$strip>; }, zod.z.core.$strip>; const type: import("isly/dist/cjs/object").IslyObject<{ email: string; access: { uk?: Partial> | undefined; eea?: Partial> | undefined; test?: Partial> | undefined; "*"?: { user?: "developer" | "read" | "write" | "admin" | undefined; } | undefined; }; }, object>; } } }