import type { Db } from "@rudderhq/db";
import { financeEvents } from "@rudderhq/db";
export interface FinanceDateRange {
    from?: Date;
    to?: Date;
}
export declare function financeService(db: Db): {
    createEvent: (orgId: string, data: Omit<typeof financeEvents.$inferInsert, "orgId">) => Promise<{
        createdAt: Date;
        provider: string | null;
        id: string;
        description: string | null;
        orgId: string;
        agentId: string | null;
        biller: string;
        model: string | null;
        issueId: string | null;
        projectId: string | null;
        goalId: string | null;
        heartbeatRunId: string | null;
        billingCode: string | null;
        occurredAt: Date;
        costEventId: string | null;
        eventKind: string;
        direction: string;
        executionAgentRuntimeType: string | null;
        pricingTier: string | null;
        region: string | null;
        quantity: number | null;
        unit: string | null;
        amountCents: number;
        currency: string;
        estimated: boolean;
        externalInvoiceId: string | null;
        metadataJson: Record<string, unknown> | null;
    }>;
    summary: (orgId: string, range?: FinanceDateRange) => Promise<{
        orgId: string;
        debitCents: number;
        creditCents: number;
        netCents: number;
        estimatedDebitCents: number;
        eventCount: number;
    }>;
    byBiller: (orgId: string, range?: FinanceDateRange) => Promise<{
        biller: string;
        debitCents: number;
        creditCents: number;
        estimatedDebitCents: number;
        eventCount: number;
        kindCount: number;
        netCents: number;
    }[]>;
    byKind: (orgId: string, range?: FinanceDateRange) => Promise<{
        eventKind: string;
        debitCents: number;
        creditCents: number;
        estimatedDebitCents: number;
        eventCount: number;
        billerCount: number;
        netCents: number;
    }[]>;
    list: (orgId: string, range?: FinanceDateRange, limit?: number) => Promise<{
        createdAt: Date;
        provider: string | null;
        id: string;
        description: string | null;
        orgId: string;
        agentId: string | null;
        biller: string;
        model: string | null;
        issueId: string | null;
        projectId: string | null;
        goalId: string | null;
        heartbeatRunId: string | null;
        billingCode: string | null;
        occurredAt: Date;
        costEventId: string | null;
        eventKind: string;
        direction: string;
        executionAgentRuntimeType: string | null;
        pricingTier: string | null;
        region: string | null;
        quantity: number | null;
        unit: string | null;
        amountCents: number;
        currency: string;
        estimated: boolean;
        externalInvoiceId: string | null;
        metadataJson: Record<string, unknown> | null;
    }[]>;
};
//# sourceMappingURL=finance.d.ts.map