You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: internal/events/README.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
This internal package defines CloudEvents-compatible schemas (with Zod) for the Supplier API domain – currently focusing on Letter Status Change events. It provides:
4
4
5
5
* A reusable CloudEvents envelope profile (`$EnvelopeProfile`)
6
-
* Domain model schemas for letter status transitions (`$LetterStatus`, `$LetterStatusChange`)
6
+
* Domain model schemas for letter status transitions (`$LetterStatus`, `$Letter`)
7
7
* Concrete per-status event schemas with strict `type`, `dataschema` URI and semantic version validation
8
8
* Utilities to programmatically access all status change event schemas (`statusChangeEvents`)
9
9
@@ -16,10 +16,10 @@ This internal package defines CloudEvents-compatible schemas (with Zod) for the
16
16
```text
17
17
src/
18
18
domain/
19
-
letter-status-change.ts # Domain model and status enum
19
+
letter.ts # Domain model and status enum
20
20
events/
21
21
envelope-profile.ts # CloudEvents base envelope extensions & constraints
22
-
letter-status-change-events.ts # Per status event schema generation
22
+
letter-events.ts # Per status event schema generation
23
23
cli/ # CLI scripts for bundling / codegen
24
24
index.ts # (re-)exports (not shown above if generated later)
25
25
```
@@ -43,26 +43,26 @@ Defines the constrained CloudEvents 1.0 envelope used across Notify. It enforces
*`$LetterStatusChange` domain object, extending a `DomainBase('LetterStatusChange')` (see helpers package) with:
50
+
*`$Letter` domain object, extending a `DomainBase('Letter')` (see helpers package) with:
51
51
*`domainId` (branded identifier)
52
52
*`sourceSubject` – original resource subject
53
53
*`status` – one of `$LetterStatus`
54
54
* Optional `reasonCode`, `reasonText`
55
55
56
56
### 3. Per‑Status Event Schemas
57
57
58
-
`letter-status-change-events.ts` programmatically creates a schema per status by extending `$EnvelopeProfile` and replacing `data` with the domain payload. Each schema enforces:
58
+
`letter-change-events.ts` programmatically creates a schema per status by extending `$EnvelopeProfile` and replacing `data` with the domain payload. Each schema enforces:
0 commit comments