Circle V2 API Docs
    Preparing search index...

    One loaded contact, carrying the two facts the resolver must verify before using its data.

    type LoadedContact = {
        contactTypeId: string;
        orgId: number;
        values: ReadonlyMap<string, string | null>;
    }
    Index

    Properties

    contactTypeId: string

    The contact's OWN contact type. Checked against the annotation's link before any value is used: v1 keyed its lookup map by the contact's own type, which made a type mismatch unresolvable by construction. Reading the chosen contact by id loses that implicit guard, so it is reinstated explicitly — otherwise a Facility contact could satisfy a Prescriber slot.

    orgId: number

    The organization that owns the contact, checked against the caller's entity.

    values: ReadonlyMap<string, string | null>

    field_id -> value, FIRST occurrence winning. contact_field_values has no unique constraint on (contact_id, field_id) and contactsRepo.update inserts a fresh row when no valueId is supplied, so duplicates exist at rest; the repo's ORDER BY does not separate them. v1 resolves with .find(), so first-wins is what production has been rendering. Last-wins would make the same contact render differently from one run to the next.