import { SmrtCollection } from '@happyvertical/smrt-core'; import { OpportunityConversion } from '../models/OpportunityConversion.js'; import { RecordConversionParams, RecordConversionResult } from '../types.js'; export declare class OpportunityConversionCollection extends SmrtCollection { static readonly _itemClass: typeof OpportunityConversion; private opportunityCollectionPromise; /** Sibling opportunity collection sharing this collection's DB connection. */ private getOpportunityCollection; /** All conversion links recorded for one opportunity, oldest first. */ findByOpportunity(opportunityId: string): Promise; /** * Record that a WON opportunity materialized into a downstream record, * idempotently on the natural key `(opportunityId, targetKind, targetId)`. * * Preconditions: the opportunity must exist and its status must be `'won'` * — conversions from open or lost deals are rejected with a clear error. * CRM only records the link; creating the downstream record itself * (client, project, contract, subscription, …) is the caller's job. * * @returns `{ conversion, created }` — `created: false` when the link * already existed (the existing row is returned untouched) */ recordConversion(params: RecordConversionParams): Promise; } export default OpportunityConversionCollection; //# sourceMappingURL=OpportunityConversionCollection.d.ts.map