@company-semantics/contracts 2.3.1 → 2.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "2.3.1",
3
+ "version": "2.4.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,7 +99,14 @@ const AclEntrySchema = z.object({
99
99
  });
100
100
 
101
101
  const AccessReasonSchema = z.object({
102
- source: z.enum(['org_rbac', 'sharing_policy', 'unit_baseline', 'acl_grant', 'doc_ownership']),
102
+ source: z.enum([
103
+ 'org_rbac',
104
+ 'sharing_policy',
105
+ 'unit_baseline',
106
+ 'unit_delegation',
107
+ 'acl_grant',
108
+ 'doc_ownership',
109
+ ]),
103
110
  detail: z.string(),
104
111
  });
105
112
 
@@ -25,8 +25,19 @@ export interface AclEntry {
25
25
  /**
26
26
  * Source of an access grant.
27
27
  * Used in EffectiveAccess.reasons and EvaluationStep.source.
28
+ *
29
+ * `unit_delegation` covers leadership/delegation grants on the doc's owning
30
+ * unit via the authority projection (ADR-BE-169). Distinct from
31
+ * `unit_baseline` (which is membership-role-based) — delegations live on the
32
+ * `org_unit_authority_grants` table and carry an explicit scope set.
28
33
  */
29
- export type AccessSource = 'org_rbac' | 'sharing_policy' | 'unit_baseline' | 'acl_grant' | 'doc_ownership';
34
+ export type AccessSource =
35
+ | 'org_rbac'
36
+ | 'sharing_policy'
37
+ | 'unit_baseline'
38
+ | 'unit_delegation'
39
+ | 'acl_grant'
40
+ | 'doc_ownership';
30
41
 
31
42
  export interface AccessReason {
32
43
  readonly source: AccessSource;