import { Repository, DataSource } from 'typeorm';
import { ClientSubscription } from './entities/client-subscription.entity';
import { Company } from '../../companies/entities/company.entity';
export declare class BillingService {
    private readonly subRepo;
    private readonly companyRepo;
    private readonly dataSource;
    private readonly logger;
    private readonly stripe;
    constructor(subRepo: Repository<ClientSubscription>, companyRepo: Repository<Company>, dataSource: DataSource);
    hasActiveSubscription(companyId: number): Promise<boolean>;
    getStatus(companyId: number): Promise<{
        active: boolean;
        billing_enabled: boolean;
        requires_payment: boolean;
        access_allowed: boolean;
        status: string;
        plan: string | null;
        is_free: boolean;
        current_period_end: Date | null;
        price_amount: number | null;
        price_currency: string;
        price_interval: string | null;
        currency: string;
    }>;
    createCheckoutSession(companyId: number, clientUserId: number, email?: string): Promise<{
        url: string | null;
        session_id: string;
    }>;
    setCompanyPrice(companyId: number, amount: number, currency?: string, interval?: string): Promise<{
        active: boolean;
        billing_enabled: boolean;
        requires_payment: boolean;
        access_allowed: boolean;
        status: string;
        plan: string | null;
        is_free: boolean;
        current_period_end: Date | null;
        price_amount: number | null;
        price_currency: string;
        price_interval: string | null;
        currency: string;
    }>;
    setBillingEnabled(companyId: number, enabled: boolean): Promise<{
        active: boolean;
        billing_enabled: boolean;
        requires_payment: boolean;
        access_allowed: boolean;
        status: string;
        plan: string | null;
        is_free: boolean;
        current_period_end: Date | null;
        price_amount: number | null;
        price_currency: string;
        price_interval: string | null;
        currency: string;
    }>;
    grantFreeAccess(companyId: number): Promise<{
        active: boolean;
        billing_enabled: boolean;
        requires_payment: boolean;
        access_allowed: boolean;
        status: string;
        plan: string | null;
        is_free: boolean;
        current_period_end: Date | null;
        price_amount: number | null;
        price_currency: string;
        price_interval: string | null;
        currency: string;
    }>;
    markPaidManually(companyId: number): Promise<{
        active: boolean;
        billing_enabled: boolean;
        requires_payment: boolean;
        access_allowed: boolean;
        status: string;
        plan: string | null;
        is_free: boolean;
        current_period_end: Date | null;
        price_amount: number | null;
        price_currency: string;
        price_interval: string | null;
        currency: string;
    }>;
    revokeAccess(companyId: number): Promise<{
        active: boolean;
        billing_enabled: boolean;
        requires_payment: boolean;
        access_allowed: boolean;
        status: string;
        plan: string | null;
        is_free: boolean;
        current_period_end: Date | null;
        price_amount: number | null;
        price_currency: string;
        price_interval: string | null;
        currency: string;
    }>;
    handleWebhook(rawBody: Buffer | string, signature: string): Promise<{
        received: boolean;
    }>;
    private getOrCreateRow;
    private companyIdFromCustomer;
    private activate;
    private setStatusFromStripe;
    private markStatus;
}
