/** * A queue entry as the behandelportal sees it — the parsed, domain-side view * of the backend's cross-owner `GET /werkvoorraad`. Pure types, no Angular. * * The status union is narrower than the SSP's full `AanvraagStatus` (ssp's * `registratie/domain/aanvraag.ts`): the backend only ever puts a case in the queue * while it is still open (`Ingediend`/`InBehandeling`), so a queue item literally * cannot be `Concept`/`Goedgekeurd`/`Afgewezen` — illegal states unrepresentable. */ export type AanvraagType = 'registratie' | 'herregistratie' | 'intake'; export type WerkvoorraadStatus = | { tag: 'Ingediend'; referentie: string } | { tag: 'InBehandeling'; referentie: string; manual: boolean }; export interface WerkvoorraadItem { id: string; type: AanvraagType; status: WerkvoorraadStatus; /** The BSN of the citizen the aanvraag belongs to — always populated (cross-owner list). */ owner: string; submittedAt?: string; }