export type SuccessEvent = {
    code: string;
    state?: string;
    idpRedirectUri?: string;
};
type ErrorType = 'validation_error' | 'employer_connection_error';
export type ErrorEvent = {
    errorMessage: string;
    errorType?: ErrorType;
};
export type Sandbox = 'finch' /** This is to enable the new Finch (simulated) Sandbox */ | 'provider' /** This is to enable the new Provider Sandbox */ | boolean /** This is the old sandbox flag retained for backwards compatibility */;
type BaseConnectOptions = {
    state: string | null;
    onSuccess: (e: SuccessEvent) => void;
    onError: (e: ErrorEvent) => void;
    onClose: () => void;
    zIndex: number;
    apiConfig?: {
        connectUrl: string;
        redirectUrl: string;
    };
};
type ConnectOptionsWithSessionId = BaseConnectOptions & {
    sessionId: string;
    products?: string[];
};
type ConnectOptionsWithClientId = BaseConnectOptions & {
    category: string | null;
    clientId: string;
    manual: boolean;
    payrollProvider: string | null;
    products: string[];
    clientName?: string;
    connectionId?: string;
    sandbox: Sandbox;
};
export type ConnectOptions = ConnectOptionsWithSessionId | ConnectOptionsWithClientId;
type OpenFn = (overrides?: Partial<ConnectOptions>) => void;
export declare const useFinchConnect: (options: Partial<ConnectOptions>) => {
    open: OpenFn;
};
export {};
//# sourceMappingURL=index.d.ts.map