@company-semantics/contracts 87.0.0 → 88.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,242 @@
1
+ /**
2
+ * Authority & Delegation Schemas
3
+ *
4
+ * Authority axes (mechanism × locality × mutability), unit owners, pending
5
+ * owners and delegations.
6
+ *
7
+ * Split out of `./schemas.ts`, which re-exports this module unchanged — import
8
+ * from `./schemas` (or the `./org` entry), not from this file directly.
9
+ */
10
+ import { z } from "zod";
11
+ import { IsoDateTime } from "../api/primitives";
12
+
13
+ // ---------------------------------------------------------------------------
14
+ // Authority & Delegation vocabulary
15
+ //
16
+ // The API expresses authority as orthogonal axes (mechanism × locality ×
17
+ // mutability) instead of a single overloaded `source` enum, so future
18
+ // combinations like inherited-delegated or hris-delegated compose by
19
+ // construction rather than forcing each consumer to add a new switch case.
20
+ // The engine's internal AuthoritySource enum stays narrower than the wire
21
+ // shape — it's debug/audit vocabulary, not API vocabulary.
22
+ // ---------------------------------------------------------------------------
23
+
24
+ /**
25
+ * Engine-internal authority source. Used by the projection storage layer for
26
+ * debugging and drift records; not part of the public API response shape.
27
+ * `manual_membership` was removed when the legacy `l{N}_unit_owner` track was
28
+ * canonicalized onto delegations.
29
+ */
30
+ export const AuthoritySourceSchema = z.enum([
31
+ "structural",
32
+ "delegated",
33
+ "org_admin",
34
+ ]);
35
+ export type AuthoritySource = z.infer<typeof AuthoritySourceSchema>;
36
+
37
+ export const AuthorityOriginSchema = z.enum([
38
+ "topology",
39
+ "delegation",
40
+ "administrative_override",
41
+ ]);
42
+ export type AuthorityOrigin = z.infer<typeof AuthorityOriginSchema>;
43
+
44
+ export const AuthorityConfidenceSchema = z.enum(["authoritative", "inferred"]);
45
+ export type AuthorityConfidence = z.infer<typeof AuthorityConfidenceSchema>;
46
+
47
+ /** How the authority arose. */
48
+ export const AuthorityMechanismSchema = z.enum([
49
+ "structural",
50
+ "delegated",
51
+ "rbac",
52
+ ]);
53
+ export type AuthorityMechanism = z.infer<typeof AuthorityMechanismSchema>;
54
+
55
+ /** Whether the grant lives on the target unit or is inherited from an ancestor. */
56
+ export const AuthorityLocalitySchema = z.enum(["local", "inherited"]);
57
+ export type AuthorityLocality = z.infer<typeof AuthorityLocalitySchema>;
58
+
59
+ /**
60
+ * Whether the user can change this authority from this surface.
61
+ * - `derived`: change the upstream source instead (the org chart, RBAC roles).
62
+ * - `user_managed`: removable from this UI.
63
+ *
64
+ * Consumed by {@link OwnerAuthoritySchema} and by the per-unit
65
+ * `WorkspaceMemberUnitDesignationEntrySchema` in `./schemas`.
66
+ */
67
+ export const AuthorityMutabilitySchema = z.enum(["derived", "user_managed"]);
68
+ export type AuthorityMutability = z.infer<typeof AuthorityMutabilitySchema>;
69
+
70
+ export const OwnerAuthoritySchema = z.object({
71
+ mechanism: AuthorityMechanismSchema,
72
+ locality: AuthorityLocalitySchema,
73
+ mutability: AuthorityMutabilitySchema,
74
+ derivedFromUnitId: z.string().uuid(),
75
+ derivedFromUnitName: z.string().min(1).optional(),
76
+ /**
77
+ * True when this authority derives from the org ROOT unit — i.e. the holder
78
+ * is a CEO (a unit owner of the org root, observed locally on the root
79
+ * or as inherited authority on a descendant). Lets consumers classify CEO
80
+ * without a separate org-tree lookup, the same way `mechanism === 'rbac'`
81
+ * identifies an org admin. Omitted (falsy) for non-root derivations.
82
+ */
83
+ derivedFromRoot: z.boolean().optional(),
84
+ derivedFromUserId: z.string().uuid().nullable().optional(),
85
+ /**
86
+ * Human-readable reason this authority applies, built at serialize time from
87
+ * the strategy's derivation metadata. Foundation for trust UI, debugging,
88
+ * AI explainability, governance reports, and audits.
89
+ */
90
+ explanation: z.string(),
91
+ /**
92
+ * Strategy-specific structured metadata, preserved verbatim for tooling that
93
+ * needs more than the explanation string (drift detection, audits).
94
+ */
95
+ derivationMetadata: z.record(z.string(), z.unknown()).optional(),
96
+ /**
97
+ * `org_unit_delegations.id` when `mechanism === 'delegated'`. Surfaced
98
+ * separately so the UI doesn't need to inspect derivationMetadata to render
99
+ * the revoke action.
100
+ */
101
+ delegationId: z.string().uuid().optional(),
102
+ /**
103
+ * Delegation expiry as an ISO-8601 timestamp when `mechanism === 'delegated'`
104
+ * and the delegation is time-boxed; `null` for a permanent delegation; omitted
105
+ * for non-delegated mechanisms. Expired delegations never reach this surface —
106
+ * the projection read filters `expires_at > now()` — so a present value is
107
+ * always in the future.
108
+ */
109
+ expiresAt: IsoDateTime.nullable().optional(),
110
+ });
111
+ export type OwnerAuthority = z.infer<typeof OwnerAuthoritySchema>;
112
+
113
+ export const OrgUnitOwnerSchema = z.object({
114
+ userId: z.string().uuid(),
115
+ fullName: z.string().min(1),
116
+ jobTitle: z.string().nullable(),
117
+ avatarUrl: z.string().nullable(),
118
+ /** All authority grants this user holds for the unit. At least one entry. */
119
+ authorities: z.array(OwnerAuthoritySchema).min(1),
120
+ });
121
+ export type OrgUnitOwner = z.infer<typeof OrgUnitOwnerSchema>;
122
+
123
+ /**
124
+ * A lead the structure review chose who is NOT YET an owner, because they have
125
+ * no account to grant to. Mirrors one `staged` row of the backend's lead → owner
126
+ * bridge ledger (ADR-BE-734): the grant is minted the moment the person links an
127
+ * account, attributed to the reviewer who decided it. Person-keyed on purpose —
128
+ * an owner is user-keyed and this person has no user.
129
+ *
130
+ * DISPLAY ONLY. Never an authorization input: a pending owner holds nothing
131
+ * until the grant exists, and consumers must not derive a capability from it.
132
+ */
133
+ export const PendingUnitOwnerSchema = z.object({
134
+ personId: z.string().uuid(),
135
+ fullName: z.string().min(1),
136
+ jobTitle: z.string().nullable(),
137
+ /** When the reviewer decided it — the answer's time, not the row's. */
138
+ decidedAt: IsoDateTime,
139
+ /** Why it is pending. One reason today; a closed enum so a second is a decision. */
140
+ reason: z.enum(["no_account"]),
141
+ });
142
+ export type PendingUnitOwner = z.infer<typeof PendingUnitOwnerSchema>;
143
+
144
+ /**
145
+ * "No lead for now" (ADR-BE-733): the latest `unit_head` review answer for the
146
+ * unit was an explicit clear, and no later answer superseded it. Distinct from
147
+ * "never had one" — an absence a person recorded, not a default. Display only.
148
+ */
149
+ export const UnitLeadClearedSchema = z.object({
150
+ decidedAt: IsoDateTime,
151
+ });
152
+ export type UnitLeadCleared = z.infer<typeof UnitLeadClearedSchema>;
153
+
154
+ /**
155
+ * Contract-level invariant: each owner list contains each userId at most once.
156
+ * Duplicate userIds are a serializer bug, not a presentation concern, so we
157
+ * fail Zod parse at the API boundary on both server and client.
158
+ */
159
+ const uniqueByUserId = (arr: ReadonlyArray<{ userId: string }>): boolean =>
160
+ new Set(arr.map((o) => o.userId)).size === arr.length;
161
+ const uniqueByPersonId = (arr: ReadonlyArray<{ personId: string }>): boolean =>
162
+ new Set(arr.map((o) => o.personId)).size === arr.length;
163
+
164
+ export const OrgUnitOwnersResponseSchema = z.object({
165
+ owners: z
166
+ .array(OrgUnitOwnerSchema)
167
+ .refine(uniqueByUserId, { message: "duplicate userId in owners" }),
168
+ inherited: z
169
+ .array(OrgUnitOwnerSchema)
170
+ .refine(uniqueByUserId, { message: "duplicate userId in inherited" })
171
+ .optional(),
172
+ /**
173
+ * Leads chosen in the structure review who become owners once they have an
174
+ * account. Always present (`[]` when none) — the server knows, so the client
175
+ * never has to guess between "none" and "not asked".
176
+ */
177
+ pending: z
178
+ .array(PendingUnitOwnerSchema)
179
+ .refine(uniqueByPersonId, { message: "duplicate personId in pending" }),
180
+ /** The recorded "no lead for now", or null when no such answer stands. */
181
+ leadCleared: UnitLeadClearedSchema.nullable(),
182
+ });
183
+ export type OrgUnitOwnersResponse = z.infer<typeof OrgUnitOwnersResponseSchema>;
184
+
185
+ export const DelegationSchema = z.object({
186
+ id: z.string().uuid(),
187
+ orgId: z.string().uuid(),
188
+ unitId: z.string().uuid(),
189
+ userId: z.string().uuid(),
190
+ grantedBy: z.string().uuid().nullable(),
191
+ grantedAt: z.string(),
192
+ revokedAt: z.string().nullable(),
193
+ status: z.enum(["active", "revoked"]),
194
+ note: z.string().nullable(),
195
+ /**
196
+ * ISO-8601 timestamp at which the delegation stops conferring authority, or
197
+ * `null` for a permanent delegation. Enforcement is read-time (the projection
198
+ * read filters `expires_at > now()`); the row itself stays `status='active'`
199
+ * until explicitly revoked.
200
+ */
201
+ expiresAt: z.string().nullable(),
202
+ });
203
+ export type Delegation = z.infer<typeof DelegationSchema>;
204
+
205
+ export const CreateDelegationRequestSchema = z.object({
206
+ userId: z.string().uuid(),
207
+ note: z.string().max(2000).optional(),
208
+ /**
209
+ * Optional ISO-8601 expiry. Omitted or `null` ⇒ a permanent delegation. The
210
+ * UI captures a date and sends end-of-day in the user's timezone.
211
+ */
212
+ expiresAt: IsoDateTime.nullable().optional(),
213
+ /**
214
+ * When true, the granted user is emailed a notification (carrying `note` as
215
+ * the message). Not persisted — it only gates the side-effect email. Omitted
216
+ * is treated as false; left without a default so the inferred request type
217
+ * keeps `notify` optional rather than forcing every caller to pass it.
218
+ */
219
+ notify: z.boolean().optional(),
220
+ });
221
+ export type CreateDelegationRequest = z.infer<
222
+ typeof CreateDelegationRequestSchema
223
+ >;
224
+
225
+ /**
226
+ * Change a delegation's expiry without revoking it: extend, shorten, or clear
227
+ * (set `expiresAt: null` to make it permanent). Used by the inline expiry edit
228
+ * on an existing delegate row.
229
+ */
230
+ export const UpdateDelegationRequestSchema = z.object({
231
+ expiresAt: IsoDateTime.nullable(),
232
+ });
233
+ export type UpdateDelegationRequest = z.infer<
234
+ typeof UpdateDelegationRequestSchema
235
+ >;
236
+
237
+ export const DelegationListResponseSchema = z.object({
238
+ delegations: z.array(DelegationSchema),
239
+ });
240
+ export type DelegationListResponse = z.infer<
241
+ typeof DelegationListResponseSchema
242
+ >;
package/src/org/index.ts CHANGED
@@ -3,6 +3,11 @@
3
3
  *
