export type TRegistrationSessionStatus = | 'announced' | 'emailValidated' | 'registered' | 'failed'; export interface IRegistrationSession { id: string; data: { emailAddress: string; hashedEmailToken: string; /** * Salted hash of the 6-digit code delivered alongside the link. */ codeHash: string; /** * Remaining code verification attempts before the session is invalidated. */ codeAttemptsRemaining: number; /** * Opaque pending OIDC authorization transaction retained server-side. * It is never embedded in registration email links. */ oidcTransactionId?: string; status: TRegistrationSessionStatus; validUntil: number; createdAt: number; collectedData: { userData: { username?: string | null; connectedOrgs: string[]; email?: string | null; name?: string | null; status?: 'new' | 'active' | 'deleted' | 'suspended' | null; mobileNumber?: string | null; password?: string | null; passwordHash?: string | null; }; }; }; }