@company-semantics/contracts 1.10.0 → 1.11.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": "1.10.0",
3
+ "version": "1.11.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 = '6984169ab437' as const;
3
- export const SPEC_HASH_FULL = '6984169ab4377753eff4a502240d80cc7504b083f7971a424943ae628dbb1fea' as const;
2
+ export const SPEC_HASH = '491b4248b151' as const;
3
+ export const SPEC_HASH_FULL = '491b4248b151c9d176a7f2ff3cff06381302277360bfc766e8cd79b2b96bac28' as const;
@@ -1570,23 +1570,6 @@ export interface paths {
1570
1570
  patch?: never;
1571
1571
  trace?: never;
1572
1572
  };
1573
- "/api/orgs/{orgId}/tree": {
1574
- parameters: {
1575
- query?: never;
1576
- header?: never;
1577
- path?: never;
1578
- cookie?: never;
1579
- };
1580
- /** Get the org tree (path-ordered snapshot) with level labels */
1581
- get: operations["getOrgTree"];
1582
- put?: never;
1583
- post?: never;
1584
- delete?: never;
1585
- options?: never;
1586
- head?: never;
1587
- patch?: never;
1588
- trace?: never;
1589
- };
1590
1573
  "/api/orgs/{orgId}/level-config": {
1591
1574
  parameters: {
1592
1575
  query?: never;
@@ -3129,7 +3112,8 @@ export interface components {
3129
3112
  /** Format: uuid */
3130
3113
  orgId: string;
3131
3114
  depth: number;
3132
- label: string;
3115
+ label: string | null;
3116
+ icon: ("city" | "buildings" | "users-four" | "users-three" | "users") | null;
3133
3117
  createdAt: string;
3134
3118
  updatedAt: string;
3135
3119
  }[];
@@ -3139,7 +3123,8 @@ export interface components {
3139
3123
  /** Format: uuid */
3140
3124
  orgId: string;
3141
3125
  depth: number;
3142
- label: string;
3126
+ label: string | null;
3127
+ icon: ("city" | "buildings" | "users-four" | "users-three" | "users") | null;
3143
3128
  createdAt: string;
3144
3129
  updatedAt: string;
3145
3130
  }[];
@@ -5765,28 +5750,6 @@ export interface operations {
5765
5750
  };
5766
5751
  };
5767
5752
  };
5768
- getOrgTree: {
5769
- parameters: {
5770
- query?: never;
5771
- header?: never;
5772
- path: {
5773
- orgId: string;
5774
- };
5775
- cookie?: never;
5776
- };
5777
- requestBody?: never;
5778
- responses: {
5779
- /** @description Org tree snapshot */
5780
- 200: {
5781
- headers: {
5782
- [name: string]: unknown;
5783
- };
5784
- content: {
5785
- "application/json": components["schemas"]["OrgUnitTreeResponse"];
5786
- };
5787
- };
5788
- };
5789
- };
5790
5753
  listOrgLevelConfig: {
5791
5754
  parameters: {
5792
5755
  query?: never;
@@ -5823,7 +5786,9 @@ export interface operations {
5823
5786
  "application/json": {
5824
5787
  entries: {
5825
5788
  depth: number;
5826
- label: string;
5789
+ label?: string;
5790
+ /** @enum {string} */
5791
+ icon: "city" | "buildings" | "users-four" | "users-three" | "users";
5827
5792
  }[];
5828
5793
  };
5829
5794
  };
@@ -128,21 +128,23 @@ describe('OrgUnitRelationshipSchema', () => {
128
128
  });
129
129
 
130
130
  describe('OrgLevelConfigSchema', () => {
131
- it('enforces depth 1..5, non-empty-when-present label, and icon enum', () => {
131
+ it('enforces depth 1..5, non-empty-when-present label/labelPlural, and icon enum', () => {
132
132
  const entry = {
133
133
  orgId: UUID_B,
134
134
  depth: 2,
135
135
  label: 'Department',
136
+ labelPlural: 'Departments',
136
137
  icon: 'users-four' as const,
137
138
  createdAt: '2026-04-17T00:00:00Z',
138
139
  updatedAt: '2026-04-17T00:00:00Z',
139
140
  };
140
141
  expect(() => OrgLevelConfigSchema.parse(entry)).not.toThrow();
141
142
  expect(() =>
142
- OrgLevelConfigSchema.parse({ ...entry, label: null, icon: null })
143
+ OrgLevelConfigSchema.parse({ ...entry, label: null, labelPlural: null, icon: null })
143
144
  ).not.toThrow();
144
145
  expect(() => OrgLevelConfigSchema.parse({ ...entry, depth: 6 })).toThrow();
145
146
  expect(() => OrgLevelConfigSchema.parse({ ...entry, label: '' })).toThrow();
147
+ expect(() => OrgLevelConfigSchema.parse({ ...entry, labelPlural: '' })).toThrow();
146
148
  expect(() =>
147
149
  OrgLevelConfigSchema.parse({ ...entry, icon: 'not-an-icon' })
148
150
  ).toThrow();
@@ -719,6 +719,7 @@ export const OrgLevelConfigSchema = z.object({
719
719
  orgId: z.string().uuid(),
720
720
  depth: z.number().int().min(1).max(5),
721
721
  label: z.string().min(1).nullable(),
722
+ labelPlural: z.string().min(1).nullable(),
722
723
  icon: OrgLevelIconSchema.nullable(),
723
724
  createdAt: z.string(),
724
725
  updatedAt: z.string(),