import { IBillingRepository, IBillingRepositoryCreateArgs } from '../../repository/billing/IBillingRepository';
import { ITeamBillingDataRepository } from '../../repository/teamBillingData/ITeamBillingDataRepository';
import { IBillingProviderService } from '../billingProvider/IBillingProviderService';
import { ITeamBillingService, TeamBillingInput } from './ITeamBillingService';
export declare class TeamBillingService implements ITeamBillingService {
    private _team;
    private billingProviderService;
    private billingRepository;
    private teamBillingDataRepository;
    constructor({ team, billingProviderService, teamBillingDataRepository, billingRepository, }: {
        team: TeamBillingInput;
        billingProviderService: IBillingProviderService;
        teamBillingDataRepository: ITeamBillingDataRepository;
        billingRepository: IBillingRepository;
    });
    set team(team: TeamBillingInput);
    get team(): typeof this._team;
    private getOrgIfNeeded;
    private logErrorFromUnknown;
    cancel(): Promise<void>;
    publish(): Promise<{
        redirectUrl: string;
        status: "REQUIRES_UPGRADE";
    } | {
        redirectUrl: string;
        status: "REQUIRES_PAYMENT";
    } | {
        status: "SUCCESS";
        redirectUrl: null;
    }>;
    downgrade(): Promise<void>;
    updateQuantity(): Promise<void>;
    /** Used to prevent double charges for the same team */
    checkIfTeamPaymentRequired(): Promise<{
        url: null;
        paymentId: null;
        paymentRequired: boolean;
    } | {
        url: null;
        paymentId: string;
        paymentRequired: boolean;
    } | {
        url: string;
        paymentId: string;
        paymentRequired: boolean;
    }>;
    /** Returns the subscription status (active, past_due, trialing, ...) */
    getSubscriptionStatus(): Promise<import('../../repository/billing/IBillingRepository').SubscriptionStatus | null>;
    /**
     * Ends the trial period for a team subscription by converting it to a regular subscription
     * @returns {Promise<boolean>} True if successful, false otherwise
     */
    endTrial(): Promise<boolean>;
    saveTeamBilling(args: IBillingRepositoryCreateArgs): Promise<void>;
}
//# sourceMappingURL=TeamBillingService.d.ts.map