4
4
  * Re-exports organization vocabulary types.
5
5
  * Import from '@company-semantics/contracts' (root).
6
+ *
7
+ * A module this barrel re-exports in full is re-exported with `export *`.
8
+ * `./types`, `./schemas` and `./org-depth` are listed by name because the
9
+ * barrel curates them: it omits a few names and re-exports some schema
10
+ * inferences under a `*Dto` alias.
6
11
  */
7
12
 
8
13
  export type {
@@ -77,183 +82,61 @@ export {
77
82
  } from "./types";
78
83
 
79
84
  // Domain types (Phase 4)
80
- export type {
81
- DomainStatus,
82
- DomainVerificationMethod,
83
- OrgDomain,
84
- Phase4AuditAction,
85
- } from "./domain";
85
+ export * from "./domain";
86
86
 
87
87
  // View authorization scopes (Phase 5 - ADR-APP-013)
88
- export type { AuthorizableView } from "./view-scopes";
89
- export { VIEW_SCOPE_MAP, getViewScope } from "./view-scopes";
88
+ export * from "./view-scopes";
90
89
 
91
90
  // Org structure facts: provenance + home/membership separation (ADR-CONTRACTS-066)
92
- export {
93
- FactSourceTierSchema,
94
- FACT_SOURCE_TIER_PRECEDENCE,
95
- FactProvenanceSchema,
96
- HomeAssignmentSchema,
97
- } from "./structure-facts";
98
- export type {
99
- FactSourceTier,
100
- FactProvenance,
101
- HomeAssignment,
102
- } from "./structure-facts";
91
+ export * from "./structure-facts";
103
92
 
104
93
  // Occupancy: the holds_position relation (M:N, co-occupancy first-class).
105
94
  // Vacancy = a position with no active occupancy. (ADR-CONT-083 / ADR-CTRL-182)
106
- export { OccupancyStatusSchema, OccupancySchema } from "./occupancy";
107
- export type { OccupancyStatus, Occupancy } from "./occupancy";
95
+ export * from "./occupancy";
108
96
 
109
97
  // Position: the org seat (planned/open/filled/closed) — a seat, not a person
110
98
  // or a title. Carries a FactProvenance envelope. (ADR-CONT-083 / ADR-CTRL-182)
111
- export { PositionStatusSchema, PositionSchema } from "./positions";
112
- export type { PositionStatus, Position } from "./positions";
99
+ export * from "./positions";
113
100
 
114
101
  // Position reporting: the canonical seat -> manager-seat reporting edge. The
115
102
  // person hierarchy derives from this composed with occupancy. (ADR-CONT-083 / ADR-CTRL-182)
116
- export {
117
- PositionReportingRelationshipTypeSchema,
118
- PositionReportingSchema,
119
- ReportingErrorCodeSchema,
120
- } from "./position-reporting";
121
- export type {
122
- PositionReportingRelationshipType,
123
- PositionReporting,
124
- ReportingErrorCode,
125
- } from "./position-reporting";
103
+ export * from "./position-reporting";
126
104
 
127
105
  // Source authority: per-field ownership — who may WRITE a given entity field.
128
106
  // Orthogonal to provenance (who reported). (ADR-CONT-083 / ADR-CTRL-182)
129
- export { SourceAuthoritySchema } from "./source-authority";
130
- export type { SourceAuthority } from "./source-authority";
107
+ export * from "./source-authority";
131
108
 
132
109
  // Sync run summary: the outcome record of one adapter sync run (counts +
133
110
  // cursor watermark). A flat report shape, not a structure fact. (ADR-CONT-085)
134
- export { SyncRunSummarySchema } from "./sync-run";
135
- export type { SyncRunSummary } from "./sync-run";
111
+ export * from "./sync-run";
136
112
 
137
113
  // Conflict record: one recorded reconciliation conflict surfaced during a sync.
138
114
  // Operational audit record about a sync, not a structure fact. (ADR-CONT-085)
139
- export { ConflictRecordSchema } from "./conflict-record";
140
- export type { ConflictRecord } from "./conflict-record";
115
+ export * from "./conflict-record";
141
116
 
142
117
  // Org reconciliation ledger: the org's STANDING disagreements with the connected
143
118
  // HRIS — the open ones only, whether they arose during a sync (runId set) or
144
119
  // during app use (runId null). Complements the run-scoped conflicts view; does
145
120
  // not replace it. Resolution is a LOCAL decision (`sentToSource` is the literal
146
121
  // false). (ADR-BE-564)
147
- export {
148
- OrgDivergenceSchema,
149
- OrgReconciliationLedgerSchema,
150
- OrgDivergenceResolutionSchema,
151
- ResolveOrgDivergenceResultSchema,
152
- } from "./reconciliation";
153
- export type {
154
- OrgDivergence,
155
- OrgReconciliationLedger,
156
- OrgDivergenceResolution,
157
- ResolveOrgDivergenceResult,
158
- } from "./reconciliation";
122
+ export * from "./reconciliation";
159
123
 
160
124
  // Structure findings: standing observations about recorded org data (a
161
125
  // custodial-looking reporting line, a pod that looks like its own team), open /
162
126
  // resolved by the facts / dismissed as intentional against a content
163
127
  // fingerprint. Not questions — corrections go through transformations.
164
128
  // (ADR-BE-765)
165
- export {
166
- STRUCTURE_FINDING_KINDS,
167
- STRUCTURE_FINDING_STATUSES,
168
- StructureFindingKindSchema,
169
- StructureFindingStatusSchema,
170
- ReportingLineAnomalyReportSchema,
171
- ReportingLineAnomalyFactsSchema,
172
- SubunitCandidateFactsSchema,
173
- StructureFindingDismissalSchema,
174
- StructureFindingSchema,
175
- StructureFindingListStatusSchema,
176
- StructureFindingListResponseSchema,
177
- DismissStructureFindingRequestSchema,
178
- StructureFindingResponseSchema,
179
- } from "./structure-findings";
180
- export type {
181
- StructureFindingKind,
182
- StructureFindingStatus,
183
- ReportingLineAnomalyReport,
184
- ReportingLineAnomalyFacts,
185
- SubunitCandidateFacts,
186
- StructureFindingDismissal,
187
- StructureFinding,
188
- StructureFindingListStatus,
189
- StructureFindingListResponse,
190
- DismissStructureFindingRequest,
191
- StructureFindingResponse,
192
- } from "./structure-findings";
129
+ export * from "./structure-findings";
193
130
 
194
131
  // Org transformation wire vocabulary: intent -> simulation -> preview. The
195
132
  // engine turns a TransformationRequest into scored mutation bundles and returns
196
133
  // a TransformationPreview the operator confirms before apply. (ADR-CONTRACTS-072)
197
- export {
198
- OrgIntentSchema,
199
- FactMutationSchema,
200
- TransformationOriginSchema,
201
- ProvenanceSchema,
202
- ExecutionContextSchema,
203
- TransformationRequestSchema,
204
- ConstraintViolationSchema,
205
- RecommendationSchema,
206
- FindingSeveritySchema,
207
- FindingSchema,
208
- TransformStrategySchema,
209
- SelectionRationaleSchema,
210
- ReportingEdgeProvenanceSchema,
211
- SupersededReportingEdgeSchema,
212
- TransformationPreviewSchema,
213
- } from "./transformation";
214
- export type {
215
- OrgIntent,
216
- FactMutation,
217
- TransformationOrigin,
218
- Provenance,
219
- ExecutionContext,
220
- TransformationRequest,
221
- ConstraintViolation,
222
- Recommendation,
223
- FindingSeverity,
224
- Finding,
225
- TransformStrategy,
226
- SelectionRationale,
227
- ReportingEdgeProvenance,
228
- SupersededReportingEdge,
229
- TransformationPreview,
230
- } from "./transformation";
134
+ export * from "./transformation";
231
135
 
232
136
  // Canonical facts: the adapter-seam ingestion batch. Each fact is keyed by
233
137
  // external identity (externalSourceId/externalSourceSystem) and carries a
234
138
  // FactProvenance envelope; the reconciler consumes the batch. (ADR-CONT-085 / ADR-CTRL-183)
235
- export {
236
- CanonicalPersonSchema,
237
- CanonicalOrgUnitSchema,
238
- CanonicalPositionStatusSchema,
239
- CanonicalPositionSchema,
240
- CanonicalOccupancySchema,
241
- CanonicalReportingEdgeSchema,
242
- CanonicalUnresolvedManagerResolutionSchema,
243
- CanonicalUnresolvedManagerSchema,
244
- CanonicalFactsSchema,
245
- } from "./canonical-facts";
246
- export type {
247
- CanonicalPerson,
248
- CanonicalOrgUnit,
249
- CanonicalPositionStatus,
250
- CanonicalPosition,
251
- CanonicalOccupancy,
252
- CanonicalReportingEdge,
253
- CanonicalUnresolvedManagerResolution,
254
- CanonicalUnresolvedManager,
255
- CanonicalFacts,
256
- } from "./canonical-facts";
139
+ export * from "./canonical-facts";
257
140
 
258
141
  // Org-structure inference: the snapshot the engine reasons over and the
259
142
  // proposed desired state it returns. Evidence is TYPED so the validator can
@@ -266,119 +149,26 @@ export type {
266
149
  // Apply on an AI proposal makes it human_confirmed without making its origin
267
150
  // manual. Precedence runs on `authority` alone, via mayOverrideAuthority.
268
151
  // (PRD-00956)
269
- export {
270
- StructureEvidenceSchema,
271
- TOPOLOGY_ONLY_EVIDENCE_KINDS,
272
- StructureUnitAuthoritySchema,
273
- StructureProposalOriginSchema,
274
- StructureAcceptedBySchema,
275
- StructureAuthoritySchema,
276
- StructureProvenanceSchema,
277
- mayOverrideAuthority,
278
- ProposedOrgUnitSchema,
279
- PersonStructureOutcomeSchema,
280
- StructureReviewItemSchema,
281
- STRUCTURE_REVIEW_ITEM_KINDS,
282
- StructureProposalSchema,
283
- StructurePersonFactSchema,
284
- StructureReportingFactSchema,
285
- ExistingUnitFactSchema,
286
- ExistingPlacementFactSchema,
287
- StructureInferenceSnapshotSchema,
288
- } from "./structure-inference";
289
- export type {
290
- StructureEvidence,
291
- StructureUnitAuthority,
292
- StructureProposalOrigin,
293
- StructureAcceptedBy,
294
- StructureAuthority,
295
- StructureProvenance,
296
- ProposedOrgUnit,
297
- PersonStructureOutcome,
298
- StructureReviewItem,
299
- StructureProposal,
300
- StructurePersonFact,
301
- StructureReportingFact,
302
- ExistingUnitFact,
303
- ExistingPlacementFact,
304
- StructureInferenceSnapshot,
305
- } from "./structure-inference";
152
+ export * from "./structure-inference";
306
153
 
307
154
  // Canonical OrgUnit tree ordering (PRD-00506)
308
- export type { TreeOrderableNode } from "./tree-ordering";
309
- export { orderTreeNodes } from "./tree-ordering";
310
- export {
311
- levelSlugForDepth,
312
- slugifyLevelLabel,
313
- unitRouteSegments,
314
- } from "./unit-route";
315
- export type { UnitRouteLevel } from "./unit-route";
155
+ export * from "./tree-ordering";
156
+ export * from "./unit-route";
316
157
 
317
158
  // Company.md domain types (PRD-00173)
318
- export type {
319
- CompanyMdVisibility,
320
- CompanyMdDiscoverabilityPolicy,
321
- CompanyMdClassification,
322
- CompanyMdDocLevel,
323
- CompanyMdDocKind,
324
- CompanyMdNodeType,
325
- CompanyMdSource,
326
- CompanyMdDependency,
327
- CompanyMdNodeIdentity,
328
- CompanyMdTreeNode,
329
- CompanyMdDocCore,
330
- CompanyMdDocCollaborators,
331
- CompanyMdDocRelations,
332
- CompanyMdDoc,
333
- CompanyMdContextBankItem,
334
- } from "./company-md";
159
+ export * from "./company-md";
335
160
 
336
161
  // Company.md real-time collaboration wire contract: sync/update-accepted
337
162
  // responses, the SSE frame union, the Y.Doc shape constant, and the published
338
163
  // size limits. Sequences are ALWAYS decimal strings. (ADR-CONT-102)
339
- export {
340
- COMPANY_MD_COLLAB_TEXT_KEY,
341
- COMPANY_MD_COLLAB_MAX_UPDATE_B64_CHARS,
342
- COMPANY_MD_COLLAB_MAX_DOC_TEXT_BYTES,
343
- COMPANY_MD_COLLAB_MAX_PRESENCE_POSITION_CHARS,
344
- COMPANY_MD_COLLAB_PRESENCE_TTL_MS,
345
- COMPANY_MD_COLLAB_PRESENCE_HEARTBEAT_MS,
346
- CompanyMdCollabSyncLimitsSchema,
347
- CompanyMdCollabSyncResponseSchema,
348
- CompanyMdCollabUpdateAcceptedSchema,
349
- CompanyMdCollabUpdateEventSchema,
350
- CompanyMdCollabPresenceEventSchema,
351
- CompanyMdCollabResetEventSchema,
352
- CompanyMdCollabAccessRevokedEventSchema,
353
- CompanyMdCollabConnectedEventSchema,
354
- CompanyMdCollabServerDrainEventSchema,
355
- CompanyMdCollabSseEventSchema,
356
- } from "./company-md-collab";
357
- export type {
358
- CompanyMdCollabSyncLimits,
359
- CompanyMdCollabSyncResponse,
360
- CompanyMdCollabUpdateAccepted,
361
- CompanyMdCollabUpdateEvent,
362
- CompanyMdCollabPresenceEvent,
363
- CompanyMdCollabResetEvent,
364
- CompanyMdCollabAccessRevokedEvent,
365
- CompanyMdCollabConnectedEvent,
366
- CompanyMdCollabServerDrainEvent,
367
- CompanyMdCollabSseEvent,
368
- } from "./company-md-collab";
164
+ export * from "./company-md-collab";
369
165
 
370
166
  // Sharing and ACL types (PRD-00306). The legacy AccessSource / AccessReason /
371
167
  // EffectiveAccess / EvaluationStep / AccessExplanation were removed with
372
168
  // CompanyMdAccessEvaluator (ADR-BE-392); ShareState.effectiveAccess now carries
373
169
  // the projection EffectiveAccessResponse, and the ONE AccessSource lives in
374
170
  // permissions/access-source.
375
- export type {
376
- AccessLevel,
377
- SharePolicy,
378
- AclEntry,
379
- ShareState,
380
- PermissionAuditEntry,
381
- } from "./sharing";
171
+ export * from "./sharing";
382
172
 
383
173
  // Workspace response schemas (PRD-00445)
384
174
  export {
@@ -513,19 +303,7 @@ export type {
513
303
  } from "./schemas";
514
304
 
515
305
  // OrgUnit canonical model (ADR-BE-120)
516
- export type {
517
- OrgUnitClassification,
518
- OrgUnitSyncMode,
519
- OrgUnitVisibility,
520
- OrgUnitRelationshipType,
521
- OrgUnitRelationshipRole,
522
- OrgUnitMembershipStatus,
523
- OrgUnitMembershipSource,
524
- OpenRoleStatus,
525
- OrgUnitErrorCode,
526
- OrgTreeResponse,
527
- } from "./org-units";
528
- export { ORG_UNITS_ROUTES } from "./org-units";
306
+ export * from "./org-units";
529
307
  export {
530
308
  ORG_UNIT_DESIGNED_MAX_DEPTH,
531
309
  ORG_UNIT_ABSOLUTE_MAX_DEPTH,
@@ -644,5 +422,4 @@ export type {
644
422
  } from "./schemas";
645
423
 
646
424
  // Why an org stopped being personal (ADR-CONTRACTS-167)
647
- export type { OrgSharedTransitionTrigger } from "./shared-transition";
648
- export { ORG_SHARED_TRANSITION_TRIGGERS } from "./shared-transition";
425
+ export * from "./shared-transition";