@rytass/bpm-core-shared 0.1.5 → 0.1.7

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.7 — 2026-05-28
12
+
13
+ ### ⚠️ Type-level breaking (consumers writing literal values)
14
+
15
+ - **`OrgUnitType` literal case corrected**: was `'company' | 'division'
16
+ | 'department' | 'team'` (lowercase, matched the database row values
17
+ but **not** the GraphQL SDL); now `'COMPANY' | 'DIVISION' |
18
+ 'DEPARTMENT' | 'TEAM'` (UPPERCASE, matches what the GraphQL wire
19
+ actually carries on every read and every write).
20
+
21
+ Consumers calling `createOrgUnit({ type: 'company' })` against the
22
+ published `@rytass/bpm-core-client@0.1.6` or earlier received a
23
+ GraphQL enum-coercion error at runtime — the lowercase form was
24
+ rejected by the BPM server. The TS type was misleading. This release
25
+ realigns the type with the wire reality.
26
+
27
+ Migration: update any literal `'company'` / `'division'` /
28
+ `'department'` / `'team'` passed to `createOrgUnit` / `updateOrgUnit`
29
+ / `readOrganizationDashboard` `orgUnitType` filter to the UPPERCASE
30
+ form. JSDoc on the type explains the casing.
31
+
32
+ ### Documentation
33
+
34
+ - JSDoc added to `OrgUnitType` explaining the lowercase database value
35
+ vs UPPERCASE wire format asymmetry.
36
+
37
+ ### Why a patch (despite the rename)
38
+
39
+ The lowercase form did not work in practice — any consumer who got
40
+ past `tsc` failed at runtime against the GraphQL server. Calling this a
41
+ patch reflects "fixing a documented contract" rather than "changing
42
+ working behavior".
43
+
44
+ ## 0.1.6 — 2026-05-28
45
+
46
+ No source changes. Lockstep bump alongside
47
+ `@rytass/bpm-core-nestjs-module@0.1.6` (new `MemberNotFoundException`
48
+ export) and `@rytass/bpm-core-client@0.1.6` (new `configureBPMClient`).
49
+
11
50
  ## 0.1.5 — 2026-05-28
12
51
 
13
52
  ### Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytass/bpm-core-shared",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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;