import type { Db } from "@rudderhq/db";
import { costEvents } from "@rudderhq/db";
import type { BudgetIncident, BudgetIncidentResolutionInput, BudgetOverview, BudgetPolicy, BudgetPolicySummary, BudgetPolicyUpsertInput, BudgetScopeType } from "@rudderhq/shared";
export type BudgetEnforcementScope = {
    orgId: string;
    scopeType: BudgetScopeType;
    scopeId: string;
};
export type BudgetServiceHooks = {
    cancelWorkForScope?: (scope: BudgetEnforcementScope) => Promise<void>;
};
export declare function budgetService(db: Db, hooks?: BudgetServiceHooks): {
    listPolicies: (orgId: string) => Promise<BudgetPolicy[]>;
    upsertPolicy: (orgId: string, input: BudgetPolicyUpsertInput, actorUserId: string | null) => Promise<BudgetPolicySummary>;
    overview: (orgId: string) => Promise<BudgetOverview>;
    evaluateCostEvent: (event: typeof costEvents.$inferSelect) => Promise<void>;
    getInvocationBlock: (orgId: string, agentId: string, context?: {
        issueId?: string | null;
        projectId?: string | null;
    }) => Promise<{
        scopeType: "organization";
        scopeId: string;
        scopeName: string;
        reason: string;
    } | {
        scopeType: "agent";
        scopeId: string;
        scopeName: string;
        reason: string;
    } | {
        scopeType: "project";
        scopeId: string;
        scopeName: string;
        reason: string;
    } | null>;
    resolveIncident: (orgId: string, incidentId: string, input: BudgetIncidentResolutionInput, actorUserId: string) => Promise<BudgetIncident>;
};
//# sourceMappingURL=budgets.d.ts.map