feat(portal-frontend): add worklist and case-detail typed interfaces and API services

Types mirror New.Api.Contracts verbatim; all write calls use the href
given in a case's actions block rather than a client-built URL.
This commit is contained in:
eho
2026-07-31 08:45:27 +02:00
parent 229ca9b7d9
commit b8a8d28e7b
6 changed files with 194 additions and 1 deletions
@@ -0,0 +1,25 @@
// Mirrors New.Api.Contracts error shapes verbatim.
export interface FieldError {
field: string;
message: string;
detail?: string | null;
}
/** 400 - legacy write-through validation failures only (seam B). */
export interface ErrorsResponse {
errors: FieldError[];
}
/** 422 - a single named domain-invariant failure. Render `invariant` and
* `message` as given; the set of invariants isn't fixed client-side
* knowledge (ADR-003), so no switch/enum maps over it. */
export interface InvariantViolationResponse {
invariant: string;
message: string;
}
/** 409 - a conflict, e.g. release-ownership blocked by prior domain writes. */
export interface MessageResponse {
message: string;
}