Files
register-referentie/services/acl/Acl.Application/AclService.cs
Edwin van den Houdt 385708c626
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / unit (pull_request) Has been cancelled
CI / compose-smoke (pull_request) Has been cancelled
feat(acl): implement OpenZaak default-fill + ZGW gateway (refs #5)
AclService.OpenZaakAsync builds a ZaakRequest from the configured defaults
(bronorganisatie, verantwoordelijkeOrganisatie, vertrouwelijkheidaanduiding,
zaaktype) plus today's date from the clock, and delegates to the gateway.
OpenZaakGateway POSTs the zaak to /zaken/api/v1/zaken with a ZGW Bearer JWT
and the CRS headers, returning the created zaak URL. Tests pass (green).

Add a root register-referentie.slnx (bff + acl) and point `make ci` at it so
the gate covers every .NET service.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 09:48:30 +02:00

21 lines
724 B
C#

namespace Acl.Application;
/// <summary>The ACL's single operation: open a zaak from a domain payload,
/// default-filling the ZGW-mandatory fields (ADR-0003).</summary>
public sealed class AclService(IZaakGateway gateway, AclDefaults defaults, IClock clock)
{
public Task<Uri> OpenZaakAsync(DomainRegistration registration, CancellationToken ct = default)
{
ArgumentNullException.ThrowIfNull(registration);
var request = new ZaakRequest(
defaults.Bronorganisatie,
defaults.VerantwoordelijkeOrganisatie,
defaults.Vertrouwelijkheidaanduiding,
defaults.ZaaktypeUrl,
clock.Today);
return gateway.OpenZaakAsync(request, ct);
}
}