import { ISimpleLogger } from '../../../../di/shared/services/logger.service';
import { IFeaturesRepository } from '../../../../flags/features.repository.interface';
import { Logger } from 'tslog';
import { IBillingProviderService } from '../billingProvider/IBillingProviderService';
interface CreateProrationParams {
    teamId: number;
    monthKey: string;
}
interface ProcessMonthlyProrationsParams {
    monthKey: string;
    teamIds?: number[];
}
export interface MonthlyProrationServiceDeps {
    logger: ISimpleLogger;
    featuresRepository: IFeaturesRepository;
    billingService?: IBillingProviderService;
}
export declare class MonthlyProrationService {
    private logger;
    private teamRepository;
    private prorationRepository;
    private billingService;
    private featuresRepository;
    constructor(deps: MonthlyProrationServiceDeps);
    constructor(customLogger?: Logger<unknown>, billingService?: IBillingProviderService);
    processMonthlyProrations(params: ProcessMonthlyProrationsParams): Promise<{
        status: import('../../../../../kysely/types.ts').ProrationStatus;
        metadata: import('@prisma/client/runtime/client').JsonValue | null;
        id: string;
        failureReason: string | null;
        createdAt: Date;
        updatedAt: Date;
        teamId: number;
        subscriptionId: string;
        retryCount: number;
        customerId: string;
        pricePerSeat: number;
        subscriptionItemId: string;
        subscriptionStart: Date;
        subscriptionEnd: Date;
        monthKey: string;
        teamBillingId: string | null;
        organizationBillingId: string | null;
        periodStart: Date;
        periodEnd: Date;
        seatsAtStart: number;
        seatsAdded: number;
        seatsRemoved: number;
        netSeatIncrease: number;
        seatsAtEnd: number;
        remainingDays: number;
        proratedAmount: number;
        invoiceItemId: string | null;
        invoiceId: string | null;
        invoiceUrl: string | null;
        chargedAt: Date | null;
        failedAt: Date | null;
    }[]>;
    createProrationForTeam(params: CreateProrationParams): Promise<{
        status: import('../../../../../kysely/types.ts').ProrationStatus;
        metadata: import('@prisma/client/runtime/client').JsonValue | null;
        id: string;
        failureReason: string | null;
        createdAt: Date;
        updatedAt: Date;
        teamId: number;
        subscriptionId: string;
        retryCount: number;
        customerId: string;
        pricePerSeat: number;
        subscriptionItemId: string;
        subscriptionStart: Date;
        subscriptionEnd: Date;
        monthKey: string;
        teamBillingId: string | null;
        organizationBillingId: string | null;
        periodStart: Date;
        periodEnd: Date;
        seatsAtStart: number;
        seatsAdded: number;
        seatsRemoved: number;
        netSeatIncrease: number;
        seatsAtEnd: number;
        remainingDays: number;
        proratedAmount: number;
        invoiceItemId: string | null;
        invoiceId: string | null;
        invoiceUrl: string | null;
        chargedAt: Date | null;
        failedAt: Date | null;
    } | null>;
    private calculateProration;
    private createStripeInvoiceItem;
    private handleInvoiceCreationFailure;
    handleProrationPaymentSuccess(prorationId: string): Promise<void>;
    handleProrationPaymentFailure(params: {
        prorationId: string;
        reason: string;
    }): Promise<void>;
    retryFailedProration(prorationId: string): Promise<void>;
    private ensureBillingDataPopulated;
    private getSubscriptionQuantity;
}
export {};
//# sourceMappingURL=MonthlyProrationService.d.ts.map