import { Session } from "neo4j-driver"; /** The ten milestone stages → their :ChainLink date property names. */ export declare const MILESTONE_STAGES: { readonly "mortgage-valuation": "mortgageValuationDate"; readonly survey: "surveyDate"; readonly "draft-contract-issued": "draftContractIssuedDate"; readonly "searches-requested": "searchesRequestedDate"; readonly "searches-received": "searchesReceivedDate"; readonly "mortgage-offer-received": "mortgageOfferReceivedDate"; readonly "seller-signed": "sellerSignedDate"; readonly "buyer-signed": "buyerSignedDate"; readonly exchanged: "exchangedDate"; readonly completed: "completedDate"; }; export type MilestoneStage = keyof typeof MILESTONE_STAGES; export declare const MILESTONE_STAGE_NAMES: MilestoneStage[]; export declare const MILESTONE_DATE_PROPS: ("mortgageValuationDate" | "surveyDate" | "draftContractIssuedDate" | "searchesRequestedDate" | "searchesReceivedDate" | "mortgageOfferReceivedDate" | "sellerSignedDate" | "buyerSignedDate" | "exchangedDate" | "completedDate")[]; /** Party role → the :ChainLink→:Person edge type carrying that role. */ export declare const PARTY_ROLES: { readonly seller: "HAS_SELLER"; readonly "seller-solicitor": "HAS_SELLER_SOLICITOR"; readonly buyer: "HAS_BUYER"; readonly "buyer-solicitor": "HAS_BUYER_SOLICITOR"; readonly agent: "HAS_AGENT"; }; export type PartyRole = keyof typeof PARTY_ROLES; export declare const PARTY_ROLE_NAMES: PartyRole[]; export interface PartyInput { name?: string | null; email?: string | null; phone?: string | null; } export interface LinkInput { priority: number; linkType: "loop-property" | "external"; address?: string | null; salePrice?: number | null; generalNotes?: string | null; proceedabilityNotes?: string | null; /** Slug of the :Property this link is, when linkType = loop-property. */ propertySlug?: string | null; /** Milestone dates keyed by stage short-name (subset allowed). */ milestones?: Partial>; /** Parties keyed by role (subset allowed). */ parties?: Partial>; } export interface ChainUpsertInput { chainId: string; sale: { sourceSystem: string; sourceId: string; salePrice?: number | null; status?: string | null; sstcDate?: string | null; isCompleteChain?: boolean | null; }; chain?: { anticipatedExchangeDate?: string | null; desiredCompletionDate?: string | null; createdDate?: string | null; owningTeam?: string | null; owningAgent?: string | null; isComplete?: boolean | null; }; links: LinkInput[]; } export interface UpsertResult { nodesCreated: number; propertiesSet: number; relationshipsCreated: number; linkCount: number; partyCount: number; listingLinked: boolean; offerLinked: boolean; } export interface PartyState { role: string; name: string | null; email: string | null; phone: string | null; } export interface LinkState { priority: number; linkType: string | null; address: string | null; salePrice: number | null; generalNotes: string | null; proceedabilityNotes: string | null; milestones: Record; parties: PartyState[]; } export interface ChainState { chainId: string; chain: Record | null; sale: Record | null; links: LinkState[]; stalled: boolean; cause: string; structuralFlags: string[]; } export interface PipelineRow { chainId: string; sourceId: string | null; address: string | null; salePrice: number | null; lastMovement: string | null; daysSinceMovement: number | null; stalled: boolean; } export interface PartyMatch { chainId: string; priority: number; partyRole: string; name: string | null; address: string | null; } export declare const DEFAULT_STALLED_THRESHOLD_DAYS = 7; export declare function upsertChain(session: Session, accountId: string, input: ChainUpsertInput): Promise; export declare function setMilestone(session: Session, accountId: string, chainId: string, priority: number, stage: MilestoneStage, date: string, source?: string | null): Promise<{ updated: number; }>; export declare function readChain(session: Session, accountId: string, sel: { chainId?: string; address?: string; }, nowMs: number, thresholdDays?: number): Promise; export declare function listPipeline(session: Session, accountId: string, nowMs: number, thresholdDays?: number): Promise; export declare function lookupParty(session: Session, accountId: string, sel: { email?: string; phone?: string; }): Promise; //# sourceMappingURL=chain-graph.d.ts.map