import { VerifyIdentityResponse } from "../types/onboarding"; import { Environment } from "../client/Config"; export interface FlowOptions { apiKey: string; clientId: string; environment?: Environment; timeout?: number; onComplete?: (result: FlowResult) => void; onError?: (error: Error) => void; onClose?: () => void; } export interface FlowResult { entryId: number; sessionId: string | null; status: string; submittedAt: string | null; verificationResult?: VerifyIdentityResponse; } export declare class SmartComplyFlow { private sdk; private options; private theme; private overlay; private modal; private contentArea; private progressBar; private stepLabel; private stageDots; private brandLabel; private sdkConfig; private currentStep; private selectedCountry; private selectedChannelId; private selectedChannelFields; private selectedIdType; private selectedIdTypeName; private selectedRequiresBack; private collectedFields; private idNumber; private documentBlob; private documentBackBlob; private _documentViaCamera; private identityCheckId; private verificationResult; private livenessEntryId; private isDestroyed; private headerBackBtn; private _keydownHandler; private _visibilityHandler; private _hiddenAtMs; private _popstateHandler; private _historyGuardActive; private _confirmRetries; private _livenessFailures; private _livenessAttemptId; private static readonly MAX_RETRIES; private _ivsName; private _ivsGender; private _ocrName; private _ocrDocNumber; private _ocrExpiry; private _ocrFaceImageUrl; private _ocrIsExpired; private _ocrExpirySoon; private _prewarmedStream; private _ocrPollTimer; private _uiTimeoutId; private sessionExpiryTimer; private sessionExpiredTimer; private _pollStatusTimer; private docCapture; private constructor(); /** * Open the SmartComply verification flow. * * Usage: * SmartComplyFlow.open({ * apiKey: "pk_live_...", * clientId: "uuid-...", * environment: "production", * onComplete: (result) => console.log("Done!", result), * onError: (err) => console.error(err), * onClose: () => console.log("Closed"), * }); */ static open(options: FlowOptions): SmartComplyFlow; /** * Close and destroy the flow widget. */ close(): void; private mount; private initialize; private _showExpiryWarningWhenSafe; private static readonly MAX_EXPIRY_DEFERRALS; private _expiryDeferrals; private _enforceSessionExpiry; private showStep; private renderStep; private renderLoading; private renderWelcome; private renderCountrySelect; private renderIdTypeSelect; private renderIdInput; private renderDocumentCapture; private renderConfirmIdentity; private renderDocumentConfirm; private renderOcrGate; private _renderExpiredDocument; private _renderOcrQualityFail; /** * OCR ran to completion but never produced a single usable field within * the poll window — do not let the flow reach liveness with no verified * identity data. Distinct from _renderOcrQualityFail (a bad photo) since * this covers a genuinely stuck/slow OCR pass instead of a rejected image. */ private _renderOcrTimeout; private renderDone; private _renderRetryLimitReached; private _prewarmCamera; /** * Process document capture result with front/back support */ private processDocumentCaptureResult; /** * Process document blob - common method for both CameraView and DocumentCapture */ private processDocumentBlob; private handleDocumentProcessingError; private renderLiveness; private showErrorStep; private createHeader; private createFooter; private createStepTitle; private createOptionCard; private createPrimaryButton; private createSecondaryButton; /** Click handler that fires once and disables the button, preventing a double-tap double-dispatch. */ private _onceClick; private isDocumentFlow; /** * True when the SDK Config is set to skip data/document verification * entirely and only run the liveness/selfie check — no country picker, * no ID-type picker, no ID-number entry or document capture. Unlike * isDocumentFlow(), there's no channel-shape fallback to infer this from: * a liveness-only config carries no channels at all, so the only signal * is verification_type itself. */ private isLivenessOnlyFlow; /** * The "go back one step" target for a given step, if that step is * navigable — shared by the header back button and the browser * back-button (popstate) handler in mount() so both agree on the same * step order. */ private _getBackAction; private updateProgress; private applyTheme; private injectStyles; } //# sourceMappingURL=SmartComplyFlow.d.ts.map