/**
 * Persist LLM extraction results as Person nodes.
 *
 * Takes the structured JSON output from an LLM extraction step
 * and creates/updates Person nodes idempotently via MERGE-on-email.
 *
 *   LLM OUTPUT (JSON array)
 *     │
 *     ├─ Validate: must be an array of extraction objects
 *     ├─ For each extraction:
 *     │    ├─ Validate email present and well-formed
 *     │    ├─ Hallucination guard: email must appear in source messages
 *     │    ├─ MERGE Person node (idempotent on email + accountId)
 *     │    ├─ ON CREATE: set all fields; createdOn = conversationDate
 *     │    │   (fallback: extraction time); extractedOn = extraction time
 *     │    ├─ ON MATCH: backfill name if existing is "Unknown";
 *     │    │   preserve createdOn (earliest conversation date)
 *     │    ├─ Merge discoveryNotes (new enriches existing)
 *     │    └─ Recompute embedding with discovery context
 *     │
 *     v
 *   SUMMARY STATS
 */
export interface DiscoveryNotes {
    businessType: string | null;
    role: string | null;
    needs: string | null;
    challenges: string | null;
    interests: string | null;
    engagementQuality: string | null;
    otherSignals: string | null;
}
export interface ExtractionEntry {
    email: string;
    givenName?: string | null;
    familyName?: string | null;
    conversationId?: string | null;
    conversationDate?: string | null;
    businessType?: string | null;
    role?: string | null;
    needs?: string | null;
    challenges?: string | null;
    interests?: string | null;
    engagementQuality?: string | null;
    otherSignals?: string | null;
}
export interface WaitlistPersistParams {
    accountId: string;
    extractions: unknown;
    conversations: unknown;
}
export interface WaitlistPersistResult {
    processed: number;
    created: number;
    updated: number;
    existing: number;
    flaggedForReview: number;
    withDiscoveryNotes: number;
    filtered: number;
    errors: number;
}
export declare function waitlistPersist(params: WaitlistPersistParams): Promise<WaitlistPersistResult>;
//# sourceMappingURL=waitlist-persist.d.ts.map