import { Prisma, PlanTier } from '@prisma/client';
import { PrismaService } from '../../prisma/prisma.service';
import { AuthenticatedUser } from '../../common/decorators/current-user.decorator';
interface UpsertPlanInput {
    code: string;
    name: string;
    tier?: PlanTier;
    fixedPrice: number;
    pricePerLot: number;
    currency?: string;
    features?: Record<string, boolean>;
}
interface SubscribeInput {
    tenantId: string;
    planCode: string;
}
export declare class BillingService {
    private readonly prisma;
    constructor(prisma: PrismaService);
    upsertPlan(user: AuthenticatedUser, dto: UpsertPlanInput): Promise<{
        id: string;
        code: string;
        name: string;
        tier: import(".prisma/client").$Enums.PlanTier;
        fixedPrice: Prisma.Decimal;
        pricePerLot: Prisma.Decimal;
        currency: string;
        features: Prisma.JsonValue;
        isActive: boolean;
        createdAt: Date;
        updatedAt: Date;
    }>;
    listPlans(user: AuthenticatedUser): Prisma.PrismaPromise<{
        id: string;
        code: string;
        name: string;
        tier: import(".prisma/client").$Enums.PlanTier;
        fixedPrice: Prisma.Decimal;
        pricePerLot: Prisma.Decimal;
        currency: string;
        features: Prisma.JsonValue;
        isActive: boolean;
        createdAt: Date;
        updatedAt: Date;
    }[]>;
    toggleFeature(user: AuthenticatedUser, tenantId: string, featureKey: string, enabled: boolean): Promise<{
        id: string;
        tenantId: string;
        featureKey: string;
        enabled: boolean;
        activatedAt: Date | null;
    }>;
    listFeatures(user: AuthenticatedUser, tenantId: string): Prisma.PrismaPromise<{
        id: string;
        tenantId: string;
        featureKey: string;
        enabled: boolean;
        activatedAt: Date | null;
    }[]>;
    subscribe(user: AuthenticatedUser, dto: SubscribeInput): Promise<{
        id: string;
        fixedPrice: Prisma.Decimal;
        pricePerLot: Prisma.Decimal;
        currency: string;
        createdAt: Date;
        status: string;
        tenantId: string;
        lotsCount: number;
        planCode: string;
        startedAt: Date;
        endedAt: Date | null;
    }>;
    generateInvoice(user: AuthenticatedUser, tenantId: string, opts: {
        periodStart: Date;
        periodEnd: Date;
    }): Promise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: string;
        tenantId: string;
        dueDate: Date;
        amount: Prisma.Decimal;
        periodStart: Date;
        periodEnd: Date;
        lotsCount: number;
        pdfUrl: string | null;
        paidAt: Date | null;
    }>;
    listInvoices(user: AuthenticatedUser, tenantId?: string): never[] | Prisma.PrismaPromise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: string;
        tenantId: string;
        dueDate: Date;
        amount: Prisma.Decimal;
        periodStart: Date;
        periodEnd: Date;
        lotsCount: number;
        pdfUrl: string | null;
        paidAt: Date | null;
    }[]>;
    markInvoicePaid(user: AuthenticatedUser, invoiceId: string): Promise<{
        id: string;
        currency: string;
        createdAt: Date;
        status: string;
        tenantId: string;
        dueDate: Date;
        amount: Prisma.Decimal;
        periodStart: Date;
        periodEnd: Date;
        lotsCount: number;
        pdfUrl: string | null;
        paidAt: Date | null;
    }>;
}
export {};
