feat: expose bounded organization hierarchy routing
This commit is contained in:
@@ -66,6 +66,36 @@ The close-out condition is that Access role resolution works with canonical
|
||||
Organizations plus IDM installed and still works through projection fallback
|
||||
for transition deployments.
|
||||
|
||||
## Directory Contracts
|
||||
|
||||
`organizations.directory` remains the small compatibility contract for direct
|
||||
unit and function lookup. It deliberately retains the legacy `parent_id`
|
||||
projection needed by existing Access and IDM integrations.
|
||||
|
||||
`organizations.hierarchyDirectory` is the structure-aware contract for new
|
||||
consumers. It provides:
|
||||
|
||||
- tenant-scoped unit-type and function-type references;
|
||||
- function resolution by type and an explicit set of units;
|
||||
- unit resolution by type, optionally bounded to one named structure;
|
||||
- batched ancestor, descendant, and path resolution with a required structure,
|
||||
optional relation-type filter, and bounded depth;
|
||||
- the exact structure, relation type, and relation edge for every path step;
|
||||
- explicit missing, inactive, unreachable, invalid-filter, cycle, and
|
||||
depth-limit state.
|
||||
|
||||
An edge is traversed from `source_unit_id` to `target_unit_id` for descendant
|
||||
lookups and in reverse for ancestor lookups. Consumers must select a structure;
|
||||
the provider never treats `parent_id` or one arbitrary structure as the
|
||||
institution's universal hierarchy.
|
||||
|
||||
Committed changes emit versioned `organizations.<resource>.<action>.v1`
|
||||
platform events for units, functions, their types, structures, relation types,
|
||||
and relation edges. The event payload contains schema version `1`, tenant and
|
||||
resource references, status, changed fields, and routing-relevant IDs so
|
||||
directory consumers can invalidate derived addresses without importing this
|
||||
module's models.
|
||||
|
||||
## UI Boundary
|
||||
|
||||
The organization workspace at `/organizations` is the primary module UI for
|
||||
|
||||
Reference in New Issue
Block a user