import { UserAuthEntry, UserAuthState } from '../store/userAuth';
interface UseUserAuthFlowOptions {
    /**
     * Called when the polling loop transitions to `connected`.
     * Typically used to retry the original failed API call.
     */
    onConnected?: () => void;
}
interface UseUserAuthFlowReturn {
    entry: UserAuthEntry;
    state: UserAuthState;
    connect: () => Promise<void>;
    isStarting: boolean;
}
/**
 * Orchestrates a user-tier connect flow:
 *   1. `connect()` calls POST /user-auth/start and opens the
 *      authorization URL in a popup.
 *   2. Marks the connector in_progress in redux.
 *   3. Polls GET /user-auth/status every 2s via tanstack-query;
 *      stops polling on a terminal state.
 *   4. On `connected`, calls onConnected so the caller can retry
 *      the original failed API call without forcing a remount.
 *
 * Polling cadence + tanstack-query usage mirrors the admin app's
 * authSuccessQuery — same pattern, scoped per-connector here.
 */
export declare function useUserAuthFlow(connectorId: string, options?: UseUserAuthFlowOptions): UseUserAuthFlowReturn;
/**
 * One-shot fetcher used at card-mount time. Doesn't poll — drops
 * the result into the slice and exits. The polling-on-in_progress
 * behavior is handled separately by useUserAuthFlow above.
 */
export declare function useFetchUserAuthStatus(connectorId: string, enabled: boolean): void;
/**
 * Exposed for tests + the rare "user clicked Disconnect from the
 * customer-identity-mapping menu" path — wipes the slice entry so
 * the next card mount triggers a fresh status fetch.
 */
export declare function useResetUserAuth(): (connectorId: string) => void;
export {};
//# sourceMappingURL=useUserAuthFlow.d.ts.map