import type { Db } from "@zmeel/db";
export interface Subscription {
    id: string;
    companyId: string;
    stripeCustomerId: string | null;
    stripeSubscriptionId: string | null;
    plan: string;
    status: string;
    currentPeriodStart: Date | null;
    currentPeriodEnd: Date | null;
    monthlyBudgetCents: number;
    apiKeyMode: string;
    anthropicApiKey: string | null;
    createdAt: Date;
    updatedAt: Date;
}
/**
 * Retrieve the subscription for a given company.
 */
export declare function getSubscription(db: Db, companyId: string): Promise<Subscription | null>;
/**
 * Create a free-tier subscription for a newly provisioned company.
 */
export declare function createFreeSubscription(db: Db, companyId: string): Promise<Subscription>;
/**
 * Returns the API key a company should use for Anthropic calls.
 * If BYOK mode and key is set, returns the BYOK key.
 * Otherwise returns the platform managed key.
 */
export declare function getApiKeyForCompany(db: Db, companyId: string, provider?: string): Promise<string | null>;
/**
 * Switch between managed and BYOK API key modes.
 */
export declare function updateApiKeyMode(db: Db, companyId: string, mode: "managed" | "byok", apiKey?: string): Promise<Subscription | null>;
//# sourceMappingURL=billing.d.ts.map