import nodeFetch, { Headers } from 'node-fetch';
import type { AbortSignal } from 'abort-controller';
declare type ServerTokenState = {
    serverToken: string;
    serverTokenExpiryMilliseconds: number;
    refreshToken: string;
    ngrokTunnelToken: string;
    projectId: string;
};
export declare class TestimAuthApi {
    private baseUrl;
    private fetch;
    tokenState?: ServerTokenState;
    constructor(baseUrl?: string, fetch?: typeof nodeFetch);
    getToken(projectId: string, ciToken: string, signal?: AbortSignal): Promise<string>;
    isAuthenticated(signal?: AbortSignal): Promise<boolean>;
    addAuthorizationHeader(headers: Headers): void;
    private obtainTokenFromCiTokenIfNeeded;
    private refreshTokenFromObtainedToken;
    private obtainTokenFromCiToken;
}
export {};
