import { TransactionHooks } from '../hooks/TransactionHooks.js'; import { DatabaseSession } from '../../infrastructure/database/DatabaseSession.js'; import { Clock } from '../utils/Clock.js'; import { CreditCurrencyDto, PlanCreditGrantInput, CreditGrantInput, CreditGrantDto, CreditBalanceDto, CreditActionDto, CreditCheckDto, CreditConsumeInput, CreditConsumeDto, CreditAdjustInput } from '../dtos/CreditDto.js'; import { PageFilter } from '../dtos/PaginationDto.js'; export declare class CreditManagementService { private readonly store; private readonly clock; private readonly mutationHooks; constructor(store: DatabaseSession, clock?: Clock, mutationHooks?: TransactionHooks); getPlanGrant(planKey: string, currencyKey: string): Promise<(PlanCreditGrantInput & { currencyKey: string; }) | null>; getConsumptionRule(featureKey: string, currencyKey: string): Promise<{ currencyKey: string; creditsPerUnit: number; } | null>; adjust(input: CreditAdjustInput): Promise<{ operationId: string; idempotencyKey: string; balance: CreditBalanceDto; }>; issueDuePlanGrants(options: { subscriptionKey: string; }): Promise<{ issued: CreditGrantDto[]; nextDueAt: string | null; hasMore: boolean; }>; private currency; createCurrency(input: { key: string; displayName: string; metadata?: Record; }): Promise; getCurrency(k: string): Promise; listCurrencies(filter?: PageFilter): Promise; updateCurrency(k: string, input: { displayName?: string; metadata?: Record; }): Promise; archiveCurrency(k: string): Promise; unarchiveCurrency(k: string): Promise; deleteCurrency(k: string): Promise; setPlanGrant(planKey: string, currencyKey: string, input: PlanCreditGrantInput): Promise; private settlePlan; removePlanGrant(p: string, c: string): Promise; listPlanGrants(p: string): Promise>; setConsumptionRule(featureKey: string, currencyKey: string, creditsPerUnit: number): Promise; removeConsumptionRule(f: string, c: string): Promise; listConsumptionRules(f: string): Promise>; private wallet; private operation; private saveResult; private replay; private ledger; private createGrant; private grantDto; private balance; grant(input: CreditGrantInput): Promise; private reconcile; processScheduledGrants(customerKey?: string): Promise<{ issued: number; customers: number; }>; getBalance(customerKey: string, currencyKey: string): Promise; listBalances(customerKey: string): Promise; private costs; canConsume(action: CreditActionDto): Promise; private burn; consume(input: CreditConsumeInput): Promise; private adjustBalance; listGrants(customerKey: string, currencyKey: string, filter?: PageFilter): Promise; getOperation(customerKey: string, k: string): Promise<{ id: string; type: string; result: unknown; createdAt: string; } | null>; listLedgerEntries(customerKey: string, currencyKey: string, filter?: PageFilter): Promise>; } //# sourceMappingURL=CreditManagementService.d.ts.map