OptionalisMainOrg?: booleanAdmin-only projection of the onboarding-internal main-org flag, used to
gate the admin org-detail delete action (never deletable — ~20
transaction views resolve through it). Optional and deliberately absent
from the base Organization type: the consumer mapper
(OrganizationQueryService's mapOrganizationFromDb) never sets it, so
it's never present on a consumer-surface row and can't leak through
mapToApiOrganization's field spread into the public org-api response.
Only OrganizationAdminService's mapper populates it.
A
searchrow: the organization plus its resolved owning customer.Both surfaces project exactly this shape, which is what lets them share one cache namespace and one cached value type. The consumer search knows
customerIdfrom its own required argument and was already inner-joiningb2b.customer— it now selects from that join rather than discarding it.