type OccubuyEnvironment = "sandbox" | "production";
interface OccubuyScoreResult {
    status: "success";
    score: number;
    band: "strong" | "moderate" | "limited";
    verifiedAt: string;
    /** scoreId, handed back by /share as a confirmation reference - see US D1.3 */
    reference: string;
}
interface OccubuyCancelResult {
    status: "cancelled";
}
interface OccubuyDeclineResult {
    status: "declined";
}
type OccubuyErrorCode = "INVALID_APPLICANT" | "START_FAILED" | "BANK_CONNECTION_FAILED" | "POLL_FAILED" | "POLL_TIMEOUT" | "SHARE_FAILED";
interface OccubuyErrorResult {
    code: OccubuyErrorCode;
    message: string;
}
/** comes from whatever form the partner already had the renter fill out - no login on our side */
interface OccubuyApplicant {
    fullName: string;
    email: string;
    phone: string;
    /** ISO date, e.g. "1998-04-12" - has to make them 18+ */
    dob: string;
    address: string;
}
interface OccubuyInitConfig {
    apiKey: string;
    /** Where to render the widget, either a CSS selector like "#occubuy-widget" or the actual element. */
    container: string | HTMLElement;
    applicant: OccubuyApplicant;
    /**
     * Where the backend actually lives - defaults to localhost:8787 for local dev. Set this
     * to the real deployed backend URL once it's up on cPanel, e.g. "https://api.occubuy.example".
     */
    apiBase?: string;
    environment?: OccubuyEnvironment;
    onComplete?: (result: OccubuyScoreResult) => void;
    onCancel?: (result: OccubuyCancelResult) => void;
    /** Fires if the customer sees their score but decides not to share it with the partner. */
    onDecline?: (result: OccubuyDeclineResult) => void;
    /** Fires whenever the widget hits an unrecoverable error, alongside showing its own error screen. */
    onError?: (error: OccubuyErrorResult) => void;
}
interface OccubuyScoreInstance {
    start: () => void;
}
declare function init(config: OccubuyInitConfig): OccubuyScoreInstance;

export { type OccubuyApplicant, type OccubuyCancelResult, type OccubuyDeclineResult, type OccubuyEnvironment, type OccubuyErrorCode, type OccubuyErrorResult, type OccubuyInitConfig, type OccubuyScoreInstance, type OccubuyScoreResult, init };
