import type { OAuthProviderConfig } from '../../config/subscriptions.js';
export interface OAuthStartState {
    readonly authorizationUrl: string;
    readonly state: string;
    readonly verifier: string;
    readonly redirectUri: string;
}
export interface OAuthTokenPayload {
    readonly accessToken: string;
    readonly refreshToken?: string;
    readonly tokenType: string;
    readonly expiresAt?: number;
    readonly scopes?: readonly string[];
}
export declare function createOAuthState(bytes?: number): string;
export declare function createPkceVerifier(bytes?: number): string;
export declare function createPkceChallenge(verifier: string): string;
export declare function parseOAuthScopes(raw: unknown): readonly string[] | undefined;
export declare function buildOAuthAuthorizationStart(config: OAuthProviderConfig, input?: {
    readonly state?: string;
    readonly verifier?: string;
    readonly redirectUri?: string;
}): OAuthStartState;
export declare function exchangeOAuthAuthorizationCode(config: OAuthProviderConfig, input: {
    readonly code: string;
    readonly verifier: string;
    readonly redirectUri: string;
    readonly state?: string;
}): Promise<OAuthTokenPayload>;
export declare function refreshOAuthAccessToken(config: OAuthProviderConfig, refreshToken: string): Promise<OAuthTokenPayload>;
export declare function decodeJwtPayload(token: string): Record<string, unknown> | null;
//# sourceMappingURL=oauth-core.d.ts.map