import { SmrtObject } from '@happyvertical/smrt-core'; import { CommissionAdjustmentKind, CommissionAdjustmentOptions } from '../types.js'; export declare class CommissionAdjustment extends SmrtObject { /** Tenant ID for multi-tenant isolation (nullable → global rows). */ tenantId: string | null; /** The {@link Commission} this adjustment corrects. Required. */ commissionId: string; /** * The {@link Earner} the adjustment applies to — denormalized from the * parent commission so balance queries never need a join. Required. */ earnerId: string; /** What kind of correction this is. */ adjustmentKind: CommissionAdjustmentKind; /** * SIGNED amount in integer cents. Negative claws earnings back (refund, * chargeback); positive credits extra. */ amountCents: number; /** ISO 4217 currency — must match the parent commission's. */ currency: string; /** Human-readable justification. Required — audit rows explain themselves. */ reason: string; /** * Profile of the operator/automation that created the adjustment * (cross-package string reference to smrt-profiles). */ createdByProfileId: string; /** * The {@link CommissionPayout} batch that settled this adjustment. Empty * until stamped. This is the ONLY field mutable after creation. */ payoutId: string | null; /** Additional metadata as a JSON string. Frozen once persisted. */ metadata: string; constructor(options?: CommissionAdjustmentOptions); /** * Capture the frozen-fields snapshot when the row was loaded from the * database — from that moment on, only {@link payoutId} may change. */ initialize(): Promise; /** `true` once a payout batch has stamped {@link payoutId}. */ isSettled(): boolean; /** Parse {@link metadata}; returns `{}` on empty/invalid JSON. */ getMetadata(): Record; /** Serialize and store {@link metadata}. */ setMetadata(data: Record): void; /** * Save with the append-only guard: once the row has been persisted, every * field except `payoutId` must match the captured snapshot. Corrections * to a wrong adjustment are new counter-adjustments, never edits. */ save(): Promise; private assertImmutableOncePersisted; /** * Serialize every field EXCEPT `payoutId` (the sole post-create mutable * field) with stable key ordering. */ private serializeFrozenSnapshot; } export default CommissionAdjustment; //# sourceMappingURL=CommissionAdjustment.d.ts.map