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:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user