using BigRegister.Api.Contracts; namespace BigRegister.Api.Data; /// /// The cases (zaken) READ seam (WP-49). A "zaak" in ZGW terms is an /// here; this interface is the one injection point that lets a real ZGW backend (OpenZaak) /// replace the local SQLite store behind the same /// contract — so the frontend never changes (BFF-lite anti-corruption, ADR-0001). /// /// Default binding is (offline). Setting Zgw:Enabled=true /// swaps in OpenZaakZaakSource. Slice 1 (WP-49) was read-only; /// (WP-50) is the first write. The interface returns the wire DTO (not the domain /// ) precisely so each source owns its own mapping — the OpenZaak /// source maps a ZGW Zaak into this shape, the local source maps the stored aanvraag. /// public interface IZaakSource { /// Every case, newest-first (the admin cross-owner list, WP-36). IReadOnlyList ListCases(DateTimeOffset now); /// /// Register a just-submitted as a zaak (WP-50). The aanvraag is /// already persisted locally (ApplicationStore.Submit already ran) — this is the /// integration side-effect, and (Referentie, Status) is what the submit endpoint hands back /// to the FE (ADR-0001: route the create through the existing submit response DTO, don't add /// a second one). The local source is a pure passthrough of the already-computed local /// reference/status (ZaakUrl null — nothing to persist); the OpenZaak source creates a Zaak /// (+ status + rol) and maps the result back into the same shape, returning the zaak's URL /// so the endpoint can persist it (, WP-51 needs it /// to later link documents to this zaak). /// (string Referentie, AanvraagStatusDto Status, string? ZaakUrl) CreateZaak(Aanvraag aanvraag, DateTimeOffset now); }