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>
21 lines
724 B
C#
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);
|
|
}
|
|
}
|