/**
 * Device code response from OAuth provider
 */
export interface DeviceCodeResponse {
    device_code: string;
    user_code: string;
    expires_in: number;
    interval: number;
    verification_uri: string;
    verification_uri_complete: string;
}
/**
 * Save authentication token to system keyring
 */
export declare function saveAuthToken(token: string): Promise<void>;
/**
 * Get authentication token from system keyring or state file
 * Returns null if no token is stored
 *
 * In test environments, checks GUILD_STATE_DIR/auth-state.json ONLY (no fallback)
 * In production, checks system keyring
 */
export declare function getAuthToken(): Promise<string | null>;
/**
 * Clear authentication token from system keyring
 */
export declare function clearAuthToken(): Promise<void>;
/**
 * Start OAuth device flow
 * @param authUrl - Base URL of the OAuth provider (guildcore)
 * @param returnUrl - Optional custom URL to redirect to after authentication
 * @param returnLabel - Optional friendly label for return button (e.g., "VSCode")
 * @returns Device code response with verification URL and code
 */
export declare function startDeviceFlow(authUrl?: string, returnUrl?: string, returnLabel?: string): Promise<DeviceCodeResponse>;
/**
 * Poll for OAuth token
 * @param authUrl - Base URL of the OAuth provider (guildcore)
 * @param code - Device code from startDeviceFlow
 * @returns Access token if successful, null if failed/expired
 */
export declare function pollForToken(authUrl: string, code: string, interval: number): Promise<string | null>;
/**
 * Perform complete login flow
 * @param returnUrl - Optional custom URL to redirect to after authentication
 * @param returnLabel - Optional friendly label for return button (e.g., "VSCode")
 * @returns true if successful, false otherwise
 */
export declare function login(returnUrl?: string, returnLabel?: string): Promise<boolean>;
/**
 * Perform logout
 */
export declare function logout(): Promise<void>;
/**
 * Get current authentication status
 * @returns Object with authenticated flag and optional token
 */
export declare function getAuthStatus(): Promise<{
    authenticated: boolean;
    token?: string;
}>;
/**
 * Create an authenticated URL by embedding the auth token.
 * Used for operations requiring x-access-token authentication.
 * @param targetUrl - The URL to authenticate
 * @returns URL with x-access-token credentials embedded, or null if not authenticated
 */
export declare function getAuthenticatedUrl(targetUrl: string): Promise<string | null>;
//# sourceMappingURL=auth.d.ts.map