Files
register-referentie/services/acl/Acl.Application/IZaakGateway.cs
T

48 lines
2.9 KiB
C#

namespace Acl.Application;
/// <summary>Port to the ZGW Zaken API. Implemented in Infrastructure — the only
/// code that talks to OpenZaak (ADR-0001).</summary>
public interface IZaakGateway
{
Task<Uri> OpenZaakAsync(ZaakRequest request, CancellationToken ct = default);
/// <summary>
/// Set the given zaak to the <em>eindstatus</em> (final statustype) of the supplied zaaktype —
/// the ZGW translation of "approve". The gateway resolves which statustype is the eindstatus from
/// the catalogus and POSTs a status against the zaak, dated <paramref name="datumStatusGezet"/>.
/// </summary>
Task SetZaakToEindstatusAsync(Uri zaakUrl, Uri zaaktypeUrl, DateOnly datumStatusGezet, CancellationToken ct = default);
/// <summary>
/// Set the given zaak to the <em>cancellation</em> statustype ("Geannuleerd") and record the
/// matching cancellation resultaat ("Vervallen") — the ZGW translation of "the 30-day document term
/// lapsed" (S-10c). Distinct from <see cref="SetZaakToEindstatusAsync"/> (approval): the gateway
/// resolves both the cancellation statustype and resultaattype from the catalogus by their
/// omschrijving, POSTs the resultaat then the status, dated <paramref name="datumStatusGezet"/>.
/// </summary>
Task SetZaakToCancellationStatusAsync(Uri zaakUrl, Uri zaaktypeUrl, DateOnly datumStatusGezet, CancellationToken ct = default);
/// <summary>Read the zaak's <c>identificatie</c> — the public-safe reference the register shows.
/// The Event Subscriber calls this through the ACL rather than reading ZGW itself (§8.1, #78).</summary>
Task<string> GetZaakIdentificatieAsync(Uri zaakUrl, CancellationToken ct = default);
/// <summary>
/// Store a diploma document (S-10b): create an <c>enkelvoudiginformatieobject</c> in the ZGW
/// Documenten API and relate it to the zaak via a <c>zaakinformatieobject</c>. Returns the URL of
/// the created informatieobject.
/// </summary>
Task<Uri> StoreDocumentAsync(DocumentRequest request, CancellationToken ct = default);
/// <summary>Resolve the URL of the published zaaktype with the given <paramref name="identificatie"/>
/// from the Catalogi API (S-27). Throws if no published zaaktype matches.</summary>
Task<Uri> ResolveZaaktypeUrlAsync(string identificatie, CancellationToken ct = default);
/// <summary>Resolve the URL of the published informatieobjecttype with the given
/// <paramref name="omschrijving"/> from the Catalogi API (S-27). Throws if none matches.</summary>
Task<Uri> ResolveInformatieobjecttypeUrlAsync(string omschrijving, CancellationToken ct = default);
/// <summary>List the published zaaktypen from the Catalogi API — the read-only catalogus the beheer
/// portal shows (S-15a). The ACL is the only code allowed to read ZGW (§8.1).</summary>
Task<IReadOnlyList<ZaaktypeSummary>> ListZaaktypenAsync(CancellationToken ct = default);
}