UNPKG

aegis-auth

Version:

A credentials-based auth solution for Next.js (and other Node projects) with IP rate-limiting, account lockouts, and sessions in DB.

134 lines 3.96 kB
import { z } from "zod"; export declare const completeEmailChangeSchema: z.ZodObject<{ token: z.ZodString; }, "strip", z.ZodTypeAny, { token: string; }, { token: string; }>; export declare const completePasswordResetSchema: z.ZodObject<{ token: z.ZodString; newPassword: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { token: string; newPassword: string; }, { token: string; newPassword: string; }>; export declare const createSessionSchema: z.ZodObject<{ userId: z.ZodString; }, "strip", z.ZodTypeAny, { userId: string; }, { userId: string; }>; export declare const createVerificationSchema: z.ZodObject<{ userId: z.ZodString; type: z.ZodNativeEnum<{ EMAIL_VERIFICATION: "EMAIL_VERIFICATION"; PASSWORD_RESET: "PASSWORD_RESET"; ACCOUNT_DELETION: "ACCOUNT_DELETION"; EMAIL_CHANGE: "EMAIL_CHANGE"; }>; tokenExpirySeconds: z.ZodOptional<z.ZodNumber>; }, "strip", z.ZodTypeAny, { userId: string; type: "ACCOUNT_DELETION" | "EMAIL_VERIFICATION" | "EMAIL_CHANGE" | "PASSWORD_RESET"; tokenExpirySeconds?: number | undefined; }, { userId: string; type: "ACCOUNT_DELETION" | "EMAIL_VERIFICATION" | "EMAIL_CHANGE" | "PASSWORD_RESET"; tokenExpirySeconds?: number | undefined; }>; export declare const initiateEmailChangeSchema: z.ZodObject<{ userId: z.ZodString; newEmail: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { userId: string; newEmail: string; }, { userId: string; newEmail: string; }>; export declare const initiatePasswordResetSchema: z.ZodObject<{ email: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { email: string; }, { email: string; }>; export declare const loginSchema: z.ZodObject<{ usernameOrEmail: z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodEffects<z.ZodString, string, string>]>; password: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { password: string; usernameOrEmail: string; }, { password: string; usernameOrEmail: string; }>; export declare const logoutUserSchema: z.ZodObject<{ sessionToken: z.ZodString; }, "strip", z.ZodTypeAny, { sessionToken: string; }, { sessionToken: string; }>; export declare const registerSchema: z.ZodObject<{ username: z.ZodEffects<z.ZodString, string, string>; email: z.ZodEffects<z.ZodString, string, string>; password: z.ZodEffects<z.ZodString, string, string>; }, "strip", z.ZodTypeAny, { password: string; username: string; email: string; }, { password: string; username: string; email: string; }>; export declare const revokeAllSessionsForUserSchema: z.ZodObject<{ userId: z.ZodString; }, "strip", z.ZodTypeAny, { userId: string; }, { userId: string; }>; export declare const revokeSessionSchema: z.ZodObject<{ sessionToken: z.ZodString; }, "strip", z.ZodTypeAny, { sessionToken: string; }, { sessionToken: string; }>; export declare const useVerificationTokenSchema: z.ZodObject<{ token: z.ZodString; type: z.ZodNativeEnum<{ EMAIL_VERIFICATION: "EMAIL_VERIFICATION"; PASSWORD_RESET: "PASSWORD_RESET"; ACCOUNT_DELETION: "ACCOUNT_DELETION"; EMAIL_CHANGE: "EMAIL_CHANGE"; }>; }, "strip", z.ZodTypeAny, { type: "ACCOUNT_DELETION" | "EMAIL_VERIFICATION" | "EMAIL_CHANGE" | "PASSWORD_RESET"; token: string; }, { type: "ACCOUNT_DELETION" | "EMAIL_VERIFICATION" | "EMAIL_CHANGE" | "PASSWORD_RESET"; token: string; }>; export declare const validateAndRotateSessionSchema: z.ZodObject<{ sessionToken: z.ZodString; }, "strip", z.ZodTypeAny, { sessionToken: string; }, { sessionToken: string; }>; export declare const verifyEmailSchema: z.ZodObject<{ token: z.ZodString; }, "strip", z.ZodTypeAny, { token: string; }, { token: string; }>; //# sourceMappingURL=schemas.d.ts.map