@company-semantics/contracts 21.2.0 → 22.0.0

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": "21.2.0",
3
+ "version": "22.0.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED — do not edit. Run pnpm generate:spec-hash to regenerate.
2
- export const SPEC_HASH = '04f6a4a8fe16' as const;
3
- export const SPEC_HASH_FULL = '04f6a4a8fe169119fda699f1854d409df278ac5dd7ab16f1d5affff6cd133e47' as const;
2
+ export const SPEC_HASH = 'c4553ad2d609' as const;
3
+ export const SPEC_HASH_FULL = 'c4553ad2d6092751eed87104b6614f3ef60884954c1d5a029a98129d32c5b9bf' as const;
@@ -3449,6 +3449,8 @@ export interface components {
3449
3449
  unitName: string;
3450
3450
  /** @enum {string} */
3451
3451
  designation: "whole_org" | "admin" | "unit_owner" | "delegate" | "member";
3452
+ /** @enum {string} */
3453
+ mutability: "derived" | "user_managed";
3452
3454
  }[];
3453
3455
  unitMembershipsTruncated: boolean;
3454
3456
  inviteStatus: ("active" | "pending" | "expired") | null;
@@ -3644,6 +3646,8 @@ export interface components {
3644
3646
  unitName: string;
3645
3647
  /** @enum {string} */
3646
3648
  designation: "whole_org" | "admin" | "unit_owner" | "delegate" | "member";
3649
+ /** @enum {string} */
3650
+ mutability: "derived" | "user_managed";
3647
3651
  }[];
3648
3652
  unitMembershipsTruncated: boolean;
3649
3653
  inviteStatus: ("active" | "pending" | "expired") | null;
