/**
 * JWT Token Management
 *
 * Handles JWT token generation and validation.
 */
import type { JwtPayload, ApiScope } from '../types.js';
/**
 * Generate a JWT token
 */
export declare function generateToken(payload: Omit<JwtPayload, 'iat' | 'exp'>, secret: string, expiresIn?: string): string;
/**
 * Verify and decode a JWT token
 */
export declare function verifyToken(token: string, secret: string): JwtPayload | null;
/**
 * Decode token without verification (for debugging)
 */
export declare function decodeToken(token: string): JwtPayload | null;
/**
 * Check if token is expired
 */
export declare function isTokenExpired(token: string): boolean;
/**
 * Get time until token expires (in seconds)
 */
export declare function getTokenTTL(token: string): number;
/**
 * Refresh a token (generate new one with same payload)
 */
export declare function refreshToken(token: string, secret: string, expiresIn?: string): string | null;
/**
 * Create access token from API key
 */
export declare function createAccessToken(keyId: string, scopes: ApiScope[], secret: string, expiresIn?: string): string;
/**
 * Create user token
 */
export declare function createUserToken(userId: string, scopes: ApiScope[], secret: string, expiresIn?: string): string;
