@rytass/bpm-core-shared 0.1.6 → 0.1.8

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/CHANGELOG.md CHANGED
@@ -8,6 +8,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  Releases are managed by [`nx release`](https://nx.dev/recipes/nx-release) with
9
9
  Conventional Commits — see `nx.json` for the release config.
10
10
 
11
+ ## 0.1.8 — 2026-05-28
12
+
13
+ No source change. Lockstep bump alongside
14
+ `@rytass/bpm-core-nestjs-module@0.1.8` (README drift fixes for Casbin
15
+ example, position signatures, and metadataJson write-only clarification).
16
+
17
+ ## 0.1.7 — 2026-05-28
18
+
19
+ ### ⚠️ Type-level breaking (consumers writing literal values)
20
+
21
+ - **`OrgUnitType` literal case corrected**: was `'company' | 'division'
22
+ | 'department' | 'team'` (lowercase, matched the database row values
23
+ but **not** the GraphQL SDL); now `'COMPANY' | 'DIVISION' |
24
+ 'DEPARTMENT' | 'TEAM'` (UPPERCASE, matches what the GraphQL wire
25
+ actually carries on every read and every write).
26
+
27
+ Consumers calling `createOrgUnit({ type: 'company' })` against the
28
+ published `@rytass/bpm-core-client@0.1.6` or earlier received a
29
+ GraphQL enum-coercion error at runtime — the lowercase form was
30
+ rejected by the BPM server. The TS type was misleading. This release
31
+ realigns the type with the wire reality.
32
+
33
+ Migration: update any literal `'company'` / `'division'` /
34
+ `'department'` / `'team'` passed to `createOrgUnit` / `updateOrgUnit`
35
+ / `readOrganizationDashboard` `orgUnitType` filter to the UPPERCASE
36
+ form. JSDoc on the type explains the casing.
37
+
38
+ ### Documentation
39
+
40
+ - JSDoc added to `OrgUnitType` explaining the lowercase database value
41
+ vs UPPERCASE wire format asymmetry.
42
+
43
+ ### Why a patch (despite the rename)
44
+
45
+ The lowercase form did not work in practice — any consumer who got
46
+ past `tsc` failed at runtime against the GraphQL server. Calling this a
47
+ patch reflects "fixing a documented contract" rather than "changing
48
+ working behavior".
49
+
11
50
  ## 0.1.6 — 2026-05-28
12
51
 
13
52
  No source changes. Lockstep bump alongside
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/bpm-core-shared",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Shared TypeScript contracts for the Rytass BPM approval workflow stack (workflow, form, condition, identity, organization, status types).",
5
5
  "keywords": [
6
6
  "bpm",
@@ -1,4 +1,15 @@
1
- export type OrgUnitType = 'company' | 'division' | 'department' | 'team';
1
+ /**
2
+ * Org-unit type — matches the BPM GraphQL `OrgUnitType` enum SDL names
3
+ * (UPPERCASE). The server stores the value lower-cased internally
4
+ * (`'company'` etc. in the database row), but every read and write
5
+ * across the GraphQL wire and the REST surface uses the UPPERCASE form.
6
+ *
7
+ * Consumers of `@rytass/bpm-core-client/organization` must pass these
8
+ * UPPERCASE literals to `createOrgUnit` / `updateOrgUnit` (and the
9
+ * `readOrganizationDashboard` `orgUnitType` filter), and will receive
10
+ * UPPERCASE values back on `OrgUnitRecord.type`.
11
+ */
12
+ export type OrgUnitType = 'COMPANY' | 'DIVISION' | 'DEPARTMENT' | 'TEAM';
2
13
  export type ManagerResolutionScopeType = 'MEMBER' | 'ORG_UNIT' | 'POSITION';
3
14
  export interface OrgUnit {
4
15
  readonly id: string;