Skip to main content

Module wire

Module wire 

Source
Expand description

The mock’s half of the six contract endpoints: the client’s own request and response types, re-exported so a mock body that the client cannot read is a compile error, plus the shapes and message strings that exist only on the answering side.

Every endpoint takes a top-level JSON array and answers with one item per request item, in order. Per-item outcomes are HTTP 200; only request-level failures are 4xx/5xx.

Structs§

CreditRange
DatePeriod
EnrolmentResolutionResult
EnrolmentsListedResult
ExistingAttainment
ImportAttainmentRequestItem
ImportAttainmentResult
One shape for import’s four success codes: sent fills the submitted pair, registered and duplicateAttainment fill attainment, notImprovedAttainment fills previous_attainment.
ListByCourseRequestItem
ListedEnrolment
ListedPerson
LocalizedName
PersonResult
ProductAccessTokenRequestItem
ProductAccessTokenResult
RequestLevelError
RequestLevelErrorBody
ResolveEnrolmentRequestItem
ResolvePersonRequestItem
SuotarAttainment
Covers both contract bodies: the bare {id, type} of a registered answer and the fuller one behind duplicateAttainment and notImprovedAttainment.
SuotarEnrolment
SuotarItemError
SuotarResponseItem
VerifyAttainmentRequestItem
VerifyAttainmentResult

Enums§

SuotarItemStatus

Functions§

canonical_message
sisuTemporarilyUnavailable is worded differently per endpoint, reproduced here so a client keying off message instead of code breaks.
erase
error_item
error_item_with_message
ok_item

Type Aliases§

ErasedResponseItem
A request’s items are all one endpoint’s shape, but the pipeline also carries fault-shaped items and logs them, so the payload is erased once the per-item logic has built it in its typed form.