import { SmrtObject } from '@happyvertical/smrt-core'; import { ReferralProgramOptions, ReferralProgramStatus } from '../types.js'; /** * A ReferralProgram anchors links, touches, referrals, agreements, and * exceptions, and carries the program-level DEFAULTS: * * - `defaultAttributionPolicyKey` — which versioned AttributionPolicy * `AttributionService.resolve()` loads when the caller doesn't override. * - `defaultCommissionPlanKey` — the suggested commissions plan for new * ReferralAgreements (the agreement's own `commissionPlanKey` is what * actually binds terms). * * Both defaults are KEYS, not pinned versions: the active version is * resolved at attribution/qualification time and pinned on the Referral / * ReferralTermSnapshot, so program rows stay stable across policy and plan * amendments. * * Natural key `(tenant_id, key)` — each tenant names its programs once. */ export declare class ReferralProgram extends SmrtObject { /** Tenant ID for multi-tenant isolation (nullable → global programs). */ tenantId: string | null; /** Stable program key within the tenant (natural-key component). */ key: string; /** Human-readable program name. */ name: string; /** * Program lifecycle: `draft` (default) → `active` → `paused` / * `archived`. Applications gate intake on `active`; this module records * the status without enforcing transition edges. */ status: ReferralProgramStatus; /** * Default commissions-plan key suggested to new ReferralAgreements. * Empty means the program has no default — agreements must name a plan. */ defaultCommissionPlanKey: string; /** * Default AttributionPolicy key `AttributionService.resolve()` uses when * the caller passes no `policyKey` override. */ defaultAttributionPolicyKey: string; /** * Free-form JSON object stored as a string. Use * {@link getMetadata}/{@link setMetadata} instead of parsing manually. */ metadata: string; constructor(options?: ReferralProgramOptions); /** Whether the program is accepting new referral activity. */ isActive(): boolean; /** Parse the metadata JSON string; returns `{}` on malformed content. */ getMetadata(): Record; /** Serialize and store the metadata object. */ setMetadata(metadata: Record): void; } export default ReferralProgram; //# sourceMappingURL=ReferralProgram.d.ts.map