@@ -3774,6 +3778,19 @@ export interface components {
3774
3778
  homeUnitId?: string;
3775
3779
  /** @enum {string} */
3776
3780
  homeUnitRole?: "member" | "unit_owner";
3781
+ stagedPlacement?: {
3782
+ title?: string;
3783
+ /** Format: uuid */
3784
+ managerUserId?: string;
3785
+ /** Format: uuid */
3786
+ homeUnitId?: string;
3787
+ /** @enum {string} */
3788
+ homeUnitRole?: "member" | "unit_owner";
3789
+ /** @default [] */
3790
+ unitOwnerOf: string[];
3791
+ /** @default [] */
3792
+ contributesTo: string[];
3793
+ };
3777
3794
  createdAt: string;
3778
3795
  expiresAt: string;
3779
3796
  acceptedAt?: string;
@@ -3805,6 +3822,19 @@ export interface components {
3805
3822
  homeUnitId?: string;
3806
3823
  /** @enum {string} */
3807
3824
  homeUnitRole?: "member" | "unit_owner";
3825
+ stagedPlacement?: {
3826
+ title?: string;
3827
+ /** Format: uuid */
3828
+ managerUserId?: string;
3829
+ /** Format: uuid */
3830
+ homeUnitId?: string;
3831
+ /** @enum {string} */
3832
+ homeUnitRole?: "member" | "unit_owner";
3833
+ /** @default [] */
3834
+ unitOwnerOf: string[];
3835
+ /** @default [] */
3836
+ contributesTo: string[];
3837
+ };
3808
3838
  createdAt: string;
3809
3839
  expiresAt: string;
3810
3840
  acceptedAt?: string;
@@ -4781,6 +4811,8 @@ export interface components {
4781
4811
  /** Format: uuid */
4782
4812
  id: string;
4783
4813
  name: string;
4814
+ /** @enum {string} */
4815
+ mutability: "derived" | "user_managed";
4784
4816
  }[];
4785
4817
  }[];
4786
4818
  edges: {
@@ -84,7 +84,7 @@ TypeScript types and functions for user identity and display name resolution.
84
84
 
85
85
  **Internal domains:**
86
86
 
87
- _None._
87
+ - `org`
88
88
 
89
89
  **External packages:**
90
90
 
@@ -12,6 +12,7 @@
12
12
  * ADR-BE-120). Tree traversal must never consult either.
13
13
  */
14
14
  import { z } from "zod";
15
+ import { AuthorityMutabilitySchema } from "../org/schemas";
15
16
 
16
17
  // ---------------------------------------------------------------------------
17
18
  // Reporting Relationship Type
@@ -34,6 +35,14 @@ export type ReportingRelationshipType = z.infer<
34
35
  export const PeopleOrgChartOwnedUnitSchema = z.object({
35
36
  id: z.string().uuid(),
36
37
  name: z.string(),
38
+ // Whether this local structural ownership is DERIVED from reporting topology
39
+ // (the senior person homed in a unit with no manager inside it — ADR-BE-267/
40
+ // 294/329) or an explicit grant (`user_managed`). The chart marks a derived
41
+ // owner with the distinct ✧ marker (not the held-key glyph). A derived owner
42
+ // can't be revoked in place — only relinquished. Display + affordance gating
43
+ // only; never an authorization input. Mirrors `WorkspaceMemberUnitDesignation
44
+ // Entry.mutability`.
45
+ mutability: AuthorityMutabilitySchema,
37
46
  });
38
47
 
39
48
  export type PeopleOrgChartOwnedUnit = z.infer<
@@ -43,10 +43,31 @@ export const OrgUnitDesignationSchema = z.enum([
43
43
  ]);
44
44
  export type OrgUnitDesignation = z.infer<typeof OrgUnitDesignationSchema>;
45
45
 
46
+ /**
47
+ * Whether the user can change this authority from this surface.
48
+ * - `derived`: change the upstream source instead (the org chart, RBAC roles).
49
+ * - `user_managed`: removable from this UI.
50
+ *
51
+ * Hoisted above {@link WorkspaceMemberUnitDesignationEntrySchema} so the
52
+ * per-unit designation can carry it; also consumed by {@link OwnerAuthoritySchema}.
53
+ */
54
+ export const AuthorityMutabilitySchema = z.enum(["derived", "user_managed"]);
55
+ export type AuthorityMutability = z.infer<typeof AuthorityMutabilitySchema>;
56
+
46
57
  export const WorkspaceMemberUnitDesignationEntrySchema = z.object({
47
58
  unitId: z.string(),
48
59
  unitName: z.string(),
49
60
  designation: OrgUnitDesignationSchema,
61
+ /**
62
+ * Whether this designation is REMOVABLE in place (`user_managed` — an explicit
63
+ * overlay grant or `l{N}_unit_owner` membership) or DERIVED from reporting
64
+ * topology (`derived` — the senior person homed in a unit with no manager
65
+ * inside it, ADR-BE-267/294). A `derived` owner can't be revoked: the holder
66
+ * must relinquish it (recorded as a higher-provenance suppression that the
67
+ * structural projection honors) or the upstream chart must change. Display +
68
+ * affordance gating only; never an authorization input.
69
+ */
70
+ mutability: AuthorityMutabilitySchema,
50
71
  });
51
72
  export type WorkspaceMemberUnitDesignationEntry = z.infer<
52
73
  typeof WorkspaceMemberUnitDesignationEntrySchema
@@ -1141,13 +1162,8 @@ export type AuthorityMechanism = z.infer<typeof AuthorityMechanismSchema>;
1141
1162
  export const AuthorityLocalitySchema = z.enum(["local", "inherited"]);
1142
1163
  export type AuthorityLocality = z.infer<typeof AuthorityLocalitySchema>;
1143
1164
 
1144
- /**
1145
- * Whether the user can change this authority from this surface.
1146
- * - `derived`: change the upstream source instead (the org chart, RBAC roles).
1147
- * - `user_managed`: removable from this UI.
1148
- */
1149
- export const AuthorityMutabilitySchema = z.enum(["derived", "user_managed"]);
1150
- export type AuthorityMutability = z.infer<typeof AuthorityMutabilitySchema>;
1165
+ // AuthorityMutabilitySchema is defined above (hoisted next to
1166
+ // WorkspaceMemberUnitDesignationEntrySchema, which also carries it).
1151
1167
 
1152
1168
  export const OwnerAuthoritySchema = z.object({
1153
1169
  mechanism: AuthorityMechanismSchema,