diff --git a/index.d.ts b/index.d.ts index 6b41b1c..2e6af15 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2486,7 +2486,7 @@ declare global { // admin UI and any client use the same contract as the server. /** Every method that can appear in the `amr` claim, including the password. */ - export type AdminAuthMethod = "pwd" | "totp" | "recovery" | "webauthn" + export type AdminAuthMethod = "pwd" | "totp" | "recovery" | "email" | "webauthn" /** Factors the login offer can contain (no password). */ export type AdminMfaMethod = Exclude @@ -2499,6 +2499,8 @@ declare global { /** Policy requires a factor and the grace period is over. */ enrollmentRequired?: boolean methods: AdminMfaMethod[] + /** Masked address when the e-mail factor is one of the methods. */ + emailHint?: string } /** Step-1 answer for an account without an active factor. */ @@ -2516,6 +2518,11 @@ declare global { export interface AdminMfaStatus { totpEnabled: boolean webauthnCredentials: number + /** The e-mail code factor is explicit opt-in and never enabled automatically. */ + emailEnabled: boolean + /** Masked verified address, e.g. `a***@example.com`. */ + email?: string + emailVerified: boolean recoveryCodesRemaining: number enforced: boolean policy: "off" | "optional" | "required"