import { type OAuthTokenResponse } from './oauth-utils.js';
export type OnTokenRefreshCallback = (tokens: OAuthTokenResponse) => void | Promise<void>;
export type OnBeforeRefreshCallback = () => Promise<{
    refreshToken?: string;
    accessToken?: string;
    accessTokenExpiresAt?: number;
} | undefined>;
export interface OAuthTokenManagerOptions {
    serverUrl: string;
    profileName: string;
    clientId: string;
    refreshToken: string;
    accessToken?: string;
    accessTokenExpiresAt?: number;
    onTokenRefresh?: OnTokenRefreshCallback;
    onBeforeRefresh?: OnBeforeRefreshCallback;
}
export declare class OAuthTokenManager {
    private serverUrl;
    private profileName;
    private clientId;
    private refreshToken;
    private accessToken;
    private accessTokenExpiresAt;
    private onTokenRefresh?;
    private onBeforeRefresh?;
    constructor(options: OAuthTokenManagerOptions);
    isAccessTokenExpired(): boolean;
    getSecondsUntilExpiry(): number;
    refreshAccessToken(): Promise<OAuthTokenResponse>;
    getValidAccessToken(): Promise<string>;
}
//# sourceMappingURL=oauth-token-manager.d.ts.map