@cfxlabsinc/b2b-services
    Preparing search index...

    Type Alias EntityDerivedCriteriaField

    EntityDerivedCriteriaField:
        | "entityType"
        | "customerId"
        | "identityId"
        | "organizationId"
        | "countryCode"
        | "hasIdentityDocument"
        | "verificationByo"

    The matcher fields ProductRouteService.search derives from the entity row itself. search() owns these outright — callers cannot supply them as criteria, because the SQL merges last and would override them anyway, and accepting both would make it ambiguous which derivation actually ran.

    entityType is the one field the caller must also state, as the separate search({ entityType }) parameter rather than as criteria: it names which table to read the others from. It is still listed here because the emitted value comes from search(), not from the caller's criteria object.

    identityId / organizationId are the entity's own external id, emitted on exactly one branch each — see entityCriteriaSql. They are derived rather than caller-supplied for the same reason as the rest: the id that decides which rules fire must be the id the quote is actually for.