Upload feature (a): BFF endpoints + category config + tests
- Domain/Documents: server-owned category config per wizard + authoritative
type/size validation (DocumentRules).
- Data/DocumentStore: in-memory metadata store (no file bytes/PII) + audit log;
user delete (owner-scoped, 409 once linked), admin delete (role seam via
X-Admin header), link-on-submit, poll-by-localId status.
- Program.cs: GET /uploads/categories, POST /uploads (multipart, excluded from
OpenAPI — hand-written on FE), GET /uploads/status, DELETE /uploads/{id},
DELETE /admin/uploads/{id}. Submit links digital docs + records post-delivery.
- Contracts extended (DocumentRefDto on registratie/herregistratie submit);
regenerated NSwag client + swagger.json (drift check stays green).
- Tests: 16 new (endpoints + DocumentRules); dotnet test 44/44.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -46,11 +46,28 @@ public sealed record DuoLookupDto(IReadOnlyList<DuoDiplomaDto> Diplomas, ManualD
|
||||
|
||||
public sealed record IntakePolicyDto(int ScholingThreshold);
|
||||
|
||||
// --- Document upload contracts ---
|
||||
|
||||
public sealed record DocumentCategoryDto(
|
||||
string CategoryId, string Label, string Description, bool Required,
|
||||
IReadOnlyList<string> AcceptedTypes, int MaxSizeMb, bool Multiple, bool AllowPostDelivery);
|
||||
|
||||
public sealed record UploadCategoriesDto(IReadOnlyList<DocumentCategoryDto> Categories);
|
||||
|
||||
public sealed record UploadResponse(string DocumentId, string LocalId);
|
||||
|
||||
public sealed record UploadStatusItemDto(string LocalId, string Status, string? DocumentId);
|
||||
public sealed record UploadStatusDto(IReadOnlyList<UploadStatusItemDto> Results);
|
||||
|
||||
// Per-category delivery intent on submit: digital categories carry their DocumentId,
|
||||
// post-delivery categories carry Channel="post".
|
||||
public sealed record DocumentRefDto(string CategoryId, string Channel, string? DocumentId = null);
|
||||
|
||||
// Submit requests carry only the fields the server re-validates (UX-only fields
|
||||
// stay on the client). ponytail: a real submit would carry the full application.
|
||||
public sealed record RegistratieRequest(string DiplomaHerkomst);
|
||||
public sealed record RegistratieRequest(string DiplomaHerkomst, IReadOnlyList<DocumentRefDto>? Documents = null);
|
||||
public sealed record IntakeRequest(int Uren);
|
||||
public sealed record HerregistratieRequest(int Uren);
|
||||
public sealed record HerregistratieRequest(int Uren, IReadOnlyList<DocumentRefDto>? Documents = null);
|
||||
public sealed record ChangeRequestRequest(string Straat, string Postcode, string Woonplaats);
|
||||
|
||||
public sealed record ReferentieResponse(string Referentie);
|
||||
|
||||
Reference in New Issue
Block a user