/**
 * Authentication and Tier Types
 *
 * Types for user authentication and subscription tier management
 */
export type Tier = 'free' | 'plus' | 'pro' | 'max';
export interface User {
    id: string;
    email: string;
    name: string | null;
    pluginatorTier: Tier;
    hasPlusDiscount: boolean;
    createdAt: string;
}
export interface AuthSession {
    user: User;
    token: string;
    expiresAt: string;
    /** When the subscription period ends (ISO string). Null for free/lifetime/owner. */
    tierExpiresAt: string | null;
}
export interface LoginCredentials {
    email: string;
    password: string;
}
export interface AuthState {
    isAuthenticated: boolean;
    user: User | null;
    tier: Tier;
    hasPlusDiscount: boolean;
    loading: boolean;
    error: string | null;
}
export interface AuthError {
    code: string;
    message: string;
}
/**
 * Encrypted session file format (v2)
 */
export interface EncryptedSessionFile {
    /** File format version (2 = encrypted) */
    version: 2;
    /** Base64-encoded IV */
    iv: string;
    /** Base64-encoded auth tag */
    authTag: string;
    /** Base64-encoded encrypted session JSON */
    ciphertext: string;
    /** HMAC of session path for integrity verification (optional for backwards compatibility) */
    hmac?: string;
}
/**
 * Plaintext session file format (v1, legacy)
 */
export interface PlaintextSessionFile extends AuthSession {
    version?: 1;
}
/**
 * Union type for session file formats
 */
export type SessionFile = EncryptedSessionFile | PlaintextSessionFile;
//# sourceMappingURL=auth.d.ts.map