Ports and failing tests for the Objecten hop, ahead of the implementation: - IRegisterRecordGateway + RegisterRecord — the Application-side port; the record mirrors the objecttype schema registered in S-18c (ADR-0027). - AclService takes the port but does not yet call it, so the approval test fails on an empty upsert list. - ObjectenGateway is a shell throwing NotImplementedException; its tests pin the contract: resolve the objecttype by name, search by data attribute, POST when absent / PATCH when present, static Token auth per API, the CRS headers the geo API requires, and a surfaced error body. Also splits S-19 (#20) into #149/#150 in BACKLOG.md — the approval-side write and the projection re-sourcing are independently deployable (CLAUDE.md §13).
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
namespace Acl.Application;
|
|
|
|
/// <summary>
|
|
/// Port to the Objecten API, which holds the authoritative register record (S-19a, ADR-0028).
|
|
/// Implemented in Infrastructure — as with ZGW, the ACL is the only code that talks to the
|
|
/// upstream Common Ground module (§8.1).
|
|
/// </summary>
|
|
public interface IRegisterRecordGateway
|
|
{
|
|
/// <summary>
|
|
/// Write the register record for a registration, creating it if absent and updating it if it
|
|
/// already exists. Idempotent on <see cref="RegisterRecord.Id"/>: a replayed approval updates
|
|
/// the existing object instead of creating a second one (§8.6).
|
|
/// </summary>
|
|
Task UpsertAsync(RegisterRecord record, CancellationToken ct = default);
|
|
}
|
|
|
|
/// <summary>
|
|
/// The public-safe register record, matching the <c>RegisterRecord</c> objecttype schema registered
|
|
/// in S-18c (ADR-0027). No bsn, no name — the register is world-readable.
|
|
/// </summary>
|
|
public sealed record RegisterRecord(string Id, string Status, string? Reference);
|
|
|
|
/// <summary>The register statuses the RegisterRecord objecttype's schema allows (ADR-0027).</summary>
|
|
public static class RegisterRecordStatus
|
|
{
|
|
public const string Ingediend = "INGEDIEND";
|
|
|
|
public const string Ingeschreven = "INGESCHREVEN";
|
|
}
|