@company-semantics/contracts 1.10.1 → 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.1",
3
+ "version": "1.11.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -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(),