/**
 * Token Service
 * Handles JWT token generation and verification
 */
import type { JWTPayload, User, Role, Tenant, Session } from "../types.js";
export interface TokenConfig {
    /**
     * Secret key for JWT signing
     */
    secret: string;
    /**
     * Token expiration time (e.g., "1h", "7d", or seconds)
     */
    expiresIn?: string | number;
}
export interface TokenService {
    /**
     * Generate a JWT token
     */
    generateToken(payload: Partial<JWTPayload>): string;
    /**
     * Verify and decode a JWT token
     */
    verifyToken(token: string): JWTPayload | null;
    /**
     * Decode a token without verification
     */
    decodeToken(token: string): JWTPayload | null;
    /**
     * Generate a token for a user session
     */
    generateUserToken(data: {
        user: User;
        role: Role;
        session: Session;
        tenant?: Tenant | null;
    }): string;
}
export declare function createTokenService(config: TokenConfig): TokenService;
export default createTokenService;
//# sourceMappingURL=token.d.ts.map