import type { TrustedDeviceChallengeResource } from './biometricCredential'; import type { ClerkAPIError } from './errors'; import type { PublicKeyCredentialCreationOptionsWithoutExtensions } from './passkey'; import type { PhoneCodeChannel } from './phoneCodeChannel'; import type { ClerkResource } from './resource'; import type { VerificationJSONSnapshot } from './snapshots'; export interface VerificationResource extends ClerkResource { attempts: number | null; error: ClerkAPIError | null; expireAt: Date | null; externalVerificationRedirectURL: URL | null; nonce: string | null; message: string | null; status: VerificationStatus | null; strategy: string | null; verifiedAtClient: string | null; verifiedFromTheSameClient: () => boolean; channel?: PhoneCodeChannel; /** * The challenge to sign when the verification uses the `trusted_device` strategy. * @experimental */ trustedDeviceChallenge?: TrustedDeviceChallengeResource | null; __internal_toSnapshot: () => VerificationJSONSnapshot; } export interface PasskeyVerificationResource extends VerificationResource { publicKey: PublicKeyCredentialCreationOptionsWithoutExtensions | null; } export type VerificationStatus = 'unverified' | 'verified' | 'transferable' | 'failed' | 'expired'; export interface CodeVerificationAttemptParam { code: string; signature?: never; } export interface SignatureVerificationAttemptParam { code?: never; signature: string; } export type VerificationAttemptParams = CodeVerificationAttemptParam | SignatureVerificationAttemptParam; export interface StartEmailLinkFlowParams { redirectUrl: string; } export type CreateEmailLinkFlowReturn = { startEmailLinkFlow: (params: Params) => Promise; cancelEmailLinkFlow: () => void; }; export interface StartEnterpriseSSOLinkFlowParams { redirectUrl: string; } export type CreateEnterpriseSSOLinkFlowReturn = { startEnterpriseSSOLinkFlow: (params: Params) => Promise; cancelEnterpriseSSOLinkFlow: () => void; };