/** * Input validation helpers. * * All functions throw a descriptive Error on invalid input so callers can * surface actionable messages without catching generic exceptions. */ import type { ChallengeAction } from "../types/liveness"; /** Returns true when s is a non-empty string after trimming. */ export declare function isNonEmpty(s: unknown): s is string; /** * Validates that apiKey looks like a SmartComply public key. * Format: pk_live_<...> or pk_test_<...> */ export declare function validateApiKey(apiKey: unknown): void; /** Throws if clientId is not a valid UUID v4. */ export declare function validateClientId(clientId: unknown): void; /** Throws if countryCode is not a 2-letter ISO 3166-1 alpha-2 code. */ export declare function validateCountryCode(countryCode: unknown): void; /** Throws if the blob is empty or exceeds the given byte limit. */ export declare function validateFileSize(blob: Blob | File, maxBytes: number, label: string): void; /** Throws if the blob's MIME type is not in the accepted image types list. */ export declare function validateImageType(blob: Blob | File, label: string): void; /** Combined validation for a document image blob. */ export declare function validateDocumentBlob(blob: Blob | File): void; /** Combined validation for a liveness video blob. */ export declare function validateVideoBlob(blob: Blob): void; /** Combined validation for a snapshot / autoshot blob. */ export declare function validateSnapshotBlob(blob: Blob): void; /** Throws if any entry in actions is not a backend-accepted challenge action. */ export declare function validateChallengeActions(actions: unknown[]): void; /** Type-guard that narrows a string[] to ChallengeAction[]. */ export declare function toChallengeActions(actions: string[]): ChallengeAction[]; /** Throws if identifier is missing or too short to be plausible. */ export declare function validateIdentifier(identifier: unknown, minLength?: number): void; //# sourceMappingURL=validator.d.ts.map