import { SmrtObject } from '@happyvertical/smrt-core'; import { AttributionExceptionCandidate, AttributionExceptionOptions, AttributionExceptionStatus } from '../types.js'; export declare class AttributionException extends SmrtObject { /** Tenant ID for multi-tenant isolation (nullable → global rows). */ tenantId: string | null; /** Target the conflicting attribution is about. Required. */ targetKind: string; /** Identifier within the {@link targetKind} namespace. Required. */ targetId: string; /** The ReferralProgram the contention belongs to. */ programId: string; /** `open` (default, awaiting review) or `resolved`. */ status: AttributionExceptionStatus; /** * Why the exception was raised — recommended vocabulary: `'tie'` * (exact-timestamp tie between distinct referrers), * `'competing_touches'` (competing manual assignments), and * `'policy_review'` (`conflictBehavior: 'review'` with multiple * referrers). Open string. */ conflictReason: string; /** * The competing touches as a JSON-string array of * {@link AttributionExceptionCandidate}. Use * {@link getCandidates}/{@link setCandidates}. */ candidates: string; /** * How the exception was resolved — `'override'` (human award) or * `'policy'` (policy re-run). Empty while open. */ resolutionMode: string; /** Why credit was awarded the way it was. REQUIRED to resolve. */ resolutionReason: string; /** * Who resolved the exception — cross-package string reference to a * smrt-profiles Profile. */ resolvedByProfileId: string; /** * Ids of the Referral rows the resolution created, as a JSON-string * array. Use {@link getResolvedReferralIds}/{@link setResolvedReferralIds}. */ resolvedReferralIds: string; /** When the exception was resolved. */ resolvedAt: Date | null; /** * Free-form JSON object stored as a string (the attribution service * stamps the policy pin here for later resolution). Use * {@link getMetadata}/{@link setMetadata}. */ metadata: string; constructor(options?: AttributionExceptionOptions); /** Re-coerce date fields after the framework reapplies raw option values. */ initialize(): Promise; /** Whether the exception still awaits review. */ isOpen(): boolean; /** Parse {@link candidates}; returns `[]` on empty/invalid JSON. */ getCandidates(): AttributionExceptionCandidate[]; /** Serialize and store {@link candidates}. */ setCandidates(candidates: AttributionExceptionCandidate[]): void; /** Parse {@link resolvedReferralIds}; returns `[]` on empty/invalid JSON. */ getResolvedReferralIds(): string[]; /** Serialize and store {@link resolvedReferralIds}. */ setResolvedReferralIds(ids: string[]): void; /** Parse {@link metadata}; returns `{}` on malformed content. */ getMetadata(): Record; /** Serialize and store {@link metadata}. */ setMetadata(data: Record): void; /** * Mark the exception resolved (mutates; the caller saves). Requires a * non-empty reason — resolutions without a recorded rationale are * rejected. */ markResolved(input: { mode: string; reason: string; resolvedByProfileId?: string; referralIds: string[]; at?: Date; }): void; private static coerceDate; } export default AttributionException; //# sourceMappingURL=AttributionException.d.ts.map