type Brand = { readonly _brand: B; }; type Branded = T & Brand; export type PlainPassword = Branded; export type PasswordHash = Branded; export type UserId = Branded; export type User = { id: UserId; email: string; passwordHash: PasswordHash; createdAt: number; updatedAt: number; }; export type PublicUser = { id: UserId; email: string; }; export type AccessTokenPayload = { sub: UserId; email: string; iat: number; exp: number; }; export type AccessToken = Branded; export type RefreshToken = Branded; export type StoredRefreshTokenId = Branded; export type StoredRefreshToken = { id: StoredRefreshTokenId; userId: UserId; token: RefreshToken; expiresAt: number; createdAt: number; }; export type JwtSecret = Branded; export type AuthConfig = { algorithm: "HS256" | "RS256"; accessTokenExpiresIn: number; refreshTokenExpiresIn: number; jwtSecret: JwtSecret; }; type ErrorCode = "INVALID_CREDENTIALS" | "USER_ALREADY_EXISTS" | "TOKEN_EXPIRED" | "TOKEN_INVALID" | "TOKEN_NOT_FOUND" | "USER_NOT_FOUND"; export type AuthError = { kind: ErrorCode; }; export {}; //# sourceMappingURL=types.d.ts.map