import { z } from 'zod'; import { AdditionalIdentifier, MfaFactor, SignInIdentifier } from '../foundations/index.js'; import type { EmailVerificationCodePayload, PhoneVerificationCodePayload } from './verification-code.js'; /** * User interaction events defined in Logto RFC 0004. * @see {@link https://github.com/logto-io/rfcs | Logto RFCs} for more information. */ export declare enum InteractionEvent { SignIn = "SignIn", Register = "Register", ForgotPassword = "ForgotPassword" } export type VerificationIdentifier = { type: SignInIdentifier | AdditionalIdentifier; value: string; }; export declare const verificationIdentifierGuard: z.ZodObject<{ type: z.ZodUnion<[z.ZodNativeEnum, z.ZodNativeEnum]>; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier | AdditionalIdentifier; }, { value: string; type: SignInIdentifier | AdditionalIdentifier; }>; /** Identifiers that can be used to uniquely identify a user. */ export type InteractionIdentifier = { type: T; value: string; }; export declare const interactionIdentifierGuard: z.ZodObject<{ type: z.ZodNativeEnum; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier; }, { value: string; type: SignInIdentifier; }>; export type VerificationCodeSignInIdentifier = SignInIdentifier.Email | SignInIdentifier.Phone; /** Currently only email and phone are supported for verification code validation. */ export type VerificationCodeIdentifier = { type: T; value: string; }; export declare const verificationCodeIdentifierGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier.Email; }, { value: string; type: SignInIdentifier.Email; }>, z.ZodObject<{ type: z.ZodLiteral; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier.Phone; }, { value: string; type: SignInIdentifier.Phone; }>]>; /** Payload type for `POST /api/experience/verification/{social|sso}/:connectorId/authorization-uri`. */ export type SocialAuthorizationUrlPayload = { state: string; redirectUri: string; scope?: string; }; export declare const socialAuthorizationUrlPayloadGuard: z.ZodObject<{ state: z.ZodString; redirectUri: z.ZodString; scope: z.ZodOptional; }, "strip", z.ZodTypeAny, { redirectUri: string; state: string; scope?: string | undefined; }, { redirectUri: string; state: string; scope?: string | undefined; }>; /** Payload type for `POST /api/experience/verification/{social|sso}/:connectorId/verify`. */ export type SocialVerificationCallbackPayload = { /** The callback data from the social connector. */ connectorData: Record; /** * Verification ID is used to retrieve the verification record. * Throws an error if the verification record is not found. * * Optional for Google one tap callback as it does not have a pre-created verification record. **/ verificationId?: string; }; export declare const socialVerificationCallbackPayloadGuard: z.ZodObject<{ connectorData: z.ZodRecord>; verificationId: z.ZodOptional; }, "strip", z.ZodTypeAny, { connectorData: Record; verificationId?: string | undefined; }, { connectorData: Record; verificationId?: string | undefined; }>; /** Payload type for `POST /api/experience/verification/password`. */ export type PasswordVerificationPayload = { identifier: InteractionIdentifier; password: string; }; export declare const passwordVerificationPayloadGuard: z.ZodObject<{ identifier: z.ZodObject<{ type: z.ZodNativeEnum; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier; }, { value: string; type: SignInIdentifier; }>; password: z.ZodString; }, "strip", z.ZodTypeAny, { password: string; identifier: { value: string; type: SignInIdentifier; }; }, { password: string; identifier: { value: string; type: SignInIdentifier; }; }>; /** Payload type for `POST /api/experience/verification/totp/verify`. */ export type TotpVerificationVerifyPayload = { code: string; /** * Required for verifying the newly created TOTP secret verification record in the session. * (For new TOTP setup use only) * * If not provided, a new TOTP verification will be generated and validated against the user's existing TOTP secret in their profile. * (For existing TOTP verification use only) */ verificationId?: string; }; export declare const totpVerificationVerifyPayloadGuard: z.ZodObject<{ code: z.ZodString; verificationId: z.ZodOptional; }, "strip", z.ZodTypeAny, { code: string; verificationId?: string | undefined; }, { code: string; verificationId?: string | undefined; }>; /** Payload type for `POST /api/experience/verification/backup-code/verify */ export type BackupCodeVerificationVerifyPayload = { code: string; }; export declare const backupCodeVerificationVerifyPayloadGuard: z.ZodObject<{ code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; }, { code: string; }>; /** Payload type for `POST /api/experience/verification/one-time-token/verify` */ export type OneTimeTokenVerificationVerifyPayload = { /** * The email address that the one-time token was sent to. Currently only email identifier is supported. */ identifier: InteractionIdentifier; token: string; }; export declare const oneTimeTokenVerificationVerifyPayloadGuard: z.ZodObject<{ identifier: z.ZodObject<{ type: z.ZodLiteral; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier.Email; }, { value: string; type: SignInIdentifier.Email; }>; token: z.ZodString; }, "strip", z.ZodTypeAny, { identifier: { value: string; type: SignInIdentifier.Email; }; token: string; }, { identifier: { value: string; type: SignInIdentifier.Email; }; token: string; }>; /** Payload type for `POST /api/experience/identification`. */ export type IdentificationApiPayload = { /** * SignIn and ForgotPassword interaction events: * Required to retrieve the verification record to validate the user's identity. * * Register interaction event: * - If provided, new user profiles will be appended to the registration session using the verified information from the verification record. * - If not provided, the user creation process will be triggered directly using the existing profile information in the current registration session. */ verificationId?: string; /** * Link social identity to a related user account with the same email or phone. * Only applicable for social verification records and a related user account is found. */ linkSocialIdentity?: boolean; }; export declare const identificationApiPayloadGuard: z.ZodObject<{ verificationId: z.ZodOptional; linkSocialIdentity: z.ZodOptional; }, "strip", z.ZodTypeAny, { verificationId?: string | undefined; linkSocialIdentity?: boolean | undefined; }, { verificationId?: string | undefined; linkSocialIdentity?: boolean | undefined; }>; /** Payload type for `POST /api/experience`. */ export type CreateExperienceApiPayload = { interactionEvent: InteractionEvent; captchaToken?: string; }; export declare const CreateExperienceApiPayloadGuard: z.ZodObject<{ interactionEvent: z.ZodNativeEnum; captchaToken: z.ZodOptional; }, "strip", z.ZodTypeAny, { interactionEvent: InteractionEvent; captchaToken?: string | undefined; }, { interactionEvent: InteractionEvent; captchaToken?: string | undefined; }>; /** Payload type for `POST /api/experience/profile */ export declare const updateProfileApiPayloadGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: SignInIdentifier.Username; }, { value: string; type: SignInIdentifier.Username; }>, z.ZodObject<{ type: z.ZodLiteral<"password">; value: z.ZodString; }, "strip", z.ZodTypeAny, { value: string; type: "password"; }, { value: string; type: "password"; }>, z.ZodObject<{ type: z.ZodLiteral; verificationId: z.ZodString; }, "strip", z.ZodTypeAny, { type: SignInIdentifier.Email; verificationId: string; }, { type: SignInIdentifier.Email; verificationId: string; }>, z.ZodObject<{ type: z.ZodLiteral; verificationId: z.ZodString; }, "strip", z.ZodTypeAny, { type: SignInIdentifier.Phone; verificationId: string; }, { type: SignInIdentifier.Phone; verificationId: string; }>, z.ZodObject<{ type: z.ZodLiteral<"social">; verificationId: z.ZodString; }, "strip", z.ZodTypeAny, { type: "social"; verificationId: string; }, { type: "social"; verificationId: string; }>, z.ZodObject<{ type: z.ZodLiteral<"extraProfile">; values: z.ZodRecord; }, "strip", z.ZodTypeAny, { type: "extraProfile"; values: Record; }, { type: "extraProfile"; values: Record; }>]>; export type UpdateProfileApiPayload = z.infer; /** * Legacy interaction identifier payload guard * * @remark * Following are the types for legacy interaction APIs. They are all treated as deprecated, and can be removed * once the new Experience API are fully implemented and migrated. * ================================================================================================================= */ /** * Detailed interaction identifier payload guard */ declare const usernamePasswordPayloadGuard: z.ZodObject<{ username: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { username: string; password: string; }, { username: string; password: string; }>; export type UsernamePasswordPayload = z.infer; export declare const emailPasswordPayloadGuard: z.ZodObject<{ email: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { email: string; password: string; }, { email: string; password: string; }>; export type EmailPasswordPayload = z.infer; export declare const phonePasswordPayloadGuard: z.ZodObject<{ phone: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { phone: string; password: string; }, { phone: string; password: string; }>; export type PhonePasswordPayload = z.infer; export declare const socialConnectorPayloadGuard: z.ZodObject<{ connectorId: z.ZodString; connectorData: z.ZodRecord>; }, "strip", z.ZodTypeAny, { connectorId: string; connectorData: Record; }, { connectorId: string; connectorData: Record; }>; export type SocialConnectorPayload = z.infer; export declare const socialEmailPayloadGuard: z.ZodObject<{ connectorId: z.ZodString; email: z.ZodString; }, "strip", z.ZodTypeAny, { email: string; connectorId: string; }, { email: string; connectorId: string; }>; export type SocialEmailPayload = z.infer; export declare const socialPhonePayloadGuard: z.ZodObject<{ connectorId: z.ZodString; phone: z.ZodString; }, "strip", z.ZodTypeAny, { phone: string; connectorId: string; }, { phone: string; connectorId: string; }>; export type SocialPhonePayload = z.infer; export declare const eventGuard: z.ZodNativeEnum; export declare const identifierPayloadGuard: z.ZodUnion<[z.ZodObject<{ username: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { username: string; password: string; }, { username: string; password: string; }>, z.ZodObject<{ email: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { email: string; password: string; }, { email: string; password: string; }>, z.ZodObject<{ phone: z.ZodString; password: z.ZodString; }, "strip", z.ZodTypeAny, { phone: string; password: string; }, { phone: string; password: string; }>, z.ZodObject<{ email: z.ZodString; verificationCode: z.ZodString; }, "strip", z.ZodTypeAny, { email: string; verificationCode: string; }, { email: string; verificationCode: string; }>, z.ZodObject<{ phone: z.ZodString; verificationCode: z.ZodString; }, "strip", z.ZodTypeAny, { phone: string; verificationCode: string; }, { phone: string; verificationCode: string; }>, z.ZodObject<{ connectorId: z.ZodString; connectorData: z.ZodRecord>; }, "strip", z.ZodTypeAny, { connectorId: string; connectorData: Record; }, { connectorId: string; connectorData: Record; }>, z.ZodObject<{ connectorId: z.ZodString; email: z.ZodString; }, "strip", z.ZodTypeAny, { email: string; connectorId: string; }, { email: string; connectorId: string; }>, z.ZodObject<{ connectorId: z.ZodString; phone: z.ZodString; }, "strip", z.ZodTypeAny, { phone: string; connectorId: string; }, { phone: string; connectorId: string; }>]>; export type IdentifierPayload = UsernamePasswordPayload | EmailPasswordPayload | PhonePasswordPayload | EmailVerificationCodePayload | PhoneVerificationCodePayload | SocialConnectorPayload | SocialPhonePayload | SocialEmailPayload; export declare const profileGuard: z.ZodObject<{ username: z.ZodOptional; email: z.ZodOptional; phone: z.ZodOptional; connectorId: z.ZodOptional; password: z.ZodOptional; }, "strip", z.ZodTypeAny, { username?: string | undefined; email?: string | undefined; phone?: string | undefined; password?: string | undefined; connectorId?: string | undefined; }, { username?: string | undefined; email?: string | undefined; phone?: string | undefined; password?: string | undefined; connectorId?: string | undefined; }>; export type Profile = z.infer; export declare enum MissingProfile { username = "username", email = "email", phone = "phone", password = "password", emailOrPhone = "emailOrPhone", extraProfile = "extraProfile" } export declare const bindTotpPayloadGuard: z.ZodObject<{ type: z.ZodLiteral; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; type: MfaFactor.TOTP; }, { code: string; type: MfaFactor.TOTP; }>; export type BindTotpPayload = z.infer; export declare const bindWebAuthnPayloadGuard: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; rawId: z.ZodString; /** * The response from WebAuthn API * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential} */ response: z.ZodObject<{ clientDataJSON: z.ZodString; attestationObject: z.ZodString; authenticatorData: z.ZodOptional; transports: z.ZodOptional, "many">>; publicKeyAlgorithm: z.ZodOptional; publicKey: z.ZodOptional; }, "strip", z.ZodTypeAny, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }>; authenticatorAttachment: z.ZodOptional>; clientExtensionResults: z.ZodObject<{ appid: z.ZodOptional; crepProps: z.ZodOptional; }, "strip", z.ZodTypeAny, { rk?: boolean | undefined; }, { rk?: boolean | undefined; }>>; hmacCreateSecret: z.ZodOptional; }, "strip", z.ZodTypeAny, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }>; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }>; export type BindWebAuthnPayload = z.infer; export declare const bindBackupCodePayloadGuard: z.ZodObject<{ type: z.ZodLiteral; }, "strip", z.ZodTypeAny, { type: MfaFactor.BackupCode; }, { type: MfaFactor.BackupCode; }>; export type BindBackupCodePayload = z.infer; export declare const bindMfaPayloadGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; type: MfaFactor.TOTP; }, { code: string; type: MfaFactor.TOTP; }>, z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; rawId: z.ZodString; /** * The response from WebAuthn API * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential} */ response: z.ZodObject<{ clientDataJSON: z.ZodString; attestationObject: z.ZodString; authenticatorData: z.ZodOptional; transports: z.ZodOptional, "many">>; publicKeyAlgorithm: z.ZodOptional; publicKey: z.ZodOptional; }, "strip", z.ZodTypeAny, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }>; authenticatorAttachment: z.ZodOptional>; clientExtensionResults: z.ZodObject<{ appid: z.ZodOptional; crepProps: z.ZodOptional; }, "strip", z.ZodTypeAny, { rk?: boolean | undefined; }, { rk?: boolean | undefined; }>>; hmacCreateSecret: z.ZodOptional; }, "strip", z.ZodTypeAny, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }>; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }>, z.ZodObject<{ type: z.ZodLiteral; }, "strip", z.ZodTypeAny, { type: MfaFactor.BackupCode; }, { type: MfaFactor.BackupCode; }>]>; export type BindMfaPayload = z.infer; /** @deprecated Legacy interaction API use only */ export declare const totpVerificationPayloadGuard: z.ZodObject<{ type: z.ZodLiteral; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; type: MfaFactor.TOTP; }, { code: string; type: MfaFactor.TOTP; }>; /** @deprecated Legacy interaction API use only */ export type TotpVerificationPayload = z.infer; export declare const webAuthnVerificationPayloadGuard: z.ZodObject; id: z.ZodString; rawId: z.ZodString; /** * The response from WebAuthn API * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential} */ response: z.ZodObject<{ clientDataJSON: z.ZodString; attestationObject: z.ZodString; authenticatorData: z.ZodOptional; transports: z.ZodOptional, "many">>; publicKeyAlgorithm: z.ZodOptional; publicKey: z.ZodOptional; }, "strip", z.ZodTypeAny, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }>; authenticatorAttachment: z.ZodOptional>; clientExtensionResults: z.ZodObject<{ appid: z.ZodOptional; crepProps: z.ZodOptional; }, "strip", z.ZodTypeAny, { rk?: boolean | undefined; }, { rk?: boolean | undefined; }>>; hmacCreateSecret: z.ZodOptional; }, "strip", z.ZodTypeAny, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }>; }, "response"> & { response: z.ZodObject<{ clientDataJSON: z.ZodString; authenticatorData: z.ZodString; signature: z.ZodString; userHandle: z.ZodOptional; }, "strip", z.ZodTypeAny, { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }, { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }>; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }>; export type WebAuthnVerificationPayload = z.infer; export declare const backupCodeVerificationPayloadGuard: z.ZodObject<{ type: z.ZodLiteral; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; type: MfaFactor.BackupCode; }, { code: string; type: MfaFactor.BackupCode; }>; export type BackupCodeVerificationPayload = z.infer; export declare const verifyMfaPayloadGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; type: MfaFactor.TOTP; }, { code: string; type: MfaFactor.TOTP; }>, z.ZodObject; id: z.ZodString; rawId: z.ZodString; /** * The response from WebAuthn API * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential} */ response: z.ZodObject<{ clientDataJSON: z.ZodString; attestationObject: z.ZodString; authenticatorData: z.ZodOptional; transports: z.ZodOptional, "many">>; publicKeyAlgorithm: z.ZodOptional; publicKey: z.ZodOptional; }, "strip", z.ZodTypeAny, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }, { clientDataJSON: string; attestationObject: string; publicKey?: string | undefined; transports?: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[] | undefined; authenticatorData?: string | undefined; publicKeyAlgorithm?: number | undefined; }>; authenticatorAttachment: z.ZodOptional>; clientExtensionResults: z.ZodObject<{ appid: z.ZodOptional; crepProps: z.ZodOptional; }, "strip", z.ZodTypeAny, { rk?: boolean | undefined; }, { rk?: boolean | undefined; }>>; hmacCreateSecret: z.ZodOptional; }, "strip", z.ZodTypeAny, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }, { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }>; }, "response"> & { response: z.ZodObject<{ clientDataJSON: z.ZodString; authenticatorData: z.ZodString; signature: z.ZodString; userHandle: z.ZodOptional; }, "strip", z.ZodTypeAny, { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }, { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }>; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }, { type: MfaFactor.WebAuthn; id: string; rawId: string; response: { clientDataJSON: string; authenticatorData: string; signature: string; userHandle?: string | undefined; }; clientExtensionResults: { appid?: boolean | undefined; crepProps?: { rk?: boolean | undefined; } | undefined; hmacCreateSecret?: boolean | undefined; }; authenticatorAttachment?: "platform" | "cross-platform" | undefined; }>, z.ZodObject<{ type: z.ZodLiteral; code: z.ZodString; }, "strip", z.ZodTypeAny, { code: string; type: MfaFactor.BackupCode; }, { code: string; type: MfaFactor.BackupCode; }>]>; export type VerifyMfaPayload = z.infer; export declare const pendingTotpGuard: z.ZodObject<{ type: z.ZodLiteral; secret: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.TOTP; secret: string; }, { type: MfaFactor.TOTP; secret: string; }>; export type PendingTotp = z.infer; export declare const pendingWebAuthnGuard: z.ZodObject<{ type: z.ZodLiteral; challenge: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; challenge: string; }, { type: MfaFactor.WebAuthn; challenge: string; }>; export type PendingWebAuthn = z.infer; export declare const pendingBackupCodeGuard: z.ZodObject<{ type: z.ZodLiteral; codes: z.ZodArray; }, "strip", z.ZodTypeAny, { type: MfaFactor.BackupCode; codes: string[]; }, { type: MfaFactor.BackupCode; codes: string[]; }>; export type PendingBackupCode = z.infer; export declare const pendingEmailVerificationCodeGuard: z.ZodObject<{ type: z.ZodLiteral; email: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.EmailVerificationCode; email: string; }, { type: MfaFactor.EmailVerificationCode; email: string; }>; export type PendingEmailVerificationCode = z.infer; export declare const pendingPhoneVerificationCodeGuard: z.ZodObject<{ type: z.ZodLiteral; phone: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.PhoneVerificationCode; phone: string; }, { type: MfaFactor.PhoneVerificationCode; phone: string; }>; export type PendingPhoneVerificationCode = z.infer; export declare const pendingMfaGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral; secret: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.TOTP; secret: string; }, { type: MfaFactor.TOTP; secret: string; }>, z.ZodObject<{ type: z.ZodLiteral; challenge: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; challenge: string; }, { type: MfaFactor.WebAuthn; challenge: string; }>, z.ZodObject<{ type: z.ZodLiteral; codes: z.ZodArray; }, "strip", z.ZodTypeAny, { type: MfaFactor.BackupCode; codes: string[]; }, { type: MfaFactor.BackupCode; codes: string[]; }>, z.ZodObject<{ type: z.ZodLiteral; email: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.EmailVerificationCode; email: string; }, { type: MfaFactor.EmailVerificationCode; email: string; }>, z.ZodObject<{ type: z.ZodLiteral; phone: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.PhoneVerificationCode; phone: string; }, { type: MfaFactor.PhoneVerificationCode; phone: string; }>]>; export type PendingMfa = z.infer; export declare const bindTotpGuard: z.ZodObject<{ type: z.ZodLiteral; secret: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.TOTP; secret: string; }, { type: MfaFactor.TOTP; secret: string; }>; export type BindTotp = z.infer; export declare const bindWebAuthnGuard: z.ZodObject<{ type: z.ZodLiteral; rpId: z.ZodString; credentialId: z.ZodString; publicKey: z.ZodString; transports: z.ZodArray, "many">; counter: z.ZodNumber; agent: z.ZodString; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; rpId: string; credentialId: string; publicKey: string; transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[]; counter: number; agent: string; name?: string | undefined; }, { type: MfaFactor.WebAuthn; rpId: string; credentialId: string; publicKey: string; transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[]; counter: number; agent: string; name?: string | undefined; }>; export type BindWebAuthn = z.infer; export declare const bindBackupCodeGuard: z.ZodObject<{ type: z.ZodLiteral; codes: z.ZodArray; }, "strip", z.ZodTypeAny, { type: MfaFactor.BackupCode; codes: string[]; }, { type: MfaFactor.BackupCode; codes: string[]; }>; export type BindBackupCode = z.infer; export declare const bindMfaGuard: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{ type: z.ZodLiteral; secret: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor.TOTP; secret: string; }, { type: MfaFactor.TOTP; secret: string; }>, z.ZodObject<{ type: z.ZodLiteral; rpId: z.ZodString; credentialId: z.ZodString; publicKey: z.ZodString; transports: z.ZodArray, "many">; counter: z.ZodNumber; agent: z.ZodString; name: z.ZodOptional; }, "strip", z.ZodTypeAny, { type: MfaFactor.WebAuthn; rpId: string; credentialId: string; publicKey: string; transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[]; counter: number; agent: string; name?: string | undefined; }, { type: MfaFactor.WebAuthn; rpId: string; credentialId: string; publicKey: string; transports: ("usb" | "nfc" | "ble" | "internal" | "cable" | "hybrid" | "smart-card")[]; counter: number; agent: string; name?: string | undefined; }>, z.ZodObject<{ type: z.ZodLiteral; codes: z.ZodArray; }, "strip", z.ZodTypeAny, { type: MfaFactor.BackupCode; codes: string[]; }, { type: MfaFactor.BackupCode; codes: string[]; }>]>; export type BindMfa = z.infer; export declare const verifyMfaResultGuard: z.ZodObject<{ type: z.ZodNativeEnum; id: z.ZodString; }, "strip", z.ZodTypeAny, { type: MfaFactor; id: string; }, { type: MfaFactor; id: string; }>; export type VerifyMfaResult = z.infer; export {};